ProteoWizard
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
pwiz::minimxml::XMLWriter Class Reference

The XMLWriter class provides simple, tag-level XML syntax writing. More...

#include <XMLWriter.hpp>

List of all members.

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 &)
XMLWriteroperator= (const XMLWriter &)

Private Attributes

boost::shared_ptr< Impl > impl_

Detailed Description

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.


Member Typedef Documentation

typedef boost::iostreams::stream_offset pwiz::minimxml::XMLWriter::stream_offset

Definition at line 123 of file XMLWriter.hpp.


Member Enumeration Documentation

tag for indicating an empty element

Enumerator:
NotEmptyElement 
EmptyElement 

Definition at line 108 of file XMLWriter.hpp.


Constructor & Destructor Documentation

pwiz::minimxml::XMLWriter::XMLWriter ( std::ostream &  os,
const Config config = Config() 
)

constructor

virtual pwiz::minimxml::XMLWriter::~XMLWriter ( )
inlinevirtual

Definition at line 96 of file XMLWriter.hpp.

{}
pwiz::minimxml::XMLWriter::XMLWriter ( const XMLWriter )
private

Member Function Documentation

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().

XMLWriter& pwiz::minimxml::XMLWriter::operator= ( const XMLWriter )
private

Member Data Documentation

boost::shared_ptr<Impl> pwiz::minimxml::XMLWriter::impl_
private

Definition at line 133 of file XMLWriter.hpp.


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