Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::XML2EventParser Class Reference

#include <mitkXML2EventParser.h>

Inheritance diagram for mitk::XML2EventParser:
Collaboration diagram for mitk::XML2EventParser:

Public Types

typedef std::vector< mitk::InteractionEvent::PointerEventContainerType
 

Public Member Functions

 XML2EventParser (const std::string &filename, const us::Module *module=NULL)
 Construct an InteractionEventList object based on a XML configuration file. More...
 
 XML2EventParser (std::istream &inputStream)
 Construct an InteractionEventList object based on a XML configuration file. More...
 
EventContainerType GetInteractions ()
 
 ~XML2EventParser ()
 

Protected Member Functions

void StartElement (const char *elementName, const char **atts) override
 Derived from XMLReader. More...
 
void EndElement (const char *elementName) override
 Derived from XMLReader. More...
 
std::string ReadXMLStringAttribute (const std::string &name, const char **atts)
 
bool ReadXMLBooleanAttribute (const std::string &name, const char **atts)
 

Detailed Description

Definition at line 42 of file mitkXML2EventParser.h.

Member Typedef Documentation

Constructor & Destructor Documentation

mitk::XML2EventParser::XML2EventParser ( const std::string &  filename,
const us::Module module = NULL 
)

Construct an InteractionEventList object based on a XML configuration file.

Uses the specified resource file containing an XML event configuration to construct an EventConfig object. If the resource is invalid, the created EventConfig object will also be invalid.

Parameters
filenameThe resource name relative to the Interactions resource folder.
module

Definition at line 110 of file mitkXML2EventParser.cpp.

References filename, ModuleContext::GetModule(), us::GetModuleContext(), us::Module::GetName(), us::Module::GetResource(), us::ModuleResource::IsValid(), and MITK_ERROR.

mitk::XML2EventParser::XML2EventParser ( std::istream &  inputStream)

Construct an InteractionEventList object based on a XML configuration file.

Uses the specified istream refering to a file containing an XML event configuration to construct an EventConfig object. If the resource is invalid, the created EventConfig object will also be invalid.

Parameters
inputStreamstd::ifstream to XML configuration file

Definition at line 131 of file mitkXML2EventParser.cpp.

References MITK_ERROR.

mitk::XML2EventParser::~XML2EventParser ( )
inline

Definition at line 71 of file mitkXML2EventParser.h.

Member Function Documentation

void mitk::XML2EventParser::EndElement ( const char *  elementName)
overrideprotected
EventContainerType mitk::XML2EventParser::GetInteractions ( )
inline

Definition at line 70 of file mitkXML2EventParser.h.

bool mitk::XML2EventParser::ReadXMLBooleanAttribute ( const std::string &  name,
const char **  atts 
)
protected

Definition at line 102 of file mitkXML2EventParser.cpp.

std::string mitk::XML2EventParser::ReadXMLStringAttribute ( const std::string &  name,
const char **  atts 
)
protected

Definition at line 83 of file mitkXML2EventParser.cpp.


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