FormattedChainLoggable< ChainType > Class Template Reference

ChainLoggable which allows arbitrary formatting of its string representation. More...

#include <FormattedChainLoggable.h>

Inheritance diagram for FormattedChainLoggable< ChainType >:

ChainLoggable< ChainType > CompositeLoggable Loggable

List of all members.

Public Member Functions

 FormattedChainLoggable (const ChainType &chain, std::tstring &format)
 Constructor.
virtual std::tstring GetStringValue () const
 Returns all elements of the m_wrappedChain formatted into a string using boost::format.

Private Member Functions

template<typename HeadType , typename TailType >
void AppendChain (const Chain< HeadType, TailType > &chain, boost::tformat &formatter) const
template<>
void AppendChain (const EmptyChain &, boost::tformat &) const

Private Attributes

std::tstring m_format
 Format string.


Detailed Description

template<typename ChainType>
class Nvidia::Logging::FormattedChainLoggable< ChainType >

ChainLoggable which allows arbitrary formatting of its string representation.

Template Parameters:
ChainType Type of the wrapped Chain.

Definition at line 31 of file FormattedChainLoggable.h.


Constructor & Destructor Documentation

FormattedChainLoggable ( const ChainType &  chain,
std::tstring &  format 
) [inline]

Constructor.

Parameters:
chain The chain which should be wrapped.
format Format string conforming to the boost::format specification (which is compatible with printf format specification, see http://www.boost.org/doc/libs/1_39_0/libs/format/doc/format.html#printf_directives for details).

Definition at line 47 of file FormattedChainLoggable.h.


Member Function Documentation

virtual std::tstring GetStringValue (  )  const [inline, virtual]

Returns all elements of the m_wrappedChain formatted into a string using boost::format.

The m_wrappedChain is processed in reverse, i.e. from the tail to the head.

Reimplemented from ChainLoggable< ChainType >.

Definition at line 56 of file FormattedChainLoggable.h.

References FormattedChainLoggable< ChainType >::m_format, and ChainLoggable< ChainType >::m_wrappedChain.


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

Generated on Thu Sep 17 15:05:17 2009 for Logging by  doxygen 1.5.8