summaryrefslogtreecommitdiff
path: root/CIAO/tools/Config_Handlers/XML_File_Intf.cpp
diff options
context:
space:
mode:
authorAbdullah Sowayan <sowayan@users.noreply.github.com>2007-03-18 22:23:37 +0000
committerAbdullah Sowayan <sowayan@users.noreply.github.com>2007-03-18 22:23:37 +0000
commit06a34455bd98b1379cc69bbc5b2cf085e0fc0d9b (patch)
tree8815ce3b3a85c3c4285429295f338e00ea4497f4 /CIAO/tools/Config_Handlers/XML_File_Intf.cpp
parentd66fcc9b4aaec8e88eeb83fc578fdf8a3cc963de (diff)
downloadATCD-06a34455bd98b1379cc69bbc5b2cf085e0fc0d9b.tar.gz
Diffstat (limited to 'CIAO/tools/Config_Handlers/XML_File_Intf.cpp')
-rw-r--r--CIAO/tools/Config_Handlers/XML_File_Intf.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/CIAO/tools/Config_Handlers/XML_File_Intf.cpp b/CIAO/tools/Config_Handlers/XML_File_Intf.cpp
new file mode 100644
index 00000000000..53e8ac1e801
--- /dev/null
+++ b/CIAO/tools/Config_Handlers/XML_File_Intf.cpp
@@ -0,0 +1,65 @@
+// $Id$
+
+#include "XML_File_Intf.h"
+#include "Utils/XML_Helper.h"
+#include "Deployment.hpp"
+#include "DP_Handler.h"
+#include "DAnCE/Deployment/Deployment_DataC.h"
+#include "ciao/CIAO_common.h"
+
+
+namespace CIAO
+{
+ namespace Config_Handlers
+ {
+ XML_File_Intf::XML_File_Intf (const char *file)
+ {
+ if (!this->read_process_file (file))
+ throw;
+ }
+
+ bool
+ XML_File_Intf::read_process_file (const char *file)
+ {
+ CIAO_TRACE("XML_File_Intf::read_process_file");
+
+ XML_Helper helper;
+
+ if (!helper.is_initialized ())
+ return false;
+
+ XERCES_CPP_NAMESPACE::DOMDocument *dom =
+ helper.create_dom (file);
+
+ if (!dom)
+ return false;
+
+ DeploymentPlan dp =
+ deploymentPlan (dom);
+
+
+ DP_Handler dp_handler (dp);
+
+ this->idl_dp_.reset (dp_handler.plan ());
+
+ if (this->idl_dp_.get ())
+ return true;
+
+ return false;
+ }
+
+ ::Deployment::DeploymentPlan const *
+ XML_File_Intf::get_plan (void) const
+ {
+ CIAO_TRACE("get_plan");
+ return this->idl_dp_.get ();
+ }
+
+ ::Deployment::DeploymentPlan *
+ XML_File_Intf::get_plan (void)
+ {
+ CIAO_TRACE("XML_File_Intf::get_plan");
+ return this->idl_dp_.release ();
+ }
+ }
+}