Oncaphillis::niftyLib

niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc > Class Template Reference

#include <iexception_stream.h>

Collaboration diagram for niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc >:

Detailed Description

template<typename _Exception, typename _CharT, typename _Traits, typename _Alloc>
class niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc >

An offstring of std::basic_stringbuff which throws an exception whenever an std::ends gets inserted int the buffer.

Supposed to be used together with an instance of iexception_stream_t.

This is the underlying std::basic_streambuf used by the iexception_stream_t which comes in handy if we want to generate formated output strings to an exception.

Parameters:
_Exception The type of Exception expected to be thrown by this iexception_buf_t
_CharT Type of charactes to be inserted into this iexception_buf_t. This will be passed to its superclass template.
_Traits 
_Alloc 
See also:
iexception_t

Public Member Functions

 iexception_buf_t (stream_type *st, const std::string &s, std::ios_base::openmode m=std::ios_base::in|std::ios_base::out)
 Construct an iexception_buf_t from a string with the apropriate input output flags.
 iexception_buf_t (stream_type *st, std::ios_base::openmode m=std::ios_base::in|std::ios_base::out)
 Construct an empty iexception_buf_twith the apropriate input output flags.
virtual int sync () throw (exception)
 We overwrite the super::sync method in order to throw an exception with the text accumulated so far.

Protected Attributes

stream_typestream
 Backward pointer to the std::iostream we are linked to.

Constructor & Destructor Documentation

template<typename _Exception, typename _CharT, typename _Traits, typename _Alloc>
niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc >::iexception_buf_t ( stream_type st,
const std::string &  s,
std::ios_base::openmode  m = std::ios_base::in | std::ios_base::out 
) [inline, explicit]

Construct an iexception_buf_t from a string with the apropriate input output flags.

Parameters:
st stream_type; backward pointer to the std::iostream we will be attached to.
s std::string; filling the buffer with initial values. Will be passed to our superclass constructor.
m std::ios_base::openmode; flags determining the io mode. Will be passed to the superclass constructor.

References niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc >::stream.

template<typename _Exception, typename _CharT, typename _Traits, typename _Alloc>
niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc >::iexception_buf_t ( stream_type st,
std::ios_base::openmode  m = std::ios_base::in | std::ios_base::out 
) [inline, explicit]

Construct an empty iexception_buf_twith the apropriate input output flags.

References niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc >::stream.


Member Function Documentation

template<typename _Exception, typename _CharT, typename _Traits, typename _Alloc>
virtual int niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc >::sync (  )  throw (exception) [inline, virtual]

We overwrite the super::sync method in order to throw an exception with the text accumulated so far.

References niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc >::stream.


Field Documentation

template<typename _Exception, typename _CharT, typename _Traits, typename _Alloc>
stream_type* niftyLib::iexception_buf_t< _Exception, _CharT, _Traits, _Alloc >::stream [protected]


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

Generated by  doxygen
© 2008; Dr. Sebastian Kloska ( Oncaphillis )
Powered by: [?]