FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairXMLNode Class Reference

#include <FairXMLNode.h>

Inheritance diagram for FairXMLNode:

Public Member Functions

 FairXMLNode (const FairXMLNode &other)
 
 FairXMLNode (TString name="", TString value="")
 
FairXMLNodeoperator= (const FairXMLNode &other)
 
void Copy (TXMLNode *node)
 
void SetValue (TString value)
 
void AddChild (FairXMLNode *node)
 
void AddAttrib (FairXMLAttrib *attrib)
 
Int_t GetNChildren () const
 
Int_t GetNAttributes () const
 
Int_t GetNChildren (TString name) const
 
TString GetValue () const
 
FairXMLAttribGetAttrib (TString name) const
 
FairXMLAttribGetAttrib (Int_t index) const
 
FairXMLNodeGetChild (TString name, Int_t count=0) const
 
FairXMLNodeGetChild (Int_t index) const
 
virtual ~FairXMLNode ()
 
 ClassDef (FairXMLNode, 1)
 

Detailed Description

class for representing XML node

Definition at line 60 of file FairXMLNode.h.

Constructor & Destructor Documentation

FairXMLNode::FairXMLNode ( const FairXMLNode other)

copy constructor

Parameters
other

Definition at line 26 of file FairXMLNode.cxx.

FairXMLNode::FairXMLNode ( TString  name = "",
TString  value = "" 
)

default constructor

Parameters
namename of node
valuevalue of node

Definition at line 19 of file FairXMLNode.cxx.

FairXMLNode::~FairXMLNode ( )
virtual

Definition at line 130 of file FairXMLNode.cxx.

Member Function Documentation

void FairXMLNode::AddAttrib ( FairXMLAttrib attrib)

add attribute to this class

Parameters
attrib

Definition at line 84 of file FairXMLNode.cxx.

void FairXMLNode::AddChild ( FairXMLNode node)
inline

add child node to this node, node is now owned by parent node

Parameters
nodenode to add

Definition at line 98 of file FairXMLNode.h.

FairXMLNode::ClassDef ( FairXMLNode  ,
 
)
void FairXMLNode::Copy ( TXMLNode *  node)

copy data for node to this

Parameters
node

Definition at line 54 of file FairXMLNode.cxx.

FairXMLAttrib * FairXMLNode::GetAttrib ( TString  name) const
Parameters
namename of atribute
Returns

Definition at line 121 of file FairXMLNode.cxx.

FairXMLAttrib * FairXMLNode::GetAttrib ( Int_t  index) const
Parameters
indexindex of atrribute
Returns

Definition at line 128 of file FairXMLNode.cxx.

FairXMLNode * FairXMLNode::GetChild ( TString  name,
Int_t  count = 0 
) const

search for node with given name

Parameters
namename of node
countnumber of node (if more than one with given name exist)
Returns
node

Definition at line 106 of file FairXMLNode.cxx.

FairXMLNode * FairXMLNode::GetChild ( Int_t  index) const
Parameters
indexchild number
Returns
child at given position

Definition at line 126 of file FairXMLNode.cxx.

Int_t FairXMLNode::GetNAttributes ( ) const
inline
Returns
number of attributes

Definition at line 113 of file FairXMLNode.h.

Int_t FairXMLNode::GetNChildren ( ) const
inline
Returns
number of childen nodes

Definition at line 108 of file FairXMLNode.h.

Int_t FairXMLNode::GetNChildren ( TString  name) const

search for child with given name

Parameters
namename of node
Returns
number of node with given name

Definition at line 94 of file FairXMLNode.cxx.

TString FairXMLNode::GetValue ( ) const
inline
Returns
value of node

Definition at line 124 of file FairXMLNode.h.

FairXMLNode & FairXMLNode::operator= ( const FairXMLNode other)

assignement operator

Parameters
node
Returns

Definition at line 37 of file FairXMLNode.cxx.

void FairXMLNode::SetValue ( TString  value)
inline
Parameters
valuenew value

Definition at line 92 of file FairXMLNode.h.


The documentation for this class was generated from the following files: