bistream Class Reference

#include <bstream.h>

List of all members.

Public Member Functions

 bistream (std::istream &s_, bool doswap_=false)
template<typename T>
bistreamget (T *data, size_t num)
template<typename T>
bistreamoperator>> (T &data)


Detailed Description

Class for reading binary data from a stream.

Definition at line 135 of file bstream.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

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:

Generated on Thu Oct 8 14:48:51 2015 for LevelS C++ support library