#include <Xwriter.hh>
Public Member Functions | |
| Xwriter (std::ostream &ostr) | |
| ~Xwriter (void) | |
| void | text (const std::string &data) |
| void | endLine (void) |
| bool | getIndentEnable (void) const |
| Get the indent enable flag. | |
| void | setIndentEnable (bool torf) |
| Set the indent enable flag. | |
| void | Tag (const char *tagname, int nattr=0, const char **attr=0, const char **value=0) |
| void | TagNData (const char *tagname, int nattr=0, const char **attr=0, const char **value=0) |
| void | Integer (int N) |
| void | endTag (const char *tagname) |
| void | sync (void) |
| void | setDocType (const std::string &doc) |
| void | writeHeader (void) |
| void | defineLigoLW (void) |
| xsil::Xwriter::Xwriter | ( | std::ostream & | ostr | ) |
Construct an XML file writer to format data to an output stream. brief XML writer constructor.
| ostr | Output stream to receive formatted XML. |
| xsil::Xwriter::~Xwriter | ( | void | ) |
XML writer destructor. brief destructor.
| void xsil::Xwriter::text | ( | const std::string & | data | ) |
Output specified XML text to the stream. brief Write text string.
| data | Text to be written to the output stream. |
| void xsil::Xwriter::endLine | ( | void | ) |
End of an output line.
| bool xsil::Xwriter::getIndentEnable | ( | void | ) | const [inline] |
Get the indent enable flag.
Get the current value of the indentation enable flag.
| void xsil::Xwriter::setIndentEnable | ( | bool | torf | ) |
Set the indent enable flag.
Set the indentation enable flag to the specified value.
| torf | Indent enable flag value. |
| void xsil::Xwriter::Tag | ( | const char * | tagname, | |
| int | nattr = 0, |
|||
| const char ** | attr = 0, |
|||
| const char ** | value = 0 | |||
| ) |
Write an xsil tag to the output file. A list of attribute names and associated values are written inside the tag block. Attribute names with null value pointers are not written. The tag name is added to the Xwiter tag list for validation. brief Write a tag.
| tagname | Pointer to the tag name. | |
| nattr | Number of attributes to be included in the tag. | |
| attr | List of pointers to attribute names. | |
| value | List of pointers to attribute values. |
| void xsil::Xwriter::TagNData | ( | const char * | tagname, | |
| int | nattr = 0, |
|||
| const char ** | attr = 0, |
|||
| const char ** | value = 0 | |||
| ) |
Write a dataless xsil tag to the output file. A list of attribute names and associated values are written inside the tag block. Attribute names with null value pointers are not written. The <tag/> syntax is used and no end tag block will be generated. brief Write a dataless tag.
| tagname | Pointer to the tag name. | |
| nattr | Number of attributes to be included in the tag. | |
| attr | List of pointers to attribute names. | |
| value | List of pointers to attribute values. |
| void xsil::Xwriter::Integer | ( | int | N | ) |
Write an integer value to the output stream. brief Write an integer.
| N | value to be written. |
| void xsil::Xwriter::endTag | ( | const char * | tagname | ) |
Write the </name> end tag to the output stream. The specified tag name must match that of the most recent unclosed tag. brief write a close tag.
| tagname | Name of tag to be closed. |
| void xsil::Xwriter::sync | ( | void | ) |
Synchronize the buffer to the output file by flushing buffered data to the output stream. brief Flush output data.
| void xsil::Xwriter::setDocType | ( | const std::string & | doc | ) |
Set the document type text to a specified string. brief Set the document type text.
| void xsil::Xwriter::writeHeader | ( | void | ) |
Write the XML document header. brief Write the document header.
| void xsil::Xwriter::defineLigoLW | ( | void | ) |
Copy in the ligo_lw definition. brief Copy in the ligo_lw definition.
1.5.4