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

#include <bstream.h>

Public Member Functions

 bostream (std::ostream &s_, bool doswap_=false)
 
template<typename T >
bostreamput (const T *data, size_t num)
 
template<typename T >
bostreamoperator<< (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::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

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

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