Inheritance diagram for code::OutputStream:
On the CODE system, there are two subclasses of OutputStream: AOStream which provides an ASCII stream BOOStream which provides a portable binary representation
Typically, most classes will provide a friend stream >> representation. That representation will then work in providing both types of streamed output.
float and double are not provided in this abstract class even though there is no portable way to represent them in binary. This is because several unfriendly data formats define them anyway. You should avoid using these operators in binary.
Public Member Functions | |
virtual OutputStream & | operator<< (bool)=0 |
Write a bool to the OutputStream buffer. | |
virtual OutputStream & | operator<< (char)=0 |
Write a char to the OutputStream buffer. | |
virtual OutputStream & | operator<< (unsigned char)=0 |
Write an unsigned char to the OutputStream buffer. | |
virtual OutputStream & | operator<< (int16_t)=0 |
Write a 16-bit signed integer to the OutputStream buffer. | |
virtual OutputStream & | operator<< (uint16_t)=0 |
Write a 16-bit unsigned integer to the OutputStream buffer. | |
virtual OutputStream & | operator<< (int32_t)=0 |
Write a 32-bit signed integer to the OutputStream buffer. | |
virtual OutputStream & | operator<< (uint32_t)=0 |
Write a 32-bit unsigned integer to the OutputStream buffer. | |
virtual OutputStream & | operator<< (int64_t)=0 |
Write a 64-bit signed integer to the OutputStream buffer. | |
virtual OutputStream & | operator<< (uint64_t)=0 |
Write a 64-bit unsigned integer to the OutputStream buffer. | |
virtual OutputStream & | operator<< (float)=0 |
Write a float to the OutputStream buffer. | |
virtual OutputStream & | operator<< (double)=0 |
Write a double to the OutputStream buffer. | |
virtual OutputStream & | operator<< (const std::string &)=0 |
Write a std::string to the OutputStream buffer. | |
virtual | ~OutputStream () |
virtual destructor to permit subclassing. |
virtual code::OutputStream::~OutputStream | ( | ) | [inline, virtual] |
virtual destructor to permit subclassing.
virtual OutputStream& code::OutputStream::operator<< | ( | const std::string & | ) | [pure virtual] |
Write a std::string to the OutputStream buffer.
This is done by writing an int (the std::string length) and a series of characters (the std::string contents).
s | the std::string to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | double | ) | [pure virtual] |
Write a double to the OutputStream buffer.
WARNING: doubles are not really very portable. If you are defining a new data format, please use int/long, multiplying your value by the needed precision. This is for those formats that do use double and can not be helped.
l | the long to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | float | ) | [pure virtual] |
Write a float to the OutputStream buffer.
WARNING: floats are not really very portable. If you are defining a new data format, please use int/long, multiplying your value by the needed precision. This is for those formats that do use float and can not be helped.
l | the long to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | uint64_t | ) | [pure virtual] |
Write a 64-bit unsigned integer to the OutputStream buffer.
value | the value to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | int64_t | ) | [pure virtual] |
Write a 64-bit signed integer to the OutputStream buffer.
value | the value to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | uint32_t | ) | [pure virtual] |
Write a 32-bit unsigned integer to the OutputStream buffer.
value | the value to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | int32_t | ) | [pure virtual] |
Write a 32-bit signed integer to the OutputStream buffer.
value | the value to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | uint16_t | ) | [pure virtual] |
Write a 16-bit unsigned integer to the OutputStream buffer.
value | the value to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | int16_t | ) | [pure virtual] |
Write a 16-bit signed integer to the OutputStream buffer.
value | the value to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | unsigned | char | ) | [pure virtual] |
Write an unsigned char to the OutputStream buffer.
uch | the unsigned char to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | char | ) | [pure virtual] |
Write a char to the OutputStream buffer.
char | the char to add. |
Implemented in code::AOStream, and code::BOOStream.
virtual OutputStream& code::OutputStream::operator<< | ( | bool | ) | [pure virtual] |
Write a bool to the OutputStream buffer.
bool | the bool to add. |
Implemented in code::AOStream, and code::BOOStream.