46 found = str.find_first_of(separator);
47 while(found != string::npos){
49 results->insert(str.substr(0,found));
51 str = str.substr(found+1);
52 found = str.find_first_of(separator);
69 if( !itksys::SystemTools::FileExists( _FileName.c_str() ) )
71 endodebug(_FileName <<
" does not exist");
75 long int _FileModifiedTime
76 = itksys::SystemTools::ModifiedTime( _FileName.c_str() );
80 endodebug(
"File not changed. No Update necessary.");
86 tinyxml2::XMLDocument doc;
87 doc.LoadFile(_FileName.c_str());
88 tinyxml2::XMLHandle docHandle(&doc);
89 auto* elem = docHandle.FirstChildElement().FirstChildElement(
"EndoDebug" ).ToElement();
98 if( elem->QueryIntAttribute(
"DebugEnabled",&_DebugEnabled) != tinyxml2::XML_SUCCESS )
100 endodebug(
"DebugEnabled attribute not found");
104 if( elem->QueryIntAttribute(
"ShowImagesInDebug",&_ShowImagesInDebug) != tinyxml2::XML_SUCCESS)
106 endodebug(
"ShowImagesInDebug attribute not found");
110 if( elem->QueryIntAttribute(
"ShowImagesTimeOut",&_ShowImagesTimeOut) != tinyxml2::XML_SUCCESS)
112 endodebug(
"ShowImagesTimeOut attribute not found");
115 std::string _DebugImagesOutputDirectory;
116 const char* _DebugImagesOutputDirectoryC = elem->Attribute(
"DebugImagesOutputDirectory");
117 if(
nullptr == _DebugImagesOutputDirectoryC)
120 endodebug(
"DebugImagesOutputDirectory attribute not found");
124 _DebugImagesOutputDirectory = _DebugImagesOutputDirectoryC;
127 std::set<std::string> _FilesToDebug;
128 std::string _FilesToDebugString;
129 const char* _FilesToDebugStringC = elem->Attribute(
"FilesToDebug");
130 if(
nullptr == _FilesToDebugStringC)
132 endodebug(
"FilesToDebug attribute not found");
136 _FilesToDebugString = _FilesToDebugStringC;
140 std::set<std::string> _SymbolsToDebug;
141 std::string _SymbolsToDebugString;
142 const char* _SymbolsToDebugStringC = elem->Attribute(
"SymbolsToDebug");
143 if(
nullptr == _SymbolsToDebugStringC )
145 endodebug(
"SymbolsToDebug attribute not found");
149 _SymbolsToDebugString = _SymbolsToDebugStringC;
150 StringExplode( _SymbolsToDebugString,
";", &_SymbolsToDebug );