QMCPACK
XMLWriterClass Class Reference
+ Collaboration diagram for XMLWriterClass:

Public Member Functions

bool StartDocument (std::string fname, std::string version="", std::string encoding="", std::string standalone="")
 
bool EndDocument ()
 
bool StartElement (std::string name)
 
bool EndElement ()
 
bool FullEndElement ()
 
bool WriteAttribute (std::string name, std::string content)
 
bool WriteAttribute (std::string name, double val, bool scientific=false)
 
bool WriteAttribute (std::string name, int val)
 
bool WriteData (std::vector< double > data)
 
bool WriteData (std::string content)
 
bool WriteElement (std::string name, std::vector< double > data)
 
template<typename T >
bool WriteData (T data)
 

Private Member Functions

void Write ()
 

Private Attributes

std::vector< std::shared_ptr< XMLElement > > Elements
 
std::ofstream Out
 

Detailed Description

Definition at line 71 of file XMLWriterClass2.h.

Member Function Documentation

◆ EndDocument()

bool EndDocument ( )

◆ EndElement()

bool EndElement ( )

◆ FullEndElement()

bool FullEndElement ( )

◆ StartDocument()

bool StartDocument ( std::string  fname,
std::string  version = "",
std::string  encoding = "",
std::string  standalone = "" 
)

◆ StartElement()

bool StartElement ( std::string  name)

◆ Write()

void Write ( )
private

◆ WriteAttribute() [1/3]

bool WriteAttribute ( std::string  name,
std::string  content 
)

◆ WriteAttribute() [2/3]

bool WriteAttribute ( std::string  name,
double  val,
bool  scientific = false 
)

◆ WriteAttribute() [3/3]

bool WriteAttribute ( std::string  name,
int  val 
)

◆ WriteData() [1/3]

bool WriteData ( std::vector< double >  data)

◆ WriteData() [2/3]

bool WriteData ( std::string  content)

◆ WriteData() [3/3]

bool WriteData ( data)

Definition at line 98 of file XMLWriterClass2.h.

References Elements.

99 {
100  std::stringstream content;
101  content << " " << data << " ";
102  Elements.back()->AddContent(content.str());
103  return true;
104 }
std::vector< std::shared_ptr< XMLElement > > Elements

◆ WriteElement()

bool WriteElement ( std::string  name,
std::vector< double >  data 
)

Member Data Documentation

◆ Elements

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

Definition at line 74 of file XMLWriterClass2.h.

Referenced by WriteData().

◆ Out

std::ofstream Out
private

Definition at line 76 of file XMLWriterClass2.h.


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