![]() |
PIP 5.5.3
Platform-Independent Primitives
|
Text serialization functionality over PIBinaryStream. More...
#include <pitextstream.h>
Public Types | |
| enum | FloatFormat { DecimalFormat = 'f' , ExponentFormat = 'e' } |
| Floating-point numbers write format. More... | |
| enum | Encoding { System , UTF8 } |
| String encoding. More... | |
Public Member Functions | |
| PITextStream (PIBinaryStream< P > *stream_) | |
| Construct text stream binded to "stream_". | |
| PIBinaryStream< P > * | stream () const |
| Returns binded PIBinaryStream. | |
| bool | isEnd () const |
| Returns if end of stream reached. | |
| Encoding | encoding () const |
| Returns read/write encoding. | |
| void | setEncoding (Encoding e) |
| Set read/write encoding, default UTF8. | |
| FloatFormat | floatFormat () const |
| Returns float numbers write format. | |
| void | setFloatFormat (FloatFormat format) |
| Set float numbers write format, default DecimalFormat. | |
| int | floatPrecision () const |
| Returns float numbers write precision. | |
| void | setFloatPrecision (int prec) |
| Set float numbers write precision to "prec_" digits, default 5. | |
| PITextStream< P > & | space () |
| Append space. | |
| PITextStream< P > & | newLine () |
| Append new line. | |
| void | append (const PIString &v) |
| Append "v" string. | |
| void | append (const PIConstChars &v) |
| Append "v" as ASCII. | |
| void | append (char v) |
| Append "v" char as character. | |
| void | append (const char *v) |
| Append "v" as ASCII. | |
| void | append (bool v) |
| Append boolean, "true" of "false". | |
| void | append (int v) |
| Append integer. | |
| void | append (llong v) |
| Append integer. | |
| void | append (float v) |
| Append floating-point number, using floatFormat() and floatPrecision() | |
| void | append (double v) |
| Append floating-point number, using floatFormat() and floatPrecision() | |
| char | readChar (bool *rok) |
| Read character. | |
| PIString | readLine () |
| Read line. | |
| PIString | readWord () |
| Read word, skip leading whitespaces, until next whitespace. | |
| PIString | readCWord () |
| Read C-word, skip leading and until non C-identifier. | |
Text serialization functionality over PIBinaryStream.
| enum PITextStream::FloatFormat |
| enum PITextStream::Encoding |