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