LevelS C++ support library  3.83
Public Member Functions | List of all members
bistream Class Reference

#include <bstream.h>

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::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

◆ 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:

Generated on Wed Nov 13 2024 12:18:16 for LevelS C++ support library