diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2011-10-13 22:21:42 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2011-10-13 22:21:42 +0000 |
commit | ce54c89f04bab323c2ff59804f2a7185d0a4aa80 (patch) | |
tree | f26826ecc394a9f9e3583cf431f347dd9dd072ba | |
parent | adf62e06271852f4208db15e21a8a45f32dcaa5f (diff) | |
download | ATCD-ce54c89f04bab323c2ff59804f2a7185d0a4aa80.tar.gz |
Thu Oct 13 22:19:49 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu>
* tools/Config_Handlers/XMLSchema/id_map.hpp:
* tools/Config_Handlers/XML_File_Intf.cpp:
1) the XML_Helper is no longer terminated in the File_Intf destructor,
this caused problems when several files were parsed in a single process.
2) We now reset the ID_Map before each parsing event.
-rw-r--r-- | DAnCE/ChangeLog | 9 | ||||
-rw-r--r-- | DAnCE/tools/Config_Handlers/XMLSchema/id_map.hpp | 6 | ||||
-rw-r--r-- | DAnCE/tools/Config_Handlers/XML_File_Intf.cpp | 11 |
3 files changed, 24 insertions, 2 deletions
diff --git a/DAnCE/ChangeLog b/DAnCE/ChangeLog index bcf857f444c..e3c09703805 100644 --- a/DAnCE/ChangeLog +++ b/DAnCE/ChangeLog @@ -1,3 +1,12 @@ +Thu Oct 13 22:19:49 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu> + + * tools/Config_Handlers/XMLSchema/id_map.hpp: + * tools/Config_Handlers/XML_File_Intf.cpp: + + 1) the XML_Helper is no longer terminated in the File_Intf destructor, + this caused problems when several files were parsed in a single process. + 2) We now reset the ID_Map before each parsing event. + Thu Oct 13 19:10:36 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu> * dance/DAnCE_Utility.h: diff --git a/DAnCE/tools/Config_Handlers/XMLSchema/id_map.hpp b/DAnCE/tools/Config_Handlers/XMLSchema/id_map.hpp index a2843d44693..efc6a8b8bd7 100644 --- a/DAnCE/tools/Config_Handlers/XMLSchema/id_map.hpp +++ b/DAnCE/tools/Config_Handlers/XMLSchema/id_map.hpp @@ -126,6 +126,12 @@ } } + void reset (void) + { + id_map_.clear (); + idref_map_.clear (); + } + private: //id_map_: maps the ID string to the element with the // ID attribute diff --git a/DAnCE/tools/Config_Handlers/XML_File_Intf.cpp b/DAnCE/tools/Config_Handlers/XML_File_Intf.cpp index e3916d35083..c2e4bb41f89 100644 --- a/DAnCE/tools/Config_Handlers/XML_File_Intf.cpp +++ b/DAnCE/tools/Config_Handlers/XML_File_Intf.cpp @@ -6,6 +6,7 @@ #include "DP_Handler.h" #include "DD_Handler.h" #include "Common.h" +#include "XMLSchema/id_map.hpp" #include "dance/Deployment/Deployment_DataC.h" #include "dance/Deployment/Deployment_TargetDataC.h" @@ -26,7 +27,7 @@ namespace DAnCE { DANCE_TRACE("XML_File_Intf::destructor"); - XML_Helper::XML_HELPER.terminate_parser (); + // XML_Helper::XML_HELPER.terminate_parser (); } bool @@ -58,6 +59,9 @@ namespace DAnCE (LM_TRACE, DLINFO ACE_TEXT ("XML_File_Intf::read_process_plan - ") ACE_TEXT ("DOMElement pointer: %u\n"), foo)); + ID_Map::TSS_ID_Map* TSS_ID_Map (ACE_Singleton<ID_Map::TSS_ID_Map, ACE_Null_Mutex>::instance()); + (*TSS_ID_Map)->reset (); + DANCE_DEBUG (DANCE_LOG_EVENT_TRACE, (LM_TRACE, DLINFO ACE_TEXT ("XML_File_Intf::read_process_plan - ") ACE_TEXT ("Parsing XML file with XSC\n"))); @@ -131,6 +135,10 @@ namespace DAnCE DANCE_DEBUG (DANCE_LOG_EVENT_TRACE, (LM_TRACE, DLINFO ACE_TEXT ("XML_File_Intf::read_process_domain - ") ACE_TEXT ("Parsing XML file with XSC\n"))); + + ID_Map::TSS_ID_Map* TSS_ID_Map (ACE_Singleton<ID_Map::TSS_ID_Map, ACE_Null_Mutex>::instance()); + (*TSS_ID_Map)->reset (); + Domain dp = DAnCE::Config_Handlers::reader::domain (dom); @@ -216,7 +224,6 @@ namespace DAnCE const ACE_TCHAR *relpath) { DANCE_TRACE("XML_File_Intf::add_search_path"); - XML_Helper::XML_HELPER.get_resolver ().get_resolver ().add_path (environment, relpath); } |