Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TListOfFunctionTemplates.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/cont
0002 // Author: Philippe Canal Aug 2013
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TListOfFunctionTemplates
0013 #define ROOT_TListOfFunctionTemplates
0014 
0015 //////////////////////////////////////////////////////////////////////////
0016 //                                                                      //
0017 // TListOfFunctionTemplates                                             //
0018 //                                                                      //
0019 // A collection of TFunctionTemplate objects designed for fast access   //
0020 // given a DeclId_t and for keep track of TFunctionTempalte that were   //
0021 // described unloaded function.                                         //
0022 //                                                                      //
0023 //////////////////////////////////////////////////////////////////////////
0024 
0025 #include "THashList.h"
0026 
0027 #include "THashTable.h"
0028 
0029 #include "TDictionary.h"
0030 
0031 class TExMap;
0032 class TFunctionTemplate;
0033 
0034 class TListOfFunctionTemplates : public THashList
0035 {
0036 private:
0037    friend class TClass;
0038 
0039    typedef TDictionary::DeclId_t DeclId_t;
0040    TClass    *fClass; // Context of this list.  Not owned.
0041 
0042    TExMap    *fIds;      // Map from DeclId_t to TFunction*
0043    THashList *fUnloaded; // Holder of TFunction for unloaded functions.
0044    THashTable fOverloads; // TLists of overloads.
0045    ULong64_t  fLastLoadMarker; // Represent interpreter state when we last did a full load.
0046 
0047    TListOfFunctionTemplates(const TListOfFunctionTemplates&) = delete;
0048    TListOfFunctionTemplates& operator=(const TListOfFunctionTemplates&) = delete;
0049    TList     *GetListForObjectNonConst(const char* name);
0050 
0051    void       MapObject(TObject *obj);
0052    void       UnmapObject(TObject *obj);
0053 
0054 public:
0055 
0056    TListOfFunctionTemplates(TClass *cl);
0057    ~TListOfFunctionTemplates();
0058 
0059    void       Clear(Option_t *option="") override;
0060    void       Delete(Option_t *option="") override;
0061 
0062    using THashList::FindObject;
0063    TObject   *FindObject(const char *name) const override;
0064    virtual TList     *GetListForObject(const char* name) const;
0065    virtual TList     *GetListForObject(const TObject* obj) const;
0066 
0067    TFunctionTemplate *Get(DeclId_t id);
0068 
0069    void       AddFirst(TObject *obj) override;
0070    void       AddFirst(TObject *obj, Option_t *opt) override;
0071    void       AddLast(TObject *obj) override;
0072    void       AddLast(TObject *obj, Option_t *opt) override;
0073    void       AddAt(TObject *obj, Int_t idx) override;
0074    void       AddAfter(const TObject *after, TObject *obj) override;
0075    void       AddAfter(TObjLink *after, TObject *obj) override;
0076    void       AddBefore(const TObject *before, TObject *obj) override;
0077    void       AddBefore(TObjLink *before, TObject *obj) override;
0078 
0079    void       RecursiveRemove(TObject *obj) override;
0080    TObject   *Remove(TObject *obj) override;
0081    TObject   *Remove(TObjLink *lnk) override;
0082 
0083    void Load();
0084    void Unload();
0085    void Unload(TFunctionTemplate *func);
0086 
0087    ClassDefOverride(TListOfFunctionTemplates,0);  // List of TFunctions for a class
0088 };
0089 
0090 #endif // ROOT_TListOfFunctionTemplates