rpa::augm_selector< DerivStrmBuf > Struct Template Reference

#include <row_buffer.h>

List of all members.

Public Types

typedef effective_streambuf<
DerivStrmBuf > 
deref_t
typedef deref_t::instant instant_t
typedef deref_t::hierarc hierarc_t
typedef hierarc_t::char_type char_type
 These two types must be the same for both template parameters.
typedef hierarc_t::traits_type traits_type

Public Member Functions

typedef typeof (cvt((const hierarc_t *) NULL)) augmented_type
 Given the base class, it selects the augmented streambuf to use.

Static Public Member Functions

static augm_basic_stringbuf<
instant_t
cvt (const std::basic_stringbuf< char_type, traits_type > *)
static augm_basic_filebuf<
instant_t
cvt (const std::basic_filebuf< char_type, traits_type > *)
static augm_basic_streambuf<
instant_t
cvt (const std::basic_streambuf< char_type, traits_type > *)


Detailed Description

template<class DerivStrmBuf>
struct rpa::augm_selector< DerivStrmBuf >

This gives at compile-time, the augmented streambuf out of the base class of a streambuf type, for several base classes belonging to STL or GCC extensions. Augmented stream buffers have some methods, stream buffers do not have. The goal of getting the base class is :


Member Typedef Documentation

template<class DerivStrmBuf>
typedef hierarc_t::char_type rpa::augm_selector< DerivStrmBuf >::char_type

These two types must be the same for both template parameters.

template<class DerivStrmBuf>
typedef effective_streambuf< DerivStrmBuf > rpa::augm_selector< DerivStrmBuf >::deref_t

template<class DerivStrmBuf>
typedef deref_t::hierarc rpa::augm_selector< DerivStrmBuf >::hierarc_t

template<class DerivStrmBuf>
typedef deref_t::instant rpa::augm_selector< DerivStrmBuf >::instant_t

template<class DerivStrmBuf>
typedef hierarc_t::traits_type rpa::augm_selector< DerivStrmBuf >::traits_type


Member Function Documentation

template<class DerivStrmBuf>
static augm_basic_streambuf< instant_t > rpa::augm_selector< DerivStrmBuf >::cvt ( const std::basic_streambuf< char_type, traits_type > *   )  [static]

If the streambuffer given as a template argument to row_buffer, does not derive from one of the aforementioned base classes, but derives from a basic_streambuf (Which is mandatory), then there is a general-purpose 'augmented streambuf', 'augm_basic_streambuf', which always works, but has no performance optimization.

template<class DerivStrmBuf>
static augm_basic_filebuf< instant_t > rpa::augm_selector< DerivStrmBuf >::cvt ( const std::basic_filebuf< char_type, traits_type > *   )  [static]

This means that, if the streambuffer given as a template argument to row_buffer, is a derived class of std::basic_filebuf, then row_buffer wraps the streambuffer in a 'augm_basic_filebuf' which, as a derived class, has the needed extra methods : a_clear, a_empty and rmi_dump.

template<class DerivStrmBuf>
static augm_basic_stringbuf< instant_t > rpa::augm_selector< DerivStrmBuf >::cvt ( const std::basic_stringbuf< char_type, traits_type > *   )  [static]

PROBLEM : The allocator of the string is not given !!!! It can only use the default memory allocator.

template<class DerivStrmBuf>
typedef rpa::augm_selector< DerivStrmBuf >::typeof ( cvt((const hierarc_t *) NULL)   ) 

Given the base class, it selects the augmented streambuf to use.


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