ProteoWizard
|
The XMLWriter class provides simple, tag-level XML syntax writing. More...
#include <XMLWriter.hpp>
Classes | |
class | Attributes |
vector of name/value pairs to be written as XML attributes More... | |
struct | Config |
initial configuration of the XMLWriter More... | |
class | OutputObserver |
interface to allow outside observation of data sent to output stream More... |
Public Types | |
enum | EmptyElementTag { NotEmptyElement, EmptyElement } |
tag for indicating an empty element More... | |
typedef boost::iostreams::stream_offset | stream_offset |
Public Member Functions | |
XMLWriter (std::ostream &os, const Config &config=Config()) | |
constructor | |
virtual | ~XMLWriter () |
void | pushStyle (unsigned int flags) |
pushes style flags onto the internal style stack | |
void | popStyle () |
pops the style stack | |
void | processingInstruction (const std::string &name, const std::string &data) |
writes a processing instruction | |
void | startElement (const std::string &name, const Attributes &attributes=Attributes(), EmptyElementTag emptyElementTag=NotEmptyElement) |
writes element start tag | |
void | endElement () |
writes element end tag | |
void | characters (const std::string &text, bool autoEscape=true) |
writes character data; autoEscape writes reserved XML characters in the input text in their escaped form '&', '<', and '>' are '&', '<', '>' respectively | |
stream_offset | position () const |
returns current stream position | |
stream_offset | positionNext () const |
returns stream position of next element start tag |
Private Member Functions | |
XMLWriter (const XMLWriter &) | |
XMLWriter & | operator= (const XMLWriter &) |
Private Attributes | |
boost::shared_ptr< Impl > | impl_ |
The XMLWriter class provides simple, tag-level XML syntax writing.
Internally, XMLWriter keeps a style stack (for client customization of the XML style) and an element stack (for element nesting/indentation).
Definition at line 47 of file XMLWriter.hpp.
typedef boost::iostreams::stream_offset pwiz::minimxml::XMLWriter::stream_offset |
Definition at line 123 of file XMLWriter.hpp.
tag for indicating an empty element
Definition at line 108 of file XMLWriter.hpp.
constructor
|
inlinevirtual |
Definition at line 96 of file XMLWriter.hpp.
|
private |
void pwiz::minimxml::XMLWriter::pushStyle | ( | unsigned int | flags | ) |
pushes style flags onto the internal style stack
Referenced by test().
void pwiz::minimxml::XMLWriter::popStyle | ( | ) |
pops the style stack
Referenced by test().
void pwiz::minimxml::XMLWriter::processingInstruction | ( | const std::string & | name, |
const std::string & | data | ||
) |
writes a processing instruction
Referenced by test().
void pwiz::minimxml::XMLWriter::startElement | ( | const std::string & | name, |
const Attributes & | attributes = Attributes() , |
||
EmptyElementTag | emptyElementTag = NotEmptyElement |
||
) |
writes element start tag
Referenced by test().
void pwiz::minimxml::XMLWriter::endElement | ( | ) |
writes element end tag
Referenced by test().
void pwiz::minimxml::XMLWriter::characters | ( | const std::string & | text, |
bool | autoEscape = true |
||
) |
writes character data; autoEscape writes reserved XML characters in the input text in their escaped form '&', '<', and '>' are '&', '<', '>' respectively
Referenced by test().
stream_offset pwiz::minimxml::XMLWriter::position | ( | ) | const |
returns current stream position
Referenced by test().
stream_offset pwiz::minimxml::XMLWriter::positionNext | ( | ) | const |
returns stream position of next element start tag
Referenced by test().
|
private |
Definition at line 133 of file XMLWriter.hpp.