summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjules <jules@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-13 17:43:59 +0000
committerjules <jules@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-13 17:43:59 +0000
commit02a170901103fc63adc52cb84224618ca1db1ce1 (patch)
tree8bdad2575c3966ffbd14262663d6c092e5b13b9e
parentfc9fcaed99b705ebe3a09b70604ef7dc6ff8883b (diff)
downloadATCD-02a170901103fc63adc52cb84224618ca1db1ce1.tar.gz
Sat Sep 13 12:39:23 2004 Jules White <jules@dre.vanderbilt.edu>
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.cpp40
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.h64
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp14
3 files changed, 118 insertions, 0 deletions
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.cpp
new file mode 100644
index 00000000000..ede65f39f61
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.cpp
@@ -0,0 +1,40 @@
+// $Id$
+
+#include "CRDD_Handler.h"
+#include "ANY_Handler.h"
+#include "Basic_Deployment_Data.hpp"
+#include "ciao/Deployment_DataC.h"
+
+namespace CIAO
+{
+ namespace Config_Handlers
+ {
+
+ CRDD_Handler::CRDD_Handler (void)
+ {
+ }
+
+ CRDD_Handler::~CRDD_Handler (void)
+ {
+ }
+
+ ///This method takes a <Deployment::ConnectionResourceDeploymentDescription>
+ ///and maps the values from the passed in XSC
+ ///ConnectionResourceDeploymentDescription to its members.
+ void CRDD_Handler::get_ConnectionResourceDeploymentDescription (
+ Deployment::ConnectionResourceDeploymentDescription& toconfig,
+ ConnectionResourceDeploymentDescription& desc)
+ {
+ toconfig.targetName = CORBA::string_dup (desc.targetName ().c_str ());
+ toconfig.requirementName =
+ CORBA::string_dup (desc.requirementName ().c_str ());
+ toconfig.resourceName =
+ CORBA::string_dup (desc.resourceName ().c_str ());
+
+ ANY_Handler anyhandler;
+ anyhandler.get_Any (toconfig.resourceValue, desc.resourceValue ());
+
+ }
+
+ }
+}
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.h
new file mode 100644
index 00000000000..1cfac7e78e2
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.h
@@ -0,0 +1,64 @@
+//==============================================================
+/**
+ * @file CRDD_Handler.h
+ *
+ * $Id$
+ *
+ * @author Jules White <jules@dre.vanderbilt.edu>
+ */
+//================================================================
+
+#ifndef CIAO_CONFIG_HANDLERS_CRDD_HANDLER_H
+#define CIAO_CONFIG_HANDLERS_CRDD_HANDLER_H
+#include /**/ "ace/pre.h"
+
+#include "Config_Handlers_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+namespace Deployment
+{
+ struct ConnectionResourceDeploymentDescription;
+}
+
+namespace CIAO
+{
+
+ namespace Config_Handlers
+ {
+
+ struct ConnectionResourceDeploymentDescription;
+
+ /*
+ * @class CRDD_Handler
+ *
+ * @brief Handler class for <ConnectionResourceDeploymentDescription> types.
+ *
+ * This class defines handler methods to map values from
+ * XSC ConnectionResourceDeploymentDescription objects, parsed from
+ * the descriptor files, to the corresponding CORBA IDL type.
+ *
+ */
+
+ class Config_Handlers_Export CRDD_Handler{
+
+ public:
+
+ CRDD_Handler (void);
+ virtual ~CRDD_Handler (void);
+
+ ///This method takes a <Deployment::ConnectionResourceDeploymentDescription>
+ ///and maps the values from the passed in XSC
+ ///ConnectionResourceDeploymentDescription to its members.
+ void get_ConnectionResourceDeploymentDescription (
+ Deployment::ConnectionResourceDeploymentDescription& toconfig,
+ ConnectionResourceDeploymentDescription& desc);
+
+ };
+ }
+}
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_CONFIG_HANDLERS_CRDD_HANDLER_H*/
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp
index a849aa90f00..56f2ac83de0 100644
--- a/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp
+++ b/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp
@@ -5,6 +5,7 @@
#include "CEPE_Handler.h"
#include "PSPE_Handler.h"
#include "ERE_Handler.h"
+#include "CRDD_Handler.h"
#include "Basic_Deployment_Data.hpp"
#include "ciao/Deployment_DataC.h"
@@ -106,6 +107,19 @@ namespace CIAO
toconfig.externalReference [toconfig.externalReference.length () - 1],
*ipoint);
}
+
+ //Configure the resource value.
+ if (desc.deployedResource_p ())
+ {
+ CRDD_Handler crddhandler;
+
+ toconfig.deployedResource.length (
+ toconfig.deployedResource.length () + 1);
+
+ crddhandler.get_ConnectionResourceDeploymentDescription (
+ toconfig.deployedResource[toconfig.deployedResource.length () - 1],
+ desc.deployedResource ());
+ }
}