214 if ( (
l > newsize) && copy ) {
226 Fatal(
"Expand",
"Failed to expand the data buffer using TStorage::ReAllocChar.");
228 Fatal(
"Expand",
"Failed to expand the data buffer because TBuffer does not own it and no custom memory reallocator was provided.");
230 Fatal(
"Expand",
"Failed to expand the data buffer using custom memory reallocator 0x%lx.", (
Long_t)
fReAllocFunc);
static char * R__NoReAllocChar(char *, size_t, size_t)
The user has provided memory than we don't own, thus we can not extent it either.
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
Buffer base class used for serializing objects.
void SetWriteMode()
Set buffer in write mode.
void SetReAllocFunc(ReAllocCharFun_t reallocfunc=0)
Set which memory reallocation method to use.
CacheList_t fCacheStack
Realloc function to be used when extending the buffer.
virtual TProcessID * ReadProcessID(UShort_t pidf)=0
Return the current Process-ID.
virtual UShort_t WriteProcessID(TProcessID *pid)=0
Always return 0 (current processID).
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
void SetParent(TObject *parent)
Set parent owning this buffer.
TObject * GetParent() const
Return pointer to parent of this buffer.
void Expand(Int_t newsize, Bool_t copy=kTRUE)
Expand (or shrink) the I/O buffer to newsize bytes.
virtual void PushDataCache(TVirtualArray *)
Push a new data cache area onto the list of area to be used for temporarily store 'missing' data memb...
virtual TVirtualArray * PopDataCache()
Pop and Return the 'current' data cache area from the list of area to be used for temporarily store '...
void AutoExpand(Int_t size_needed)
Automatically calculate a new size and expand the buffer to fit at least size_needed.
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.
virtual TVirtualArray * PeekDataCache() const
Return the 'current' data cache area from the list of area to be used for temporarily store 'missing'...
virtual ~TBuffer()
Delete an I/O buffer object.
static TClass * GetClass(const std::type_info &typeinfo)
Forward to TROOT::GetClass().
ReAllocCharFun_t GetReAllocFunc() const
Return the reallocation method currently used.
ReAllocCharFun_t fReAllocFunc
void SetReadMode()
Set buffer in read mode.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
The ROOT global object gROOT contains a list of all defined classes.
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.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
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.
A TProcessID identifies a ROOT job in a unique way in time and space.
static TProcessID * GetPID()
static: returns pointer to current TProcessID
static char * ReAllocChar(char *vp, size_t size, size_t oldsize)
Reallocate (i.e.
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
void DefaultStreamer(TBuffer &R__b, const TClass *cl, void *objpointer)
Default streamer implementation used by ClassDefInline to avoid requirement to include TBuffer....