26 #include <vtkXMLDataElement.h>
38 std::string name(elementName);
61 m_EventPropertyList->SetStringProperty(name.c_str(), value.c_str());
67 std::string name(elementName);
72 if (event.IsNotNull())
74 m_InteractionList.push_back(event);
78 MITK_WARN <<
"EventConfig: Unknown Event-Type in config. Entry skipped: " << name;
87 const char **attsIter = atts;
91 if (name == *attsIter)
104 std::string s = ReadXMLStringAttribute(name, atts);
105 std::transform(s.begin(), s.end(), s.begin(), ::toupper);
119 MITK_ERROR <<
"Resource not valid. State machine pattern in module " << module->
GetName()
120 <<
" not found: /Interactions/" <<
filename;
125 this->SetStream(&stream);
126 bool success = this->Parse();
128 MITK_ERROR <<
"Error occured during parsing of EventXML File.";
133 this->SetStream(&inputStream);
134 bool success = this->Parse();
136 MITK_ERROR <<
"Error occured during parsing of EventXML File.";
static const std::string xmlParameterName()
std::string GetName() const
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
static const std::string filename
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.
bool ReadXMLBooleanAttribute(const std::string &name, const char **atts)
XML2EventParser(const std::string &filename, const us::Module *module=NULL)
Construct an InteractionEventList object based on a XML configuration file.
ModuleResource GetResource(const std::string &path) const
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
static const std::string xmlTagAttribute()