Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TXMLAttr.h
Go to the documentation of this file.
1// @(#)root/xmlparser:$Id$
2// Author: Jose Lo 12/4/2005
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, 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_TXMLAttr
13#define ROOT_TXMLAttr
14
15#include "TObject.h"
16
17
18class TXMLAttr : public TObject {
19
20private:
21 TXMLAttr(const TXMLAttr&) = delete;
22 TXMLAttr& operator=(const TXMLAttr&) = delete;
23
24 const char *fKey; ///< XML attribute key
25 const char *fValue; ///< XML attribute value
26
27public:
28 TXMLAttr(const char *key, const char *value) : fKey(key), fValue(value) {}
29 virtual ~TXMLAttr() {}
30
31 const char *GetName() const override { return fKey; }
32 const char *Key() const { return fKey; }
33 const char *GetValue() const { return fValue; }
34
35 ClassDefOverride(TXMLAttr,0) //XML attribute pair
36};
37
38#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Mother of all ROOT objects.
Definition TObject.h:41
TXMLAttribute is the attribute of an Element.
Definition TXMLAttr.h:18
TXMLAttr & operator=(const TXMLAttr &)=delete
TXMLAttr(const TXMLAttr &)=delete
const char * fKey
XML attribute key.
Definition TXMLAttr.h:24
const char * GetValue() const
Definition TXMLAttr.h:33
const char * fValue
XML attribute value.
Definition TXMLAttr.h:25
virtual ~TXMLAttr()
Definition TXMLAttr.h:29
TXMLAttr(const char *key, const char *value)
Definition TXMLAttr.h:28
const char * GetName() const override
Returns name of object.
Definition TXMLAttr.h:31
const char * Key() const
Definition TXMLAttr.h:32