ARTS 2.5.11 (git: 6827797f)
bofstream Class Reference

Binary output file stream class. More...

#include <bofstream.h>

Inheritance diagram for bofstream:
binostream binio

Public Member Functions

 bofstream ()
 bofstream (const char *name, ios::openmode mode=ios::out|ios::trunc|ios::binary)
void seek (long spos, Offset offs) override final
streampos pos () override final
void putByte (bofstream::Byte b) override final
void putRaw (const char *c, streamsize n) override final
- Public Member Functions inherited from binostream
void writeInt (Int val, unsigned int size)
void writeFloat (Float f, FType ft)
unsigned long writeString (const char *str, unsigned long amount=0)
- 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

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 Member Functions inherited from binostream
virtual void putByte (Byte)=0
virtual void putRaw (const char *c, std::streamsize n)=0
- 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

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 25 of file bofstream.h.

Constructor & Destructor Documentation

◆ bofstream() [1/2]

bofstream::bofstream ( )

Definition at line 27 of file bofstream.h.

◆ bofstream() [2/2]

bofstream::bofstream ( const char *  name,
ios::openmode  mode = ios::out | ios::trunc | ios::binary 

Definition at line 29 of file bofstream.h.

Member Function Documentation

◆ pos()

streampos bofstream::pos ( )

Implements binio.

Definition at line 36 of file

References binio::err.

◆ putByte()

void bofstream::putByte ( bofstream::Byte  b)

Implements binostream.

Definition at line 44 of file

References ARTS_USER_ERROR, b, and binio::err.

◆ putRaw()

void bofstream::putRaw ( const char *  c,
streamsize  n 

Definition at line 37 of file bofstream.h.

References c.

◆ seek()

void bofstream::seek ( long  spos,
Offset  offs 

Implements binio.

Definition at line 17 of file

References binio::err.

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