ARTS  2.3.1285(git:92a29ea9-dirty)
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 99 of file binio.h.

◆ Error

typedef int binio::Error

Definition at line 82 of file binio.h.

◆ Flags

typedef int binio::Flags
protected

Definition at line 101 of file binio.h.

◆ Float

typedef double binio::Float
protected

Definition at line 98 of file binio.h.

◆ Int

typedef long binio::Int
protected

Definition at line 97 of file binio.h.

Member Enumeration Documentation

◆ ErrorCode

Enumerator
NoError 
Fatal 
Unsupported 
NotOpen 
Denied 
NotFound 
Eof 

Definition at line 70 of file binio.h.

◆ Flag

Enumerator
BigEndian 
FloatIEEE 

Definition at line 68 of file binio.h.

◆ FType

Enumerator
Single 
Double 

Definition at line 81 of file binio.h.

◆ Offset

Enumerator
Set 
Add 
End 

Definition at line 80 of file binio.h.

Constructor & Destructor Documentation

◆ binio()

binio::binio ( )

Definition at line 80 of file binio.cc.

◆ ~binio()

binio::~binio ( )
virtual

Definition at line 82 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 100 of file binio.cc.

References Eof, and err.

Referenced by binistream::ateof().

◆ error()

binio::Error binio::error ( )

Definition at line 93 of file binio.cc.

Referenced by readppdata(), and readppheader().

◆ getFlag()

bool binio::getFlag ( Flag  f)

◆ pos()

virtual streampos binio::pos ( )
pure virtual

Implemented in bifstream, and bofstream.

◆ seek()

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

Implemented in bifstream, and bofstream.

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

◆ setFlag()

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

Definition at line 84 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 103 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 104 of file binio.h.

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


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