28 static
char *R__NoReAllocChar(
char *,
size_t,
size_t)
114 if (buf && ( (
fMode&
kWrite)!=0 ) && fBufSize < 0) {
186 if (buf && ( (
fMode&
kWrite)!=0 ) && fBufSize < 0) {
202 if ( (l > newsize) && copy ) {
214 Fatal(
"Expand",
"Failed to expand the data buffer using TStorage::ReAllocChar.");
216 Fatal(
"Expand",
"Failed to expand the data buffer because TBuffer does not own it and no custom memory reallocator was provided.");
218 Fatal(
"Expand",
"Failed to expand the data buffer using custom memory reallocator 0x%lx.", (
Long_t)
fReAllocFunc);
TObject * GetParent() const
Return pointer to parent of this buffer.
static TProcessID * GetPID()
static: returns pointer to current TProcessID
virtual ~TBuffer()
Delete an I/O buffer object.
static TClass * GetClass(const type_info &typeinfo)
Forward to TROOT::GetClass().
ReAllocCharFun_t fReAllocFunc
Buffer base class used for serializing objects.
virtual TVirtualArray * PeekDataCache() const
Return the 'current' data cache area from the list of area to be used for temporarily store 'missing'...
void SetParent(TObject *parent)
Set parent owning this buffer.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual TProcessID * ReadProcessID(UShort_t pidf)=0
Return the current Process-ID.
static char * ReAllocChar(char *vp, size_t size, size_t oldsize)
Reallocate (i.e.
A TProcessID identifies a ROOT job in a unique way in time and space.
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
ClassImp(TBuffer) static char *R__NoReAllocChar(char *
The user has provided memory than we don't own, thus we can not extent it either. ...
virtual UShort_t WriteProcessID(TProcessID *pid)=0
Always return 0 (current processID).
void Expand(Int_t newsize, Bool_t copy=kTRUE)
Expand (or shrink) the I/O buffer to newsize bytes.
CacheList_t fCacheStack
Realloc function to be used when extending the buffer.
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
Bool_t TestBit(UInt_t f) const
void SetReadMode()
Set buffer in read mode.
The ROOT global object gROOT contains a list of all defined classes.
virtual TVirtualArray * PopDataCache()
Pop and Return the 'current' data cache area from the list of area to be used for temporarily store '...
virtual void PushDataCache(TVirtualArray *)
Push a new data cache area onto the list of area to be used for temporarily store 'missing' data memb...
ReAllocCharFun_t GetReAllocFunc() const
Return the reallocation method currently used.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Mother of all ROOT objects.
void SetReAllocFunc(ReAllocCharFun_t reallocfunc=0)
Set which memory reallocation method to use.
void AutoExpand(Int_t size_needed)
Automatically calculate a new size and expand the buffer to fit at least size_needed.
void SetWriteMode()
Set buffer in write mode.
void SetBuffer(void *buf, UInt_t bufsiz=0, Bool_t adopt=kTRUE, ReAllocCharFun_t reallocfunc=0)
Sets a new buffer in an existing TBuffer object.