ARTS 2.5.11 (git: 725533f0)
binio Class Referenceabstract

#include <binio.h>

Inheritance diagram for binio:
binistream binostream bifstream bofstream

Public Types

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
 

Public Member Functions

 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 Types

using Int = std::int64_t
 
using Float = double
 
using Byte = unsigned char
 
using Flags = int
 

Protected Attributes

Flags my_flags {system_flags}
 
Error err {NoError}
 

Static Protected Attributes

static const Flags system_flags = binio::detect_system_flags()
 

Static Private Member Functions

static Flags detect_system_flags ()
 

Detailed Description

Definition at line 50 of file binio.h.

Member Typedef Documentation

◆ Byte

using binio::Byte = unsigned char
protected

Definition at line 82 of file binio.h.

◆ Error

using binio::Error = int

Definition at line 66 of file binio.h.

◆ ErrorCode

using binio::ErrorCode = enum { NoError = 0, Fatal = 1 << 0, Unsupported = 1 << 1, NotOpen = 1 << 2, Denied = 1 << 3, NotFound = 1 << 4, Eof = 1 << 5 }

Definition at line 54 of file binio.h.

◆ Flag

using binio::Flag = enum { BigEndian = 1 << 0, FloatIEEE = 1 << 1 }

Definition at line 52 of file binio.h.

◆ Flags

using binio::Flags = int
protected

Definition at line 84 of file binio.h.

◆ Float

using binio::Float = double
protected

Definition at line 81 of file binio.h.

◆ FType

using binio::FType = enum { Single, Double }

Definition at line 65 of file binio.h.

◆ Int

using binio::Int = std::int64_t
protected

Definition at line 80 of file binio.h.

◆ Offset

using binio::Offset = enum { Set, Add, End }

Definition at line 64 of file binio.h.

Constructor & Destructor Documentation

◆ binio()

binio::binio ( )

Definition at line 66 of file binio.cc.

References ARTS_USER_ERROR, setFlag(), and system_flags.

Member Function Documentation

◆ detect_system_flags()

binio::Flags binio::detect_system_flags ( )
staticprivate

Definition at line 37 of file binio.cc.

◆ eof()

bool binio::eof ( )

Definition at line 94 of file binio.cc.

References err.

Referenced by binistream::ateof().

◆ error()

binio::Error binio::error ( )

Definition at line 87 of file binio.cc.

References err.

◆ getFlag()

bool binio::getFlag ( Flag  f)

◆ pos()

virtual std::streampos binio::pos ( )
pure virtual

Implemented in bifstream, and bofstream.

◆ seek()

virtual void binio::seek ( long  ,
Offset  = Set 
)
pure virtual

Implemented in bifstream, and bofstream.

Referenced by binistream::peekFloat(), and binistream::peekInt().

◆ setFlag()

void binio::setFlag ( Flag  f,
bool  set = true 
)

Definition at line 78 of file binio.cc.

References my_flags.

Referenced by binio().

Member Data Documentation

◆ err

◆ my_flags

Flags binio::my_flags {system_flags}
protected

Definition at line 86 of file binio.h.

Referenced by getFlag(), and setFlag().

◆ system_flags

const binio::Flags binio::system_flags = binio::detect_system_flags()
staticprotected

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