11 #ifndef ROOT_TGenCollectionProxy 12 #define ROOT_TGenCollectionProxy 38 typedef const std::type_info&
Info_t;
40 typedef const std::type_info&
Info_t;
106 return *(&this->p_void);
109 return (std::string*)
this;
112 return ((std::string*)
this)->c_str();
115 return (*(std::string**)
this)->c_str();
118 *(&this->p_void) = p;
123 ((std::string*)
this)->assign(s.
Data());
132 std::string* str2 = (std::string*)ptr();
133 if (!str2) str2 =
new std::string();
141 std::string* strptr = (*(std::string**)
this);
142 c = (
const char*)(strptr->c_str());
152 else if ( v->
fType ) {
155 else if ( v->
fDtor ) {
157 ::operator
delete(p);
160 ::operator
delete(p);
194 typedef void* (*Call_t)(
void*);
200 void*
invoke(
void* obj)
const {
return (*call)(obj); }
214 typedef void* (*Call_t)();
220 void*
invoke()
const {
return (*call)(); }
244 TStaging(
size_t size,
size_t size_of) : fTarget(0), fContent(0), fReserved(0), fSize(size), fSizeOf(size_of)
248 fContent =
::malloc(fReserved * fSizeOf);
262 return ((
char*)fContent) + fSize*fSizeOf;
273 if (fReserved < nelement) {
274 fReserved = nelement;
275 fContent =
::realloc(fContent,fReserved * fSizeOf);
294 typedef void* (*Feedfunc_t)(
void *from,
void *to,
size_t size);
295 typedef void* (*Collectfunc_t)(
void *from,
void *to);
296 typedef void* (*ArrIterfunc_t)(
void *from,
size_t size);
395 virtual void Clear(
const char *opt =
"");
408 virtual void Insert(
const void *
data,
void *container,
size_t size);
411 virtual void Commit(
void* env);
466 template <
typename T>
474 fSize.call = T::size;
Method fSize
Container accessors: size of container.
size_t fSize
Number of elements.
void DeleteItem(void *ptr)
DeleteIterator_t fFunctionDeleteIterator
ROOT::DelFunc_t fDelete
Method cache for containee delete.
ROOT::NewFunc_t fCtor
Method cache for containee constructor.
virtual TStreamerInfoActions::TActionSequence * GetReadMemberWiseActions(Int_t version)
Return the set of action necessary to stream in this collection member-wise coming from the old value...
Proxies_t fProxyKept
Optimization: Keep proxies once they were created.
virtual UInt_t Sizeof() const
Return the sizeof the collection object.
DeleteTwoIterators_t fFunctionDeleteTwoIterators
UInt_t fProperties
Additional properties of the value type (kNeedDelete)
virtual Bool_t HasPointers() const
Return true if the content is of type 'pointer to'.
ROOT::Detail::TCollectionProxyInfo::EnvironBase EnvironBase_t
virtual void UpdateValueClass(const TClass *oldcl, TClass *newcl)
Update the internal ValueClass when a TClass constructor need to replace an emulated TClass by the re...
Bool_t fPointers
Flag to indicate if containee has pointers (key or value)
std::map< std::string, TObjArray * > * fConversionReadMemberWise
Array of bundle of TStreamerInfoActions to stream out (read) derived from another class...
Collectfunc_t fCollect
Method to collect objects from container.
std::string fName
Name of the class being proxied.
TStaging(size_t size, size_t size_of)
void * read_tstring(TBuffer &b)
virtual TStreamerInfoActions::TActionSequence * GetWriteMemberWiseActions()
Return the set of action necessary to stream out this collection member-wise.
virtual void PopProxy()
Remove the last object.
void write_tstring_pointer(TBuffer &b)
virtual void Insert(const void *data, void *container, size_t size)
Insert data into the container where data is a C-style array of the actual type contained in the coll...
Method fFirst
Container accessors: generic iteration: first.
Buffer base class used for serializing objects.
virtual EDataType GetType() const
If the content is a simple numerical value, return its type (see TDataType)
TClass * fOnFileClass
On file class.
Feedfunc_t fFeed
Container accessors: block feed.
void CheckFunctions() const
Check existence of function pointers.
UInt_t fCase
type of data of Value_type
virtual Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE)=0
void *(* CopyIterator_t)(void *dest, const void *source)
Sizing_t fResize
Container accessors: resize container.
void * invoke(void *obj) const
size_t fSize
fSize of the contained object
virtual ULong_t GetIncrement() const
Return the offset between two consecutive value_types (memory layout).
void(* DeleteIterator_t)(void *iter)
void read_std_string(TBuffer &b)
TObjArray * fReadMemberWise
Array of bundle of TStreamerInfoActions to stream out (read)
CopyIterator_t fFunctionCopyIterator
virtual CreateIterators_t GetFunctionCreateIterators(Bool_t read=kTRUE)
See typedef void (*CreateIterators_t)(void *collection, void *&begin_arena, void *&end_arena); begin_...
virtual TStreamerInfoActions::TActionSequence * GetConversionReadMemberWiseActions(TClass *oldClass, Int_t version)
Return the set of action necessary to stream in this collection member-wise coming from the old value...
void Clear()
Clear string without changing its capacity.
void *(* NewFunc_t)(void *)
Proxies_t fProxyList
Stack of recursive proxies.
void *(* ArrIterfunc_t)(void *from, size_t size)
Method fClear
Method cache for container accessors: clear container.
Method0 fCreateEnv
Method to allocate an Environment holder.
ArrIterfunc_t fConstruct
Container accessors: block construct.
virtual void Streamer(TBuffer &refBuffer)
Streamer Function.
void * fContent
Pointer to the content.
std::vector< EnvironBase_t * > Proxies_t
EDataType fKind
kind of ROOT-fundamental type
void SetTarget(void *target)
Staged_t fStaged
Optimization: Keep staged array once they were created.
void(* Sizing_t)(void *obj, size_t size)
int fValOffset
Offset from key to value (in maps)
TGenCollectionProxy * Initialize(Bool_t silent) const
Proxy initializer.
Method0 & operator=(const Method0 &m)
Small helper to save proxy environment in the event of recursive calls.
void read_std_string_pointer(TBuffer &b)
int fSTL_type
STL container type.
void(* CreateIterators_t)(void *collection, void **begin_arena, void **end_arena, TVirtualCollectionProxy *proxy)
Method0(const Method0 &m)
virtual void Commit(void *env)
Commit the change.
std::vector< TStaging * > Staged_t
Collection of pre-allocated staged array for associative containers.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
virtual void PushProxy(void *objstart)
Add an object.
void *(* Feedfunc_t)(void *from, void *to, size_t size)
virtual Next_t GetFunctionNext(Bool_t read=kTRUE)
See typedef void* (*Next_t)(void *iter, void *end); iter and end should be pointer to respectively an...
CreateIterators_t fFunctionCreateIterators
The ROOT global object gROOT contains a list of all defined classes.
TGenCollectionProxy & operator=(const TGenCollectionProxy &)
void read_any_object(Value *v, TBuffer &b)
void * fTarget
Pointer to the collection we are staging for.
Next_t fFunctionNextIterator
Small helper to execute (compiler) generated function for the access to STL or other containers...
int fValDiff
Offset between two consecutive value_types (memory layout).
virtual void Resize(UInt_t n, Bool_t force_delete)
Resize the container.
virtual TClass * GetCollectionClass() const
Return a pointer to the TClass representing the container.
TCollectionProxyFactory Interface to collection proxy and streamer generator.
virtual DeleteIterator_t GetFunctionDeleteIterator(Bool_t read=kTRUE)
See typedef void (*DeleteIterator_t)(void *iter); If the sizeof iterator is greater than fgIteratorAr...
virtual DeleteTwoIterators_t GetFunctionDeleteTwoIterators(Bool_t read=kTRUE)
See typedef void (*DeleteTwoIterators_t)(void *begin, void *end); If the sizeof iterator is greater t...
virtual TGenCollectionProxy * InitializeEx(Bool_t silent)
Proxy initializer.
unsigned long long ULong64_t
virtual TClass * GetValueClass() const
Return a pointer to the TClass representing the content.
static constexpr double s
void write_std_string_pointer(TBuffer &b)
virtual void * ReadObjectAny(const TClass *cast)=0
std::atomic< Value * > fValue
Descriptor of the container value type.
TClassRef fType
TClass reference of Value_type in collection.
virtual void SetOnFileClass(TClass *cl)
virtual void Clear(const char *opt="")
Clear the emulated collection.
virtual TVirtualCollectionProxy * Generate() const
Virtual copy constructor.
virtual void ReadBuffer(TBuffer &b, void *obj)
virtual CopyIterator_t GetFunctionCopyIterator(Bool_t read=kTRUE)
See typedef void (*CopyIterator_t)(void *&dest, const void *source); Copy the iterator source...
Value(const std::string &info, Bool_t silent)
Constructor.
virtual void * At(UInt_t idx)
Return the address of the value at index 'idx'.
void(* DelFunc_t)(void *)
size_t fSizeOf
size of each elements
TClassRef is used to implement a permanent reference to a TClass object.
typedef void((*Func_t)())
Value * fKey
Descriptor of the key_type.
virtual void operator()(TBuffer &refBuffer, void *pObject)
TClassStreamer IO overload.
Small helper to stage the content of an associative container when reading and before inserting it in...
Helper class to facilitate I/O.
Proxy around an arbitrary container, which implements basic functionality and iteration.
EnvironBase_t * fEnv
Address of the currently proxied object.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Sizing_t fDestruct
Container accessors: block destruct.
Bool_t IsValid()
Return true if the Value has been properly initialized.
Method fNext
Container accessors: generic iteration: next.
virtual UInt_t Size() const
Return the current size of the container.
void *(* Next_t)(void *iter, const void *end)
size_t fReserved
Amount of space already reserved.
Info_t fTypeinfo
Type information.
ROOT::Detail::TCollectionProxyInfo::Environ< char[64]> Env_t
void Resize(size_t nelement)
void(* DeleteTwoIterators_t)(void *begin, void *end)
const std::type_info & Info_t
virtual TClass * GetOnFileClass() const
virtual ~AnyCollectionProxy()
TStreamerInfoActions::TActionSequence * fWriteMemberWise
Small helper to describe the Value_type or the key_type of an STL container.
Method & operator=(const Method &m)
void read_tstring_pointer(Bool_t vsn3, TBuffer &b)
virtual ~TGenCollectionProxy()
Standard destructor.
virtual void * Allocate(UInt_t n, Bool_t forceDelete)
Allocate the needed space.
Value * fVal
Descriptor of the Value_type.
void *(* Collectfunc_t)(void *from, void *to)
virtual Int_t GetCollectionType() const
Return the type of collection see TClassEdit::ESTLType.
void(* DesFunc_t)(void *)
const char * Data() const
ROOT::DesFunc_t fDtor
Method cache for containee destructor.