$search

Aseba::BasicFormatableString< charT > Class Template Reference
[General helper functions and classes]

#include <FormatableString.h>

List of all members.

Public Member Functions

template<typename T >
BasicFormatableStringarg (const T &value)
BasicFormatableStringarg (float value, int fieldWidth=0, int precision=6, charT fillChar= ' ')
BasicFormatableStringarg (unsigned value, int fieldWidth=0, int base=10, charT fillChar= ' ')
BasicFormatableStringarg (int value, int fieldWidth=0, int base=10, charT fillChar= ' ')
 BasicFormatableString (const S &s)
 BasicFormatableString ()
BasicFormatableStringoperator= (const S &str)

Private Types

typedef std::basic_string< charT > S

Private Member Functions

void proceedReplace (const S &replacement)

Private Attributes

int argLevel

Detailed Description

template<typename charT>
class Aseba::BasicFormatableString< charT >

string that can be used for argument substitution. Example : FormatableString fs("Hello %0"); cout << fs.arg("World");

Definition at line 39 of file FormatableString.h.


Member Typedef Documentation

template<typename charT>
typedef std::basic_string<charT> Aseba::BasicFormatableString< charT >::S [private]

Definition at line 41 of file FormatableString.h.


Constructor & Destructor Documentation

template<typename charT>
Aseba::BasicFormatableString< charT >::BasicFormatableString (  )  [inline]

Definition at line 56 of file FormatableString.h.

template<typename charT>
Aseba::BasicFormatableString< charT >::BasicFormatableString ( const S s  )  [inline]

Creates a new FormatableString with format string set to s.

Parameters:
s A string with indicators for argument substitution. Each indicator is the % symbol followed by a number. The number is the index of the corresponding argument (starting at 0).

Definition at line 63 of file FormatableString.h.


Member Function Documentation

template<typename charT>
template<typename T >
BasicFormatableString& Aseba::BasicFormatableString< charT >::arg ( const T &  value  )  [inline]

Replace the next arg by a value that can be passed to an ostringstream. The first call to arg replace 0, the second 1, and so on.

Parameters:
value Value used to replace the current argument.

Definition at line 100 of file FormatableString.h.


Member Data Documentation

template<typename charT>
int Aseba::BasicFormatableString< charT >::argLevel [private]

Next argument to be replaced.

Definition at line 47 of file FormatableString.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


aseba
Author(s): Stéphane Magnenat
autogenerated on Sat Mar 2 12:31:52 2013