cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Types | Protected Member Functions | List of all members
osaThreadedLogFileStreambuf< _element, _trait > Class Template Reference

#include <osaThreadedLogFile.h>

Inheritance diagram for osaThreadedLogFileStreambuf< _element, _trait >:

Public Types

typedef std::basic_streambuf
< _element, _trait > 
BaseClassType
 
typedef std::basic_streambuf
< _element, _trait > 
ChannelType
 
typedef std::pair< osaThreadId,
ChannelType * > 
ElementType
 
typedef std::list< ElementTypeChannelContainerType
 
typedef
ChannelContainerType::iterator 
iterator
 
typedef
ChannelContainerType::const_iterator 
const_iterator
 

Public Member Functions

 osaThreadedLogFileStreambuf (const std::string &filePrefix)
 
ChannelTypeAddChannelForThread (const osaThreadId &threadId)
 

Protected Types

typedef std::basic_streambuf
< _element, _trait >::int_type 
int_type
 

Protected Member Functions

virtual int sync ()
 
virtual std::streamsize xsputn (const _element *s, std::streamsize n)
 
virtual int_type overflow (int_type c=_trait::eof())
 

Detailed Description

template<class _element, class _trait = std::char_traits<_element>>
class osaThreadedLogFileStreambuf< _element, _trait >

See Also
C++ manual on basic_ostream and basic_streambuf, cmnLogger

Member Typedef Documentation

template<class _element, class _trait = std::char_traits<_element>>
typedef std::basic_streambuf<_element, _trait> osaThreadedLogFileStreambuf< _element, _trait >::BaseClassType
template<class _element, class _trait = std::char_traits<_element>>
typedef std::list<ElementType> osaThreadedLogFileStreambuf< _element, _trait >::ChannelContainerType

Type of internal data structure storing the channels.

template<class _element, class _trait = std::char_traits<_element>>
typedef std::basic_streambuf<_element, _trait> osaThreadedLogFileStreambuf< _element, _trait >::ChannelType
template<class _element, class _trait = std::char_traits<_element>>
typedef ChannelContainerType::const_iterator osaThreadedLogFileStreambuf< _element, _trait >::const_iterator
template<class _element, class _trait = std::char_traits<_element>>
typedef std::pair<osaThreadId, ChannelType *> osaThreadedLogFileStreambuf< _element, _trait >::ElementType
template<class _element, class _trait = std::char_traits<_element>>
typedef std::basic_streambuf<_element, _trait>::int_type osaThreadedLogFileStreambuf< _element, _trait >::int_type
protected
template<class _element, class _trait = std::char_traits<_element>>
typedef ChannelContainerType::iterator osaThreadedLogFileStreambuf< _element, _trait >::iterator

Constructor & Destructor Documentation

template<class _element, class _trait = std::char_traits<_element>>
osaThreadedLogFileStreambuf< _element, _trait >::osaThreadedLogFileStreambuf ( const std::string &  filePrefix)
inline

Create the stream buf with the file name prefix. Does nothing else than storing the file name prefix.

Member Function Documentation

template<class _element , class _trait >
osaThreadedLogFileStreambuf< _element, _trait >::ChannelType * osaThreadedLogFileStreambuf< _element, _trait >::AddChannelForThread ( const osaThreadId threadId)

Create a file for the current thread and add its buffer to the list of channels.

template<class _element , class _trait >
osaThreadedLogFileStreambuf< _element, _trait >::int_type osaThreadedLogFileStreambuf< _element, _trait >::overflow ( int_type  c = _trait::eof())
protectedvirtual

Override the basic_streambuf overflow. overflow() is called when sputc() discovers it does not have space in the storage buffer. In our case, it's always. See more on it in the basic_streambuf documentation.

template<class _element , class _trait >
int osaThreadedLogFileStreambuf< _element, _trait >::sync ( void  )
protectedvirtual

Override the basic_streambuf sync for the current file output.

template<class _element, class _trait >
std::streamsize osaThreadedLogFileStreambuf< _element, _trait >::xsputn ( const _element *  s,
std::streamsize  n 
)
protectedvirtual

Override the basic_streambuf xsputn for the current file output.


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