ARTS  2.4.0(git:4fb77825)
binostream Class Referenceabstract

#include <binio.h>

Inheritance diagram for binostream:
binio binstream bofstream

Public Member Functions

 binostream ()
 
virtual ~binostream ()
 
void writeInt (Int val, unsigned int size)
 
void writeFloat (Float f, FType ft)
 
unsigned long writeString (const char *str, unsigned long amount=0)
 
unsigned long writeString (const std::string &str)
 
- Public Member Functions inherited from binio
 binio ()
 
virtual ~binio ()
 
void setFlag (Flag f, bool set=true)
 
bool getFlag (Flag f)
 
Error error ()
 
bool eof ()
 
virtual void seek (long, Offset=Set)=0
 
virtual streampos pos ()=0
 

Protected Member Functions

virtual void putByte (Byte)=0
 
virtual void putRaw (const char *c, streamsize n)=0
 

Private Member Functions

void float2ieee_single (Float f, Byte *data)
 
void float2ieee_double (Float f, Byte *data)
 

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

Definition at line 145 of file binio.h.

Constructor & Destructor Documentation

◆ binostream()

binostream::binostream ( )

Definition at line 395 of file binio.cc.

◆ ~binostream()

binostream::~binostream ( )
virtual

Definition at line 397 of file binio.cc.

Member Function Documentation

◆ float2ieee_double()

void binostream::float2ieee_double ( Float  f,
Byte data 
)
private

Definition at line 609 of file binio.cc.

References DEXP_MAX, DEXP_OFFSET, DEXP_POSITION, FloatToUnsigned, and sign().

Referenced by writeFloat().

◆ float2ieee_single()

void binostream::float2ieee_single ( Float  f,
Byte data 
)
private

Definition at line 552 of file binio.cc.

References SEXP_MAX, SEXP_OFFSET, SEXP_POSITION, and sign().

Referenced by writeFloat().

◆ putByte()

virtual void binostream::putByte ( Byte  )
protectedpure virtual

Implemented in bofstream.

Referenced by writeFloat(), writeInt(), and writeString().

◆ putRaw()

virtual void binostream::putRaw ( const char *  c,
streamsize  n 
)
protectedpure virtual

Implemented in bofstream.

Referenced by writeFloat().

◆ writeFloat()

◆ writeInt()

void binostream::writeInt ( Int  val,
unsigned int  size 
)

Definition at line 399 of file binio.cc.

References binio::BigEndian, binio::err, binio::getFlag(), putByte(), and binio::Unsupported.

Referenced by operator<<().

◆ writeString() [1/2]

unsigned long binostream::writeString ( const char *  str,
unsigned long  amount = 0 
)

Definition at line 680 of file binio.cc.

References binio::err, and putByte().

Referenced by writeString().

◆ writeString() [2/2]

unsigned long binostream::writeString ( const std::string &  str)

Definition at line 694 of file binio.cc.

References writeString().


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