cisst-saw
|
#include <mtsLODMultiplexerStreambuf.h>
Public Types | |
typedef cmnLODMultiplexerStreambuf < char > | BaseType |
typedef std::char_traits< char > | TraitType |
typedef cmnCallbackStreambuf < char > | PerThreadChannelType |
typedef BaseType::int_type | IntType |
![]() | |
typedef cmnLODMultiplexerStreambuf < char, std::char_traits< char > > | ThisType |
typedef std::basic_streambuf < char, std::char_traits< char > > | BaseClassType |
typedef std::basic_streambuf < char, std::char_traits< char > > | ChannelType |
typedef std::pair< ChannelType *, cmnLogMask > | ElementType |
typedef std::list< ElementType > | ChannelContainerType |
typedef ChannelContainerType::iterator | IteratorType |
typedef ChannelContainerType::const_iterator | ConstIteratorType |
typedef std::list< ThisType * > | MultiplexerContainerType |
typedef MultiplexerContainerType::iterator | MultiplexerIteratorType |
typedef MultiplexerContainerType::const_iterator | MultiplexerConstIteratorType |
Public Member Functions | |
mtsLODMultiplexerStreambuf () | |
~mtsLODMultiplexerStreambuf () | |
![]() | |
cmnLODMultiplexerStreambuf (std::ofstream &fileStream) | |
cmnLODMultiplexerStreambuf () | |
bool | AddChannel (ChannelType *channel, cmnLogMask mask) |
bool | AddChannel (std::ostream &outstream, cmnLogMask mask) |
bool | AddMultiplexer (ThisType *multiplexer) |
void | RemoveChannel (ChannelType *channel) |
void | RemoveChannel (std::ostream &outstream) |
void | RemoveMultiplexer (ThisType *multiplexer) |
void | RemoveAllChannels (void) |
bool | SetChannelMask (ChannelType *channel, cmnLogMask mask) |
bool | GetChannelMask (const ChannelType *channel, cmnLogMask &mask) const |
const ChannelContainerType & | GetChannels (void) const |
Protected Types | |
typedef std::map< osaThreadId, PerThreadChannelType *, osaThreadId > | PerThreadChannelMapType |
typedef std::pair < PerThreadChannelMapType::iterator, bool > | PerThreadChannelMapPairType |
![]() | |
typedef std::basic_streambuf < char, std::char_traits< char > >::int_type | int_type |
Protected Member Functions | |
std::streamsize | xsputn (const char *s, std::streamsize n, cmnLogLevel level) |
std::streamsize | xsputn (const char *s, std::streamsize n) |
IntType | overflow (IntType c, cmnLogLevel level) |
IntType | overflow (IntType c=mtsLODMultiplexerStreambuf::TraitType::eof()) |
int | sync (void) |
PerThreadChannelType * | GetThreadChannel (const osaThreadId &threadId) |
![]() | |
IteratorType | FindChannel (const ChannelType *channel) |
ConstIteratorType | FindChannel (const ChannelType *channel) const |
MultiplexerIteratorType | FindMultiplexer (const ThisType *multiplexer) |
MultiplexerConstIteratorType | FindMultiplexer (const ThisType *multiplexer) const |
Protected Attributes | |
PerThreadChannelMapType | PerThreadChannelMap |
osaMutex | PerThreadChannelMapSync |
![]() | |
ChannelContainerType | Channels |
MultiplexerContainerType | Multiplexers |
|
protected |
|
protected |
typedef std::char_traits<char> mtsLODMultiplexerStreambuf::TraitType |
mtsLODMultiplexerStreambuf::mtsLODMultiplexerStreambuf | ( | ) |
mtsLODMultiplexerStreambuf::~mtsLODMultiplexerStreambuf | ( | ) |
|
protected |
Get (per-thread) log channel for a thread given. If thread id was not registered yet, create new one.
|
protectedvirtual |
Multiplexed and LODed version of basic_streambuf overflow for multiplexing. 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.
Reimplemented from cmnLODMultiplexerStreambuf< char >.
|
protectedvirtual |
Override the basic_streambuf overflow for multiplexing. 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.
Reimplemented from cmnLODMultiplexerStreambuf< char >.
|
protectedvirtual |
Override the basic_streambuf sync for multiplexing. Note that in this one we sync() all the channels, regardless of the LOD.
Reimplemented from cmnLODMultiplexerStreambuf< char >.
|
protectedvirtual |
Multiplexed and LODed version of basic_streambuf xsputn.
Reimplemented from cmnLODMultiplexerStreambuf< char >.
|
protectedvirtual |
Override the basic_streambuf xsputn to do the multiplexing
Reimplemented from cmnLODMultiplexerStreambuf< char >.
|
protected |
|
protected |
To access internal container thread-safely