ARTS 2.5.11 (git: 725533f0)
|
#include <binio.h>
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) |
![]() | |
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 | |
![]() | |
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 |
![]() | |
using | Int = std::int64_t |
using | Float = double |
using | Byte = unsigned char |
using | Flags = int |
![]() | |
Flags | my_flags {system_flags} |
Error | err {NoError} |
![]() | |
static const Flags | system_flags = binio::detect_system_flags() |
bool binistream::ateof | ( | ) |
Definition at line 259 of file binio.cc.
References binio::eof(), binio::err, and peekInt().
|
protectedpure virtual |
Implemented in bifstream.
Referenced by ignore(), readFloat(), readInt(), readString(), and readString().
|
protectedpure virtual |
Referenced by readDoubleArray(), and readFloat().
void binistream::ignore | ( | unsigned long | amount = 1 | ) |
binistream::Float binistream::peekFloat | ( | FType | ft | ) |
Definition at line 244 of file binio.cc.
References binio::err, readFloat(), and binio::seek().
binistream::Int binistream::peekInt | ( | unsigned int | size | ) |
Definition at line 238 of file binio.cc.
References binio::err, readInt(), and binio::seek().
Referenced by ateof().
void binistream::readDoubleArray | ( | double * | d, |
unsigned long | size | ||
) |
Definition at line 184 of file binio.cc.
References d, binio::getFlag(), getRaw(), swap_endian(), and binio::system_flags.
Referenced by xml_parse_from_stream(), xml_read_from_stream(), xml_read_from_stream(), xml_read_from_stream(), xml_read_from_stream(), xml_read_from_stream(), xml_read_from_stream(), and xml_read_from_stream().
binistream::Float binistream::readFloat | ( | FType | ft | ) |
Definition at line 121 of file binio.cc.
References ARTS_USER_ERROR, d, getByte(), binio::getFlag(), getRaw(), and binio::system_flags.
Referenced by operator>>(), operator>>(), and peekFloat().
binistream::Int binistream::readInt | ( | unsigned int | size | ) |
Definition at line 97 of file binio.cc.
References binio::err, getByte(), and binio::getFlag().
Referenced by operator>>(), operator>>(), and peekInt().
unsigned long binistream::readString | ( | char * | str, |
unsigned long | amount | ||
) |
Definition at line 192 of file binio.cc.
References binio::err, and getByte().
Referenced by Quantum::Number::Value::read().
unsigned long binistream::readString | ( | char * | str, |
unsigned long | maxlen, | ||
const char | delim | ||
) |
Definition at line 206 of file binio.cc.
References binio::err, and getByte().