#include <Xreader.hh>
Public Types | |
| enum | LxrTokens { tkEnd, tkWord, tkString, tkNumber, tkEqual, tkOpenTag, tkOpenETag, tkOpenCTag, tkOpenHead, tkEndTag, tkEndSTag, tkCloseHead, tkEscape, tkQMark } |
Public Member Functions | |
| Xreader (std::istream &istr) | |
| ~Xreader (void) | |
| array * | readArray (const attr_list &a, int hdronly) |
| xobj * | readDoc (void) |
| void | readEndTag (const std::string &endtag) |
| void | readHeader (void) |
| ligolw * | readLigoLW (const attr_list &a, int tagonly) |
| xobj * | readObject (void) |
| param * | readParam (const attr_list &a, int tagonly) |
| Stream * | readStream (const attr_list &a, int tagonly) |
| table * | readTable (const attr_list &a, int tagonly) |
| time * | readTime (const attr_list &a, int tagonly) |
| int | readTag (std::string &name, attr_list &attrs) |
| void | setDebug (int lvl) |
{verbatim} std::ifstream in("myxsil.xml"); xsil::Xreader xs(in); xsil::xobj* xo = in.readDoc(); xsil::table* xt = reinterpret_cast<>(xo->find("xmltable", "table")); {verbatim}
brief XSil reader class.
Xsil input lexographical tokens.
| xsil::Xreader::Xreader | ( | std::istream & | istr | ) |
Construct an XML file writer to format data to an output stream. brief XML reader constructor.
| istr | Input stream to receive formatted XML. |
| xsil::Xreader::~Xreader | ( | void | ) |
XML reader destructor. brief Xreader destructor.
| array* xsil::Xreader::readArray | ( | const attr_list & | a, | |
| int | hdronly | |||
| ) |
| xobj* xsil::Xreader::readDoc | ( | void | ) |
The first/next document in the stream associated with the Xreader is ingested into memory as a tree of xsil class objects. brief Read a document.
| void xsil::Xreader::readEndTag | ( | const std::string & | endtag | ) |
Read an end tag and compare the tag name to the specified tag value. readEndTag throws an "Mismatched end tag" exception if the values are not the same.
| void xsil::Xreader::readHeader | ( | void | ) |
Read the file header
| ligolw* xsil::Xreader::readLigoLW | ( | const attr_list & | a, | |
| int | tagonly | |||
| ) |
Read a Ligo LW structure
| xobj* xsil::Xreader::readObject | ( | void | ) |
Read an xsil object.
| param* xsil::Xreader::readParam | ( | const attr_list & | a, | |
| int | tagonly | |||
| ) |
Read an xsil parameter object.
| Stream* xsil::Xreader::readStream | ( | const attr_list & | a, | |
| int | tagonly | |||
| ) |
Read an xsil stream object.
| int xsil::Xreader::readTag | ( | std::string & | name, | |
| attr_list & | attrs | |||
| ) |
Read an xml object header tag. The tag type is returned in the string references by name and any attributes are copied to the attribute list. brief Read a tag.
| name | Reference to string that will receive the tag type. | |
| attrs | reference to an attribute list to receive attributes specified in the tag. |
| void xsil::Xreader::setDebug | ( | int | lvl | ) |
Set the level of debug printout. brief Set the debug level.
| lvl | level of detail in debug outputs. |
1.5.4