49 #ifndef SOFTWARE_AND_SERVICES_LIBRARY_COMMON_BASE_HPP_ 50 #define SOFTWARE_AND_SERVICES_LIBRARY_COMMON_BASE_HPP_ 53 #pragma warning (disable : 4251) 57 #include <sys/types.h> 59 #ifdef BUILDING_SAS_COMMON_LIBRARY 65 #include <SaS/Common/osver.h> 66 #include <SaS/Common/File.hpp> 67 #include <SaS/Common/VBase.hpp> 68 #include <SaS/Common/instance.hpp> 76 #ifdef BUILDING_SAS_COMMON_LIBRARY 77 #define EXPORT_COMMON EXPORT_OUT 79 #define EXPORT_COMMON EXPORT_IN 84 #define htonll(u64) _byteswap_uint64(u64) 85 #define ntohll(u64) _byteswap_uint64(u64) 93 uint64_t htonll(uint64_t host64);
94 uint64_t ntohll(uint64_t host64);
140 Base(std::fstream * fs,
const char * aFileName);
149 Base(
const int fd,
const char * aFileName);
157 explicit Base(
const char * buffer);
164 explicit Base(
const wchar_t * buffer);
191 bool open(
const char * file,
int RWmode);
211 void operator delete(
void * data);
223 O_RDONLY_t = O_RDONLY,
226 O_WRONLY_t = O_WRONLY
236 LittleEndian_t = 1234,
237 NetworkByteOrder_t = BigEndian_t,
248 void DoIoInNetworkByteOrder(
bool NetOrder);
255 bool WeAreNetworkByteOrder();
276 bool writeBool(
bool Value);
283 bool readBool(
bool * Value);
290 bool writeChar(
char Value);
299 bool readChar(
char * Value);
306 bool writeUChar(
unsigned char Value);
315 bool readUChar(
unsigned char * Value);
322 bool writeShort(
short Value);
329 bool readShort(
short * Value);
336 bool writeUShort(
unsigned short Value);
343 bool readUShort(
unsigned short * Value);
350 bool writeInt(
int Value);
357 bool readInt(
int * Value);
364 bool writeUInt(
unsigned int Value);
371 bool readUInt(
unsigned int * Value);
378 bool writeLong(
long Value);
385 bool readLong(
long * Value);
392 bool writeULong(
unsigned long Value);
399 bool readULong(
unsigned long * Value);
406 bool readLongLong(
long long * Value);
413 bool writeLongLong(
long long Value);
420 bool readULongLong(
unsigned long long * Value);
427 bool writeULongLong(
unsigned long long Value);
434 bool readFloat(
float * Value);
441 bool writeFloat(
float Value);
448 bool readDouble(
double * Value);
455 bool writeDouble(
double Value);
462 bool writeString(
const char * Value);
469 bool readString(
char ** Value);
476 bool writeToken(
const Token_t token);
483 bool readToken(Token_t * token);
490 bool _DoIoInNetworkByteOrder;
endian_t
enumerated types for BIG_ENDIAN and LITTLE_ENDIAN.
Like 'FILE', except C++ implementation and allows sockets and disk files to use same object on WINDOW...
A portable I/O library for reading and writing binary data.
open_flags
Open a file flags.
"<SaS/Common/mingw.hpp>" Definitions when compiling with MINGW.
Copyright Douglas Mark Royer DouglasRoyer@gmail.com.
Base class for instance counting objects.
Base virtual functions for IO.
"<SaS/Common/psver.h>" Definitions specific to various OS's and OS versions.