#include <ChainLoggable.h>
Public Member Functions | |
ChainLoggable (const ChainType &chain) | |
Constructor. | |
ChainLoggable (const ChainLoggable &chainLoggable) | |
Copy constructor. | |
ChainLoggable & | operator= (const ChainLoggable &chainLoggable) |
Copy assignment operator. | |
virtual void | LogContentsOn (LogContentsPrinter &logContentsPrinter) const |
Passes all the elements of the m_wrappedChain to the logContentsPrinter. | |
virtual std::tstring | GetStringValue () const |
Returns the concatenation of string representations of all the elements of the m_wrappedChain. | |
Protected Attributes | |
const ChainType & | m_wrappedChain |
Reference to the wrapped chain. | |
Private Member Functions | |
template<typename HeadType , typename TailType > | |
void | LogChainOn (const Chain< HeadType, TailType > &chain, LogContentsPrinter &logContentsPrinter) const |
Recursively passes the elements of the chain to the logContentsPrinter. | |
template<> | |
void | LogChainOn (const EmptyChain &, LogContentsPrinter &) const |
Specialization of LogChainOn() for EmptyChain. Does nothing. | |
template<typename HeadType , typename TailType > | |
void | AppendChainTo (const Chain< HeadType, TailType > &chain, std::tostringstream &stream) const |
Recursively outputs the elements of the chain to the stream, with space characters between them. | |
template<> | |
void | AppendChainTo (const EmptyChain &, std::tostringstream &) const |
Specialization of AppendChainTo() for EmptyChain. Does nothing. | |
Static Private Member Functions | |
template<typename HeadType > | |
static void | AppendChainElementTo (HeadType head, std::tostringstream &stream) |
Outputs a signgle chain element to the stream. | |
template<typename T > | |
static void | AppendChainElementTo (std::vector< T > &head, std::tostringstream &stream) |
Outputs a signgle chain element to the stream. |
ChainType | Type of the wrapped Chain. |
Definition at line 36 of file ChainLoggable.h.
ChainLoggable | ( | const ChainType & | chain | ) | [inline] |
Constructor.
chain | Chain which should be wrapped in this ChainLoggable. |
Definition at line 48 of file ChainLoggable.h.
static void AppendChainElementTo | ( | std::vector< T > & | head, | |
std::tostringstream & | stream | |||
) | [inline, static, private] |
Outputs a signgle chain element to the stream.
Template function specialization for std::vector (necessary because we can't use LoggableTraits with templated types).
Definition at line 135 of file ChainLoggable.h.
void AppendChainTo | ( | const Chain< HeadType, TailType > & | chain, | |
std::tostringstream & | stream | |||
) | const [inline, private] |
Recursively outputs the elements of the chain to the stream, with space characters between them.
The chain is processed in reverse, i.e. from the tail to the head.
Definition at line 114 of file ChainLoggable.h.
Referenced by ChainLoggable< ChainType >::AppendChainTo(), and ChainLoggable< ChainType >::GetStringValue().
virtual std::tstring GetStringValue | ( | ) | const [inline, virtual] |
Returns the concatenation of string representations of all the elements of the m_wrappedChain.
The m_wrappedChain is processed in reverse, i.e. from the tail to the head.
Implements Loggable.
Reimplemented in FormattedChainLoggable< ChainType >.
Definition at line 79 of file ChainLoggable.h.
void LogChainOn | ( | const Chain< HeadType, TailType > & | chain, | |
LogContentsPrinter & | logContentsPrinter | |||
) | const [inline, private] |
Recursively passes the elements of the chain to the logContentsPrinter.
The chain is processed in reverse, i.e. from the tail to the head.
Definition at line 96 of file ChainLoggable.h.
Referenced by ChainLoggable< ChainType >::LogChainOn(), and ChainLoggable< ChainType >::LogContentsOn().
virtual void LogContentsOn | ( | LogContentsPrinter & | logContentsPrinter | ) | const [inline, virtual] |
Passes all the elements of the m_wrappedChain to the logContentsPrinter.
The m_wrappedChain is processed in reverse, i.e. from the tail to the head.
Implements CompositeLoggable.
Definition at line 69 of file ChainLoggable.h.