bostream Class Reference
#include <bstream.h>
List of all members.
|
Public Member Functions |
| bostream (std::ostream &s_, bool doswap_=false) |
template<typename T> |
bostream & | put (const T *data, size_t num) |
template<typename T> |
bostream & | operator<< (const T &data) |
Detailed Description
Class for writing binary data to a stream.
Definition at line 88 of file bstream.h.
Constructor & Destructor Documentation
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.
Member Function Documentation
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.
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: