An abstract interface for performing both unformatted and formatted output operations.
More...
|
| void | Close () |
| | Flushes any unwritten output and closes the stream.
|
| void | Flush () |
| | Flushes any unwritten output.
|
| OutputStream * | PrintStr (const char *str) |
| | Writes a string of characters to the output stream. Writing stops at the first null character.
|
| OutputStream * | PrintB (bool value) |
| | Writes a formatted Boolean value to the output stream.
|
| OutputStream * | PrintC (char value) |
| | Writes a single character to the output stream.
|
| OutputStream * | PrintI (int value) |
| | Writes a formatted int to the output stream.
|
| OutputStream * | PrintUI (uint value) |
| | Writes a formatted uint to the output stream.
|
| OutputStream * | PrintL (long value) |
| | Writes a formatted long to the output stream.
|
| OutputStream * | PrintUL (ulong value) |
| | Writes a formatted ulong to the output stream.
|
| OutputStream * | PrintF (float value) |
| | Writes a formatted float to the output stream.
|
| OutputStream * | PrintD (double value) |
| | Writes a formatted double to the output stream.
|
| OutputStream * | Put (uchar byte) |
| | Writes a single unformatted byte to the output stream.
|
| OutputStream * | Write (void *bytes, uint numBytes) |
| int | GetFlags () const |
| | Returns the stream's current format flags as a bitmask of values from the IO::Flags enum.
|
| OutputStream * | SetFlags (int flags) |
| | Enables the format format flags in the given bitmask of values from the IO::Flags enum if they are not already enabled.
|
| OutputStream * | UnsetFlags (int flags) |
| | Disables the format format flags in the given bitmask of values from the IO::Flags enum if they are not already disabled.
|
| OutputStream * | ClearFlags (int flags) |
| | Disables all of the format flags.
|
| int | GetPrecision () const |
| OutputStream * | SetPrecision (int flags) |
| int | GetWidth () const |
| | Returns the current minimum field width.
|
| OutputStream * | SetWidth (int flags) |
| | Assigns the minimum field width.
|
| int | GetPosition () const |
| | Returns the stream's current position measured in bytes.
|
| int | GetEndPosition () const |
| | Returns the position of the stream's end measured in bytes.
|
| void | SetPosition (int offset) |
| | Sets the stream's position relative to its beginning measured in bytes.
|
| void | SetPositionFromEnd (int offset) |
| | Sets the stream's position relative to its end measured in bytes.
|
| void | AddOffset (int offset) |
| | Moves the stream by the specified number of bytes relative to its current position.
|
| bool | IsEof () const |
| | Returns whether the end of the stream has been reached.
|
| bool | HasError () const |
| | Returns whether an error has occurred during an output operation.
|
| void | ClearError () |
| | Clears the error flag.
|
An abstract interface for performing both unformatted and formatted output operations.
◆ AddOffset()
| void Bond::OutputStream::AddOffset |
( |
int | offset | ) |
|
Moves the stream by the specified number of bytes relative to its current position.
- Parameters
-
| offset | The number of bytes by which the stream is repositioned. |
◆ ClearError()
| void Bond::OutputStream::ClearError |
( |
| ) |
|
◆ ClearFlags()
Disables all of the format flags.
The format flags modify how the stream formats output.
- Returns
- The stream on which this function was called.
◆ Close()
| void Bond::OutputStream::Close |
( |
| ) |
|
Flushes any unwritten output and closes the stream.
◆ Flush()
| void Bond::OutputStream::Flush |
( |
| ) |
|
Flushes any unwritten output.
◆ GetEndPosition()
| int Bond::OutputStream::GetEndPosition |
( |
| ) |
const |
Returns the position of the stream's end measured in bytes.
◆ GetFlags()
| int Bond::OutputStream::GetFlags |
( |
| ) |
const |
Returns the stream's current format flags as a bitmask of values from the IO::Flags enum.
The format flags modify how the stream formats output.
◆ GetPosition()
| int Bond::OutputStream::GetPosition |
( |
| ) |
const |
Returns the stream's current position measured in bytes.
◆ GetPrecision()
| int Bond::OutputStream::GetPrecision |
( |
| ) |
const |
◆ GetWidth()
| int Bond::OutputStream::GetWidth |
( |
| ) |
const |
Returns the current minimum field width.
◆ HasError()
| bool Bond::OutputStream::HasError |
( |
| ) |
const |
Returns whether an error has occurred during an output operation.
◆ IsEof()
| bool Bond::OutputStream::IsEof |
( |
| ) |
const |
Returns whether the end of the stream has been reached.
◆ PrintB()
Writes a formatted Boolean value to the output stream.
If the IO::BoolAlpha flag is set, the values true and false are written as the strings "true" and "false" respectively, otherwise they are written as the strings "0" and "1".
- Parameters
-
| value | The Boolean value to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ PrintC()
Writes a single character to the output stream.
- Parameters
-
| value | The character to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ PrintD()
Writes a formatted double to the output stream.
If the IO::Fixed or IO::Scientific flag is set, the number is written in decimal notation or scientific notation respectively. If neither flag is set, the number is written in scientific notation if the exponent is less than -4 or greater than the precision, otherwise the number is written in decimal notation. If the IO::Zero flag is set, the value is zero padded to the left. If the IO::Left flag is set, the value is left-justified instead of right-justified. If the IO::ShowPoint flag is set, a decimal point is always written.
- Parameters
-
| value | The floating-point number to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ PrintF()
Writes a formatted float to the output stream.
If the IO::Fixed or IO::Scientific flag is set, the number is written in decimal notation or scientific notation respectively. If neither flag is set, the number is written in scientific notation if the exponent is less than -4 or greater than the precision, otherwise the number is written in decimal notation. If the IO::Zero flag is set, the value is zero padded to the left. If the IO::Left flag is set, the value is left-justified instead of right-justified. If the IO::ShowPoint flag is set, a decimal point is always written.
- Parameters
-
| value | The floating-point number to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ PrintI()
Writes a formatted int to the output stream.
If the IO::Hex or IO::Oct flag is set, the integer is written in base 16 or 8 respectively, otherwise it is written in base 10. If the IO::ShowBase flag is set in addition to IO::Hex, the string "0x" is written before the number. If the IO::ShowBase flag is set in addition to IO::Oct, the string "0" is written before the number. If the IO::Zero flag is set, the value is zero padded to the left. If the IO::Left flag is set, the value is left-justified instead of right-justified.
- Parameters
-
| value | The integer to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ PrintL()
Writes a formatted long to the output stream.
If the IO::Hex or IO::Oct flag is set, the integer is written in base 16 or 8 respectively, otherwise it is written in base 10. If the IO::ShowBase flag is set in addition to IO::Hex, the string "0x" is written before the number. If the IO::ShowBase flag is set in addition to IO::Oct, the string "0" is written before the number. If the IO::Zero flag is set, the value is zero padded to the left. If the IO::Left flag is set, the value is left-justified instead of right-justified.
- Parameters
-
| value | The integer to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ PrintStr()
| OutputStream * Bond::OutputStream::PrintStr |
( |
const char * | str | ) |
|
Writes a string of characters to the output stream. Writing stops at the first null character.
- Parameters
-
| str | Pointer to a string of characters to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ PrintUI()
Writes a formatted uint to the output stream.
If the IO::Hex or IO::Oct flag is set, the integer is written in base 16 or 8 respectively, otherwise it is written in base 10. If the IO::ShowBase flag is set in addition to IO::Hex, the string "0x" is written before the number. If the IO::ShowBase flag is set in addition to IO::Oct, the string "0" is written before the number. If the IO::Zero flag is set, the value is zero padded to the left. If the IO::Left flag is set, the value is left-justified instead of right-justified.
- Parameters
-
| value | The integer to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ PrintUL()
Writes a formatted ulong to the output stream.
If the IO::Hex or IO::Oct flag is set, the integer is written in base 16 or 8 respectively, otherwise it is written in base 10. If the IO::ShowBase flag is set in addition to IO::Hex, the string "0x" is written before the number. If the IO::ShowBase flag is set in addition to IO::Oct, the string "0" is written before the number. If the IO::Zero flag is set, the value is zero padded to the left. If the IO::Left flag is set, the value is left-justified instead of right-justified.
- Parameters
-
| value | The integer to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ Put()
Writes a single unformatted byte to the output stream.
- Parameters
-
| byte | The byte to be written to the stream. |
- Returns
- The stream on which this function was called.
◆ SetFlags()
Enables the format format flags in the given bitmask of values from the IO::Flags enum if they are not already enabled.
All other flags are left untouched. The format flags modify how the stream formats output.
- Parameters
-
| flags | The bitmask of flags from the IO::Flags enum to enable. |
- Returns
- The stream on which this function was called.
◆ SetPosition()
| void Bond::OutputStream::SetPosition |
( |
int | offset | ) |
|
Sets the stream's position relative to its beginning measured in bytes.
- Parameters
-
| offset | The number of bytes from the beginning to which the stream is repositioned. |
◆ SetPositionFromEnd()
| void Bond::OutputStream::SetPositionFromEnd |
( |
int | offset | ) |
|
Sets the stream's position relative to its end measured in bytes.
- Parameters
-
| offset | The number of bytes from the end to which the stream is repositioned. |
◆ SetPrecision()
| OutputStream * Bond::OutputStream::SetPrecision |
( |
int | flags | ) |
|
◆ SetWidth()
Assigns the minimum field width.
The minimum field width specifies the minimum number of characters to be written in a formatted output operation. If the number of characters in the written value is less than the field width, it will be padded to the left with spaces, or padded to the right if the IO::Left flag is set.
◆ UnsetFlags()
Disables the format format flags in the given bitmask of values from the IO::Flags enum if they are not already disabled.
All other flags are left untouched. The format flags modify how the stream formats output.
- Parameters
-
| flags | The bitmask of flags from the IO::Flags enum to disable. |
- Returns
- The stream on which this function was called.
◆ Write()
| OutputStream * Bond::OutputStream::Write |
( |
void * | bytes, |
|
|
uint | numBytes ) |
- Parameters
-
| bytes | Pointer to the array of bytes to be written to the stream. |
| numBytes | The number of bytes to be written. |
- Returns
- The stream on which this function was called.
The documentation for this struct was generated from the following file: