31#define BINIO_ENABLE_STRING 1
37#define BINIO_ISO_STDLIB 1
43#pragma warning(disable : 4250)
46#if BINIO_ENABLE_STRING
52 using Flag =
enum { BigEndian = 1 << 0, FloatIEEE = 1 << 1 };
64 using Offset =
enum { Set, Add, End };
65 using FType =
enum { Single, Double };
77 virtual std::streampos
pos() = 0;
80 using Int = std::int64_t;
82 using Byte =
unsigned char;
101 unsigned long readString(
char *str,
unsigned long amount);
102 unsigned long readString(
char *str,
unsigned long maxlen,
const char delim);
105#if BINIO_ENABLE_STRING
106 std::string
readString(
const char delim =
'\0');
113 void ignore(
unsigned long amount = 1);
117 virtual void getRaw(
char *
c, std::streamsize n) = 0;
124 unsigned long writeString(
const char *str,
unsigned long amount = 0);
125#if BINIO_ENABLE_STRING
131 virtual void putRaw(
const char *
c, std::streamsize n) = 0;
The global header file for ARTS.
void setFlag(Flag f, bool set=true)
virtual void seek(long, Offset=Set)=0
static Flags detect_system_flags()
virtual std::streampos pos()=0
enum { Set, Add, End } Offset
static const Flags system_flags
enum { BigEndian=1<< 0, FloatIEEE=1<< 1 } Flag
enum { Single, Double } FType
enum { NoError=0, Fatal=1<< 0, Unsupported=1<< 1, NotOpen=1<< 2, Denied=1<< 3, NotFound=1<< 4, Eof=1<< 5 } ErrorCode
unsigned long readString(char *str, unsigned long amount)
Float peekFloat(FType ft)
void ignore(unsigned long amount=1)
Int readInt(unsigned int size)
virtual void getRaw(char *c, std::streamsize n)=0
Int peekInt(unsigned int size)
Float readFloat(FType ft)
void readDoubleArray(double *d, unsigned long size)
void writeInt(Int val, unsigned int size)
virtual void putRaw(const char *c, std::streamsize n)=0
virtual void putByte(Byte)=0
unsigned long writeString(const char *str, unsigned long amount=0)
void writeFloat(Float f, FType ft)