chrono::ChStreamOutAscii Class Reference


This is a base class for all ASCII OUTPUT streams, in the sense that number are formatted into readable strings, etc.

Defines some << operators from basic types, converting all them into calls to the Output() function. Also, defines the Format() function, which can be used a bit like the printf formatting. At least some inherited class should be used by the user in order to get some practical effect (file saving, etc.)

#include <ChStream.h>

Inheritance diagram for chrono::ChStreamOutAscii:
Collaboration diagram for chrono::ChStreamOutAscii:

Public Member Functions

ChStreamOutAsciioperator<< (bool bVal)
 Generic << operator for all classes which implement serialization by means of a method named 'void StreamOUT(ChStreamOutAscii&)'.
ChStreamOutAsciioperator<< (char tch)
ChStreamOutAsciioperator<< (const int nVal)
ChStreamOutAsciioperator<< (const double dVal)
ChStreamOutAsciioperator<< (const float dVal)
ChStreamOutAsciioperator<< (unsigned int unVal)
ChStreamOutAsciioperator<< (char *str)
ChStreamOutAsciioperator<< (const char *str)
ChStreamOutAsciioperator<< (std::string &str)
ChStreamOutAsciioperator<< (unsigned long unVal)
ChStreamOutAsciioperator<< (unsigned long long unVal)
template<class T >
ChStreamOutAsciioperator< (T obj)
 ***OBSOLETE*** use ChArchive << operator and ArchiveOUT()
virtual void Format (char *formatString,...)
 Output the log message in form of a formatted string, like in printf()
void SetNumFormat (const char *mf)
 Set the formatting string (ex "%f" or "%g" etc.) for float->text conversion.
char * GetNumFormat ()
void SetCommentTrailer (char *mt)
 Set the trailer symbol before each comment (example: "#" , or "//" etc.)
void CR ()
 Outputs carriage return.
void TAB ()
 Output tab.
void Comment (char m_string[])
 Output comment with preceding trailer (ex #)
void Bar ()
 Output a separation bar in Ascii file.

Protected Attributes

char number_format [10]
char comment_trailer [10]

Additional Inherited Members

- Public Types inherited from chrono::ChStream
 Modes for chrono files (the ch-modes) - obsolete -. More...
 Errors for chrono files (the ch-modes) More...
- Protected Member Functions inherited from chrono::ChStreamOut
virtual void Output (const char *data, size_t n)=0
 Outputs a raw chunk of data, from pointer 'data' up to 'n' chars (bytes). More...