oasys::InlineFormatter< _T > Class Template Reference

#include <InlineFormatter.h>

List of all members.


Detailed Description

template<typename _T>
class oasys::InlineFormatter< _T >

In some cases (such as templated data structures) where we can't or don't want to use the standard Formatter() virtual callback, this provides an alternate mechanism to print out a string for an object.

Each type will therefore require a new implementation for the format() method which should fill in the StringBuffer buf_ with the string contents and then return a pointer to that, thus ensuring that the string is valid for the duration of the call.

Definition at line 36 of file InlineFormatter.h.


Public Member Functions

const char * format (const _T &t)
template<>
const char * format (const std::string &s)
template<>
const char * format (const int &i)

Public Attributes

StaticStringBuffer< 64 > buf_

Member Function Documentation

template<typename _T>
const char* oasys::InlineFormatter< _T >::format ( const _T &  t  ) 

template<>
const char * oasys::InlineFormatter< std::string >::format ( const std::string &  s  )  [inline]

Definition at line 47 of file InlineFormatter.h.

References oasys::StringBuffer::append(), oasys::InlineFormatter< _T >::buf_, and oasys::StringBuffer::c_str().

template<>
const char * oasys::InlineFormatter< int >::format ( const int &  i  )  [inline]

Definition at line 58 of file InlineFormatter.h.

References oasys::StringBuffer::appendf(), oasys::InlineFormatter< _T >::buf_, and oasys::StringBuffer::c_str().


Member Data Documentation

template<typename _T>
StaticStringBuffer<64> oasys::InlineFormatter< _T >::buf_

Definition at line 39 of file InlineFormatter.h.

Referenced by oasys::InlineFormatter< _T >::format().


The documentation for this class was generated from the following file:
Generated on Sat Sep 8 08:43:50 2007 for DTN Reference Implementation by  doxygen 1.5.3