ldas-tools-framecpp
2.7.0
|
Buffer appropriate for caching frame data. More...
#include <MemoryBuffer.hh>
Classes | |
class | BufferSeeder |
Seed an input buffer for MemoryBufferT from buffers. More... | |
class | Seeder |
Seed an input buffer for MemoryBufferT. More... | |
Public Types | |
typedef BT | buffer_type |
typedef buffer_type::char_type | char_type |
typedef BT | buffer_type |
typedef buffer_type::char_type | char_type |
typedef INT_4U | buffer_size_type |
typedef INT_4U | buffer_size_type |
Public Member Functions | |
MemoryBufferT (std::ios::openmode Mode, const BT &Source, bool ParentAutoDelete=true) | |
Default constructor. More... | |
MemoryBufferT (std::ios::openmode Mode, bool ParentAutoDelete=true) | |
Default constructor. More... | |
MemoryBufferT (Seeder &Seed, bool ParentAutoDelete=true) | |
Default constructor. More... | |
virtual | ~MemoryBufferT () |
Destructor. More... | |
bool | FilterInternally () const |
Returns true if filtering happens internally; false otherwise. More... | |
std::string | str () |
void | str (const std::string &S) |
MemoryBufferT (std::ios::openmode Mode, const BT &Source, bool ParentAutoDelete=true) | |
Default constructor. More... | |
MemoryBufferT (std::ios::openmode Mode, bool ParentAutoDelete=true) | |
Default constructor. More... | |
MemoryBufferT (Seeder &Seed, bool ParentAutoDelete=true) | |
Default constructor. More... | |
virtual | ~MemoryBufferT () |
Destructor. More... | |
bool | FilterInternally () const |
Returns true if filtering happens internally; false otherwise. More... | |
std::string | str () |
void | str (const std::string &S) |
bool | AutoDelete () const |
void | AutoDelete (bool Value) |
bool | AutoDelete () const |
void | AutoDelete (bool Value) |
virtual void | FilterAdd (FrameCPP::Common::StreamFilter *Filter) |
Adds a filter to the stream. More... | |
virtual void | FilterAdd (FrameCPP::Common::StreamFilter *Filter) |
Adds a filter to the stream. More... | |
virtual void | FilterRemove (FrameCPP::Common::StreamFilter *Filter) |
Removes a filter from the stream. More... | |
virtual void | FilterRemove (FrameCPP::Common::StreamFilter *Filter) |
Removes a filter from the stream. More... | |
template<class DT > | |
void | filter (const DT &Data) |
virtual void | filter (const char_type *Start, const char_type *End)=0 |
void | FilterBuffer (const char *Begin, const char *End) |
void | FilterBuffer (const char *Begin, const char *End) |
const std::string & | BufferId () const |
Retrieve the string identification of the buffer. More... | |
const std::string & | BufferId () const |
Retrieve the string identification of the buffer. More... | |
Static Public Attributes | |
static const buffer_size_type | M_BUFFER_SIZE_DEFAULT = 256 * 1024 |
The default size for buffered input and output. More... | |
static const buffer_size_type | M_BUFFER_SIZE_SYSTEM |
Protected Types | |
typedef std::list< FrameCPP::Common::StreamFilter * > | filters_type |
Type specifying the container holding the active filters. More... | |
typedef std::list< FrameCPP::Common::StreamFilter * > | filters_type |
Type specifying the container holding the active filters. More... | |
Protected Member Functions | |
virtual MemoryBufferT * | setbuf (char_type *S, std::streamsize N) |
Routine to register if the caller has specified a buffer. More... | |
virtual void | buffer () |
Initialization of the buffer. More... | |
virtual MemoryBufferT * | setbuf (char_type *S, std::streamsize N) |
Routine to register if the caller has specified a buffer. More... | |
virtual void | buffer () |
Initialization of the buffer. More... | |
void | bufferId (const std::string &Id) |
void | bufferId (const std::string &Id) |
Protected Attributes | |
filters_type | m_filters |
Container holding all active filters. More... | |
Private Member Functions | |
virtual void | filter (const char_type *Begin, const char_type *End) |
Perform filtering operations on the stream. More... | |
virtual void | filter (const char_type *Begin, const char_type *End) |
Perform filtering operations on the stream. More... | |
Private Attributes | |
boost::scoped_array< char_type > | buffer_cache |
bool | buffer_user_supplied |
State of user supplied buffer. More... | |
bool | m_auto_delete |
std::string | m_stream_id |
Friends | |
class | IStream |
class | OStream |
Buffer appropriate for caching frame data.
If the buffer is for input, then the buffer needs to be initialized with the contents. The initialization needs to be done as via the call to the str( ) method before the buffer is associated with an IFrameStream object.
BT | Internal storage type to hold the buffer contents. |
|
inherited |
|
inherited |
typedef BT FrameCPP::Common::MemoryBufferT< BT >::buffer_type |
typedef BT FrameCPP::Common::MemoryBufferT< BT >::buffer_type |
typedef buffer_type::char_type FrameCPP::Common::MemoryBufferT< BT >::char_type |
typedef buffer_type::char_type FrameCPP::Common::MemoryBufferT< BT >::char_type |
|
protectedinherited |
Type specifying the container holding the active filters.
|
protectedinherited |
Type specifying the container holding the active filters.
FrameCPP::Common::MemoryBufferT< BT >::MemoryBufferT | ( | std::ios::openmode | Mode, |
const BT & | Source, | ||
bool | ParentAutoDelete = true |
||
) |
Default constructor.
[in] | Seed | Method use for input buffers to move data into the new instance. |
[in] | ParentAutoDelete | True if dynamic memory associated with the temporary buffer should be release once this object goes out of scope. |
FrameCPP::Common::MemoryBufferT< BT >::MemoryBufferT | ( | std::ios::openmode | Mode, |
bool | ParentAutoDelete = true |
||
) |
Default constructor.
[in] | Mode | Specify the I/O mode of the buffer. |
[in] | ParentAutoDelete | True if dynamic memory associated with the temporary buffer should be release once this object goes out of scope. |
The default constructor will initialize all the parts used in the general case.
FrameCPP::Common::MemoryBufferT< BT >::MemoryBufferT | ( | Seeder & | Seed, |
bool | ParentAutoDelete = true |
||
) |
Default constructor.
[in] | Seed | Method use for input buffers to move data into the new instance. |
[in] | ParentAutoDelete | True if dynamic memory associated with the temporary buffer should be release once this object goes out of scope. |
The default constructor will initialize all the parts used in the general case.
|
virtual |
Destructor.
Be careful to release all the resources that were created for this object.
FrameCPP::Common::MemoryBufferT< BT >::MemoryBufferT | ( | std::ios::openmode | Mode, |
const BT & | Source, | ||
bool | ParentAutoDelete = true |
||
) |
Default constructor.
[in] | Seed | Method use for input buffers to move data into the new instance. |
[in] | ParentAutoDelete | True if dynamic memory associated with the temporary buffer should be release once this object goes out of scope. |
FrameCPP::Common::MemoryBufferT< BT >::MemoryBufferT | ( | std::ios::openmode | Mode, |
bool | ParentAutoDelete = true |
||
) |
Default constructor.
[in] | Mode | Specify the I/O mode of the buffer. |
[in] | ParentAutoDelete | True if dynamic memory associated with the temporary buffer should be release once this object goes out of scope. |
FrameCPP::Common::MemoryBufferT< BT >::MemoryBufferT | ( | Seeder & | Seed, |
bool | ParentAutoDelete = true |
||
) |
Default constructor.
[in] | Seed | Method use for input buffers to move data into the new instance. |
[in] | ParentAutoDelete | True if dynamic memory associated with the temporary buffer should be release once this object goes out of scope. |
|
virtual |
Destructor.
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
protectedvirtual |
Initialization of the buffer.
Implements FrameCPP::Common::FrameBufferInterface.
|
protectedvirtual |
Initialization of the buffer.
Implements FrameCPP::Common::FrameBufferInterface.
|
inlineinherited |
Retrieve the string identification of the buffer.
|
inherited |
Retrieve the string identification of the buffer.
|
inlineprotectedinherited |
|
protectedinherited |
|
privatevirtual |
Perform filtering operations on the stream.
|
privatevirtual |
Perform filtering operations on the stream.
|
pure virtualinherited |
Implemented in FrameCPP::Common::MemoryBufferT< std::stringbuf >.
|
inlineinherited |
|
virtualinherited |
Adds a filter to the stream.
[in] | Filter | Filter function to add to the stream |
Reimplemented in FrameCPP::Common::FrameBuffer< BT >, and FrameCPP::Common::FrameBuffer< BT >.
|
virtualinherited |
Adds a filter to the stream.
[in] | Filter | Filter function to add to the stream |
Reimplemented in FrameCPP::Common::FrameBuffer< BT >, and FrameCPP::Common::FrameBuffer< BT >.
|
inherited |
|
inherited |
|
virtual |
Returns true if filtering happens internally; false otherwise.
Filtering currently is not optimized at the this layer so this method will always return false.
Implements FrameCPP::Common::FrameBufferInterface.
|
virtual |
Returns true if filtering happens internally; false otherwise.
Implements FrameCPP::Common::FrameBufferInterface.
|
virtualinherited |
Removes a filter from the stream.
[in] | Filter | Filter function to remove from the stream |
Reimplemented in FrameCPP::Common::FrameBuffer< BT >, and FrameCPP::Common::FrameBuffer< BT >.
|
virtualinherited |
Removes a filter from the stream.
[in] | Filter | Filter function to remove from the stream |
Reimplemented in FrameCPP::Common::FrameBuffer< BT >, and FrameCPP::Common::FrameBuffer< BT >.
|
protectedvirtual |
Routine to register if the caller has specified a buffer.
|
protectedvirtual |
Routine to register if the caller has specified a buffer.
std::string FrameCPP::Common::MemoryBufferT< BT >::str |
std::string FrameCPP::Common::MemoryBufferT< BT >::str | ( | ) |
void FrameCPP::Common::MemoryBufferT< BT >::str | ( | const std::string & | S | ) |
void FrameCPP::Common::MemoryBufferT< BT >::str | ( | const std::string & | S | ) |
|
friend |
|
friend |
|
private |
|
private |
State of user supplied buffer.
|
privateinherited |
|
staticinherited |
The default size for buffered input and output.
|
staticinherited |
|
protectedinherited |
Container holding all active filters.
|
privateinherited |