ldas-tools-framecpp 3.0.4
 
Loading...
Searching...
No Matches
FrameBuffer< BT > Class Template Referenceabstract

Buffer appropriate for caching frame data. More...

#include <FrameBuffer.hh>

Inheritance diagram for FrameBuffer< BT >:
Collaboration diagram for FrameBuffer< BT >:

Public Types

typedef FrameBuffer< BT > buffer_type
 Type of self.
 
typedef FrameBuffer< BT > buffer_type
 Type of self.
 
typedef BT element_type
 
typedef BT element_type
 
typedef BT::char_type char_type
 type representing a character in the stream.
 
typedef BT::char_type char_type
 type representing a character in the stream.
 
typedef BT::int_type int_type
 integer type
 
typedef BT::int_type int_type
 integer type
 
typedef BT::pos_type pos_type
 type appropriate for holding stream position information
 
typedef BT::pos_type pos_type
 type appropriate for holding stream position information
 
typedef BT::off_type off_type
 type apprpriate to hold stream offset request
 
typedef BT::off_type off_type
 type apprpriate to hold stream offset request
 
typedef INT_4U buffer_size_type
 
typedef INT_4U buffer_size_type
 

Public Member Functions

 FrameBuffer (std::ios::openmode Mode, bool ParentAutoDelete=true)
 constructor
 
 FrameBuffer (std::ios::openmode Mode, bool ParentAutoDelete=true)
 constructor
 
virtual void FilterAdd (FrameCPP::Common::StreamFilter *Filter)
 Adds a filter to the stream.
 
virtual void FilterAdd (FrameCPP::Common::StreamFilter *Filter)
 Adds a filter to the stream.
 
virtual void FilterRemove (FrameCPP::Common::StreamFilter *Filter)
 Removes a filter from the stream.
 
virtual void FilterRemove (FrameCPP::Common::StreamFilter *Filter)
 Removes a filter from the stream.
 
bool FilterInternally () const
 Returns true if filtering happens internally; false otherwise.
 
bool FilterInternally () const
 Returns true if filtering happens internally; false otherwise.
 
bool FilterInternally () const
 
FrameBuffer< BT > * close ()
 
FrameBuffer< BT > * close ()
 
FrameBuffer< std::filebuf > * close ()
 
FrameBuffer< LDASTools::AL::filebuf > * close ()
 
FrameBuffer< BT > * open (const std::string &Filename, std::ios::openmode Mode)
 
FrameBuffer< BT > * open (const std::string &Filename, std::ios::openmode Mode)
 
FrameBuffer< std::filebuf > * open (const std::string &Filename, std::ios::openmode Mode)
 
FrameBuffer< LDASTools::AL::filebuf > * open (const std::string &Filename, std::ios::openmode Mode)
 
void UseMemoryMappedIO (bool Value)
 
void UseMemoryMappedIO (bool Value)
 
void UseMemoryMappedIO (bool Value)
 
void UseMemoryMappedIO (bool Value)
 
bool AutoDelete () const
 
void AutoDelete (bool Value)
 
bool AutoDelete () const
 
void AutoDelete (bool Value)
 
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.
 
const std::string & BufferId () const
 Retrieve the string identification of the buffer.
 

Static Public Attributes

static const buffer_size_type M_BUFFER_SIZE_DEFAULT = 256 * 1024
 The default size for buffered input and output.
 
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.
 
typedef std::list< FrameCPP::Common::StreamFilter * > filters_type
 Type specifying the container holding the active filters.
 

Protected Member Functions

virtual FrameBuffer< BT > * setbuf (char_type *S, std::streamsize N)
 Routine to register if the caller has specified a buffer.
 
virtual FrameBuffer< BT > * setbuf (char_type *S, std::streamsize N)
 Routine to register if the caller has specified a buffer.
 
virtual void buffer ()
 Establish buffering.
 
virtual void buffer ()
 Establish buffering.
 
void bufferId (const std::string &Id)
 
void bufferId (const std::string &Id)
 

Protected Attributes

filters_type m_filters
 Container holding all active filters.
 

Private Member Functions

void set_user_buf (const char_type *S, std::streamsize N)
 Establish the size of the current user buffer.
 
void set_user_buf (const char_type *S, std::streamsize N)
 Establish the size of the current user buffer.
 
void mark (const char_type *Offset=(const char_type *) 0)
 Mark the current position in the buffer.
 
void mark (const char_type *Offset=(const char_type *) 0)
 Mark the current position in the buffer.
 
virtual void filter (const char_type *Begin, const char_type *End)
 Perform filtering operations on the stream.
 
virtual void filter (const char_type *Begin, const char_type *End)
 Perform filtering operations on the stream.
 

Private Attributes

bool m_buffer_user_supplied
 State of user supplied buffer.
 
boost::scoped_array< typename BT::char_type > m_buffer
 
std::streamsize m_buffer_size
 Size of the internal buffer.
 
const char_typem_user_buf
 Location of the user specified buffer.
 
std::streamsize m_user_buf_size
 Size of the user specified buffer.
 
INT_8U m_bytes_filtered
 
std::ios::openmode m_mode
 
bool m_auto_delete
 
std::string m_stream_id
 

Friends

class IStream
 
class OStream
 

Detailed Description

template<typename BT>
class FrameBuffer< BT >

Buffer appropriate for caching frame data.

Member Typedef Documentation

◆ buffer_size_type [1/2]

◆ buffer_size_type [2/2]

◆ buffer_type [1/2]

template<typename BT>
typedef FrameBuffer< BT > FrameCPP::Common::FrameBuffer< BT >::buffer_type

Type of self.

◆ buffer_type [2/2]

template<typename BT>
typedef FrameBuffer< BT > FrameCPP::Common::FrameBuffer< BT >::buffer_type

Type of self.

◆ char_type [1/2]

template<typename BT>
typedef BT::char_type FrameCPP::Common::FrameBuffer< BT >::char_type

type representing a character in the stream.

◆ char_type [2/2]

template<typename BT>
typedef BT::char_type FrameCPP::Common::FrameBuffer< BT >::char_type

type representing a character in the stream.

◆ element_type [1/2]

template<typename BT>
typedef BT FrameCPP::Common::FrameBuffer< BT >::element_type

◆ element_type [2/2]

template<typename BT>
typedef BT FrameCPP::Common::FrameBuffer< BT >::element_type

◆ filters_type [1/2]

Type specifying the container holding the active filters.

◆ filters_type [2/2]

Type specifying the container holding the active filters.

◆ int_type [1/2]

template<typename BT>
typedef BT::int_type FrameCPP::Common::FrameBuffer< BT >::int_type

integer type

◆ int_type [2/2]

template<typename BT>
typedef BT::int_type FrameCPP::Common::FrameBuffer< BT >::int_type

integer type

◆ off_type [1/2]

template<typename BT>
typedef BT::off_type FrameCPP::Common::FrameBuffer< BT >::off_type

type apprpriate to hold stream offset request

◆ off_type [2/2]

template<typename BT>
typedef BT::off_type FrameCPP::Common::FrameBuffer< BT >::off_type

type apprpriate to hold stream offset request

◆ pos_type [1/2]

template<typename BT>
typedef BT::pos_type FrameCPP::Common::FrameBuffer< BT >::pos_type

type appropriate for holding stream position information

◆ pos_type [2/2]

template<typename BT>
typedef BT::pos_type FrameCPP::Common::FrameBuffer< BT >::pos_type

type appropriate for holding stream position information

Constructor & Destructor Documentation

◆ FrameBuffer() [1/2]

template<typename BT>
FrameCPP::Common::FrameBuffer< BT >::FrameBuffer ( std::ios::openmode Mode,
bool ParentAutoDelete = true )

constructor

◆ FrameBuffer() [2/2]

template<typename BT>
FrameCPP::Common::FrameBuffer< BT >::FrameBuffer ( std::ios::openmode Mode,
bool ParentAutoDelete = true )

constructor

Member Function Documentation

◆ AutoDelete() [1/4]

bool FrameCPP::Common::FrameBufferInterface::AutoDelete ( ) const
inlineinherited

◆ AutoDelete() [2/4]

bool FrameCPP::Common::FrameBufferInterface::AutoDelete ( ) const
inherited

◆ AutoDelete() [3/4]

void FrameCPP::Common::FrameBufferInterface::AutoDelete ( bool Value)
inlineinherited

◆ AutoDelete() [4/4]

void FrameCPP::Common::FrameBufferInterface::AutoDelete ( bool Value)
inherited

◆ buffer() [1/2]

◆ buffer() [2/2]

◆ BufferId() [1/2]

const std::string & FrameCPP::Common::FrameBufferInterface::BufferId ( ) const
inlineinherited

Retrieve the string identification of the buffer.

Returns
An identifier associated with the open buffer.

◆ BufferId() [2/2]

const std::string & FrameCPP::Common::FrameBufferInterface::BufferId ( ) const
inherited

Retrieve the string identification of the buffer.

Returns
An identifier associated with the open buffer.

◆ bufferId() [1/2]

void FrameCPP::Common::FrameBufferInterface::bufferId ( const std::string & Id)
inlineprotectedinherited

◆ bufferId() [2/2]

void FrameCPP::Common::FrameBufferInterface::bufferId ( const std::string & Id)
protectedinherited

◆ close() [1/4]

template<typename BT>
FrameBuffer< BT > * FrameCPP::Common::FrameBuffer< BT >::close ( )

◆ close() [2/4]

FrameBuffer< std::filebuf > * FrameCPP::Common::FrameBuffer< std::filebuf >::close ( )

◆ close() [3/4]

FrameBuffer< LDASTools::AL::filebuf > * FrameCPP::Common::FrameBuffer< LDASTools::AL::filebuf >::close ( )

◆ close() [4/4]

template<typename BT>
FrameBuffer< BT > * FrameCPP::Common::FrameBuffer< BT >::close ( )

◆ filter() [1/4]

template<typename BT>
void FrameCPP::Common::FrameBuffer< BT >::filter ( const char_type * Begin,
const char_type * End )
inlineprivatevirtual

◆ filter() [2/4]

◆ filter() [3/4]

virtual void FrameCPP::Common::FrameBufferInterface::filter ( const char_type * Start,
const char_type * End )
pure virtualinherited

◆ filter() [4/4]

template<class DT>
void FrameCPP::Common::FrameBufferInterface::filter ( const DT & Data)
inlineinherited

◆ FilterAdd() [1/2]

◆ FilterAdd() [2/2]

◆ FilterBuffer() [1/2]

void FrameCPP::Common::FrameBufferInterface::FilterBuffer ( const char * Begin,
const char * End )
inherited

◆ FilterBuffer() [2/2]

void FrameCPP::Common::FrameBufferInterface::FilterBuffer ( const char * Begin,
const char * End )
inherited

◆ FilterInternally() [1/3]

◆ FilterInternally() [2/3]

◆ FilterInternally() [3/3]

◆ FilterRemove() [1/2]

◆ FilterRemove() [2/2]

◆ mark() [1/2]

template<typename BT>
void FrameCPP::Common::FrameBuffer< BT >::mark ( const char_type * Offset = (const char_type *) 0)
private

Mark the current position in the buffer.

◆ mark() [2/2]

template<typename BT>
void FrameCPP::Common::FrameBuffer< BT >::mark ( const char_type * Offset = (const char_type *) 0)
private

Mark the current position in the buffer.

◆ open() [1/4]

template<typename BT>
FrameBuffer< BT > * FrameCPP::Common::FrameBuffer< BT >::open ( const std::string & Filename,
std::ios::openmode Mode )

◆ open() [2/4]

FrameBuffer< std::filebuf > * FrameCPP::Common::FrameBuffer< std::filebuf >::open ( const std::string & Filename,
std::ios::openmode Mode )

◆ open() [3/4]

FrameBuffer< LDASTools::AL::filebuf > * FrameCPP::Common::FrameBuffer< LDASTools::AL::filebuf >::open ( const std::string & Filename,
std::ios::openmode Mode )

◆ open() [4/4]

template<typename BT>
FrameBuffer< BT > * FrameCPP::Common::FrameBuffer< BT >::open ( const std::string & Filename,
std::ios::openmode Mode )

◆ set_user_buf() [1/2]

template<typename BT>
void FrameCPP::Common::FrameBuffer< BT >::set_user_buf ( const char_type * S,
std::streamsize N )
inlineprivate

Establish the size of the current user buffer.

◆ set_user_buf() [2/2]

template<typename BT>
void FrameCPP::Common::FrameBuffer< BT >::set_user_buf ( const char_type * S,
std::streamsize N )
private

Establish the size of the current user buffer.

◆ setbuf() [1/2]

template<typename BT>
FrameBuffer< BT > * FrameCPP::Common::FrameBuffer< BT >::setbuf ( char_type * S,
std::streamsize N )
protectedvirtual

◆ setbuf() [2/2]

template<typename BT>
virtual FrameBuffer< BT > * FrameCPP::Common::FrameBuffer< BT >::setbuf ( char_type * S,
std::streamsize N )
protectedvirtual

◆ UseMemoryMappedIO() [1/4]

template<typename BT>
void FrameCPP::Common::FrameBuffer< BT >::UseMemoryMappedIO ( bool Value)

◆ UseMemoryMappedIO() [2/4]

void FrameCPP::Common::FrameBuffer< std::filebuf >::UseMemoryMappedIO ( bool Value)

◆ UseMemoryMappedIO() [3/4]

void FrameCPP::Common::FrameBuffer< LDASTools::AL::filebuf >::UseMemoryMappedIO ( bool Value)

◆ UseMemoryMappedIO() [4/4]

template<typename BT>
void FrameCPP::Common::FrameBuffer< BT >::UseMemoryMappedIO ( bool Value)

Friends And Related Symbol Documentation

◆ IStream

template<typename BT>
IStream
friend

◆ OStream

template<typename BT>
OStream
friend

Member Data Documentation

◆ m_auto_delete

bool FrameCPP::Common::FrameBufferInterface::m_auto_delete
privateinherited

◆ m_buffer

template<typename BT>
boost::scoped_array< typename BT::char_type > FrameCPP::Common::FrameBuffer< BT >::m_buffer
private

◆ m_buffer_size

template<typename BT>
std::streamsize FrameCPP::Common::FrameBuffer< BT >::m_buffer_size
private

Size of the internal buffer.

◆ M_BUFFER_SIZE_DEFAULT

static const buffer_size_type FrameCPP::Common::FrameBufferInterface::M_BUFFER_SIZE_DEFAULT = 256 * 1024
staticinherited

The default size for buffered input and output.

◆ M_BUFFER_SIZE_SYSTEM

static const buffer_size_type FrameCPP::Common::FrameBufferInterface::M_BUFFER_SIZE_SYSTEM
staticinherited
Initial value:
=
INT_4U buffer_size_type
Definition FrameBufferInterface.hh:163

◆ m_buffer_user_supplied

template<typename BT>
bool FrameCPP::Common::FrameBuffer< BT >::m_buffer_user_supplied
private

State of user supplied buffer.

◆ m_bytes_filtered

template<typename BT>
INT_8U FrameCPP::Common::FrameBuffer< BT >::m_bytes_filtered
private

◆ m_filters

filters_type FrameCPP::Common::FrameBufferInterface::m_filters
protectedinherited

Container holding all active filters.

◆ m_mode

template<typename BT>
std::ios::openmode FrameCPP::Common::FrameBuffer< BT >::m_mode
private

◆ m_stream_id

std::string FrameCPP::Common::FrameBufferInterface::m_stream_id
privateinherited

◆ m_user_buf

template<typename BT>
const char_type * FrameCPP::Common::FrameBuffer< BT >::m_user_buf
private

Location of the user specified buffer.

◆ m_user_buf_size

template<typename BT>
std::streamsize FrameCPP::Common::FrameBuffer< BT >::m_user_buf_size
private

Size of the user specified buffer.


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