11 #ifndef ROOT_TGenCollectionProxy
12 #define ROOT_TGenCollectionProxy
18 #ifndef ROOT_TVirtualCollectionProxy
22 #ifndef ROOT_TCollectionProxyInfo
26 #ifndef ROOT_Rtypeinfo
48 typedef const type_info&
Info_t;
50 typedef const std::type_info&
Info_t;
120 return (std::string*)
this;
123 return ((std::string*)
this)->c_str();
126 return (*(std::string**)
this)->c_str();
134 ((std::string*)
this)->assign(s.
Data());
143 std::string* str2 = (std::string*)
ptr();
144 if (!str2) str2 =
new std::string();
152 std::string* strptr = (*(std::string**)
this);
153 c = (
const char*)(strptr->c_str());
163 else if ( v->
fType ) {
166 else if ( v->
fDtor ) {
168 ::operator
delete(p);
171 ::operator
delete(p);
205 typedef void* (*Call_t)(
void*);
225 typedef void* (*Call_t)();
305 typedef void* (*Feedfunc_t)(
void *from,
void *to,
size_t size);
306 typedef void* (*Collectfunc_t)(
void *from,
void *to);
307 typedef void* (*ArrIterfunc_t)(
void *from,
size_t size);
406 virtual void Clear(
const char *opt =
"");
419 virtual void Insert(
const void *data,
void *container,
size_t size);
422 virtual void Commit(
void* env);
477 template <
typename T>
Method fSize
Container accessors: size of container.
void(* DeleteIterator_t)(void *iter)
size_t fSize
Number of elements.
double read(const std::string &file_name)
reading
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.
TStaging(const TStaging &)
Not implemented.
virtual TVirtualCollectionProxy * Generate() const
Virtual copy constructor.
DeleteTwoIterators_t fFunctionDeleteTwoIterators
void * invoke(void *obj) const
UInt_t fProperties
Additional properties of the value type (kNeedDelete)
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...
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
virtual TClass * GetOnFileClass() const
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...
TGenCollectionProxy * Initialize(Bool_t silent) const
Proxy initializer.
Collectfunc_t fCollect
Method to collect objects from container.
std::string fName
Name of the class being proxied.
void(* Sizing_t)(void *obj, size_t size)
TStaging(size_t size, size_t size_of)
virtual Int_t WriteObjectAny(const void *obj, const TClass *ptrClass)=0
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.
TClass * fOnFileClass
On file class.
Feedfunc_t fFeed
Container accessors: block feed.
UInt_t fCase
type of data of Value_type
virtual Bool_t HasPointers() const
Return true if the content is of type 'pointer to'.
virtual ULong_t GetIncrement() const
Return the offset between two consecutive value_types (memory layout).
Sizing_t fResize
Container accessors: resize container.
void *(* CopyIterator_t)(void *dest, const void *source)
size_t fSize
fSize of the contained object
const char * Data() const
virtual Int_t GetCollectionType() const
Return the type of collection see TClassEdit::ESTLType.
virtual void DeleteItem(Bool_t force, void *ptr) const
Call to delete/destruct individual item.
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.
TStaging & operator=(const TStaging &)
Not implemented.
virtual UInt_t Size() const
Return the current size of the container.
void *(* ArrIterfunc_t)(void *from, size_t size)
Proxies_t fProxyList
Stack of recursive proxies.
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.
virtual EDataType GetType() const
If the content is a simple numerical value, return its type (see TDataType)
int fValOffset
Offset from key to value (in maps)
Method0 & operator=(const Method0 &m)
void read_std_string_pointer(TBuffer &b)
void *(* Feedfunc_t)(void *from, void *to, size_t size)
int fSTL_type
STL container type.
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.
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).
void(* DesFunc_t)(void *)
virtual void Resize(UInt_t n, Bool_t force_delete)
Resize 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...
void *(* NewFunc_t)(void *)
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.
void(* CreateIterators_t)(void *collection, void **begin_arena, void **end_arena, TVirtualCollectionProxy *proxy)
unsigned long long ULong64_t
void *(* Next_t)(void *iter, const void *end)
void write_std_string_pointer(TBuffer &b)
virtual void * ReadObjectAny(const TClass *cast)=0
void CheckFunctions() const
Check existence of function pointers.
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 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...
virtual TClass * GetValueClass() const
Return a pointer to the TClass representing the content.
Value(const std::string &info, Bool_t silent)
Constructor.
virtual void * At(UInt_t idx)
Return the address of the value at index 'idx'.
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.
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.
void(* DeleteTwoIterators_t)(void *begin, void *end)
size_t fReserved
Amount of space already reserved.
Info_t fTypeinfo
Type information.
ROOT::Detail::TCollectionProxyInfo::Environ< char[64]> Env_t
void *(* Collectfunc_t)(void *from, void *to)
void Resize(size_t nelement)
virtual TClass * GetCollectionClass() const
Return a pointer to the TClass representing the container.
virtual UInt_t Sizeof() const
Return the sizeof the collection object.
Vc_ALWAYS_INLINE_L T *Vc_ALWAYS_INLINE_R malloc(size_t n)
Allocates memory on the Heap with alignment and padding suitable for vectorized access.
const std::type_info & Info_t
virtual ~AnyCollectionProxy()
TStreamerInfoActions::TActionSequence * fWriteMemberWise
void(* DelFunc_t)(void *)
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.
ROOT::DesFunc_t fDtor
Method cache for containee destructor.