MCPcopy Create free account
hub / github.com/MITK/MITK / XML2EventParser

Method XML2EventParser

Modules/Core/src/Interactions/mitkXML2EventParser.cpp:106–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 mitk::XML2EventParser::XML2EventParser(const std::string &filename, const us::Module *module)
107 {
108 if (module == nullptr)
109 {
110 module = us::GetModuleContext()->GetModule();
111 }
112 us::ModuleResource resource = module->GetResource("Interactions/" + filename);
113 if (!resource.IsValid())
114 {
115 MITK_ERROR << "Resource not valid. State machine pattern in module " << module->GetName()
116 << " not found: /Interactions/" << filename;
117 return;
118 }
119
120 us::ModuleResourceStream stream(resource);
121 this->SetStream(&stream);
122 bool success = this->Parse();
123 if (!success)
124 MITK_ERROR << "Error occurred during parsing of EventXML File.";
125 }
126
127 mitk::XML2EventParser::XML2EventParser(std::istream &inputStream)
128 {

Callers

nothing calls this directly

Calls 7

GetModuleContextFunction · 0.85
GetResourceMethod · 0.80
GetModuleMethod · 0.45
IsValidMethod · 0.45
GetNameMethod · 0.45
SetStreamMethod · 0.45
ParseMethod · 0.45

Tested by

no test coverage detected