#include <bstream.h>
Class for reading binary data from a stream.
Definition at line 135 of file bstream.h.
◆ bistream()
bistream::bistream |
( |
std::istream & |
s_, |
|
|
bool |
doswap_ = false |
|
) |
| |
|
inline |
Creates a new object which is attached to s_ and performs endianness conversion if doswap_==true.
Definition at line 144 of file bstream.h.
◆ get()
template<typename T >
bistream& bistream::get |
( |
T * |
data, |
|
|
size_t |
num |
|
) |
| |
|
inline |
Reads a binary representation of num objects of type T from the attached stream and stores them in data. Endianness conversion is performed if requested in the constructor.
- Note
- T must be a primitive data type!
Definition at line 151 of file bstream.h.
◆ operator>>()
template<typename T >
bistream& bistream::operator>> |
( |
T & |
data | ) |
|
|
inline |
Reads a binary representation of data from the attached stream. Endianness conversion is performed if requested in the constructor.
- Note
- T must be a primitive data type!
Definition at line 162 of file bstream.h.
The documentation for this class was generated from the following file: