Logo ROOT  
Reference Guide
TDictAttributeMap.h
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Bianca-Cristina Cristescu 03/07/13
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_TDictAttributeMap
13 #define ROOT_TDictAttributeMap
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TDictAttributeMap //
19 // //
20 // Dictionary of attributes of a TClass. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 
25 #include "TObject.h"
26 #include "THashTable.h"
27 
28 
29 class TDictAttributeMap : public TObject
30 {
31 public:
32 
34  virtual ~TDictAttributeMap();
35 
36  void AddProperty(const char* key, const char* value);
37  Bool_t HasKey(const char* key) const;
38  const char *GetPropertyAsString(const char* key) const;
39  Int_t GetPropertySize() const { return fStringProperty.GetSize(); }
40  TString RemovePropertyString(const char* key);
41  Bool_t RemoveProperty(const char* key);
42  void Clear(Option_t* option = "");
43 
44 private:
45 
46  THashTable fStringProperty; //all properties of String type
47 
48  ClassDef(TDictAttributeMap,2) // Container for name/value pairs of TDictionary attributes
49 };
50 
51 #endif // ROOT_TDictAttributeMap
52 
TDictAttributeMap::~TDictAttributeMap
virtual ~TDictAttributeMap()
Default destructor.
Definition: TDictAttributeMap.cxx:38
TDictAttributeMap::Clear
void Clear(Option_t *option="")
Deletes all the properties of the class.
Definition: TDictAttributeMap.cxx:109
THashTable::GetSize
Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: THashTable.h:72
TDictAttributeMap::RemovePropertyString
TString RemovePropertyString(const char *key)
Remove a String property from the attribute map specified by the key.
Definition: TDictAttributeMap.cxx:83
TString
Definition: TString.h:136
bool
TDictAttributeMap
Definition: TDictAttributeMap.h:29
TDictAttributeMap::GetPropertyAsString
const char * GetPropertyAsString(const char *key) const
Access the value of a String property using the key.
Definition: TDictAttributeMap.cxx:66
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
THashTable
Definition: THashTable.h:35
TDictAttributeMap::GetPropertySize
Int_t GetPropertySize() const
Definition: TDictAttributeMap.h:45
TDictAttributeMap::fStringProperty
THashTable fStringProperty
Definition: TDictAttributeMap.h:52
TDictAttributeMap::TDictAttributeMap
TDictAttributeMap()
Default constructor.
Definition: TDictAttributeMap.cxx:30
TDictAttributeMap::HasKey
Bool_t HasKey(const char *key) const
Definition: TDictAttributeMap.cxx:54
TObject.h
TDictAttributeMap::AddProperty
void AddProperty(const char *key, const char *value)
Add a property with a String value to the TDictAttributeMap.
Definition: TDictAttributeMap.cxx:46
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TDictAttributeMap::RemoveProperty
Bool_t RemoveProperty(const char *key)
Definition: TDictAttributeMap.cxx:93
int
THashTable.h