ARTS  2.2.66
bifstream Class Reference

Binary output file stream class. More...

#include <bifstream.h>

Inheritance diagram for bifstream:
binistream binio

Public Member Functions

 bifstream ()
 
 bifstream (const char *name, ios::openmode mode=ios::in|ios::binary)
 
virtual ~bifstream ()
 
void seek (long spos, Offset offs)
 
streampos pos ()
 
bifstream::Byte getByte ()
 
void getRaw (char *c, streamsize n)
 
- Public Member Functions inherited from binistream
 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 ()
 

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

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 44 of file bifstream.h.

Constructor & Destructor Documentation

◆ bifstream() [1/2]

bifstream::bifstream ( )
inline

Definition at line 47 of file bifstream.h.

◆ bifstream() [2/2]

bifstream::bifstream ( const char *  name,
ios::openmode  mode = ios::in | ios::binary 
)
inlineexplicit

Definition at line 50 of file bifstream.h.

References binio::BigEndian, binio::FloatIEEE, and binio::setFlag().

◆ ~bifstream()

virtual bifstream::~bifstream ( )
inlinevirtual

Definition at line 60 of file bifstream.h.

Member Function Documentation

◆ getByte()

bifstream::Byte bifstream::getByte ( )
virtual

Implements binistream.

Definition at line 52 of file bifstream.cc.

References binio::Eof, binio::err, and binio::NotOpen.

◆ getRaw()

void bifstream::getRaw ( char *  c,
streamsize  n 
)
inlinevirtual

Implements binistream.

Definition at line 65 of file bifstream.h.

◆ pos()

streampos bifstream::pos ( )
virtual

Implements binio.

Definition at line 46 of file bifstream.cc.

References binio::err, and binio::NotOpen.

◆ seek()

void bifstream::seek ( long  spos,
Offset  offs 
)
virtual

Implements binio.

Definition at line 35 of file bifstream.cc.

References binio::Add, binio::End, binio::err, binio::NotOpen, and binio::Set.


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