ProteoWizard
Public Member Functions | Private Attributes
PrintEventHandler Class Reference
Inheritance diagram for PrintEventHandler:
pwiz::minimxml::SAXParser::Handler

List of all members.

Public Member Functions

 PrintEventHandler (ostream &os)
virtual Status processingInstruction (const string &name, const string &value, stream_offset position)
virtual Status startElement (const string &name, const Attributes &attributes, stream_offset position)
virtual Status endElement (const string &name, stream_offset position)
virtual Status characters (const SAXParser::saxstring &text, stream_offset position)
- Public Member Functions inherited from pwiz::minimxml::SAXParser::Handler
 Handler ()
virtual ~Handler ()

Private Attributes

ostream & os_

Additional Inherited Members

- Public Types inherited from pwiz::minimxml::SAXParser::Handler
enum  XMLUnescapeBehavior_t { XMLUnescapeDefault, NoXMLUnescape }
typedef
boost::iostreams::stream_offset 
stream_offset
- Public Attributes inherited from pwiz::minimxml::SAXParser::Handler
bool parseCharacters
 When false, no calls to characters() will be made.
bool autoUnescapeAttributes
 Setting these to false will disable the auto-unescaping feature of the parser; this is useful for handlers which deal with large amounts of data.
bool autoUnescapeCharacters
int version
 contextual version available to control handler logic which support multiple versions of a schema; the default value 0 indicates handler should ignore the version; the handler determines the meaning of any non-zero value
- Protected Member Functions inherited from pwiz::minimxml::SAXParser::Handler
template<typename T >
T & getAttribute (const Attributes &attributes, const char *name, T &result, XMLUnescapeBehavior_t Unescape, T defaultValue=T()) const
const char * getAttribute (const Attributes &attributes, const char *name, XMLUnescapeBehavior_t Unescape, const char *defaultValue=NULL) const
template<typename T >
T & getAttribute (const Attributes &attributes, const char *name, T &result) const
std::string & getAttribute (const Attributes &attributes, const char *name, std::string &result) const
template<typename T >
T & getAttribute (const Attributes &attributes, const std::string &name, T &result, T defaultValue=T()) const

Detailed Description

Definition at line 76 of file SAXParserTest.cpp.


Constructor & Destructor Documentation

PrintEventHandler::PrintEventHandler ( ostream &  os)
inline

Definition at line 80 of file SAXParserTest.cpp.

: os_(os)
{}

Member Function Documentation

virtual Status PrintEventHandler::processingInstruction ( const string &  name,
const string &  value,
stream_offset  position 
)
inlinevirtual

Reimplemented from pwiz::minimxml::SAXParser::Handler.

Definition at line 84 of file SAXParserTest.cpp.

References os_.

{
os_ << "[0x" << hex << position << "] processingInstruction: (" << name << "," << value << ")\n";
return Status::Ok;
};
virtual Status PrintEventHandler::startElement ( const string &  name,
const Attributes attributes,
stream_offset  position 
)
inlinevirtual

Reimplemented from pwiz::minimxml::SAXParser::Handler.

Definition at line 92 of file SAXParserTest.cpp.

References pwiz::minimxml::SAXParser::Handler::Attributes::begin(), pwiz::minimxml::SAXParser::Handler::Attributes::end(), and os_.

{
os_ << "[0x" << hex << position << "] startElement: " << name;
for_each(attributes.begin(), attributes.end(), PrintAttribute(os_));
os_ << endl;
return Status::Ok;
};
virtual Status PrintEventHandler::endElement ( const string &  name,
stream_offset  position 
)
inlinevirtual

Reimplemented from pwiz::minimxml::SAXParser::Handler.

Definition at line 102 of file SAXParserTest.cpp.

References os_.

{
os_ << "[0x" << hex << position << "] endElement: " << name << endl;
return Status::Ok;
}
virtual Status PrintEventHandler::characters ( const SAXParser::saxstring text,
stream_offset  position 
)
inlinevirtual

Reimplemented from pwiz::minimxml::SAXParser::Handler.

Definition at line 108 of file SAXParserTest.cpp.

References os_.

{
os_ << "[0x" << hex << position << "] text: " << text << endl;
return Status::Ok;
}

Member Data Documentation

ostream& PrintEventHandler::os_
private

Definition at line 115 of file SAXParserTest.cpp.


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