rpa::obuf_storage< Buffer, IterBuf >::internal_buffer Class Reference

#include <common.h>

List of all members.

Public Types

typedef obuf_storage::buffer_type physical_buf_t
 This is the type of the physical buffer.
typedef container_traits<
physical_buf_t
cont_trts
 Describes the properties of the buffer.
typedef cont_trts::const_iterator const_iterator
typedef cont_trts::iterator iterator
typedef cont_trts::value_type value_type

Public Member Functions

 internal_buffer ()
 internal_buffer (const internal_buffer &aBuf)
 internal_buffer (physical_buf_t &aBuf)
 Very fast because only reference copies.
physical_buf_tphys_buf (void)
 This class can behave as a physical_buf_t due to this converter.
const physical_buf_tphys_buf (void) const
const physical_buf_tphys_buf_const (void) const
const_iterator begin (void) const
 For read-only access.
const_iterator end (void) const
void push_back (const value_type &aVT)
void resize (size_t aSz)
 Ensures that the buffer is big enough. It never shrinks a buffer.
bool empty (void) const
 Tests whether the buffer is empty.
void clear (void)

Private Member Functions

void check (void) const
 Runtime check for debug version.
internal_bufferoperator= (const internal_buffer &aIB)
 Assignation is forbidden : Too dangerous because of the buffer pointer.

Private Attributes

physical_buf_t_buf
 As 'IterBuf' is not void, we use a pointer to the buffer given by IterBuf.


Detailed Description

template<class Buffer, class IterBuf>
class rpa::obuf_storage< Buffer, IterBuf >::internal_buffer

Contains many type names which make that it has the same container properties as the physical buffer it points to.


Member Typedef Documentation

template<class Buffer, class IterBuf>
typedef cont_trts::const_iterator rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::const_iterator

template<class Buffer, class IterBuf>
typedef container_traits<physical_buf_t> rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::cont_trts

Describes the properties of the buffer.

template<class Buffer, class IterBuf>
typedef cont_trts::iterator rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::iterator

template<class Buffer, class IterBuf>
typedef obuf_storage::buffer_type rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::physical_buf_t

This is the type of the physical buffer.

template<class Buffer, class IterBuf>
typedef cont_trts::value_type rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::value_type


Constructor & Destructor Documentation

template<class Buffer, class IterBuf>
rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::internal_buffer (  )  [inline]

Simple default constructor. The pointer is intentionnaly made invalid for helping the detection of an error. For this reason only.

template<class Buffer, class IterBuf>
rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::internal_buffer ( const internal_buffer aBuf  )  [inline]

Plain copy constructor. Note the pointer is simply copied, because the object comes from 'outside'.

template<class Buffer, class IterBuf>
rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::internal_buffer ( physical_buf_t aBuf  )  [inline]

Very fast because only reference copies.


Member Function Documentation

template<class Buffer, class IterBuf>
const_iterator rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::begin ( void   )  const [inline]

For read-only access.

template<class Buffer, class IterBuf>
void rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::check ( void   )  const [inline, private]

Runtime check for debug version.

template<class Buffer, class IterBuf>
void rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::clear ( void   )  [inline]

The buffer is cleared before each algorithm execution. This is necessary, because obuf_iterators with infinite-size output buffers, write their output into a back_inserter. So, without a 'clear', we would keep the data of the last previous run.

template<class Buffer, class IterBuf>
bool rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::empty ( void   )  const [inline]

Tests whether the buffer is empty.

template<class Buffer, class IterBuf>
const_iterator rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::end ( void   )  const [inline]

template<class Buffer, class IterBuf>
internal_buffer& rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::operator= ( const internal_buffer aIB  )  [private]

Assignation is forbidden : Too dangerous because of the buffer pointer.

template<class Buffer, class IterBuf>
const physical_buf_t& rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::phys_buf ( void   )  const [inline]

The compiler can choose the const or non-const version. This is specially done for flush_all and flush_itr.

template<class Buffer, class IterBuf>
physical_buf_t& rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::phys_buf ( void   )  [inline]

This class can behave as a physical_buf_t due to this converter.

template<class Buffer, class IterBuf>
const physical_buf_t& rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::phys_buf_const ( void   )  const [inline]

This class can behave as a physical_buf_t due to this converter. Here, we enforce the constness, without discussion.

template<class Buffer, class IterBuf>
void rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::push_back ( const value_type aVT  )  [inline]

If the buffer has an unlimited size. We can safely use 'push_back' of the container, because it cannot be a fixed-size C-style array.

template<class Buffer, class IterBuf>
void rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::resize ( size_t  aSz  )  [inline]

Ensures that the buffer is big enough. It never shrinks a buffer.


Member Data Documentation

template<class Buffer, class IterBuf>
physical_buf_t* rpa::obuf_storage< Buffer, IterBuf >::internal_buffer::_buf [private]

As 'IterBuf' is not void, we use a pointer to the buffer given by IterBuf.


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:35 2007 for rpa by  doxygen 1.4.7