summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjules <jules@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-07 23:29:22 +0000
committerjules <jules@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-07 23:29:22 +0000
commitf3b726aadd6ed4464bc96971da6cb68889bb5516 (patch)
treea94403f09756426f175ca8b06367de47c78dfe41
parent58b472f69cd45eb8ccb115d790e71efb5abaf1aa (diff)
downloadATCD-f3b726aadd6ed4464bc96971da6cb68889bb5516.tar.gz
Tue Sep 07 18:23:02 2004 Jules White <jules@dre.vanderbilt.edu>
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/ChangeLog11
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp84
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h62
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp41
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h61
5 files changed, 259 insertions, 0 deletions
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog
index a1748d748c2..b99373d38e0 100644
--- a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog
+++ b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog
@@ -1,3 +1,14 @@
+Tue Sep 07 18:23:02 2004 Jules White <jules@dre.vanderbilt.edu>
+
+ * Config_Handlers/MDD_Handler.h
+ * Config_Handlers/MDD_Handler.cpp
+ * Config_Handlers/Req_Handler.h
+ * Config_Handlers/Req_Handler.cpp
+
+ Created classes to handled mapping values from
+ XSC MonolithicDeploymentDescription and
+ Requirement to the corresponding IDL types.
+
Thu Sep 02 15:01:21 2004 Jules White <jules@dre.vanderbilt.edu>
* Config_Handlers/ANY_Handler.h:
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp
new file mode 100644
index 00000000000..feb19231251
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp
@@ -0,0 +1,84 @@
+// $Id$
+
+#include "MDD_Handler.h"
+#include "Req_Handler.h"
+#include "Prop_Handler.h"
+#include "ciao/Deployment_DataC.h"
+
+namespace CIAO
+{
+ namespace Config_Handlers
+ {
+
+ MDD_Handler::MDD_Handler (void)
+ {
+ }
+
+ MDD_Handler::~MDD_Handler (void)
+ {
+ }
+
+
+ void
+ MDD_Handler::get_MonolithicDeploymentDescription (
+ Deployment::MonolithicDeploymentDescription& toconfig,
+ MonolithicDeploymentDescription& desc)
+ {
+ //Transfer the name.
+ toconfig.name = CORBA::string_dup (desc.name ().c_str ());
+
+ //Increase the length of the sequence.
+ toconfig.source.length (toconfig.source.length () + 1);
+
+ //The IDL specifies a sequence for source, but the
+ //schema specifies a string, so we map that single string
+ //to the first position in the sequence.
+ toconfig.source[toconfig.source.length () - 1] =
+ CORBA::string_dup (desc.source ().c_str ());
+
+ /*
+ *
+ *
+ * NEED TO FIGURE OUT WHAT THE VALUE
+ * THAT GETS STORED IN artifactRef will be
+ *
+ * IT WILL GO HERE
+ */
+
+
+ if (desc.execParameter_p ())
+ {
+ //Create the property handler to
+ //delegate to.
+ Prop_Handler phandler;
+
+ //Lengthen the sequence for the new element.
+ toconfig.execParameter.length (
+ toconfig.execParameter.length () + 1);
+
+ //Configure the new property using the handler.
+ phandler.get_Property (
+ toconfig.execParameter[toconfig.execParameter.length () -1],
+ desc.execParameter ());
+ }
+
+ if (desc.deployRequirement_p ())
+ {
+ //Create the Requirement handler.
+ Requirement_Handler reqhandler;
+
+ //Lengthen the sequence for the new element.
+ toconfig.deployRequirement.length (
+ toconfig.deployRequirement.length () + 1);
+
+ //Configure the new requirement using the handler.
+ reqhandler.get_Requirement (
+ toconfig.deployRequirement[toconfig.deployRequirement.length () -1],
+ desc.deployRequirement ());
+ }
+
+
+ }
+
+ }
+}
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h
new file mode 100644
index 00000000000..50ae8f5d1e7
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h
@@ -0,0 +1,62 @@
+//==============================================================
+/**
+ * @file MDD_Handler.h
+ *
+ * $Id$
+ *
+ * @author Jules White <jules@dre.vanderbilt.edu>
+ */
+//================================================================
+
+#ifndef CIAO_CONFIG_HANDLERS_MDD_HANDLER_H
+#define CIAO_CONFIG_HANDLERS_MDD_HANDLER_H
+#include /**/ "ace/pre.h"
+
+#include "Basic_Deployment_Data.hpp"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+namespace Deployment
+{
+ struct MonolithicDeploymentDescription;
+}
+
+
+namespace CIAO
+{
+
+ namespace Config_Handlers
+ {
+ /*
+ * @class MDD_Handler
+ *
+ * @brief Handler class for <MonolithicDeploymentDescription> types.
+ *
+ * This class defines handler methods to map values from
+ * XSC MonolithicDeploymentDescription objects, parsed from
+ * the descriptor files, to the corresponding CORBA IDL type.
+ *
+ */
+
+ class MDD_Handler{
+
+ public:
+
+ MDD_Handler (void);
+ virtual ~MDD_Handler (void);
+
+ ///This method takes a <Deployment::MonolithicDeploymentDescription>
+ ///and maps the values from the passed in XSC
+ ///MonolithicDeploymentDescription to its members.
+ void get_MonolithicDeploymentDescription (
+ Deployment::MonolithicDeploymentDescription& toconfig,
+ MonolithicDeploymentDescription& desc);
+
+ };
+ }
+}
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_CONFIG_HANDLERS_MDD_HANDLER_H*/
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp
new file mode 100644
index 00000000000..436628088eb
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp
@@ -0,0 +1,41 @@
+// $Id$
+
+#include "Req_Handler.h"
+#include "Prop_Handler.h"
+#include "ciao/DeploymentC.h"
+
+namespace CIAO
+{
+ namespace Config_Handlers
+ {
+
+ Requirement_Handler::Requirement_Handler (void)
+ {
+ }
+
+ Requirement_Handler::~Requirement_Handler (void)
+ {
+ }
+
+ void
+ Requirement_Handler::get_Requirement (
+ Deployment::Requirement& toconfig,
+ Requirement& desc)
+ {
+ //Map the basic string types to their Deployment::Requirement
+ //counterparts.
+ toconfig.name = CORBA::string_dup (desc.name ().c_str ());
+ toconfig.resourceType =
+ CORBA::string_dup (desc.resourceType ().c_str ());
+
+ //Map the XSC Requirement's property into the next
+ //position in the IDL Requirement's sequence.
+ Prop_Handler prophandler;
+ toconfig.property.length (toconfig.property.length () + 1);
+ prophandler.get_Property (
+ toconfig.property[toconfig.property.length () - 1],
+ desc.property ());
+ }
+
+ }
+}
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h
new file mode 100644
index 00000000000..5993f2abcb6
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h
@@ -0,0 +1,61 @@
+//==============================================================
+/**
+ * @file REQ_Handler.h
+ *
+ * $Id$
+ *
+ * @author Jules White <jules@dre.vanderbilt.edu>
+ */
+//================================================================
+
+#ifndef CIAO_CONFIG_HANDLERS_REQ_HANDLER_H
+#define CIAO_CONFIG_HANDLERS_REQ_HANDLER_H
+#include /**/ "ace/pre.h"
+
+#include "Basic_Deployment_Data.hpp"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+namespace Deployment
+{
+ struct Requirement;
+}
+
+namespace CIAO
+{
+
+ namespace Config_Handlers
+ {
+ /*
+ * @class REQ_Handler
+ *
+ * @brief Handler class for <Requirement> types.
+ *
+ * This class defines handler methods to map values from
+ * XSC Requirement objects, parsed from
+ * the descriptor files, to the corresponding CORBA IDL type.
+ *
+ */
+
+ class Requirement_Handler{
+
+ public:
+
+ Requirement_Handler (void);
+ virtual ~Requirement_Handler (void);
+
+ ///This method takes a <Deployment::Requirement>
+ ///and maps the values from the passed in XSC
+ ///Requirement to its members.
+ static void get_Requirement (
+ Deployment::Requirement& toconfig,
+ Requirement& desc);
+
+ };
+ }
+}
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_CONFIG_HANDLERS_REQ_HANDLER_H*/