ARTS  2.2.66
binio Class Referenceabstract

#include <binio.h>

Inheritance diagram for binio:
binistream binostream bifstream binstream binstream bofstream

Public Types

enum  Flag { BigEndian = 1 << 0, FloatIEEE = 1 << 1 }
 
enum  ErrorCode {
  NoError = 0, Fatal = 1 << 0, Unsupported = 1 << 1, NotOpen = 1 << 2,
  Denied = 1 << 3, NotFound = 1 << 4, Eof = 1 << 5
}
 
enum  Offset { Set, Add, End }
 
enum  FType { Single, Double }
 
typedef int Error
 

Public Member Functions

 binio ()
 
virtual ~binio ()
 
void setFlag (Flag f, bool set=true)
 
bool getFlag (Flag f)
 
Error error ()
 
bool eof ()
 
virtual void seek (long, Offset=Set)=0
 
virtual streampos pos ()=0
 

Protected Types

typedef long Int
 
typedef double Float
 
typedef unsigned char Byte
 
typedef int Flags
 

Protected Attributes

Flags my_flags
 
Error err
 

Static Protected Attributes

static const Flags system_flags = binio::detect_system_flags()
 

Static Private Member Functions

static Flags detect_system_flags ()
 

Detailed Description

Definition at line 66 of file binio.h.

Member Typedef Documentation

◆ Byte

typedef unsigned char binio::Byte
protected

Definition at line 103 of file binio.h.

◆ Error

typedef int binio::Error

Definition at line 86 of file binio.h.

◆ Flags

typedef int binio::Flags
protected

Definition at line 105 of file binio.h.

◆ Float

typedef double binio::Float
protected

Definition at line 102 of file binio.h.

◆ Int

typedef long binio::Int
protected

Definition at line 101 of file binio.h.

Member Enumeration Documentation

◆ ErrorCode

Enumerator
NoError 
Fatal 
Unsupported 
NotOpen 
Denied 
NotFound 
Eof 

Definition at line 74 of file binio.h.

◆ Flag

Enumerator
BigEndian 
FloatIEEE 

Definition at line 69 of file binio.h.

◆ FType

Enumerator
Single 
Double 

Definition at line 85 of file binio.h.

◆ Offset

Enumerator
Set 
Add 
End 

Definition at line 84 of file binio.h.

Constructor & Destructor Documentation

◆ binio()

binio::binio ( )

Definition at line 85 of file binio.cc.

◆ ~binio()

binio::~binio ( )
virtual

Definition at line 90 of file binio.cc.

Member Function Documentation

◆ detect_system_flags()

binio::Flags binio::detect_system_flags ( )
staticprivate

Definition at line 51 of file binio.cc.

References BigEndian, and FloatIEEE.

◆ eof()

bool binio::eof ( )

Definition at line 115 of file binio.cc.

References Eof, and err.

Referenced by binistream::ateof().

◆ error()

binio::Error binio::error ( )

Definition at line 107 of file binio.cc.

References err, and NoError.

Referenced by main(), readppdata(), and readppheader().

◆ getFlag()

bool binio::getFlag ( Flag  f)

◆ pos()

virtual streampos binio::pos ( )
pure virtual

Implemented in bofstream, and bifstream.

◆ seek()

virtual void binio::seek ( long  ,
Offset  = Set 
)
pure virtual

Implemented in bofstream, and bifstream.

Referenced by binistream::peekFloat(), and binistream::peekInt().

◆ setFlag()

void binio::setFlag ( Flag  f,
bool  set = true 
)

Definition at line 94 of file binio.cc.

References my_flags.

Referenced by bifstream::bifstream(), bofstream::bofstream(), and main().

Member Data Documentation

◆ err

◆ my_flags

Flags binio::my_flags
protected

Definition at line 107 of file binio.h.

Referenced by getFlag(), and setFlag().

◆ system_flags

const binio::Flags binio::system_flags = binio::detect_system_flags()
staticprotected

Definition at line 108 of file binio.h.

Referenced by binistream::readFloat(), and binostream::writeFloat().


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