22 #include <vtkXMLDataElement.h> 34 std::string name(elementName);
57 m_EventPropertyList->SetStringProperty(name.c_str(), value.c_str());
63 std::string name(elementName);
68 if (event.IsNotNull())
70 m_InteractionList.push_back(event);
74 MITK_WARN <<
"EventConfig: Unknown Event-Type in config. Entry skipped: " << name;
83 const char **attsIter = atts;
87 if (name == *attsIter)
100 std::string s = ReadXMLStringAttribute(name, atts);
101 std::transform(s.begin(), s.end(), s.begin(), ::toupper);
108 if (module ==
nullptr)
115 MITK_ERROR <<
"Resource not valid. State machine pattern in module " << module->
GetName()
116 <<
" not found: /Interactions/" << filename;
121 this->SetStream(&stream);
122 bool success = this->Parse();
124 MITK_ERROR <<
"Error occured during parsing of EventXML File.";
129 this->SetStream(&inputStream);
130 bool success = this->Parse();
132 MITK_ERROR <<
"Error occured during parsing of EventXML File.";
static const std::string xmlParameterName()
static const std::string xmlParameterValue()
static const std::string xmlTagConfigRoot()
DataCollection - Class to facilitate loading/accessing structured data.
static const std::string xmlParameterEventClass()
static InteractionEvent::Pointer CreateEvent(PropertyList::Pointer eventDescription)
std::string ReadXMLStringAttribute(const std::string &name, const char **atts)
Module * GetModule() const
ModuleResource GetResource(const std::string &path) const
void EndElement(const char *elementName) override
Derived from XMLReader.
static const std::string xmlTagEventVariant()
void StartElement(const char *elementName, const char **atts) override
Derived from XMLReader.
std::string GetName() const
bool ReadXMLBooleanAttribute(const std::string &name, const char **atts)
XML2EventParser(const std::string &filename, const us::Module *module=nullptr)
Construct an InteractionEventList object based on a XML configuration file.
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
static const std::string xmlTagAttribute()