ARTS 2.5.11 (git: 6827797f)
|
Binary output file stream class. More...
#include <bifstream.h>
Public Member Functions | |
bifstream () | |
bifstream (const char *name, ios::openmode mode=ios::in|ios::binary) | |
~bifstream () final | |
void | seek (long spos, Offset offs) final |
streampos | pos () final |
bifstream::Byte | getByte () final |
void | getRaw (char *c, streamsize n) final |
![]() | |
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 |
Private Attributes | |
FILE * | mfilep {nullptr} |
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 |
![]() | |
virtual Byte | getByte ()=0 |
virtual void | getRaw (char *c, std::streamsize n)=0 |
![]() | |
Flags | my_flags {system_flags} |
Error | err {NoError} |
![]() | |
static const Flags | system_flags = binio::detect_system_flags() |
Binary output file stream class.
Handles writing to an output file stream in binary format. It makes it possible to use the operator<< for binary output.
Definition at line 26 of file bifstream.h.
|
inline |
Definition at line 28 of file bifstream.h.
|
inlineexplicit |
Definition at line 30 of file bifstream.h.
References ARTS_USER_ERROR, and mfilep.
|
inlinefinal |
Definition at line 39 of file bifstream.h.
References mfilep.
|
finalvirtual |
|
inlinefinal |
Definition at line 49 of file bifstream.h.
References ARTS_USER_ERROR_IF, c, mfilep, and seek().
|
finalvirtual |
|
finalvirtual |
Implements binio.
Definition at line 17 of file bifstream.cc.
References binio::err.
Referenced by getRaw().
|
private |
Definition at line 61 of file bifstream.h.
Referenced by bifstream(), getRaw(), and ~bifstream().