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

List of all members.

Public Member Functions

 RootHandler (Root &root, bool autoUnescapeAttributes=true, bool autoUnescapeCharacters=true)
virtual Status startElement (const string &name, const Attributes &attributes, stream_offset position)
- Public Member Functions inherited from pwiz::minimxml::SAXParser::Handler
virtual Status processingInstruction (const std::string &name, const std::string &data, stream_offset position)
virtual Status endElement (const std::string &name, stream_offset position)
virtual Status characters (const SAXParser::saxstring &text, stream_offset position)
 Handler ()
virtual ~Handler ()

Private Attributes

Rootobject_
FirstHandler firstHandler_
SecondHandler secondHandler_
FifthHandler fifthHandler_

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 314 of file SAXParserTest.cpp.


Constructor & Destructor Documentation

RootHandler::RootHandler ( Root root,
bool  autoUnescapeAttributes = true,
bool  autoUnescapeCharacters = true 
)
inline

Member Function Documentation

virtual Status RootHandler::startElement ( const string &  name,
const Attributes attributes,
stream_offset  position 
)
inlinevirtual

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

Definition at line 329 of file SAXParserTest.cpp.

References readAttribute(), and unit_assert_operator_equal.

{
if (name == "RootElement")
{
readAttribute(attributes, "param", object_.param);
}
else if (name == "FirstElement")
{
// delegate handling to a FirstHandler
return Status(Status::Delegate, &firstHandler_);
}
else if (name == "SecondElement")
{
// delegate handling to a SecondHandler
return Status(Status::Delegate, &secondHandler_);
}
else if (name == "FifthElement")
{
// delegate handling to a FifthHandler
return Status(Status::Delegate, &fifthHandler_);
}
return Status::Ok;
}

Member Data Documentation

Root& RootHandler::object_
private

Definition at line 359 of file SAXParserTest.cpp.

FirstHandler RootHandler::firstHandler_
private

Definition at line 360 of file SAXParserTest.cpp.

SecondHandler RootHandler::secondHandler_
private

Definition at line 361 of file SAXParserTest.cpp.

FifthHandler RootHandler::fifthHandler_
private

Definition at line 362 of file SAXParserTest.cpp.


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