Project
Loading...
Searching...
No Matches
o2::framework::FairMQOutputStream Class Reference

#include <FairMQResizableBuffer.h>

Inherits OutputStream.

Public Member Functions

 FairMQOutputStream (const std::shared_ptr< ResizableBuffer > &buffer)
 
 ~FairMQOutputStream () override=default
 
Status Close () override
 Close the stream, preserving the buffer (retrieve it with Finish()).
 
bool closed () const override
 
Result< int64_t > Tell () const override
 
Status Write (const void *data, int64_t nbytes) override
 
Result< std::shared_ptr< Buffer > > Finish ()
 Close the stream and return the buffer.
 
Status Reset (int64_t initial_capacity=1024, MemoryPool *pool=default_memory_pool())
 Initialize state of OutputStream with newly allocated memory and set position to 0.
 
int64_t capacity () const
 

Static Public Member Functions

static Result< std::shared_ptr< FairMQOutputStream > > Create (int64_t initial_capacity=4096, MemoryPool *pool=default_memory_pool())
 Create in-memory output stream with indicated capacity using a memory pool.
 

Detailed Description

Definition at line 30 of file FairMQResizableBuffer.h.

Constructor & Destructor Documentation

◆ FairMQOutputStream()

o2::framework::FairMQOutputStream::FairMQOutputStream ( const std::shared_ptr< ResizableBuffer > &  buffer)
explicit

Definition at line 31 of file FairMQResizableBuffer.cxx.

◆ ~FairMQOutputStream()

o2::framework::FairMQOutputStream::~FairMQOutputStream ( )
overridedefault

Member Function Documentation

◆ capacity()

int64_t o2::framework::FairMQOutputStream::capacity ( ) const
inline

Definition at line 71 of file FairMQResizableBuffer.h.

◆ Close()

Status o2::framework::FairMQOutputStream::Close ( )
override

Close the stream, preserving the buffer (retrieve it with Finish()).

Definition at line 57 of file FairMQResizableBuffer.cxx.

◆ closed()

bool o2::framework::FairMQOutputStream::closed ( ) const
override

Definition at line 68 of file FairMQResizableBuffer.cxx.

◆ Create()

Result< std::shared_ptr< FairMQOutputStream > > o2::framework::FairMQOutputStream::Create ( int64_t  initial_capacity = 4096,
MemoryPool *  pool = default_memory_pool() 
)
static

Create in-memory output stream with indicated capacity using a memory pool.

Parameters
[in]initial_capacitythe initial allocated internal capacity of the OutputStream
[in,out]poola MemoryPool to use for allocations
Returns
the created stream

Definition at line 38 of file FairMQResizableBuffer.cxx.

◆ Finish()

Result< std::shared_ptr< Buffer > > o2::framework::FairMQOutputStream::Finish ( )

Close the stream and return the buffer.

Definition at line 70 of file FairMQResizableBuffer.cxx.

◆ Reset()

Status o2::framework::FairMQOutputStream::Reset ( int64_t  initial_capacity = 1024,
MemoryPool *  pool = default_memory_pool() 
)

Initialize state of OutputStream with newly allocated memory and set position to 0.

Parameters
[in]initial_capacitythe starting allocated capacity
[in,out]poolthe memory pool to use for allocations
Returns
Status

Definition at line 47 of file FairMQResizableBuffer.cxx.

◆ Tell()

Result< int64_t > o2::framework::FairMQOutputStream::Tell ( ) const
override

Definition at line 78 of file FairMQResizableBuffer.cxx.

◆ Write()

Status o2::framework::FairMQOutputStream::Write ( const void data,
int64_t  nbytes 
)
override

Definition at line 80 of file FairMQResizableBuffer.cxx.


The documentation for this class was generated from the following files: