QMCPACK
XMLElement Class Reference
+ Collaboration diagram for XMLElement:

Public Member Functions

void Write (std::ostream &out)
 
int GetLevel ()
 
void AddElement (std::shared_ptr< XMLElement > &elem)
 
void AddAttribute (std::shared_ptr< XMLAttribute > &attr)
 
void AddContent (std::string content)
 
void AddContent (std::vector< double > &data)
 
 XMLElement (std::string name, int level=0)
 
 XMLElement (const XMLElement &elem)
 

Private Member Functions

void Indent (std::ostream &out)
 

Private Attributes

std::vector< std::shared_ptr< XMLAttribute > > Attributes
 
std::vector< std::shared_ptr< XMLElement > > Children
 
std::string Name
 
std::string Content
 
int Level
 

Detailed Description

Definition at line 40 of file XMLWriterClass2.h.

Constructor & Destructor Documentation

◆ XMLElement() [1/2]

XMLElement ( std::string  name,
int  level = 0 
)
inline

Definition at line 61 of file XMLWriterClass2.h.

References Level, and Name.

62  {
63  Name = name;
64  Level = level;
65  }
std::string Name

◆ XMLElement() [2/2]

XMLElement ( const XMLElement elem)

Member Function Documentation

◆ AddAttribute()

void AddAttribute ( std::shared_ptr< XMLAttribute > &  attr)
inline

Definition at line 55 of file XMLWriterClass2.h.

References Attributes.

55 { Attributes.push_back(attr); }
std::vector< std::shared_ptr< XMLAttribute > > Attributes

◆ AddContent() [1/2]

void AddContent ( std::string  content)
inline

Definition at line 57 of file XMLWriterClass2.h.

References Content.

57 { Content += content; }
std::string Content

◆ AddContent() [2/2]

void AddContent ( std::vector< double > &  data)

◆ AddElement()

void AddElement ( std::shared_ptr< XMLElement > &  elem)
inline

Definition at line 53 of file XMLWriterClass2.h.

References Children.

53 { Children.push_back(elem); }
std::vector< std::shared_ptr< XMLElement > > Children

◆ GetLevel()

int GetLevel ( )
inline

Definition at line 51 of file XMLWriterClass2.h.

References Level.

51 { return Level; }

◆ Indent()

void Indent ( std::ostream &  out)
private

◆ Write()

void Write ( std::ostream &  out)

Member Data Documentation

◆ Attributes

std::vector<std::shared_ptr<XMLAttribute> > Attributes
private

Definition at line 42 of file XMLWriterClass2.h.

Referenced by AddAttribute().

◆ Children

std::vector<std::shared_ptr<XMLElement> > Children
private

Definition at line 43 of file XMLWriterClass2.h.

Referenced by AddElement().

◆ Content

std::string Content
private

Definition at line 44 of file XMLWriterClass2.h.

Referenced by AddContent().

◆ Level

int Level
private

Definition at line 45 of file XMLWriterClass2.h.

Referenced by GetLevel(), and XMLElement().

◆ Name

std::string Name
private

Definition at line 44 of file XMLWriterClass2.h.

Referenced by XMLElement().


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