ARTS 2.5.11 (git: 725533f0)
binistream Class Referenceabstract

#include <binio.h>

Inheritance diagram for binistream:
binio bifstream

Public Member Functions

Int readInt (unsigned int size)
Float readFloat (FType ft)
void readDoubleArray (double *d, unsigned long size)
unsigned long readString (char *str, unsigned long amount)
unsigned long readString (char *str, unsigned long maxlen, const char delim)
Int peekInt (unsigned int size)
Float peekFloat (FType ft)
bool ateof ()
void ignore (unsigned long amount=1)
- Public Member Functions inherited from binio
 binio ()
void setFlag (Flag f, bool set=true)
bool getFlag (Flag f)
Error error ()
bool eof ()
virtual void seek (long, Offset=Set)=0
virtual std::streampos pos ()=0

Protected Member Functions

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

Additional Inherited Members

- Public Types inherited from binio
using Flag = enum { BigEndian=1<< 0, FloatIEEE=1<< 1 }
using ErrorCode = enum { NoError=0, Fatal=1<< 0, Unsupported=1<< 1, NotOpen=1<< 2, Denied=1<< 3, NotFound=1<< 4, Eof=1<< 5 }
using Offset = enum { Set, Add, End }
using FType = enum { Single, Double }
using Error = int
- Protected Types inherited from binio
using Int = std::int64_t
using Float = double
using Byte = unsigned char
using Flags = int
- Protected Attributes inherited from binio
Flags my_flags {system_flags}
Error err {NoError}
- Static Protected Attributes inherited from binio
static const Flags system_flags = binio::detect_system_flags()

Detailed Description

Definition at line 94 of file binio.h.

Member Function Documentation

◆ ateof()

bool binistream::ateof ( )

Definition at line 259 of file

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

◆ getByte()

virtual Byte binistream::getByte ( )
protectedpure virtual

Implemented in bifstream.

Referenced by ignore(), readFloat(), readInt(), readString(), and readString().

◆ getRaw()

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

Referenced by readDoubleArray(), and readFloat().

◆ ignore()

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

Definition at line 269 of file

References getByte().

◆ peekFloat()

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

Definition at line 244 of file

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

◆ peekInt()

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

Definition at line 238 of file

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

Referenced by ateof().

◆ readDoubleArray()

void binistream::readDoubleArray ( double *  d,
unsigned long  size 

◆ readFloat()

binistream::Float binistream::readFloat ( FType  ft)

Definition at line 121 of file

References ARTS_USER_ERROR, d, getByte(), binio::getFlag(), getRaw(), and binio::system_flags.

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

◆ readInt()

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

Definition at line 97 of file

References binio::err, getByte(), and binio::getFlag().

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

◆ readString() [1/2]

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

Definition at line 192 of file

References binio::err, and getByte().

Referenced by Quantum::Number::Value::read().

◆ readString() [2/2]

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

Definition at line 206 of file

References binio::err, and getByte().

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