Public Member Functions | Private Types | Private Member Functions | Private Attributes
Aseba::BasicFormatableString< charT > Class Template Reference

#include <FormatableString.h>

Inheritance diagram for Aseba::BasicFormatableString< charT >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

BasicFormatableStringarg (int value, int fieldWidth=0, int base=10, charT fillChar= ' ')
BasicFormatableStringarg (unsigned value, int fieldWidth=0, int base=10, charT fillChar= ' ')
BasicFormatableStringarg (float value, int fieldWidth=0, int precision=6, charT fillChar= ' ')
template<typename T >
BasicFormatableStringarg (const T &value)
 BasicFormatableString ()
 BasicFormatableString (const S &s)
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:
sA 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:
valueValue 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:


aseba
Author(s): Stéphane Magnenat
autogenerated on Sun Oct 5 2014 23:46:39