cisst-saw
Loading...
Searching...
No Matches
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

◆ BaseClassType

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

◆ ChannelContainerType

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.

◆ ChannelType

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

◆ const_iterator

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

◆ ElementType

template<class _element, class _trait = std::char_traits<_element>>
typedef std::pair<osaThreadId, ChannelType *> osaThreadedLogFileStreambuf< _element, _trait >::ElementType

◆ int_type

template<class _element, class _trait = std::char_traits<_element>>
typedef std::basic_streambuf<_element,_trait>::int_type osaThreadedLogFileStreambuf< _element, _trait >::int_type
protected

◆ iterator

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

Constructor & Destructor Documentation

◆ osaThreadedLogFileStreambuf()

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

◆ AddChannelForThread()

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.

◆ overflow()

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.

◆ sync()

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

Override the basic_streambuf sync for the current file output.

◆ xsputn()

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: