summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjules <jules@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-22 00:53:33 +0000
committerjules <jules@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-22 00:53:33 +0000
commit20bc7a6afa0beb74b60770dd10a6648d08498725 (patch)
tree3ebc56217b320045786c2dc109789e9e643dba6c
parent23c4119d8e715c2798f6d8cf51c2c4fc8075ec26 (diff)
downloadATCD-20bc7a6afa0beb74b60770dd10a6648d08498725.tar.gz
Tue Sep 21 19:47:02 2004 Jules White <jules@dre.vanderbilt.edu>
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp64
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h69
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/ChangeLog20
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp111
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h41
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp12
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h9
7 files changed, 245 insertions, 81 deletions
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp
new file mode 100644
index 00000000000..ef81a2d76b4
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp
@@ -0,0 +1,64 @@
+
+// $Id$
+
+
+#include "ADD_Handler.h"
+#include "Basic_Deployment_Data.hpp"
+#include "ciao/Deployment_DataC.h"
+
+
+
+namespace CIAO
+{
+ namespace Config_Handlers
+ {
+
+ ADD_Handler::ADD_Handler (void)
+ {
+ }
+
+ ADD_Handler::~ADD_Handler (void)
+ {
+ }
+
+
+ void
+ ADD_Handler::get_ArtifactDeploymentDescription (
+ Deployment::ArtifactDeploymentDescription& toconfig,
+ ArtifactDeploymentDescription& desc)
+ {
+
+
+
+ toconfig.name=
+ CORBA::string_dup (desc.name ().c_str ());
+
+ toconfig.source.length (
+ toconfig.source.length () + 1);
+ toconfig.source[toconfig.source.length () - 1]=
+ CORBA::string_dup (desc.source ().c_str ());
+
+ if (desc.node_p ())
+ {
+
+ toconfig.node=
+ CORBA::string_dup (desc.node ().c_str ());
+ }
+
+ for (ArtifactDeploymentDescription::location_iterator
+ item (desc.begin_location ());
+ item != desc.end_location ();
+ ++item)
+ {
+ toconfig.location.length (
+ toconfig.location.length () + 1);
+ toconfig.location[toconfig.location.length () - 1] =
+ CORBA::string_dup (item->c_str ());
+ }
+
+
+ }
+
+ }
+
+}
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h
new file mode 100644
index 00000000000..957d10ec7e1
--- /dev/null
+++ b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h
@@ -0,0 +1,69 @@
+
+ //==============================================================
+/**
+ * @file ADD_Handler.h
+ *
+ * $Id$
+ *
+ * @author Jules White <jules@dre.vanderbilt.edu>
+ */
+//================================================================
+
+#ifndef CIAO_CONFIG_HANDLERS_ADD_Handler_H
+#define CIAO_CONFIG_HANDLERS_ADD_Handler_H
+#include /**/ "ace/pre.h"
+
+#include "Base_Handler.h"
+#include "Config_Handlers_export.h"
+#include "ace/config-lite.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+
+
+namespace Deployment
+{
+ class ArtifactDeploymentDescription;
+}
+
+
+namespace CIAO
+{
+
+ namespace Config_Handlers
+ {
+
+ class ArtifactDeploymentDescription;
+
+
+ /*
+ * @class ADD_Handler
+ *
+ * @brief Handler class for <ArtifactDeploymentDescription> types.
+ *
+ * This class defines handler methods to map values from
+ * XSC ArtifactDeploymentDescription objects, parsed from the descriptor files, to the
+ * corresponding CORBA IDL Any type.
+ *
+ */
+
+ class Config_Handlers_Export ADD_Handler : public Base_Handler{
+
+ public:
+
+ ADD_Handler (void);
+ virtual ~ADD_Handler (void);
+
+ void get_ArtifactDeploymentDescription (
+ Deployment::ArtifactDeploymentDescription& toconfig,
+ ArtifactDeploymentDescription& desc);
+
+ };
+ }
+}
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_CONFIG_HANDLERS_ADD_Handler_H */
+
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog
index 6717dd9f0f4..7c12e1dc3b9 100644
--- a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog
+++ b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog
@@ -1,3 +1,23 @@
+Tue Sep 21 19:47:02 2004 Jules White <jules@dre.vanderbilt.edu>
+
+ * MDD_Handler.h:
+ * MDD_Handler.cpp:
+ * ADD_Handler.h:
+ * ADD_Handler.cpp:
+ * Req_Handler.h:
+ * Req_Handler.cpp:
+
+ Added classes to handle MonolithicDeploymentDescription and
+ ArtifactDeploymentDescription. Changed Requirement_Handler to
+ Req_Handler.
+
+Mon Sep 20 14:02:32 2004 Jules White <jules@dre.vanderbilt.edu>
+
+ * Base_Handler.h:
+ * Base_Handler.cpp:
+
+ Added a base class for the configuration handlers.
+
Mon Sep 13 12:44:19 2004 Jules White <jules@dre.vanderbilt.edu>
* Config_Handlers.mpc:
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp
index feb19231251..6dca34c7dab 100644
--- a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp
+++ b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp
@@ -1,9 +1,15 @@
+
// $Id$
+
#include "MDD_Handler.h"
-#include "Req_Handler.h"
-#include "Prop_Handler.h"
+#include "Basic_Deployment_Data.hpp"
#include "ciao/Deployment_DataC.h"
+#include "ADD_Handler.h"
+#include "Prop_Handler.h"
+#include "Req_Handler.h"
+
+
namespace CIAO
{
@@ -19,66 +25,63 @@ namespace CIAO
}
- void
+ void
MDD_Handler::get_MonolithicDeploymentDescription (
- Deployment::MonolithicDeploymentDescription& toconfig,
+ 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);
+ toconfig.name=
+ CORBA::string_dup (desc.name ().c_str ());
- //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 ());
- }
+ 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 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 ());
- }
+ ADD_Handler artifact_handler;
+ ACE_TString artifact_id;
+ for (MonolithicDeploymentDescription::artifact_iterator
+ item (desc.begin_artifact ());
+ item != desc.end_artifact ();
+ ++item)
+ {
+
+ toconfig.artifactRef.length (
+ toconfig.artifactRef.length () + 1);
+
+ artifact_id = item->id ().c_str ();
+ artifact_handler.get_ref (
+ artifact_id,
+ toconfig.artifactRef[toconfig.artifactRef.length () - 1]);
+
+ }
+ if (desc.execParameter_p ())
+ {
+ Prop_Handler handler;
+ toconfig.execParameter.length (
+ toconfig.execParameter.length () + 1);
+ handler.get_Property (
+ toconfig.execParameter[toconfig.execParameter.length () - 1],
+ desc.execParameter ());
+ }
+
+ if (desc.deployRequirement_p ())
+ {
+ Req_Handler handler;
+ toconfig.deployRequirement.length (
+ toconfig.deployRequirement.length () + 1);
+ handler.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
index 50ae8f5d1e7..6a2babbf706 100644
--- a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h
+++ b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h
@@ -1,4 +1,5 @@
-//==============================================================
+
+ //==============================================================
/**
* @file MDD_Handler.h
*
@@ -8,19 +9,23 @@
*/
//================================================================
-#ifndef CIAO_CONFIG_HANDLERS_MDD_HANDLER_H
-#define CIAO_CONFIG_HANDLERS_MDD_HANDLER_H
+#ifndef CIAO_CONFIG_HANDLERS_MDD_Handler_H
+#define CIAO_CONFIG_HANDLERS_MDD_Handler_H
#include /**/ "ace/pre.h"
-#include "Basic_Deployment_Data.hpp"
+#include "Base_Handler.h"
+#include "Config_Handlers_export.h"
+#include "ace/config-lite.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+
namespace Deployment
{
- struct MonolithicDeploymentDescription;
+ class MonolithicDeploymentDescription;
}
@@ -29,34 +34,36 @@ namespace CIAO
namespace Config_Handlers
{
+
+ class MonolithicDeploymentDescription;
+
+
/*
* @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.
+ * XSC MonolithicDeploymentDescription objects, parsed from the descriptor files, to the
+ * corresponding CORBA IDL Any type.
*
*/
- class MDD_Handler{
+ class Config_Handlers_Export MDD_Handler : public Base_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);
+ Deployment::MonolithicDeploymentDescription& toconfig,
+ MonolithicDeploymentDescription& desc);
};
}
}
-#include /**/ "ace/post.h"
-#endif /* CIAO_CONFIG_HANDLERS_MDD_HANDLER_H*/
+#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
index 436628088eb..4c094086ce9 100644
--- a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp
+++ b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp
@@ -9,27 +9,27 @@ namespace CIAO
namespace Config_Handlers
{
- Requirement_Handler::Requirement_Handler (void)
+ Req_Handler::Req_Handler (void)
{
}
- Requirement_Handler::~Requirement_Handler (void)
+ Req_Handler::~Req_Handler (void)
{
}
void
- Requirement_Handler::get_Requirement (
+ Req_Handler::get_Requirement (
Deployment::Requirement& toconfig,
Requirement& desc)
{
- //Map the basic string types to their Deployment::Requirement
+ //Map the basic string types to their Deployment::Req
//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.
+ //Map the XSC Req's property into the next
+ //position in the IDL Req's sequence.
Prop_Handler prophandler;
toconfig.property.length (toconfig.property.length () + 1);
prophandler.get_Property (
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h
index 5993f2abcb6..c3a22cc6dc7 100644
--- a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h
+++ b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h
@@ -13,6 +13,7 @@
#include /**/ "ace/pre.h"
#include "Basic_Deployment_Data.hpp"
+#include "Config_Handlers_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -39,17 +40,17 @@ namespace CIAO
*
*/
- class Requirement_Handler{
+ class Config_Handlers_Export Req_Handler{
public:
- Requirement_Handler (void);
- virtual ~Requirement_Handler (void);
+ Req_Handler (void);
+ virtual ~Req_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 (
+ void get_Requirement (
Deployment::Requirement& toconfig,
Requirement& desc);