Medical Imaging Interaction Toolkit  2021.10.99-9c07a326
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=nullptr)
 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 () override
 

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 38 of file mitkXML2EventParser.h.

Member Typedef Documentation

◆ EventContainerType

Constructor & Destructor Documentation

◆ XML2EventParser() [1/2]

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

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

◆ XML2EventParser() [2/2]

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

◆ ~XML2EventParser()

mitk::XML2EventParser::~XML2EventParser ( )
inlineoverride

Definition at line 67 of file mitkXML2EventParser.h.

Member Function Documentation

◆ EndElement()

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

Derived from XMLReader.

◆ GetInteractions()

EventContainerType mitk::XML2EventParser::GetInteractions ( )
inline

Definition at line 66 of file mitkXML2EventParser.h.

◆ ReadXMLBooleanAttribute()

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

◆ ReadXMLStringAttribute()

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

◆ StartElement()

void mitk::XML2EventParser::StartElement ( const char *  elementName,
const char **  atts 
)
overrideprotected

Derived from XMLReader.


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