ARTS  2.3.1285(git:92a29ea9-dirty)
binistream Class Referenceabstract

#include <binio.h>

Inheritance diagram for binistream:
binio bifstream binstream

Public Member Functions

 binistream ()
 
virtual ~binistream ()
 
Int readInt (unsigned int size)
 
Float readFloat (FType ft)
 
unsigned long readString (char *str, unsigned long amount)
 
unsigned long readString (char *str, unsigned long maxlen, const char delim)
 
std::string readString (const char delim='\0')
 
Int peekInt (unsigned int size)
 
Float peekFloat (FType ft)
 
bool ateof ()
 
void ignore (unsigned long amount=1)
 
- Public Member Functions inherited from binio
 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 Member Functions

virtual Byte getByte ()=0
 
virtual void getRaw (char *c, streamsize n)=0
 

Private Member Functions

Float ieee_single2float (Byte *data)
 
Float ieee_double2float (Byte *data)
 

Additional Inherited Members

- Public Types inherited from binio
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
 
- Protected Types inherited from binio
typedef long Int
 
typedef double Float
 
typedef unsigned char Byte
 
typedef int Flags
 
- Protected Attributes inherited from binio
Flags my_flags
 
Error err
 
- Static Protected Attributes inherited from binio
static const Flags system_flags = binio::detect_system_flags()
 

Detailed Description

Definition at line 117 of file binio.h.

Constructor & Destructor Documentation

◆ binistream()

binistream::binistream ( )

Definition at line 104 of file binio.cc.

◆ ~binistream()

binistream::~binistream ( )
virtual

Definition at line 106 of file binio.cc.

Member Function Documentation

◆ ateof()

bool binistream::ateof ( )

Definition at line 377 of file binio.cc.

References binio::eof(), and binio::err.

◆ getByte()

virtual Byte binistream::getByte ( )
protectedpure virtual

Implemented in bifstream.

◆ getRaw()

virtual void binistream::getRaw ( char *  c,
streamsize  n 
)
protectedpure virtual

Implemented in bifstream.

◆ ieee_double2float()

binistream::Float binistream::ieee_double2float ( Byte data)
private

Definition at line 242 of file binio.cc.

References binio::err, binio::Fatal, HUGE_VAL, i, pow(), sign(), and binio::Unsupported.

◆ ieee_single2float()

binistream::Float binistream::ieee_single2float ( Byte data)
private

Definition at line 199 of file binio.cc.

References binio::err, binio::Fatal, HUGE_VAL, pow(), sign(), and binio::Unsupported.

◆ ignore()

void binistream::ignore ( unsigned long  amount = 1)

Definition at line 387 of file binio.cc.

References i.

◆ peekFloat()

binistream::Float binistream::peekFloat ( FType  ft)

Definition at line 362 of file binio.cc.

References binio::Add, binio::Double, binio::err, binio::seek(), and binio::Single.

◆ peekInt()

binistream::Int binistream::peekInt ( unsigned int  size)

Definition at line 356 of file binio.cc.

References binio::Add, binio::err, and binio::seek().

◆ readFloat()

◆ readInt()

binistream::Int binistream::readInt ( unsigned int  size)

Definition at line 108 of file binio.cc.

References binio::BigEndian, binio::err, binio::getFlag(), i, and binio::Unsupported.

Referenced by operator>>(), and readppheader().

◆ readString() [1/3]

unsigned long binistream::readString ( char *  str,
unsigned long  amount 
)

Definition at line 310 of file binio.cc.

References binio::err, and i.

◆ readString() [2/3]

unsigned long binistream::readString ( char *  str,
unsigned long  maxlen,
const char  delim 
)

Definition at line 324 of file binio.cc.

References binio::err, and i.

◆ readString() [3/3]

std::string binistream::readString ( const char  delim = '\0')

Definition at line 342 of file binio.cc.

References lm_hitran_2017::read(), and STRINGBUFSIZE.


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