00001 // @(#)root/xmlparser:$Id: TXMLAttr.h 22428 2008-03-03 18:17:03Z brun $ 00002 // Author: Jose Lo 12/4/2005 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TXMLAttr 00013 #define ROOT_TXMLAttr 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TXMLAttr // 00018 // // 00019 // TXMLAttr is the attribute of an Element. It contains the name (key) // 00020 // and the value of the attribute. // 00021 // // 00022 ////////////////////////////////////////////////////////////////////////// 00023 00024 #ifndef ROOT_TObject 00025 #include "TObject.h" 00026 #endif 00027 00028 00029 class TXMLAttr : public TObject { 00030 00031 private: 00032 TXMLAttr(const TXMLAttr&); // Not implemented 00033 TXMLAttr& operator=(const TXMLAttr&); // Not implemented 00034 00035 const char *fKey; // XML attribute key 00036 const char *fValue; // XML attribute value 00037 00038 public: 00039 TXMLAttr(const char *key, const char *value) : fKey(key), fValue(value) { } 00040 virtual ~TXMLAttr() { } 00041 00042 const char *GetName() const { return fKey; } 00043 const char *Key() const { return fKey; } 00044 const char *GetValue() const { return fValue; } 00045 00046 ClassDef(TXMLAttr,0) //XML attribute pair 00047 }; 00048 00049 #endif