GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ADF::BufferIO Class Reference

#include <BufferIO.h>

Inheritance diagram for ADF::BufferIO:

Public Member Functions

Char_t * Address ()
 for classes that needs it to write directly data into it. More...
 
 BufferIO (UInt_t s=aByte)
 Default size for a BufferIO is one byte just because it could be used only with an external buffer. More...
 
virtual Bool_t Copy (const Char_t *from, UInt_t from_size)
 copy an external buffer to this. More...
 
Char_t * CurrentAddress ()
 for classes that needs it to write directly data into it. More...
 
virtual Bool_t Expand (UInt_t new_size)
 Expand the size of the current buffer. More...
 
virtual UInt_t Export (Char_t *, UInt_t) const
 Export this buffer to an array. More...
 
virtual UInt_t Export (UShort_t *, UInt_t) const
 
virtual UInt_t Export (Short_t *, UInt_t) const
 
virtual UInt_t Export (UInt_t *, UInt_t) const
 
virtual UInt_t Export (Int_t *, UInt_t) const
 
virtual UInt_t Export (Float_t *, UInt_t) const
 
virtual UInt_t Export (Double_t *, UInt_t) const
 Export this buffer to an array of doubles. More...
 
virtual UInt_t Export (FILE *, UInt_t) const
 Export this buffer to a C files. More...
 
virtual UInt_t Export (std::ostream &, UInt_t) const
 Export this buffer. More...
 
virtual void FastReset ()
 
virtual UInt_t FillWith (Char_t c, UInt_t how_many)
 add the same character how_many times from the current position More...
 
UInt_t FreeSize () const
 it returns the number of free bytes to the end More...
 
const Char_t * GetAddress () const
 Pointer to the current underlying array of bytes. More...
 
BaseBuffer::EEndian GetEndian () const
 
BufferIO::EStatus GetStatus () const
 
UInt_t Import (const Char_t *from, UInt_t size_ext_buf)
 Import the given array in this buffer. More...
 
virtual UInt_t Import (const UShort_t *, UInt_t)
 Import the given array in this buffer. More...
 
virtual UInt_t Import (const Short_t *, UInt_t)
 
virtual UInt_t Import (const UInt_t *, UInt_t)
 
virtual UInt_t Import (const Int_t *, UInt_t)
 
virtual UInt_t Import (const Float_t *, UInt_t)
 
virtual UInt_t Import (const Double_t *, UInt_t)
 Import the given array in this buffer. More...
 
virtual UInt_t Import (const BufferIO &, UInt_t)
 Import in this buffer the content of another buffer. More...
 
virtual UInt_t Import (FILE *, UInt_t)
 Import in the buffer data coming from a C file. More...
 
virtual UInt_t Import (std::istream &, UInt_t)
 Import in the buffer data coming from a C++ stream. More...
 
Bool_t IsAnOffset (const Char_t *off, UInt_t &pos) const
 check if this address belongs to this buffer More...
 
Bool_t IsEndian (BaseBuffer::EEndian e) const
 
virtual Bool_t IsLinked ()
 check if this is linked or not More...
 
Bool_t IsStatus (BufferIO::EStatus s) const
 
virtual Bool_t Link (const Char_t *from, UInt_t from_size)
 Link an external buffer to this class. More...
 
virtual Bool_t Link (const BufferIO &buf, UInt_t pos, UInt_t size)
 Link a buffer to this buffer. More...
 
UInt_t Offset () const
 it returns the current position in the buffer More...
 
virtual BufferIOoperator<< (Char_t)
 
virtual BufferIOoperator<< (UChar_t)
 
virtual BufferIOoperator<< (Short_t)
 
virtual BufferIOoperator<< (UShort_t)
 
virtual BufferIOoperator<< (Int_t)
 
virtual BufferIOoperator<< (UInt_t)
 
virtual BufferIOoperator<< (Float_t)
 
virtual BufferIOoperator<< (Double_t)
 
virtual BufferIOoperator<< (Long_t)
 
virtual BufferIOoperator<< (ULong_t)
 
virtual BufferIOoperator<< (Long64_t)
 
virtual BufferIOoperator<< (ULong64_t)
 
virtual BufferIOoperator<< (std::string)
 string can be handled BUT only with size less that 2^16 chars. Use Import/Export method otherwise More...
 
virtual const BufferIOoperator>> (Char_t &) const
 
virtual const BufferIOoperator>> (UChar_t &) const
 
virtual const BufferIOoperator>> (Short_t &) const
 
virtual const BufferIOoperator>> (UShort_t &) const
 
virtual const BufferIOoperator>> (Int_t &) const
 
virtual const BufferIOoperator>> (UInt_t &) const
 
virtual const BufferIOoperator>> (Float_t &) const
 
virtual const BufferIOoperator>> (Double_t &) const
 
virtual const BufferIOoperator>> (Long_t &) const
 
virtual const BufferIOoperator>> (ULong_t &) const
 
virtual const BufferIOoperator>> (Long64_t &) const
 
virtual const BufferIOoperator>> (ULong64_t &) const
 
virtual const BufferIOoperator>> (std::string &) const
 string can be handled BUT only with size less that 2^16 chars. Use Import/Export method otherwise More...
 
virtual Bool_t Reserve (UInt_t size)
 to reserve a given size (from the current position) to be sure one are able to write something More...
 
virtual void Reset ()
 Reset means set all elements to 0 and the current position is 0. More...
 
UInt_t SetEffectiveSize (UInt_t size=kMaxUInt_t)
 in case the buffer is partly filled and you would like to read it again More...
 
UInt_t SetOffset (UInt_t off=0u) const
 change the current position. More...
 
UInt_t SetOffset (const Char_t *off) const
 change the current position. More...
 
void SetStatus (BufferIO::EStatus s=BaseBuffer::kGood)
 
UInt_t Size () const
 it returns the maximum number of bytes in this buffer More...
 
virtual Char_t * Unlink ()
 Unlink the external buffer to this class. More...
 
virtual ~BufferIO ()
 

Static Public Member Functions

static Bool_t Copy (const BufferIO &from, BufferIO &to, UInt_t size, UInt_t off_from=0u)
 copy from a buffer to another one More...
 
static Bool_t Copy (const BufferIO &from, BufferIO &to)
 copy a buffer to another one More...
 
static BufferIONew (BaseBuffer::EEndian e, UInt_t s=aByte)
 return the right buffer taking Into account the endian argument compared to the underlying endian system type. More...
 

Protected Types

enum  EEndian { kLittle = 0, kBig = 1 }
 
enum  EStatus { kGood, kFail, kCorrupt }
 Status for this buffer. More...
 

Protected Member Functions

void AllocInner (UInt_t)
 
void SetCurrent (const char= 'i')
 to switch between inner and outer More...
 
void SetEndian (BaseBuffer::EEndian e)
 

Static Protected Member Functions

static void Copy (const void *from, void *to, Int_t size)
 copy the content from -> to More...
 
static void Copy (const void *from, void *to, UInt_t size)
 
static void Delete (Char_t *p)
 
static void Delete (Short_t *p)
 
static void Delete (Int_t *p)
 
static void Delete (UChar_t *p)
 
static void Delete (UShort_t *p)
 
static void Delete (UInt_t *p)
 
static void Delete (Float_t *p)
 
static void Delete (Double_t *p)
 
static bool IsSysEndian (BaseBuffer::EEndian e)
 check out the endian type of the running system More...
 
static Char_t * New (Char_t *p, Int_t nb=32 *aKByte)
 
static Short_t * New (Short_t *p, Int_t nb=32 *aKByte)
 
static Int_t * New (Int_t *p, Int_t nb=32 *aKByte)
 
static UChar_t * New (UChar_t *p, Int_t nb=32 *aKByte)
 
static UShort_t * New (UShort_t *p, Int_t nb=32 *aKByte)
 
static UInt_t * New (UInt_t *p, Int_t nb=32 *aKByte)
 
static Float_t * New (Float_t *p, Int_t nb=32 *aKByte)
 
static Double_t * New (Double_t *p, Int_t nb=32 *aKByte)
 
static Char_t * New (Char_t *p, UInt_t nb)
 
static Short_t * New (Short_t *p, UInt_t nb)
 
static Int_t * New (Int_t *p, UInt_t nb)
 
static UChar_t * New (UChar_t *p, UInt_t nb)
 
static UShort_t * New (UShort_t *p, UInt_t nb)
 
static UInt_t * New (UInt_t *p, UInt_t nb)
 
static Float_t * New (Float_t *p, UInt_t nb)
 
static Double_t * New (Double_t *p, UInt_t nb)
 
static void Swap (Short_t, Char_t *)
 the Swap members More...
 
static void Swap (UShort_t, Char_t *)
 
static void Swap (Int_t, Char_t *)
 
static void Swap (UInt_t, Char_t *)
 
static void Swap (Float_t, Char_t *)
 
static void Swap (Double_t, Char_t *)
 
static void Swap (Long64_t, Char_t *)
 
static void Swap (ULong64_t, Char_t *)
 
static void Swap (Long_t, Char_t *)
 
static void Swap (ULong_t, Char_t *)
 
static void Swap (const Char_t *, Short_t &)
 
static void Swap (const Char_t *, UShort_t &)
 
static void Swap (const Char_t *, Int_t &)
 
static void Swap (const Char_t *, UInt_t &)
 
static void Swap (const Char_t *, Float_t &)
 
static void Swap (const Char_t *, Double_t &)
 
static void Swap (const Char_t *, Long64_t &)
 
static void Swap (const Char_t *, ULong64_t &)
 
static void Swap (const Char_t *, Long_t &)
 
static void Swap (const Char_t *, ULong_t &)
 
static EEndian SysEndian ()
 
static void Zero (Char_t *p, Int_t nb)
 
static void Zero (Short_t *p, Int_t nb)
 
static void Zero (Int_t *p, Int_t nb)
 
static void Zero (UChar_t *p, Int_t nb)
 
static void Zero (UShort_t *p, Int_t nb)
 
static void Zero (UInt_t *p, Int_t nb)
 
static void Zero (Float_t *p, Int_t nb)
 
static void Zero (Double_t *p, Int_t nb)
 
static void Zero (Char_t *p, UInt_t nb)
 
static void Zero (Short_t *p, UInt_t nb)
 
static void Zero (Int_t *p, UInt_t nb)
 
static void Zero (UChar_t *p, UInt_t nb)
 
static void Zero (UShort_t *p, UInt_t nb)
 
static void Zero (UInt_t *p, UInt_t nb)
 
static void Zero (Float_t *p, UInt_t nb)
 
static void Zero (Double_t *p, UInt_t nb)
 

Protected Attributes

Char_t * fBufferIO
 current buffer in which data are read/written More...
 
UInt_t fCurrent
 current position in the buffer (mutable so that reading are allowed for constant) More...
 
EEndian fEndian
 current endian More...
 
UInt_t fRealSize
 Real size of the current buffer. More...
 
UInt_t fSize
 effective size of the current buffer More...
 
EStatus fStatus
 current status More...
 

Friends

class CompositeFrame
 

Detailed Description

Definition at line 50 of file BufferIO.h.


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