#include <bstream.h>
Class for writing binary data to a stream.
Definition at line 88 of file bstream.h.
◆ bostream()
bostream::bostream |
( |
std::ostream & |
s_, |
|
|
bool |
doswap_ = false |
|
) |
| |
|
inline |
Creates a new object which is attached to s_ and performs endianness conversion if doswap_==true.
Definition at line 97 of file bstream.h.
◆ put()
template<typename T >
bostream& bostream::put |
( |
const T * |
data, |
|
|
size_t |
num |
|
) |
| |
|
inline |
Writes a binary representation of num objects of type T (stored in data) to the attached stream. Endianness conversion is performed if requested in the constructor.
- Note
- T must be a primitive data type!
Definition at line 104 of file bstream.h.
◆ operator<<()
template<typename T >
bostream& bostream::operator<< |
( |
const T & |
data | ) |
|
|
inline |
Writes a binary representation of data to the attached stream. Endianness conversion is performed if requested in the constructor.
- Note
- T must be a primitive data type!
Definition at line 120 of file bstream.h.
The documentation for this class was generated from the following file: