ROOT » IO » XML » TXMLSetup

class TXMLSetup


 Class TXMLSetup is used as storage of xml file settings
 This class is used in TXMLFile and in TXmlBuffer classes.
 Xml settings can be codded via a string in following format

   "2xoo"
    ||| \ .
    || \ usage of name spaces.
    | \ usage of DTD;
     \ storage of TStreamerInfo objects in file;
      layout of xml file (= 2 - specialized (default), = 3 - generic)

 For last three boolean parameters "x" means true, "o" - false

 Such string can be set as argument of TXMLFile constructor. In that
 case new TXMLFile with such parameters will be created.
 These settings automatically stored in xml file.

Function Members (Methods)

public:
virtual~TXMLSetup()
static TClass*Class()
static TStringDefaultXmlSetup()
Int_tGetNextRefCounter()
TStringGetSetupAsString()
TXMLSetup::EXMLLayoutGetXmlLayout() const
virtual TClass*IsA() const
Bool_tIsStoreStreamerInfos() const
Bool_tIsUseDtd() const
Bool_tIsUseNamespaces() const
TXMLSetup&operator=(const TXMLSetup&)
voidPrintSetup()
static voidSetNameSpaceBase(const char* namespacebase)
virtual voidSetStoreStreamerInfos(Bool_t iConvert = kTRUE)
virtual voidSetUsedDtd(Bool_t use = kTRUE)
virtual voidSetUseNamespaces(Bool_t iUseNamespaces = kTRUE)
virtual voidSetXmlLayout(TXMLSetup::EXMLLayout layout)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TXMLSetup()
TXMLSetup(const char* opt)
TXMLSetup(const TXMLSetup& src)
const char*XmlClassNameSpaceRef(const TClass* cl)
const char*XmlConvertClassName(const char* name)
const char*XmlGetElementName(const TStreamerElement* el)
protected:
Int_tAtoI(const char* sbuf, Int_t def = 0, const char* errinfo = 0)
const char*GetElItemName(TStreamerElement* el)
Bool_tIsValidXmlSetup(const char* setupstr)
Bool_tReadSetupFromStr(const char* setupstr)
TClass*XmlDefineClass(const char* xmlClassName)

Data Members

public:
static TXMLSetup::EXMLLayoutkGeneralized
static TXMLSetup::EXMLLayoutkSpecialized
protected:
Int_tfRefCounter! counter , used to build id of xml references
Bool_tfStoreStreamerInfos
TStringfStrBuf! buffer, used in XmlDefineClass() function
Bool_tfUseDtd
Bool_tfUseNamespaces
TXMLSetup::EXMLLayoutfXmlLayout
static TStringfgNameSpaceBase

Class Charts

Inheritance Chart:
TXMLSetup
TBufferXML
TXMLFile

Function documentation

TString DefaultXmlSetup()
 return default value for XML setup
void SetNameSpaceBase(const char* namespacebase)
 set namespace base
TXMLSetup()
 defaule constructor of TXMLSetup class
TXMLSetup(const char* opt)
 contsruct TXMLSetup object getting values from string
TXMLSetup(const TXMLSetup& src)
 copy sonstructor of TXMLSetup class
~TXMLSetup()
 TXMLSetup class destructor
TString GetSetupAsString()
 return setup values as string
Bool_t IsValidXmlSetup(const char* setupstr)
 checks if string is valid setup
Bool_t ReadSetupFromStr(const char* setupstr)
 get values from string
void PrintSetup()
 show setup values
const char* XmlConvertClassName(const char* name)
 convert class name to exclude any special symbols like ':', '<' '>' ',' and spaces
const char* XmlClassNameSpaceRef(const TClass* cl)
 produce string which used as reference in class namespace definition
const char* XmlGetElementName(const TStreamerElement* el)
  return converted name for TStreamerElement
const char* GetElItemName(TStreamerElement* el)
 get item name for given element
TClass* XmlDefineClass(const char* xmlClassName)
 define class for the converted class name, where
 special symbols were replaced by '_'
Int_t AtoI(const char* sbuf, Int_t def = 0, const char* errinfo = 0)
 converts string to integer.
 if error, returns default value
EXMLLayout GetXmlLayout() const
{ return fXmlLayout; }
Bool_t IsStoreStreamerInfos() const
Bool_t IsUseDtd() const
{ return fUseDtd; }
Bool_t IsUseNamespaces() const
{ return fUseNamespaces; }
void SetXmlLayout(TXMLSetup::EXMLLayout layout)
{ fXmlLayout = layout; }
void SetStoreStreamerInfos(Bool_t iConvert = kTRUE)
{ fStoreStreamerInfos = iConvert; }
void SetUsedDtd(Bool_t use = kTRUE)
{ fUseDtd = use; }
void SetUseNamespaces(Bool_t iUseNamespaces = kTRUE)
{ fUseNamespaces = iUseNamespaces; }
Int_t GetNextRefCounter()
{ return fRefCounter++; }