Portability Libraries  2015.2.0.0
Common Methods and Objects for Platform Independance.
SoftwareAndServices::Library::Common::Base Class Reference

#include "<SaS/Common/Base.hpp>"

+ Inheritance diagram for SoftwareAndServices::Library::Common::Base:
+ Collaboration diagram for SoftwareAndServices::Library::Common::Base:

Public Types

enum  endian_t { BigEndian_t = 4321, LittleEndian_t = 1234, NetworkByteOrder_t = BigEndian_t, UnknownEndian_t = 0 }
enum  open_flags { O_CREAT_t = O_CREAT, O_RDONLY_t = O_RDONLY, O_WRONLY_t = O_WRONLY }
- Public Types inherited from SoftwareAndServices::Library::Common::File
enum  Whence_t { SEEK_SET_t = SEEK_SET, SEEK_CUR_t = SEEK_CUR, SEEK_END_t = SEEK_END }

Public Member Functions

 Base (const int fd, const char *aFileName)
 Base (const char *buffer)
 Base (const wchar_t *buffer)
 Base (File *file=NULL)
virtual ~Base ()
bool close ()
void DoIoInNetworkByteOrder (bool NetOrder)
bool open (const char *file, int RWmode)
void operator delete (void *data)
bool readBool (bool *Value)
bool readChar (char *Value)
bool readDouble (double *Value)
bool readEndian (endian_t *Value)
bool readFloat (float *Value)
bool readInt (int *Value)
bool readLong (long *Value)
bool readLongLong (long long *Value)
bool readShort (short *Value)
bool readString (char **Value)
bool readToken (Token_t *token)
bool readUChar (unsigned char *Value)
bool readUInt (unsigned int *Value)
bool readULong (unsigned long *Value)
bool readULongLong (unsigned long long *Value)
bool readUShort (unsigned short *Value)
bool WeAreNetworkByteOrder ()
bool writeBool (bool Value)
bool writeChar (char Value)
bool writeDouble (double Value)
bool writeEndian (endian_t Value)
bool writeFloat (float Value)
bool writeInt (int Value)
bool writeLong (long Value)
bool writeLongLong (long long Value)
bool writeShort (short Value)
bool writeString (const char *Value)
bool writeToken (const Token_t token)
bool writeUChar (unsigned char Value)
bool writeUInt (unsigned int Value)
bool writeULong (unsigned long Value)
bool writeULongLong (unsigned long long Value)
bool writeUShort (unsigned short Value)
- Public Member Functions inherited from SoftwareAndServices::Library::Common::File
 File ()
 File (const int fd, const char *aFileName)
 File (const void *buffer, uint32_t BufferSize=0)
 File (const wchar_t *buffer, uint32_t BufferSize=0)
 File (char **buffer, uint32_t *BufferSize=NULL)
 File (wchar_t **buffer, uint32_t *BufferSize=NULL)
virtual ~File ()
bool AtEOF ()
uint32_t CanRead ()
bool Close ()
bool Encrypt (bool DoEncryption)
bool Flush ()
const char * GetBuffer () const
uint32_t GetBufferSize () const
int GetFd ()
const char * GetFileName () const
bool IsMMapped () const
bool Keys (const char *Private, const char *Public)
char LookNext ()
off_t Lseek (off_t offset, Whence_t whence)
bool Mkdir (const char *path, mode_t mode)
bool NextIsLwsp ()
bool Open (const char *file, int RWmode)
int Printf (const char *Format,...)
uint32_t Read (void *data, const uint32_t Length, bool force=true)
bool ReadLine (uint8_t **Results, uint32_t &Length, bool Force=true, bool DiscardEol=true)
off_t Tell ()
void ThrowExceptions (bool Enable)
uint32_t Write (const void *data, const uint32_t Length)
uint32_t Write (const char *data)
- Public Member Functions inherited from SoftwareAndServices::Library::Common::instance< File >
 instance ()
virtual InstanceCount_t decInstance () const
virtual InstanceCount_t getInstance () const
virtual InstanceCount_t incInstance () const
void operator delete (void *ToFree)

Additional Inherited Members

- Static Public Member Functions inherited from SoftwareAndServices::Library::Common::File
static const char * GetTopDir ()
static bool Lock (const char *fileName)
static bool LockFileOnly (const char *fileName)
static bool SetTopDir (const char *theTop)
static bool Trylock (const char *fileName)
static bool Unlock (const char *fileName)
static bool UnlockFileOnly (const char *fileName)
- Static Public Attributes inherited from SoftwareAndServices::Library::Common::File
static const char * DefaultTopDir
static const char * NewTmpFileExt

Detailed Description

A portable I/O library for reading and writing binary data.

Write/read the data type to/from storage.

It takes the object and the token and data, and call the correct writeObject(File *) or writeObject(File *) method to save the data.

The 'all' flag, forces writeArray to write ALL objects. By default, _Method_t (and others? check Base.cc for authoritative source) is not written to storage as it is a process time action and not a state object.

Software and Services LLC

Definition at line 125 of file Base.hpp.

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