Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TListOfFunctionTemplates.h
Go to the documentation of this file.
1// @(#)root/cont
2// Author: Philippe Canal Aug 2013
3
4/*************************************************************************
5 * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TListOfFunctionTemplates
13#define ROOT_TListOfFunctionTemplates
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TListOfFunctionTemplates //
18// //
19// A collection of TFunctionTemplate objects designed for fast access //
20// given a DeclId_t and for keep track of TFunctionTempalte that were //
21// described unloaded function. //
22// //
23//////////////////////////////////////////////////////////////////////////
24
25#include "THashList.h"
26
27#include "THashTable.h"
28
29#include "TDictionary.h"
30
31class TExMap;
33
35{
36private:
37 friend class TClass;
38
40 TClass *fClass; // Context of this list. Not owned.
41
42 TExMap *fIds; // Map from DeclId_t to TFunction*
43 THashList *fUnloaded; // Holder of TFunction for unloaded functions.
44 THashTable fOverloads; // TLists of overloads.
45 ULong64_t fLastLoadMarker; // Represent interpreter state when we last did a full load.
46
50
51 void MapObject(TObject *obj);
52 void UnmapObject(TObject *obj);
53
54public:
55
58
59 void Clear(Option_t *option="") override;
60 void Delete(Option_t *option="") override;
61
63 TObject *FindObject(const char *name) const override;
64 virtual TList *GetListForObject(const char* name) const;
65 virtual TList *GetListForObject(const TObject* obj) const;
66
68
69 void AddFirst(TObject *obj) override;
70 void AddFirst(TObject *obj, Option_t *opt) override;
71 void AddLast(TObject *obj) override;
72 void AddLast(TObject *obj, Option_t *opt) override;
73 void AddAt(TObject *obj, Int_t idx) override;
74 void AddAfter(const TObject *after, TObject *obj) override;
75 void AddAfter(TObjLink *after, TObject *obj) override;
76 void AddBefore(const TObject *before, TObject *obj) override;
77 void AddBefore(TObjLink *before, TObject *obj) override;
78
79 void RecursiveRemove(TObject *obj) override;
80 TObject *Remove(TObject *obj) override;
81 TObject *Remove(TObjLink *lnk) override;
82
83 void Load();
84 void Unload();
85 void Unload(TFunctionTemplate *func);
86
87 ClassDefOverride(TListOfFunctionTemplates,0); // List of TFunctions for a class
88};
89
90#endif // ROOT_TListOfFunctionTemplates
unsigned long long ULong64_t
Definition RtypesCore.h:70
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
char name[80]
Definition TGX11.cxx:110
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
const void * DeclId_t
This class stores a (key,value) pair using an external hash.
Definition TExMap.h:33
Dictionary for function template This class describes one single function template.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
Definition THashList.h:34
TObject * FindObject(const char *name) const override
Find object using its name.
THashTable implements a hash table to store TObject's.
Definition THashTable.h:35
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
void AddAfter(const TObject *after, TObject *obj) override
Insert object after object after in the list.
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
TFunctionTemplate * Get(DeclId_t id)
Return (after creating it if necessary) the TMethod or TFunction describing the function correspondin...
TObject * FindObject(const char *name) const override
Specialize FindObject to do search for the a function just by name or create it if its not already in...
void AddAt(TObject *obj, Int_t idx) override
Insert object at location idx in the list.
void Clear(Option_t *option="") override
Remove all objects from the list.
void Load()
Load all the functions known to the interpreter for the scope 'fClass' into this collection.
TObject * Remove(TObject *obj) override
Remove object from the list.
void Unload()
Mark 'all func' as being unloaded.
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.
TListOfFunctionTemplates & operator=(const TListOfFunctionTemplates &)=delete
void AddLast(TObject *obj) override
Add object at the end of the list.
void RecursiveRemove(TObject *obj) override
Remove object from this collection and recursively remove the object from all other objects (and coll...
void Delete(Option_t *option="") override
Delete all TFunction object files.
virtual TList * GetListForObject(const char *name) const
Return the set of overloads for this name, collecting all available ones.
void MapObject(TObject *obj)
Add pair<id, object> to the map of functions and their ids.
TList * GetListForObjectNonConst(const char *name)
Return the set of overloads for this name, collecting all available ones.
void UnmapObject(TObject *obj)
Remove a pair<id, object> from the map of functions and their ids.
TListOfFunctionTemplates(const TListOfFunctionTemplates &)=delete
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41