ROOT  6.06/09
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 #ifndef ROOT_TObject
26 #include "TObject.h"
27 #endif
28 #ifndef ROOT_THashTable
29 #include "THashTable.h"
30 #endif
31 
32 
33 class TDictAttributeMap : public TObject
34 {
35 public:
36 
38  virtual ~TDictAttributeMap();
39 
40  void AddProperty(const char* key, const char* value);
41  Bool_t HasKey(const char* key) const;
42  const char *GetPropertyAsString(const char* key) const;
44  TString RemovePropertyString(const char* key);
45  Bool_t RemoveProperty(const char* key);
46  void Clear(Option_t* option = "");
47 
48 private:
49 
50  THashTable fStringProperty; //all properties of String type
51 
52  ClassDef(TDictAttributeMap,2) // Container for name/value pairs of TDictionary attributes
53 };
54 
55 #endif // ROOT_TDictAttributeMap
56 
Bool_t RemoveProperty(const char *key)
void Clear(Option_t *option="")
Deletes all the properties of the class.
const char Option_t
Definition: RtypesCore.h:62
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TString RemovePropertyString(const char *key)
Remove a String property from the attribute map specified by the key.
THashTable implements a hash table to store TObject's.
Definition: THashTable.h:39
#define ClassDef(name, id)
Definition: Rtypes.h:254
Int_t GetSize() const
Definition: THashTable.h:73
Bool_t HasKey(const char *key) const
void AddProperty(const char *key, const char *value)
Add a property with a String value to the TDictAttributeMap.
const char * GetPropertyAsString(const char *key) const
Access the value of a String property using the key.
The ROOT object has a list of properties which are stored and retrieved using TDictAttributeMap.
THashTable fStringProperty
Mother of all ROOT objects.
Definition: TObject.h:58
virtual ~TDictAttributeMap()
Default destructor.
float value
Definition: math.cpp:443
Int_t GetPropertySize() const