summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-04-20 21:06:50 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-04-20 21:06:50 +0000
commit037f853f18e8baad7ded2e372c629feaa7ba3e38 (patch)
tree368fe4c9211bb103b5bfdfffce8143bef212109b
parent31a5e9e8f1344336c3297d28773c6a68907e1fdb (diff)
downloadATCD-037f853f18e8baad7ded2e372c629feaa7ba3e38.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/ciao/CIAO_common.h24
-rw-r--r--TAO/CIAO/tools/Config_Handlers/CRDD_Handler.cpp2
-rw-r--r--TAO/CIAO/tools/Config_Handlers/CRDD_Handler.h69
-rw-r--r--TAO/CIAO/tools/Config_Handlers/Config_Handlers.mpc1
-rw-r--r--TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp14
-rw-r--r--TAO/CIAO/tools/Config_Handlers/DP_PCD_Handler.cpp107
-rw-r--r--TAO/CIAO/tools/Config_Handlers/DP_PCD_Handler.h67
-rw-r--r--TAO/CIAO/tools/Config_Handlers/PCD_Handler.cpp8
-rw-r--r--TAO/CIAO/tools/Config_Handlers/PCD_Handler.h13
-rw-r--r--TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp3
10 files changed, 60 insertions, 248 deletions
diff --git a/TAO/CIAO/ciao/CIAO_common.h b/TAO/CIAO/ciao/CIAO_common.h
index 21d96a2658f..cd6caa908ba 100644
--- a/TAO/CIAO/ciao/CIAO_common.h
+++ b/TAO/CIAO/ciao/CIAO_common.h
@@ -56,30 +56,6 @@
# include "ace/Trace.h"
#endif /* CIAO_NTRACE */
-#if defined (CIAO_NDEBUG)
-#define CIAO_DEBUG(X, ...) do {} while (0)
-#define CIAO_ERROR(X, ...) do {} while (0)
-#else
-#define CIAO_DEBUG(X, ...) \
- do { \
- if (CIAO::debug_level () > X) { \
- int __ace_error = ACE_Log_Msg::last_error_adapter (); \
- ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \
- ace___->log (LM_DEBUG, __VA_ARGS__); \
- } \
- } while (0)
-#define CIAO_ERROR(X, ...) \
- do { \
- if (CIAO::debug_level () > X) { \
- int __ace_error = ACE_Log_Msg::last_error_adapter (); \
- ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \
- ace___->log (LM_ERROR, __VA_ARGS__); \
- } \
- } while (0)
-#endif
-
namespace CIAO
{
/**
diff --git a/TAO/CIAO/tools/Config_Handlers/CRDD_Handler.cpp b/TAO/CIAO/tools/Config_Handlers/CRDD_Handler.cpp
index dd89569e16e..03da34467eb 100644
--- a/TAO/CIAO/tools/Config_Handlers/CRDD_Handler.cpp
+++ b/TAO/CIAO/tools/Config_Handlers/CRDD_Handler.cpp
@@ -25,7 +25,7 @@ namespace CIAO
///and maps the values from the passed in XSC
///ConnectionResourceDeploymentDescription to its members.
void CRDD_Handler::get_ConnectionResourceDeploymentDescription (Deployment::ConnectionResourceDeploymentDescription& toconfig,
- ConnectionResourceDeploymentDescription& desc)
+ const ConnectionResourceDeploymentDescription& desc)
{
CIAO_TRACE("CRDD_Handler::get_ConnectionResourceDD");
diff --git a/TAO/CIAO/tools/Config_Handlers/CRDD_Handler.h b/TAO/CIAO/tools/Config_Handlers/CRDD_Handler.h
index 314a07e1edb..8f5c964aab4 100644
--- a/TAO/CIAO/tools/Config_Handlers/CRDD_Handler.h
+++ b/TAO/CIAO/tools/Config_Handlers/CRDD_Handler.h
@@ -1,11 +1,11 @@
//==============================================================
/**
-* @file CRDD_Handler.h
-*
-* $Id$
-*
-* @author Jules White <jules@dre.vanderbilt.edu>
-*/
+ * @file CRDD_Handler.h
+ *
+ * $Id$
+ *
+ * @author Jules White <jules@dre.vanderbilt.edu>
+ */
//================================================================
#ifndef CIAO_CONFIG_HANDLERS_CRDD_HANDLER_H
@@ -20,48 +20,47 @@
namespace Deployment
{
-struct ConnectionResourceDeploymentDescription;
+ struct ConnectionResourceDeploymentDescription;
}
namespace CIAO
{
-namespace Config_Handlers
-{
+ namespace Config_Handlers
+ {
-class ConnectionResourceDeploymentDescription;
+ class 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 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{
+ class Config_Handlers_Export CRDD_Handler{
-public:
+ public:
-CRDD_Handler (void);
-virtual ~CRDD_Handler (void);
+ 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);
+ ///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,
+ const ConnectionResourceDeploymentDescription& desc);
-static ConnectionResourceDeploymentDescription
-connection_resource_depl_desc (
-const ::Deployment::ConnectionResourceDeploymentDescription& src);
+ static ConnectionResourceDeploymentDescription
+ connection_resource_depl_desc (
+ const ::Deployment::ConnectionResourceDeploymentDescription& src);
-};
-}
+ };
+ }
}
#include /**/ "ace/post.h"
diff --git a/TAO/CIAO/tools/Config_Handlers/Config_Handlers.mpc b/TAO/CIAO/tools/Config_Handlers/Config_Handlers.mpc
index c007c2d868a..e8a88d181d9 100644
--- a/TAO/CIAO/tools/Config_Handlers/Config_Handlers.mpc
+++ b/TAO/CIAO/tools/Config_Handlers/Config_Handlers.mpc
@@ -49,7 +49,6 @@ project (XSC_Config_Handlers) : ciao_deployment_stub, xerces, dynamicany, typeco
CCD_Handler.cpp
Property_Handler.cpp
ComponentPropertyDescription_Handler.cpp
- DP_PCD_Handler.cpp
CPD_Handler.cpp
DataType_Handler.cpp
MDD_Handler.cpp
diff --git a/TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp b/TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp
index 833bb0d645d..ce1be29b89a 100644
--- a/TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp
+++ b/TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp
@@ -20,7 +20,7 @@
#include "CIAO_Events/CIAOEvents_Handler.h"
#include "CIAO_Events/CIAOEvents.hpp"
-#include "DP_PCD_Handler.h"
+#include "PCD_Handler.h"
ACE_RCSID (Config_Handlers,
DP_Handler,
@@ -195,8 +195,13 @@ ACE_RCSID (Config_Handlers,
IDD_Handler::instance_deployment_descrs (xsc_dp,
this->idl_dp_->instance);
-
- DP_PCD_Handler::plan_connection_descrs (xsc_dp, this->idl_dp_->connection);
+
+ this->idl_dp_->connection.length (xsc_dp.count_connection ());
+ std::for_each (xsc_dp.begin_connection (),
+ xsc_dp.end_connection (),
+ PCD_Functor (this->idl_dp_->connection));
+
+ //PCD_Handler::get_PlanConnectionDescription (xsc_dp, this->idl_dp_->connection);
return true;
}
@@ -311,8 +316,7 @@ ACE_RCSID (Config_Handlers,
len = plan.connection.length();
for(size_t n = 0; n < len; n++)
{
- this->xsc_dp_->add_connection (
- DP_PCD_Handler::plan_connection_descr (
+ this->xsc_dp_->add_connection (PCD_Handler::get_PlanConnectionDescription (
plan.connection[n]));
}
diff --git a/TAO/CIAO/tools/Config_Handlers/DP_PCD_Handler.cpp b/TAO/CIAO/tools/Config_Handlers/DP_PCD_Handler.cpp
deleted file mode 100644
index c42bb8a5e51..00000000000
--- a/TAO/CIAO/tools/Config_Handlers/DP_PCD_Handler.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// $Id$
-
-#include "DP_PCD_Handler.h"
-#include "CEPE_Handler.h"
-#include "PSPE_Handler.h"
-#include "ERE_Handler.h"
-#include "CRDD_Handler.h"
-#include "PCD_Handler.h"
-#include "Basic_Deployment_Data.hpp"
-#include "cdp.hpp"
-#include "ciao/Deployment_DataC.h"
-#include "ciao/CIAO_common.h"
-namespace CIAO
-{
- namespace Config_Handlers
- {
- void
- DP_PCD_Handler::plan_connection_descrs (
- const DeploymentPlan &src,
- Deployment::PlanConnectionDescriptions& dest)
- {
- CIAO_TRACE("DP_PCD_Handler::plan_connection_descrs");
- DeploymentPlan::connection_const_iterator cci_e =
- src.end_connection ();
-
- CORBA::ULong pos = 0;
- dest.length (src.count_connection ());
- for (DeploymentPlan::connection_const_iterator cci_b =
- src.begin_connection ();
- cci_b != cci_e;
- ++cci_b)
- {
- DP_PCD_Handler::plan_connection_descr (*(cci_b),
- dest[pos++]);
- }
- }
-
- PlanConnectionDescription
- DP_PCD_Handler::plan_connection_descr (
- const Deployment::PlanConnectionDescription &src)
- {
- CIAO_TRACE("DP_PCD_Handler::plan_connection_descr");
- PlanConnectionDescription pcd = PCD_Handler::get_PlanConnectionDescription(src);
- return pcd;
- }
-
- void
- DP_PCD_Handler::plan_connection_descr (
- const PlanConnectionDescription &src,
- Deployment::PlanConnectionDescription &dest)
- {
- CIAO_TRACE("DP_PCD_Handler::plan_connection_descr - reverse");
- dest.name =
- src.name ().c_str ();
-
- if (src.source_p ())
- {
- // There will be only one as per the schema
- dest.source.length (1);
- dest.source[0] =
- src.source ().c_str ();
- }
-
-
- CEPE_Handler::external_port_endpoints (src,
- dest.externalEndpoint);
- ERE_Handler::external_ref_endpoints (src,
- dest.externalReference);
-
- PSPE_Handler::sub_component_port_endpoints (src,
- dest.internalEndpoint);
-
-#if 0
- // @@MAJO: Need to figure how to use this.
- 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 ());
- }
-
- if (desc.deployRequirement_p ())
- {
-
- // @@ MAJO: Not sure how to use this
- //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 ());
-
-
- }
-#endif /*if 0*/
- }
- }
-}
diff --git a/TAO/CIAO/tools/Config_Handlers/DP_PCD_Handler.h b/TAO/CIAO/tools/Config_Handlers/DP_PCD_Handler.h
deleted file mode 100644
index 8e04c612bc9..00000000000
--- a/TAO/CIAO/tools/Config_Handlers/DP_PCD_Handler.h
+++ /dev/null
@@ -1,67 +0,0 @@
-//==============================================================
-/**
-* @file DP_PCD_Handler.h
-*
-* $Id$
-*
-* Handler for Deployment::PlanConnectionHandler
-*
-* @author Jules White <jules@dre.vanderbilt.edu>
-*/
-//================================================================
-
-#ifndef CIAO_CONFIG_HANDLERS_DP_PCD_HANDLER_H
-#define CIAO_CONFIG_HANDLERS_DP_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;
-class PlanConnectionDescriptions;
-}
-
-namespace CIAO
-{
-
-namespace Config_Handlers
-{
-class DeploymentPlan;
-class PlanConnectionDescription;
-
-/*
-* @class DP_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 DP_PCD_Handler
-{
-public:
-static void plan_connection_descrs (
-const DeploymentPlan &src,
-Deployment::PlanConnectionDescriptions& toconfig);
-
-static PlanConnectionDescription plan_connection_descr(
-const Deployment::PlanConnectionDescription &src);
-
-private:
-static void plan_connection_descr (
-const PlanConnectionDescription& desc,
-Deployment::PlanConnectionDescription& toconfig);
-};
-}
-}
-
-#include /**/ "ace/post.h"
-#endif /* CIAO_CONFIG_HANDLERS_PCD_HANDLER_H*/
diff --git a/TAO/CIAO/tools/Config_Handlers/PCD_Handler.cpp b/TAO/CIAO/tools/Config_Handlers/PCD_Handler.cpp
index d8c54d106a2..bcb5e4d917c 100644
--- a/TAO/CIAO/tools/Config_Handlers/PCD_Handler.cpp
+++ b/TAO/CIAO/tools/Config_Handlers/PCD_Handler.cpp
@@ -26,9 +26,8 @@ namespace CIAO
///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)
+ void PCD_Handler::get_PlanConnectionDescription (const PlanConnectionDescription& desc,
+ Deployment::PlanConnectionDescription& toconfig)
{
CIAO_TRACE("PCD_Handler::get_PlanConnectionDescription");
@@ -57,7 +56,6 @@ namespace CIAO
toconfig.externalEndpoint);
//Configure the PlanSubcomponentPortEndpoint's.
-
PSPE_Handler::sub_component_port_endpoints (desc,
toconfig.internalEndpoint);
@@ -69,7 +67,7 @@ namespace CIAO
CRDD_Handler crddhandler;
CORBA::ULong pos = 0;
toconfig.deployedResource.length (desc.count_deployedResource ());
- for(PlanConnectionDescription::deployedResource_iterator res =
+ for(PlanConnectionDescription::deployedResource_const_iterator res =
desc.begin_deployedResource();
res != desc.end_deployedResource();
res++)
diff --git a/TAO/CIAO/tools/Config_Handlers/PCD_Handler.h b/TAO/CIAO/tools/Config_Handlers/PCD_Handler.h
index cc99eaf186b..edac698d7b6 100644
--- a/TAO/CIAO/tools/Config_Handlers/PCD_Handler.h
+++ b/TAO/CIAO/tools/Config_Handlers/PCD_Handler.h
@@ -13,7 +13,7 @@
#include /**/ "ace/pre.h"
#include "Config_Handlers_Export.h"
-
+#include "Utils/Functors.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
@@ -21,6 +21,7 @@
namespace Deployment
{
struct PlanConnectionDescription;
+ class PlanConnectionDescriptions;
}
namespace CIAO
@@ -52,8 +53,8 @@ namespace CIAO
///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);
+ static void get_PlanConnectionDescription (const PlanConnectionDescription& desc,
+ Deployment::PlanConnectionDescription& toconfig);
//This method takes a <Deployment::PlanConnectionDescription>
//converts it into a <Config_Handler::PlanConnectionDescription>
@@ -61,6 +62,12 @@ namespace CIAO
static PlanConnectionDescription
get_PlanConnectionDescription (const Deployment::PlanConnectionDescription &src);
};
+
+ typedef Sequence_Handler < PlanConnectionDescription,
+ ::Deployment::PlanConnectionDescriptions,
+ ::Deployment::PlanConnectionDescription,
+ PCD_Handler::get_PlanConnectionDescription > PCD_Functor;
+
}
}
diff --git a/TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp b/TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp
index d18285c8b12..24d55cecf36 100644
--- a/TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp
+++ b/TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp
@@ -133,6 +133,9 @@ namespace CIAO
case ::Deployment::EventConsumer:
pspe.kind (CCMComponentPortKind::EventConsumer);
break;
+
+ default:
+ ACE_ERROR ((LM_ERROR, "Invalid port kind in PSPE\n"));
}