summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjules <jules@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-11 22:51:14 +0000
committerjules <jules@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-11 22:51:14 +0000
commita957c498a85d061389688a3060e557d9a1a0ec51 (patch)
treeac9ecae10965ce6786fea080a5c1ee15b8bc8814
parenta97c708e5f095e3ffb04bf6adb3ae3888dc1326f (diff)
downloadATCD-a957c498a85d061389688a3060e557d9a1a0ec51.tar.gz
Sat Sep 11 17:43:34 2004 Jules White <jules@dre.vanderbilt.edu>
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/ChangeLog17
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp80
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.h64
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.cpp44
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.h64
5 files changed, 269 insertions, 0 deletions
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog
index 7447977f567..3d6e504bb0a 100644
--- a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog
+++ b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog
@@ -1,3 +1,20 @@
+Sat Sep 11 17:43:34 2004 Jules White <jules@dre.vanderbilt.edu>
+
+ * PSPE_Handler.h:
+ * PSPE_Handler.cpp:
+ * PCD_Handler.cpp:
+ * PCD_Handler.h
+
+ Created a class to handle PlanSubcomponentPortEndpoint.
+ Created a class to hanlde PlanConnectionDescription.
+
+Thu Sep 9 14:34:02 2004 Jules White <jules@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/CEPE_Handler.h:
+ * DAnCE/Config_Handlers/CEPE_Handler.cpp:
+
+ Added a class to handle ComponentExternalPortEndpoints.
+
Wed Sep 8 17:23:56 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
* Dance/Config_Handlers/Config_Handlers.mpc:
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp
new file mode 100644
index 00000000000..3e3c33bc848
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp
@@ -0,0 +1,80 @@
+// $Id$
+
+#include "PCD_Handler.h"
+#include "Req_Handler.h"
+#include "CEPE_Handler.h"
+#include "Basic_Deployment_Data.hpp"
+#include "ciao/Deployment_DataC.h"
+
+namespace CIAO
+{
+ namespace Config_Handlers
+ {
+
+ PCD_Handler::PCD_Handler (void)
+ {
+ }
+
+ PCD_Handler::~PCD_Handler (void)
+ {
+ }
+
+ ///This method takes a <Deployment::PlanConnectionDescription>
+ ///and maps the values from the passed in XSC
+ ///PlanConnectionDescription to its members.
+ void PCD_Handler::get_PlanConnectionDescription (
+ Deployment::PlanConnectionDescription& toconfig,
+ PlanConnectionDescription& desc)
+ {
+ toconfig.name = CORBA::string_dup (desc.name ().c_str ());
+
+ //Source is mapped to a string in the schema and a sequence
+ //in the IDL. We just assign the source string from the xml
+ //to the first position in the IDL type's sequence. We
+ //make sure that the source is present before lengthening
+ //the sequence.
+ if (desc.source_p ())
+ {
+ toconfig.source.length (toconfig.source.length () + 1);
+ toconfig.source[toconfig.source.length () - 1] =
+ CORBA::string_dup (desc.source ().c_str ());
+ }
+
+
+ if (desc.deployRequirement_p ())
+ {
+ //Create the handler for the requirements.
+ Requirement_Handler reqhandler;
+
+ //Increase the sequence length and delgate
+ //the Requirement to the Req_Handler.
+ toconfig.deployRequirement.length (
+ toconfig.deployRequirement.length () + 1);
+ reqhandler.get_Requirement (
+ toconfig.deployRequirement[toconfig.deployRequirement.length () - 1],
+ desc.deployRequirement ());
+ }
+
+ //Create the ComponentExternalPortEndpoint handler.
+ CEPE_Handler cepehandler;
+
+ //Iterate through and configure each port in the
+ //externalEndpoint sequence.
+ for (PlanConnectionDescription::externalEndpoint_iterator
+ port (desc.begin_externalEndpoint ());
+ port != desc.end_externalEndpoint ();
+ ++port)
+ {
+ toconfig.externalEndpoint.length (
+ toconfig.externalEndpoint.length () + 1);
+
+ cepehandler.get_ComponentExternalPortEndpoint (
+ toconfig.externalEndpoint [toconfig.externalEndpoint.length () - 1],
+ *port);
+ }
+
+
+ }
+
+ }
+}
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.h
new file mode 100644
index 00000000000..f52cd57c602
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.h
@@ -0,0 +1,64 @@
+//==============================================================
+/**
+ * @file PCD_Handler.h
+ *
+ * $Id$
+ *
+ * @author Jules White <jules@dre.vanderbilt.edu>
+ */
+//================================================================
+
+#ifndef CIAO_CONFIG_HANDLERS_PCD_HANDLER_H
+#define CIAO_CONFIG_HANDLERS_PCD_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 PlanConnectionDescription;
+}
+
+namespace CIAO
+{
+
+ namespace Config_Handlers
+ {
+
+ struct PlanConnectionDescription;
+
+ /*
+ * @class PCD_Handler
+ *
+ * @brief Handler class for <PlanConnectionDescription> types.
+ *
+ * This class defines handler methods to map values from
+ * XSC PlanConnectionDescription objects, parsed from
+ * the descriptor files, to the corresponding CORBA IDL type.
+ *
+ */
+
+ class Config_Handlers_Export PCD_Handler{
+
+ public:
+
+ PCD_Handler (void);
+ virtual ~PCD_Handler (void);
+
+ ///This method takes a <Deployment::PlanConnectionDescription>
+ ///and maps the values from the passed in XSC
+ ///PlanConnectionDescription to its members.
+ void get_PlanConnectionDescription (
+ Deployment::PlanConnectionDescription& toconfig,
+ PlanConnectionDescription& desc);
+
+ };
+ }
+}
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_CONFIG_HANDLERS_PCD_HANDLER_H*/
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.cpp
new file mode 100644
index 00000000000..88a1180a6d5
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.cpp
@@ -0,0 +1,44 @@
+// $Id$
+
+#include "PSPE_Handler.h"
+#include "Basic_Deployment_Data.hpp"
+
+
+namespace CIAO
+{
+ namespace Config_Handlers
+ {
+
+ PSPE_Handler::PSPE_Handler (void)
+ {
+ }
+
+ PSPE_Handler::~PSPE_Handler (void)
+ {
+ }
+
+ ///This method takes a <Deployment::PlanSubcomponentPortEndpoint>
+ ///and maps the values from the passed in XSC
+ ///PlanSubcomponentPortEndpoint to its members.
+ void PSPE_Handler::get_PlanSubcomponentPortEndpoint (
+ Deployment::PlanSubcomponentPortEndpoint& toconfig,
+ PlanSubcomponentPortEndpoint& desc)
+ {
+ toconfig.portName = CORBA::string_dup (desc.portName ().c_str ());
+
+ if (desc.provider_p ())
+ {
+ toconfig.provider.length (
+ toconfig.provider.length () + 1);
+ toconfig.provider[toconfig.provider.length () - 1] =
+ CORBA::string_dup (desc.provider ().c_str ());
+ }
+
+
+
+
+
+ }
+
+ }
+}
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.h
new file mode 100644
index 00000000000..3ea3a8428f7
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.h
@@ -0,0 +1,64 @@
+//==============================================================
+/**
+ * @file PSPE_Handler.h
+ *
+ * $Id$
+ *
+ * @author Jules White <jules@dre.vanderbilt.edu>
+ */
+//================================================================
+
+#ifndef CIAO_CONFIG_HANDLERS_PSPE_HANDLER_H
+#define CIAO_CONFIG_HANDLERS_PSPE_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 PlanConnectionDescription;
+}
+
+namespace CIAO
+{
+
+ namespace Config_Handlers
+ {
+
+ struct PlanConnectionDescription;
+
+ /*
+ * @class PSPE_Handler
+ *
+ * @brief Handler class for <PlanSubcomponentPortEndpoint> types.
+ *
+ * This class defines handler methods to map values from
+ * XSC PlanSubcomponentPortEndpoint objects, parsed from
+ * the descriptor files, to the corresponding CORBA IDL type.
+ *
+ */
+
+ class Config_Handlers_Export PSPE_Handler{
+
+ public:
+
+ PSPE_Handler (void);
+ virtual ~PSPE_Handler (void);
+
+ ///This method takes a <Deployment::PlanConnectionDescription>
+ ///and maps the values from the passed in XSC
+ ///PlanConnectionDescription to its members.
+ void get_PlanSubcomponentPortEndpoint (
+ Deployment::PlanSubcomponentPortEndpoint& toconfig,
+ PlanSubcomponentPortEndpoint& desc);
+
+ };
+ }
+}
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_CONFIG_HANDLERS_PSPE_HANDLER_H*/