Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
30{
31public:
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;
40 TString RemovePropertyString(const char* key);
41 Bool_t RemoveProperty(const char* key);
42 void Clear(Option_t* option = "") override;
43
44private:
45
46 THashTable fStringProperty; //all properties of String type
47
48 ClassDefOverride(TDictAttributeMap,2) // Container for name/value pairs of TDictionary attributes
49};
50
51#endif // ROOT_TDictAttributeMap
52
bool Bool_t
Definition RtypesCore.h:63
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
The ROOT object has a list of properties which are stored and retrieved using TDictAttributeMap.
TString RemovePropertyString(const char *key)
Remove a String property from the attribute map specified by the key.
void Clear(Option_t *option="") override
Deletes all the properties of the class.
Int_t GetPropertySize() const
const char * GetPropertyAsString(const char *key) const
Access the value of a String property using the key.
TDictAttributeMap()
Default constructor.
Bool_t HasKey(const char *key) const
virtual ~TDictAttributeMap()
Default destructor.
void AddProperty(const char *key, const char *value)
Add a property with a String value to the TDictAttributeMap.
Bool_t RemoveProperty(const char *key)
THashTable implements a hash table to store TObject's.
Definition THashTable.h:35
Int_t GetSize() const override
Return the capacity of the collection, i.e.
Definition THashTable.h:73
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139