#include <logserverstreambuf.h>
Public Member Functions | |
LogServerStreamBuf (unsigned int size) | |
virtual | ~LogServerStreamBuf () |
void | AddStream (std::ostream *stream, unsigned int mask) |
bool | RemoveStream (const std::ostream *stream) |
bool | SetPriorityMask (const std::ostream *stream, unsigned int mask) |
unsigned int | GetPriorityMask (const std::ostream *stream) const |
void | SetCurrentPriority (unsigned int priority) |
Protected Types | |
typedef std::char_traits< char > | TTraitsType |
typedef traits_type::int_type | TIntType |
Protected Member Functions | |
TIntType | overflow (TIntType c) |
int | sync () |
Private Types | |
typedef std::pair< unsigned int, std::ostream * > | TMaskStream |
typedef std::vector< TMaskStream > | TMaskStreams |
Private Member Functions | |
LogServerStreamBuf (const LogServerStreamBuf &obj) | |
LogServerStreamBuf & | operator= (const LogServerStreamBuf &obj) |
void | Forward (const char *buffer, unsigned int length) |
multiplex to all registered streams | |
void | PutBuffer () |
stream out complete internal buffer | |
void | PutChar (TIntType chr) |
stream out a single character | |
Private Attributes | |
unsigned int | mSize |
size of the internal buffer to use | |
unsigned int | mCurrentPriority |
TMaskStreams | mStreams |
Classes | |
class | MaskStreamEQ |
A predicate to compare streams in a MaskStream list (or vector). More... |
Definition at line 55 of file logserverstreambuf.h.
|
Definition at line 61 of file logserverstreambuf.h. |
|
Definition at line 64 of file logserverstreambuf.h. |
|
Definition at line 65 of file logserverstreambuf.h. |
|
Definition at line 60 of file logserverstreambuf.h. |
|
Definition at line 8 of file logserverstreambuf.cpp. References mSize. |
|
Definition at line 26 of file logserverstreambuf.cpp. References mStreams, and sync(). Here is the call graph for this function: ![]() |
|
|
|
Add a stream to the list of streams. First, it is checked if the stream is already in. If the stream is found, we only add a new priority mask to the existing ones, so no stream can be added twice.
Definition at line 43 of file logserverstreambuf.cpp. References mStreams. Referenced by zeitgeist::LogServer::AddStream(). |
|
multiplex to all registered streams
Definition at line 148 of file logserverstreambuf.cpp. References mCurrentPriority, and mStreams. Referenced by PutBuffer(), and PutChar(). |
|
Get priority mask of a stream in the list.
Definition at line 92 of file logserverstreambuf.cpp. References mStreams. Referenced by zeitgeist::LogServer::GetPriorityMask(). |
|
|
|
This routine is called by the iostream library if our internal buffer is overflowing (the put area is full). Definition at line 114 of file logserverstreambuf.cpp. References PutBuffer(), and PutChar(). Here is the call graph for this function: ![]() |
|
stream out complete internal buffer
Definition at line 160 of file logserverstreambuf.cpp. References Forward(). Referenced by overflow(), and sync(). Here is the call graph for this function: ![]() |
|
stream out a single character
Definition at line 176 of file logserverstreambuf.cpp. References Forward(). Referenced by overflow(). Here is the call graph for this function: ![]() |
|
Remove a stream from the list of streams.
Definition at line 59 of file logserverstreambuf.cpp. References mStreams, and sync(). Referenced by zeitgeist::LogServer::RemoveStream(). Here is the call graph for this function: ![]() |
|
Set the current priority level. All data which is streamed into the forwarder after this point will use the current priority level. Before the priority level is adjusted, all buffered data is flushed.
Definition at line 104 of file logserverstreambuf.cpp. References mCurrentPriority, and sync(). Referenced by zeitgeist::LogServer::Priority(). Here is the call graph for this function: ![]() |
|
Set priority mask of a stream in the list.
Definition at line 76 of file logserverstreambuf.cpp. References mStreams, and sync(). Referenced by zeitgeist::LogServer::SetPriorityMask(). Here is the call graph for this function: ![]() |
|
This routine synchronizes the internal state with the external state. It is used to flush the streambuf object. Definition at line 141 of file logserverstreambuf.cpp. References PutBuffer(). Referenced by RemoveStream(), SetCurrentPriority(), SetPriorityMask(), and ~LogServerStreamBuf(). Here is the call graph for this function: ![]() |
|
Definition at line 142 of file logserverstreambuf.h. Referenced by Forward(), and SetCurrentPriority(). |
|
size of the internal buffer to use
Definition at line 141 of file logserverstreambuf.h. Referenced by LogServerStreamBuf(). |
|
Definition at line 143 of file logserverstreambuf.h. Referenced by AddStream(), Forward(), GetPriorityMask(), RemoveStream(), SetPriorityMask(), and ~LogServerStreamBuf(). |