# LogContentsPrinter Class Reference

Base class for objects responsible for formatting separate Loggables. More...

`#include <LogContentsPrinter.h>`

Inheritance diagram for LogContentsPrinter:

List of all members.

## Public Member Functions
template<typename T >
void | LogContent (const TCHAR *name, T value)
| Logs the value with provided name on this LogContentsPrinter.
template<typename T >
void | LogContent (const std::tstring &name, T value)
| Logs the value with provided name on this LogContentsPrinter.
## Protected Member Functions
virtual void | LogContentInternal (const std::tstring &name, const SimpleLoggable &loggable)=0
| Implementation of this method should save the result of formatting this SimpleLoggable into the LogContentsPrinter state.
virtual void | LogContentInternal (const std::tstring &name, const CompositeLoggable &loggable)=0
| Implementation of this method should save the result of formatting this CompositeLoggable into the LogContentsPrinter state.
template<typename T >
void | LogContentInternal (const std::tstring &name, T value, typename boost::disable_if_c< boost::is_base_of< Loggable, T >::value, T >::type *=0)
| Helper method to convert simple types into GenericSimpleLoggable on the fly.
template<typename T >
void | LogContentInternal (const std::tstring &name, const std::vector< T > &value)
| Helper method to convert std::vector into VectorLoggable on the fly.

## Detailed Description

Base class for objects responsible for formatting separate Loggables.

Implementations of this abstract class are be responsible for formatting separate Loggables (as opposed to printing and formatting the whole log message contained in ChainLoggable, which is the responsibility of ILogPrinter).

Definition at line 39 of file LogContentsPrinter.h.

## Member Function Documentation

void LogContent | ( | const std::tstring & | name,
|  | T | value |
| ) |  |  | `[inline]`

Logs the value with provided name on this LogContentsPrinter.

This should be called for all CompositeLoggable components in CompositeLoggable::LogContentsOn().

Parameters:

  | name | Name of the value. This should represent the role that the value has for the caller, for example it should be the name of the field when called from CompositeLoggable implementation, or an index when called from VectorLoggable.
  | value | The value which should be logged.

Definition at line 69 of file LogContentsPrinter.h.

References LogContentsPrinter::LogContentInternal().

void LogContent | ( | const TCHAR * | name,
|  | T | value |
| ) |  |  | `[inline]`

Logs the value with provided name on this LogContentsPrinter.

This should be called for all CompositeLoggable components in CompositeLoggable::LogContentsOn().

Parameters:

  | name | Name of the value. This should represent the role that the value has for the caller, for example it should be the name of the field when called from CompositeLoggable implementation, or an index when called from VectorLoggable.
  | value | The value which should be logged.

Definition at line 53 of file LogContentsPrinter.h.

References LogContentsPrinter::LogContentInternal().

Referenced by ChainLoggable< ChainType >::LogChainOn(), and VectorLoggable< T >::LogContentsOn().

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

- LogContentsPrinter.h