|
QDP++
|
Writes XML metadata to a file. More...
#include <qdp_xmlio.h>
Public Member Functions | |
| XMLFileWriter () | |
| XMLFileWriter (const std::string &filename, bool write_prologue=true) | |
| Constructor from a filename. | |
| ~XMLFileWriter () | |
| bool | is_open () |
| Queries whether the binary file is open. | |
| void | open (const std::string &filename, bool write_prologue=true) |
| Opens a file. | |
| void | flush () |
| Flush the buffer. | |
| bool | fail () const |
| Return true if some failure occurred in previous IO operation. | |
| void | close () |
| Closes the last file opened. | |
| Public Member Functions inherited from QDP::XMLWriter | |
| XMLWriter () | |
| virtual | ~XMLWriter () |
| virtual void | openSimple (const std::string &tagname) |
| Writes an opening XML tag. | |
| virtual void | closeSimple () |
| virtual void | openStruct (const std::string &tagname) |
| Writes an opening XML tag. | |
| virtual void | closeStruct () |
| void | openTag (const std::string &tagname) |
| Writes an opening XML tag. | |
| void | openTag (const std::string &nsprefix, const std::string &tagname) |
| Writes an opening XML tag. | |
| void | openTag (const std::string &tagname, XMLWriterAPI::AttributeList &al) |
| Writes an opening XML tag. | |
| void | openTag (const std::string &nsprefix, const std::string &tagname, XMLWriterAPI::AttributeList &al) |
| Writes an opening XML tag. | |
| void | closeTag () |
| Closes a tag. | |
| void | emptyTag (const std::string &tagname) |
| Writes an empty tag. | |
| void | emptyTag (const std::string &nsprefix, const std::string &tagname) |
| Writes an empty tag. | |
| void | emptyTag (const std::string &tagname, XMLWriterAPI::AttributeList &al) |
| Writes an empty tag. | |
| void | emptyTag (const std::string &nsprefix, const std::string &tagname, XMLWriterAPI::AttributeList &al) |
| Writes an empty tag. | |
| void | write (const std::string &output) |
| Write tag contents. | |
| void | write (const int &output) |
| Write tag contents. | |
| void | write (const unsigned int &output) |
| Write tag contents. | |
| void | write (const short int &output) |
| Write tag contents. | |
| void | write (const unsigned short int &output) |
| Write tag contents. | |
| void | write (const long int &output) |
| Write tag contents. | |
| void | write (const unsigned long int &output) |
| Write tag contents. | |
| void | write (const float &output) |
| Write tag contents. | |
| void | write (const double &output) |
| Write tag contents. | |
| void | write (const bool &output) |
| Write tag contents. | |
| void | writeXML (const std::string &output) |
Writes XML metadata to a file.
Definition at line 1066 of file qdp_xmlio.h.
| QDP::XMLFileWriter::XMLFileWriter | ( | ) |
Definition at line 1319 of file qdp_xmlio.cc.
|
inlineexplicit |
Constructor from a filename.
| filename | The name of the file |
| write_prologue | Whether to write the standard opening line of XML files. Defaults to true. |
Definition at line 1078 of file qdp_xmlio.h.
References open().
| QDP::XMLFileWriter::~XMLFileWriter | ( | ) |
Definition at line 1391 of file qdp_xmlio.cc.
References close().
| void QDP::XMLFileWriter::close | ( | ) |
Closes the last file opened.
Definition at line 1339 of file qdp_xmlio.cc.
References is_open(), and QDP::Layout::primaryNode().
Referenced by ~XMLFileWriter().
| bool QDP::XMLFileWriter::fail | ( | ) | const |
Return true if some failure occurred in previous IO operation.
Definition at line 1376 of file qdp_xmlio.cc.
References QDP::QDPInternal::broadcast(), QDP::Layout::primaryNode(), and QDP::QDP_isInitialized().
| void QDP::XMLFileWriter::flush | ( | ) |
Flush the buffer.
Definition at line 1366 of file qdp_xmlio.cc.
References is_open(), and QDP::Layout::primaryNode().
| bool QDP::XMLFileWriter::is_open | ( | ) |
Queries whether the binary file is open.
Definition at line 1349 of file qdp_xmlio.cc.
References QDP::QDPInternal::broadcast(), QDP::Layout::primaryNode(), and QDP::QDP_isInitialized().
| void QDP::XMLFileWriter::open | ( | const std::string & | filename, |
| bool | write_prologue = true ) |
Opens a file.
| filename | The name of the file |
| write_prologue | Whether to write the standard opening line of XML files. Defaults to true. |
Definition at line 1321 of file qdp_xmlio.cc.
References QDP::QDPIO::cerr, QDP::Layout::primaryNode(), and QDP::QDP_abort().
Referenced by XMLFileWriter().