libpniio
Public Member Functions | Private Types | Private Attributes
pni::io::formatter< T > Class Template Reference

scalar formatter More...

#include <formatter.hpp>

Collaboration diagram for pni::io::formatter< T >:
Collaboration graph
[legend]

Public Member Functions

pni::core::string operator() (const T &v) const
 generate output More...
 

Private Types

typedef
std::back_insert_iterator
< pni::core::string > 
iterator_type
 output iterator type More...
 
typedef get_generator
< iterator_type, T >::type 
generator_type
 generator type More...
 

Private Attributes

generator_type generator
 generator instance More...
 

Detailed Description

template<typename T>
class pni::io::formatter< T >

This is the default implementation of a formatter. It is intended to be used with scalar and complex primitive types.

formatter<T> works for the following types

Template Parameters
Tthe type which should be converted to a string

Member Typedef Documentation

template<typename T >
typedef get_generator<iterator_type,T>::type pni::io::formatter< T >::generator_type
private
template<typename T >
typedef std::back_insert_iterator<pni::core::string> pni::io::formatter< T >::iterator_type
private

Member Function Documentation

template<typename T >
pni::core::string pni::io::formatter< T >::operator() ( const T &  v) const
inline

Take the input value and convert it to its string representation.

Parameters
valuea value of type T
Returns
string representation of value

Field Documentation

template<typename T >
generator_type pni::io::formatter< T >::generator
private

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