MIRA
Public Types | Public Member Functions | Protected Attributes | List of all members
BinaryIosBase Class Reference

Helper class that is a base for binaryostream and binaryistream in the same way as ios_base is a base of ostream and istream. More...

#include <stream/BinaryStream.h>

Inheritance diagram for BinaryIosBase:
Inheritance graph
[legend]

Public Types

enum  fmtflags { none = 0, net = 1L << 0 }
 

Public Member Functions

 BinaryIosBase ()
 
fmtflags setf (fmtflags flags)
 Setting new format flags. More...
 
void unsetf (fmtflags mask)
 Clearing format flags. More...
 

Protected Attributes

fmtflags mFmtFlags
 

Detailed Description

Helper class that is a base for binaryostream and binaryistream in the same way as ios_base is a base of ostream and istream.

It defines additional format flags for the binary mode and provides the setf() and unsetf() method for setting and clearing these flags.

Note
This class must use the same naming conventions as the original std::ios_base of the STL (e.g. setf, unsetf) !!

Member Enumeration Documentation

◆ fmtflags

enum fmtflags
Enumerator
none 
net 

Constructor & Destructor Documentation

◆ BinaryIosBase()

BinaryIosBase ( )
inline

Member Function Documentation

◆ setf()

fmtflags setf ( fmtflags  flags)
inline

Setting new format flags.

Parameters
flagsAdditional flags to set.
Returns
The previous format control flags.

This function sets additional flags in format control. Flags that were previously set remain set.

Note
This method has the same behavior as ios_base::setf() but works for our additional binary format flags only!

◆ unsetf()

void unsetf ( fmtflags  mask)
inline

Clearing format flags.

Parameters
maskThe flags to unset.

This function clears mask in the format flags.

Member Data Documentation

◆ mFmtFlags

fmtflags mFmtFlags
protected

The documentation for this class was generated from the following file: