ProteoWizard
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
pwiz::minimxml::XMLWriter Class Reference

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 More...
 
virtual ~XMLWriter ()
 
void pushStyle (unsigned int flags)
 pushes style flags onto the internal style stack More...
 
void popStyle ()
 pops the style stack More...
 
void processingInstruction (const std::string &name, const std::string &data)
 writes a processing instruction More...
 
void startElement (const std::string &name, const Attributes &attributes=Attributes(), EmptyElementTag emptyElementTag=NotEmptyElement)
 writes element start tag More...
 
void endElement ()
 writes element end tag More...
 
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 More...
 
stream_offset position () const
 returns current stream position More...
 
stream_offset positionNext () const
 returns stream position of next element start tag More...
 

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

§ stream_offset

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

Definition at line 123 of file XMLWriter.hpp.

Member Enumeration Documentation

§ EmptyElementTag

tag for indicating an empty element

Enumerator
NotEmptyElement 
EmptyElement 

Definition at line 108 of file XMLWriter.hpp.

Constructor & Destructor Documentation

§ XMLWriter() [1/2]

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

constructor

§ ~XMLWriter()

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

Definition at line 96 of file XMLWriter.hpp.

96 {}

§ XMLWriter() [2/2]

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

Member Function Documentation

§ pushStyle()

void pwiz::minimxml::XMLWriter::pushStyle ( unsigned int  flags)

pushes style flags onto the internal style stack

Referenced by test().

§ popStyle()

void pwiz::minimxml::XMLWriter::popStyle ( )

pops the style stack

Referenced by test().

§ processingInstruction()

void pwiz::minimxml::XMLWriter::processingInstruction ( const std::string &  name,
const std::string &  data 
)

writes a processing instruction

Referenced by test().

§ startElement()

void pwiz::minimxml::XMLWriter::startElement ( const std::string &  name,
const Attributes attributes = Attributes(),
EmptyElementTag  emptyElementTag = NotEmptyElement 
)

writes element start tag

Referenced by test().

§ endElement()

void pwiz::minimxml::XMLWriter::endElement ( )

writes element end tag

Referenced by test().

§ characters()

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

§ position()

stream_offset pwiz::minimxml::XMLWriter::position ( ) const

returns current stream position

Referenced by test().

§ positionNext()

stream_offset pwiz::minimxml::XMLWriter::positionNext ( ) const

returns stream position of next element start tag

Referenced by test().

§ operator=()

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

Member Data Documentation

§ impl_

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: