diff options
author | bala <balanatarajan@users.noreply.github.com> | 2004-10-03 03:42:53 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2004-10-03 03:42:53 +0000 |
commit | 8f965baeb9758a104d9f7c1609dd3a396b5f4c63 (patch) | |
tree | 30f0205ca9791cb89f92cdf243cf3aa207c0271f | |
parent | 6d856395aff120814780d4de6ad404ccfd51fc4c (diff) | |
download | ATCD-8f965baeb9758a104d9f7c1609dd3a396b5f4c63.tar.gz |
ChangeLogTag:Sun Oct 3 03:38:28 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
32 files changed, 1319 insertions, 1240 deletions
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp index 3817dfee742..4284e1243f2 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp @@ -1,158 +1,148 @@ - // $Id$ - - #include "ADD_Handler.h" -#include "Basic_Deployment_Data.hpp" +#include "cdp.hpp" #include "ciao/Deployment_DataC.h" #include "Property_Handler.h" -#include "Req_Handler.h" -#include "RDD_Handler.h" - +#include "Singleton_IDREF_Map.h" +ACE_RCSID (DAnCE, + ADD_Handler, + "$Id$") namespace CIAO { namespace Config_Handlers { - - ADD_Handler::ADD_Handler (void) + bool + ADD_Handler::artifact_deployment_descrs ( + const DeploymentPlan &src, + ::Deployment::ArtifactDeploymentDescriptions &dest) { - } + DeploymentPlan::artifact_const_iterator aci_e = + src.end_artifact (); + + for (DeploymentPlan::artifact_const_iterator aci_b = + src.begin_artifact (); + aci_e != aci_b; + ++aci_b) + { + CORBA::ULong len = + dest.length (); + + dest.length (len + 1); + + bool retval = + ADD_Handler::artifact_deployment_descr ( + (*aci_b), + dest[len], + len); + + if (!retval) + return retval; + } - ADD_Handler::~ADD_Handler (void) - { + return true; } - - void + bool ADD_Handler::artifact_deployment_descr ( - const ArtifactDeploymentDescription& desc, - Deployment::ArtifactDeploymentDescription& toconfig) + const ArtifactDeploymentDescription &src, + Deployment::ArtifactDeploymentDescription &dest, + CORBA::ULong pos) { + dest.name = + CORBA::string_dup (src.name ().c_str ()); + dest.node = + CORBA::string_dup (src.node ().c_str ()); + + ArtifactDeploymentDescription::location_const_iterator end = + src.end_location (); + + for (ArtifactDeploymentDescription::location_const_iterator + start = src.begin_location (); + start != end; + ++start) + { + CORBA::ULong l = + dest.location.length (); + + dest.location.length (l + 1); + + dest.location[l] = start->c_str (); + } + + ArtifactDeploymentDescription::source_const_iterator sce = + src.end_source (); - - toconfig.name= - CORBA::string_dup (desc.name ().c_str ()); - - ArtifactDeploymentDescription::source_const_iterator source_end = - desc.end_source (); - ArtifactDeploymentDescription::source_const_iterator source_beg = - desc.begin_source (); - - CORBA::ULong source_length = toconfig.source.length (); - size_t source_delta = source_end - source_beg; - source_length += source_delta; - - toconfig.source.length (source_length); - size_t source_count = 0; - for (ArtifactDeploymentDescription::source_const_iterator - item (desc.begin_source ()); - item != source_end; - ++item) - { - toconfig.source[source_length - (source_delta - source_count)] = - CORBA::string_dup (item->c_str ()); - ++source_count; + scb = src.begin_source (); + scb != sce; + ++scb) + { + CORBA::ULong l = + dest.location.length (); + + dest.location.length (l + 1); + + dest.location[l] = scb->c_str (); } - - toconfig.node= - CORBA::string_dup (desc.node ().c_str ()); - - ArtifactDeploymentDescription::location_const_iterator location_end = - desc.end_location (); - ArtifactDeploymentDescription::location_const_iterator location_beg = - desc.begin_location (); - - CORBA::ULong location_length = toconfig.location.length (); - size_t location_delta = location_end - location_beg; - location_length += location_delta; - - toconfig.location.length (location_length); - size_t location_count = 0; - - for (ArtifactDeploymentDescription::location_const_iterator - item (desc.begin_location ()); - item != location_end; - ++item) - { - toconfig.location[location_length - (location_delta - location_count)] = - CORBA::string_dup (item->c_str ()); - ++location_count; + + // @@TODO: See this loop is repeated + ArtifactDeploymentDescription::execParameter_const_iterator adce = + src.end_execParameter (); + + for (ArtifactDeploymentDescription::execParameter_const_iterator adcb = + src.begin_execParameter (); + adcb != adce; + ++adcb) + { + CORBA::ULong len = + dest.execParameter.length (); + + dest.execParameter.length (len + 1); + + Property_Handler::get_property ((*adcb), + dest.execParameter[len]); } - - ArtifactDeploymentDescription::execParameter_const_iterator execParameter_end = - desc.end_execParameter (); - ArtifactDeploymentDescription::execParameter_const_iterator execParameter_beg = - desc.begin_execParameter (); - - CORBA::ULong execParameter_length = toconfig.execParameter.length (); - size_t execParameter_delta = execParameter_end - execParameter_beg; - execParameter_length += execParameter_delta; - - toconfig.execParameter.length (execParameter_length); - size_t execParameter_count = 0; - - for (ArtifactDeploymentDescription::execParameter_const_iterator - item (execParameter_beg); - item != execParameter_end; - ++item) - { - Property_Handler::property ( - *item, - toconfig.execParameter[execParameter_length - (execParameter_delta - execParameter_count)]); - ++execParameter_count; + + + if (src.id_p ()) + { + ACE_CString cstr (src.id ().c_str ()); + + bool retval = + Singleton_IDREF_Map::instance ()->bind_ref (cstr, + pos); + if (!retval) + { + return false; + } } - - ArtifactDeploymentDescription::deployRequirement_const_iterator deployRequirement_end = - desc.end_deployRequirement (); - ArtifactDeploymentDescription::deployRequirement_const_iterator deployRequirement_beg = - desc.begin_deployRequirement (); - - CORBA::ULong deployRequirement_length = toconfig.deployRequirement.length (); - size_t deployRequirement_delta = deployRequirement_end - deployRequirement_beg; - deployRequirement_length += deployRequirement_delta; - - toconfig.deployRequirement.length (deployRequirement_length); - size_t deployRequirement_count = 0; - - for (ArtifactDeploymentDescription::deployRequirement_const_iterator - item (deployRequirement_beg); - item != deployRequirement_end; - ++item) - { - Req_Handler::requirement ( - *item, - toconfig.deployRequirement[deployRequirement_length - (deployRequirement_delta - deployRequirement_count)]); - ++deployRequirement_count; +#if 0 + // @@ MAJO: Don't know how to handle this. + if (src.deployRequirement_p ()) + { + Req_Handler handler; + add.deployRequirement.length ( + add.deployRequirement.length () + 1); + handler.get_Requirement ( + add.deployRequirement[add.deployRequirement.length () - 1], + src.deployRequirement ()); } - - ArtifactDeploymentDescription::deployedResource_const_iterator deployedResource_end = - desc.end_deployedResource (); - ArtifactDeploymentDescription::deployedResource_const_iterator deployedResource_beg = - desc.begin_deployedResource (); - - CORBA::ULong deployedResource_length = toconfig.deployedResource.length (); - size_t deployedResource_delta = deployedResource_end - deployedResource_beg; - deployedResource_length += deployedResource_delta; - - toconfig.deployedResource.length (deployedResource_length); - size_t deployedResource_count = 0; - - for (ArtifactDeploymentDescription::deployedResource_const_iterator - item (deployedResource_beg); - item != deployedResource_end; - ++item) - { - RDD_Handler::resource_deployment_descr ( - *item, - toconfig.deployedResource[deployedResource_length - (deployedResource_delta - deployedResource_count)]); - ++deployedResource_count; + + if (src.deployedResource_p ()) + { + RDD_Handler handler; + add.deployedResource.length ( + add.deployedResource.length () + 1); + handler.get_ResourceDeploymentDescription ( + add.deployedResource[add.deployedResource.length () - 1], + src.deployedResource ()); } +#endif /* if 0*/ - + return true; } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h index b9139bc633b..9e017440105 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h @@ -1,5 +1,4 @@ - - //============================================================== +//============================================================== /** * @file ADD_Handler.h * @@ -14,17 +13,17 @@ #include /**/ "ace/pre.h" #include "Config_Handlers/Config_Handlers_Export.h" -#include "ace/config-lite.h" +#include "tao/Basic_Types.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - namespace Deployment { - class ArtifactDeploymentDescription; + struct ArtifactDeploymentDescription; + class ArtifactDeploymentDescriptions; } @@ -33,36 +32,34 @@ namespace CIAO namespace Config_Handlers { + class DeploymentPlan; + class ArtifactDeploymentDescription; - 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. - * + * This class defines handler methods to map values from XSC + * ArtifactDeploymentDescription objects, parsed from the + * // @@ Jules, why Any type? + * descriptor files, to the corresponding CORBA IDL Any type. */ - - class Config_Handlers_Export ADD_Handler { - - public: - - ADD_Handler (void); - virtual ~ADD_Handler (void); - - static void artifact_deployment_descr ( - const ArtifactDeploymentDescription& desc, - Deployment::ArtifactDeploymentDescription& toconfig); - + class Config_Handlers_Export ADD_Handler + { + public: + static bool artifact_deployment_descrs ( + const DeploymentPlan &src, + ::Deployment::ArtifactDeploymentDescriptions &dest); + + private: + static bool artifact_deployment_descr ( + const ArtifactDeploymentDescription& desc, + ::Deployment::ArtifactDeploymentDescription &dest, + CORBA::ULong l = 0); }; } } -#include /**/ "ace/post.h" +#include /**/ "ace/post.h" #endif /* CIAO_CONFIG_HANDLERS_ADD_Handler_H */ - diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.cpp b/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.cpp index bf7c71bf978..5016e04a33b 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.cpp @@ -6,7 +6,7 @@ namespace CIAO namespace Config_Handlers { // TCKind - // + // TCKind::Value TCKind:: integral () const @@ -33,7 +33,7 @@ namespace CIAO } // DataType - // + // DataType:: DataType () @@ -62,7 +62,7 @@ namespace CIAO // DataType - // + // bool DataType:: kind_p () const { @@ -98,7 +98,7 @@ namespace CIAO // DataValue - // + // DataValue:: DataValue () @@ -202,7 +202,7 @@ namespace CIAO // DataValue - // + // bool DataValue:: short_p () const { @@ -237,7 +237,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: long_p () const { @@ -272,7 +272,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: ushort_p () const { @@ -307,7 +307,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: ulong_p () const { @@ -342,7 +342,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: float_p () const { @@ -377,7 +377,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: double_p () const { @@ -412,7 +412,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: boolean_p () const { @@ -447,7 +447,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: octet_p () const { @@ -482,7 +482,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: objref_p () const { @@ -517,7 +517,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: enum_p () const { @@ -552,7 +552,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: string_p () const { @@ -587,7 +587,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: longlong_p () const { @@ -622,7 +622,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: ulonglong_p () const { @@ -657,7 +657,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: longdouble_p () const { @@ -692,7 +692,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: fixed_p () const { @@ -727,7 +727,7 @@ namespace CIAO } // DataValue - // + // bool DataValue:: typecode_p () const { @@ -763,7 +763,7 @@ namespace CIAO // Any - // + // Any:: Any (::CIAO::Config_Handlers::DataType const& type__, @@ -800,7 +800,7 @@ namespace CIAO // Any - // + // ::CIAO::Config_Handlers::DataType const& Any:: type () const { @@ -820,7 +820,7 @@ namespace CIAO } // Any - // + // ::CIAO::Config_Handlers::DataValue const& Any:: value () const { @@ -841,7 +841,7 @@ namespace CIAO // Property - // + // Property:: Property (::XMLSchema::string< char > const& name__, @@ -878,7 +878,7 @@ namespace CIAO // Property - // + // ::XMLSchema::string< char > const& Property:: name () const { @@ -898,7 +898,7 @@ namespace CIAO } // Property - // + // ::CIAO::Config_Handlers::Any const& Property:: value () const { @@ -919,7 +919,7 @@ namespace CIAO // Node - // + // Node:: Node (::XMLSchema::string< char > const& name__, @@ -956,7 +956,7 @@ namespace CIAO // Node - // + // ::XMLSchema::string< char > const& Node:: name () const { @@ -976,7 +976,7 @@ namespace CIAO } // Node - // + // ::XMLSchema::string< char > const& Node:: label () const { @@ -997,7 +997,7 @@ namespace CIAO // SatisfierPropertyKind - // + // SatisfierPropertyKind::Value SatisfierPropertyKind:: integral () const @@ -1024,7 +1024,7 @@ namespace CIAO } // SatisfierProperty - // + // SatisfierProperty:: SatisfierProperty (::XMLSchema::string< char > const& name__, @@ -1068,7 +1068,7 @@ namespace CIAO // SatisfierProperty - // + // ::XMLSchema::string< char > const& SatisfierProperty:: name () const { @@ -1088,7 +1088,7 @@ namespace CIAO } // SatisfierProperty - // + // ::CIAO::Config_Handlers::SatisfierPropertyKind const& SatisfierProperty:: kind () const { @@ -1108,7 +1108,7 @@ namespace CIAO } // SatisfierProperty - // + // ::CIAO::Config_Handlers::Any const& SatisfierProperty:: value () const { @@ -1129,7 +1129,7 @@ namespace CIAO // Resource - // + // Resource:: Resource (::XMLSchema::string< char > const& name__, @@ -1173,7 +1173,7 @@ namespace CIAO // Resource - // + // ::XMLSchema::string< char > const& Resource:: name () const { @@ -1193,7 +1193,7 @@ namespace CIAO } // Resource - // + // ::XMLSchema::string< char > const& Resource:: resourceType () const { @@ -1213,7 +1213,7 @@ namespace CIAO } // Resource - // + // ::CIAO::Config_Handlers::SatisfierProperty const& Resource:: property () const { @@ -1234,7 +1234,7 @@ namespace CIAO // SharedResource - // + // SharedResource:: SharedResource (::XMLSchema::string< char > const& name__, @@ -1285,7 +1285,7 @@ namespace CIAO // SharedResource - // + // ::XMLSchema::string< char > const& SharedResource:: name () const { @@ -1305,7 +1305,7 @@ namespace CIAO } // SharedResource - // + // ::XMLSchema::string< char > const& SharedResource:: resourceType () const { @@ -1325,7 +1325,7 @@ namespace CIAO } // SharedResource - // + // ::CIAO::Config_Handlers::Node const& SharedResource:: node () const { @@ -1345,7 +1345,7 @@ namespace CIAO } // SharedResource - // + // ::CIAO::Config_Handlers::SatisfierProperty const& SharedResource:: property () const { @@ -1366,7 +1366,7 @@ namespace CIAO // Requirement - // + // Requirement:: Requirement (::XMLSchema::string< char > const& resourceType__, @@ -1410,7 +1410,7 @@ namespace CIAO // Requirement - // + // ::XMLSchema::string< char > const& Requirement:: resourceType () const { @@ -1430,7 +1430,7 @@ namespace CIAO } // Requirement - // + // ::XMLSchema::string< char > const& Requirement:: name () const { @@ -1450,7 +1450,7 @@ namespace CIAO } // Requirement - // + // ::CIAO::Config_Handlers::Property const& Requirement:: property () const { @@ -1471,7 +1471,7 @@ namespace CIAO // ResourceDeploymentDescription - // + // ResourceDeploymentDescription:: ResourceDeploymentDescription (::XMLSchema::string< char > const& requirementName__, @@ -1515,7 +1515,7 @@ namespace CIAO // ResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& ResourceDeploymentDescription:: requirementName () const { @@ -1535,7 +1535,7 @@ namespace CIAO } // ResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& ResourceDeploymentDescription:: resourceName () const { @@ -1555,7 +1555,7 @@ namespace CIAO } // ResourceDeploymentDescription - // + // ::CIAO::Config_Handlers::Any const& ResourceDeploymentDescription:: resourceValue () const { @@ -1576,7 +1576,7 @@ namespace CIAO // ArtifactDeploymentDescription - // + // ArtifactDeploymentDescription:: ArtifactDeploymentDescription (::XMLSchema::string< char > const& name__, @@ -1693,7 +1693,7 @@ namespace CIAO // ArtifactDeploymentDescription - // + // ::XMLSchema::string< char > const& ArtifactDeploymentDescription:: name () const { @@ -1713,7 +1713,7 @@ namespace CIAO } // ArtifactDeploymentDescription - // + // ArtifactDeploymentDescription::source_iterator ArtifactDeploymentDescription:: begin_source () { @@ -1764,7 +1764,7 @@ namespace CIAO } // ArtifactDeploymentDescription - // + // ::XMLSchema::string< char > const& ArtifactDeploymentDescription:: node () const { @@ -1784,7 +1784,7 @@ namespace CIAO } // ArtifactDeploymentDescription - // + // ArtifactDeploymentDescription::location_iterator ArtifactDeploymentDescription:: begin_location () { @@ -1835,7 +1835,7 @@ namespace CIAO } // ArtifactDeploymentDescription - // + // ArtifactDeploymentDescription::execParameter_iterator ArtifactDeploymentDescription:: begin_execParameter () { @@ -1886,7 +1886,7 @@ namespace CIAO } // ArtifactDeploymentDescription - // + // ArtifactDeploymentDescription::deployRequirement_iterator ArtifactDeploymentDescription:: begin_deployRequirement () { @@ -1937,7 +1937,7 @@ namespace CIAO } // ArtifactDeploymentDescription - // + // ArtifactDeploymentDescription::deployedResource_iterator ArtifactDeploymentDescription:: begin_deployedResource () { @@ -1988,7 +1988,7 @@ namespace CIAO } // ArtifactDeploymentDescription - // + // bool ArtifactDeploymentDescription:: id_p () const { @@ -2024,7 +2024,7 @@ namespace CIAO // MonolithicDeploymentDescription - // + // MonolithicDeploymentDescription:: MonolithicDeploymentDescription (::XMLSchema::string< char > const& name__) @@ -2119,7 +2119,7 @@ namespace CIAO // MonolithicDeploymentDescription - // + // ::XMLSchema::string< char > const& MonolithicDeploymentDescription:: name () const { @@ -2139,7 +2139,7 @@ namespace CIAO } // MonolithicDeploymentDescription - // + // MonolithicDeploymentDescription::source_iterator MonolithicDeploymentDescription:: begin_source () { @@ -2190,7 +2190,7 @@ namespace CIAO } // MonolithicDeploymentDescription - // + // MonolithicDeploymentDescription::artifact_iterator MonolithicDeploymentDescription:: begin_artifact () { @@ -2241,7 +2241,7 @@ namespace CIAO } // MonolithicDeploymentDescription - // + // MonolithicDeploymentDescription::execParameter_iterator MonolithicDeploymentDescription:: begin_execParameter () { @@ -2292,7 +2292,7 @@ namespace CIAO } // MonolithicDeploymentDescription - // + // MonolithicDeploymentDescription::deployRequirement_iterator MonolithicDeploymentDescription:: begin_deployRequirement () { @@ -2343,7 +2343,7 @@ namespace CIAO } // MonolithicDeploymentDescription - // + // bool MonolithicDeploymentDescription:: id_p () const { @@ -2379,7 +2379,7 @@ namespace CIAO // ResourceUsageKind - // + // ResourceUsageKind::Value ResourceUsageKind:: integral () const @@ -2406,7 +2406,7 @@ namespace CIAO } // InstanceResourceDeploymentDescription - // + // InstanceResourceDeploymentDescription:: InstanceResourceDeploymentDescription (::CIAO::Config_Handlers::ResourceUsageKind const& resourceUsage__, @@ -2457,7 +2457,7 @@ namespace CIAO // InstanceResourceDeploymentDescription - // + // ::CIAO::Config_Handlers::ResourceUsageKind const& InstanceResourceDeploymentDescription:: resourceUsage () const { @@ -2477,7 +2477,7 @@ namespace CIAO } // InstanceResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceResourceDeploymentDescription:: requirementName () const { @@ -2497,7 +2497,7 @@ namespace CIAO } // InstanceResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceResourceDeploymentDescription:: resourceName () const { @@ -2517,7 +2517,7 @@ namespace CIAO } // InstanceResourceDeploymentDescription - // + // ::CIAO::Config_Handlers::Any const& InstanceResourceDeploymentDescription:: resourceValue () const { @@ -2538,7 +2538,7 @@ namespace CIAO // InstanceDeploymentDescription - // + // InstanceDeploymentDescription:: InstanceDeploymentDescription (::XMLSchema::string< char > const& name__, @@ -2565,7 +2565,6 @@ namespace CIAO node_ (new ::XMLSchema::string< char > (*s.node_)), source_ (new ::XMLSchema::string< char > (*s.source_)), implementation_ (new ::XMLSchema::IDREF< char > (*s.implementation_)), - configProperty_ (s.configProperty_.get () ? new ::CIAO::Config_Handlers::Property (*s.configProperty_) : 0), deployedResource_ (s.deployedResource_.get () ? new ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription (*s.deployedResource_) : 0), deployedSharedResource_ (s.deployedSharedResource_.get () ? new ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription (*s.deployedSharedResource_) : 0), id_ (s.id_.get () ? new ::XMLSchema::ID< char > (*s.id_) : 0), @@ -2575,7 +2574,13 @@ namespace CIAO node_->container (this); source_->container (this); implementation_->container (this); - if (configProperty_.get ()) configProperty_->container (this); + configProperty_.reserve (s.configProperty_.size ()); + { + for (configProperty_const_iterator i (s.configProperty_.begin ()); + i != s.configProperty_.end (); + ++i) add_configProperty (*i); + } + if (deployedResource_.get ()) deployedResource_->container (this); if (deployedSharedResource_.get ()) deployedSharedResource_->container (this); if (id_.get ()) id_->container (this); @@ -2592,8 +2597,13 @@ namespace CIAO implementation (s.implementation ()); - if (s.configProperty_.get ()) configProperty (*(s.configProperty_)); - else configProperty_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Property > (0); + configProperty_.clear (); + configProperty_.reserve (s.configProperty_.size ()); + { + for (configProperty_const_iterator i (s.configProperty_.begin ()); + i != s.configProperty_.end (); + ++i) add_configProperty (*i); + } if (s.deployedResource_.get ()) deployedResource (*(s.deployedResource_)); else deployedResource_ = ::std::auto_ptr< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription > (0); @@ -2609,7 +2619,7 @@ namespace CIAO // InstanceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceDeploymentDescription:: name () const { @@ -2629,7 +2639,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceDeploymentDescription:: node () const { @@ -2649,7 +2659,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceDeploymentDescription:: source () const { @@ -2669,7 +2679,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // ::XMLSchema::IDREF< char > const& InstanceDeploymentDescription:: implementation () const { @@ -2689,42 +2699,58 @@ namespace CIAO } // InstanceDeploymentDescription - // - bool InstanceDeploymentDescription:: - configProperty_p () const + // + InstanceDeploymentDescription::configProperty_iterator InstanceDeploymentDescription:: + begin_configProperty () { - return configProperty_.get () != 0; + return configProperty_.begin (); } - ::CIAO::Config_Handlers::Property const& InstanceDeploymentDescription:: - configProperty () const + InstanceDeploymentDescription::configProperty_iterator InstanceDeploymentDescription:: + end_configProperty () { - return *configProperty_; + return configProperty_.end (); } - ::CIAO::Config_Handlers::Property& InstanceDeploymentDescription:: - configProperty () + InstanceDeploymentDescription::configProperty_const_iterator InstanceDeploymentDescription:: + begin_configProperty () const { - return *configProperty_; + return configProperty_.begin (); + } + + InstanceDeploymentDescription::configProperty_const_iterator InstanceDeploymentDescription:: + end_configProperty () const + { + return configProperty_.end (); } void InstanceDeploymentDescription:: - configProperty (::CIAO::Config_Handlers::Property const& e) + add_configProperty (::CIAO::Config_Handlers::Property const& e) { - if (configProperty_.get ()) + if (configProperty_.capacity () < configProperty_.size () + 1) { - *configProperty_ = e; - } + ::std::vector< ::CIAO::Config_Handlers::Property > v; + v.reserve (configProperty_.size () + 1); - else - { - configProperty_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Property > (new ::CIAO::Config_Handlers::Property (e)); - configProperty_->container (this); + while (configProperty_.size ()) + { + //@@ VC6 + ::CIAO::Config_Handlers::Property& t = configProperty_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + configProperty_.pop_back (); + } + + configProperty_.swap (v); } + + configProperty_.push_back (e); + configProperty_.back ().container (this); } // InstanceDeploymentDescription - // + // bool InstanceDeploymentDescription:: deployedResource_p () const { @@ -2759,7 +2785,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // bool InstanceDeploymentDescription:: deployedSharedResource_p () const { @@ -2794,7 +2820,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // bool InstanceDeploymentDescription:: id_p () const { @@ -2830,7 +2856,7 @@ namespace CIAO // CCMComponentPortKind - // + // CCMComponentPortKind::Value CCMComponentPortKind:: integral () const @@ -2857,7 +2883,7 @@ namespace CIAO } // ComponentPortDescription - // + // ComponentPortDescription:: ComponentPortDescription (::XMLSchema::string< char > const& name__, @@ -2936,7 +2962,7 @@ namespace CIAO // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: name () const { @@ -2956,7 +2982,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: specificType () const { @@ -2976,7 +3002,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: supportedType () const { @@ -2996,7 +3022,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: provider () const { @@ -3016,7 +3042,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: exclusiveProvider () const { @@ -3036,7 +3062,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: exclusiveUser () const { @@ -3056,7 +3082,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: optional () const { @@ -3076,7 +3102,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::CIAO::Config_Handlers::CCMComponentPortKind const& ComponentPortDescription:: kind () const { @@ -3097,7 +3123,7 @@ namespace CIAO // ComponentPropertyDescription - // + // ComponentPropertyDescription:: ComponentPropertyDescription (::XMLSchema::string< char > const& name__, @@ -3134,7 +3160,7 @@ namespace CIAO // ComponentPropertyDescription - // + // ::XMLSchema::string< char > const& ComponentPropertyDescription:: name () const { @@ -3154,7 +3180,7 @@ namespace CIAO } // ComponentPropertyDescription - // + // ::CIAO::Config_Handlers::DataType const& ComponentPropertyDescription:: type () const { @@ -3175,7 +3201,7 @@ namespace CIAO // ComponentExternalPortEndpoint - // + // ComponentExternalPortEndpoint:: ComponentExternalPortEndpoint (::XMLSchema::string< char > const& portName__) @@ -3205,7 +3231,7 @@ namespace CIAO // ComponentExternalPortEndpoint - // + // ::XMLSchema::string< char > const& ComponentExternalPortEndpoint:: portName () const { @@ -3226,7 +3252,7 @@ namespace CIAO // PlanSubcomponentPortEndpoint - // + // PlanSubcomponentPortEndpoint:: PlanSubcomponentPortEndpoint (::XMLSchema::string< char > const& portName__, @@ -3275,7 +3301,7 @@ namespace CIAO // PlanSubcomponentPortEndpoint - // + // ::XMLSchema::string< char > const& PlanSubcomponentPortEndpoint:: portName () const { @@ -3295,7 +3321,7 @@ namespace CIAO } // PlanSubcomponentPortEndpoint - // + // bool PlanSubcomponentPortEndpoint:: provider_p () const { @@ -3330,7 +3356,7 @@ namespace CIAO } // PlanSubcomponentPortEndpoint - // + // ::CIAO::Config_Handlers::CCMComponentPortKind const& PlanSubcomponentPortEndpoint:: kind () const { @@ -3350,7 +3376,7 @@ namespace CIAO } // PlanSubcomponentPortEndpoint - // + // ::XMLSchema::IDREF< char > const& PlanSubcomponentPortEndpoint:: instance () const { @@ -3371,7 +3397,7 @@ namespace CIAO // ExternalReferenceEndpoint - // + // ExternalReferenceEndpoint:: ExternalReferenceEndpoint (::XMLSchema::string< char > const& location__) @@ -3401,7 +3427,7 @@ namespace CIAO // ExternalReferenceEndpoint - // + // ::XMLSchema::string< char > const& ExternalReferenceEndpoint:: location () const { @@ -3422,7 +3448,7 @@ namespace CIAO // ConnectionResourceDeploymentDescription - // + // ConnectionResourceDeploymentDescription:: ConnectionResourceDeploymentDescription (::XMLSchema::string< char > const& targetName__, @@ -3473,7 +3499,7 @@ namespace CIAO // ConnectionResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& ConnectionResourceDeploymentDescription:: targetName () const { @@ -3493,7 +3519,7 @@ namespace CIAO } // ConnectionResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& ConnectionResourceDeploymentDescription:: requirementName () const { @@ -3513,7 +3539,7 @@ namespace CIAO } // ConnectionResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& ConnectionResourceDeploymentDescription:: resourceName () const { @@ -3533,7 +3559,7 @@ namespace CIAO } // ConnectionResourceDeploymentDescription - // + // ::CIAO::Config_Handlers::Any const& ConnectionResourceDeploymentDescription:: resourceValue () const { @@ -3554,7 +3580,7 @@ namespace CIAO // PlanConnectionDescription - // + // PlanConnectionDescription:: PlanConnectionDescription (::XMLSchema::string< char > const& name__) @@ -3570,13 +3596,17 @@ namespace CIAO : name_ (new ::XMLSchema::string< char > (*s.name_)), source_ (s.source_.get () ? new ::XMLSchema::string< char > (*s.source_) : 0), - deployRequirement_ (s.deployRequirement_.get () ? new ::CIAO::Config_Handlers::Requirement (*s.deployRequirement_) : 0), - deployedResource_ (s.deployedResource_.get () ? new ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription (*s.deployedResource_) : 0), regulator__ () { name_->container (this); if (source_.get ()) source_->container (this); - if (deployRequirement_.get ()) deployRequirement_->container (this); + deployRequirement_.reserve (s.deployRequirement_.size ()); + { + for (deployRequirement_const_iterator i (s.deployRequirement_.begin ()); + i != s.deployRequirement_.end (); + ++i) add_deployRequirement (*i); + } + externalEndpoint_.reserve (s.externalEndpoint_.size ()); { for (externalEndpoint_const_iterator i (s.externalEndpoint_.begin ()); @@ -3598,7 +3628,12 @@ namespace CIAO ++i) add_externalReference (*i); } - if (deployedResource_.get ()) deployedResource_->container (this); + deployedResource_.reserve (s.deployedResource_.size ()); + { + for (deployedResource_const_iterator i (s.deployedResource_.begin ()); + i != s.deployedResource_.end (); + ++i) add_deployedResource (*i); + } } ::CIAO::Config_Handlers::PlanConnectionDescription& PlanConnectionDescription:: @@ -3609,8 +3644,13 @@ namespace CIAO if (s.source_.get ()) source (*(s.source_)); else source_ = ::std::auto_ptr< ::XMLSchema::string< char > > (0); - if (s.deployRequirement_.get ()) deployRequirement (*(s.deployRequirement_)); - else deployRequirement_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Requirement > (0); + deployRequirement_.clear (); + deployRequirement_.reserve (s.deployRequirement_.size ()); + { + for (deployRequirement_const_iterator i (s.deployRequirement_.begin ()); + i != s.deployRequirement_.end (); + ++i) add_deployRequirement (*i); + } externalEndpoint_.clear (); externalEndpoint_.reserve (s.externalEndpoint_.size ()); @@ -3636,15 +3676,20 @@ namespace CIAO ++i) add_externalReference (*i); } - if (s.deployedResource_.get ()) deployedResource (*(s.deployedResource_)); - else deployedResource_ = ::std::auto_ptr< ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription > (0); + deployedResource_.clear (); + deployedResource_.reserve (s.deployedResource_.size ()); + { + for (deployedResource_const_iterator i (s.deployedResource_.begin ()); + i != s.deployedResource_.end (); + ++i) add_deployedResource (*i); + } return *this; } // PlanConnectionDescription - // + // ::XMLSchema::string< char > const& PlanConnectionDescription:: name () const { @@ -3664,7 +3709,7 @@ namespace CIAO } // PlanConnectionDescription - // + // bool PlanConnectionDescription:: source_p () const { @@ -3699,42 +3744,58 @@ namespace CIAO } // PlanConnectionDescription - // - bool PlanConnectionDescription:: - deployRequirement_p () const + // + PlanConnectionDescription::deployRequirement_iterator PlanConnectionDescription:: + begin_deployRequirement () { - return deployRequirement_.get () != 0; + return deployRequirement_.begin (); } - ::CIAO::Config_Handlers::Requirement const& PlanConnectionDescription:: - deployRequirement () const + PlanConnectionDescription::deployRequirement_iterator PlanConnectionDescription:: + end_deployRequirement () { - return *deployRequirement_; + return deployRequirement_.end (); } - ::CIAO::Config_Handlers::Requirement& PlanConnectionDescription:: - deployRequirement () + PlanConnectionDescription::deployRequirement_const_iterator PlanConnectionDescription:: + begin_deployRequirement () const { - return *deployRequirement_; + return deployRequirement_.begin (); + } + + PlanConnectionDescription::deployRequirement_const_iterator PlanConnectionDescription:: + end_deployRequirement () const + { + return deployRequirement_.end (); } void PlanConnectionDescription:: - deployRequirement (::CIAO::Config_Handlers::Requirement const& e) + add_deployRequirement (::CIAO::Config_Handlers::Requirement const& e) { - if (deployRequirement_.get ()) + if (deployRequirement_.capacity () < deployRequirement_.size () + 1) { - *deployRequirement_ = e; - } + ::std::vector< ::CIAO::Config_Handlers::Requirement > v; + v.reserve (deployRequirement_.size () + 1); - else - { - deployRequirement_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Requirement > (new ::CIAO::Config_Handlers::Requirement (e)); - deployRequirement_->container (this); + while (deployRequirement_.size ()) + { + //@@ VC6 + ::CIAO::Config_Handlers::Requirement& t = deployRequirement_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + deployRequirement_.pop_back (); + } + + deployRequirement_.swap (v); } + + deployRequirement_.push_back (e); + deployRequirement_.back ().container (this); } // PlanConnectionDescription - // + // PlanConnectionDescription::externalEndpoint_iterator PlanConnectionDescription:: begin_externalEndpoint () { @@ -3785,7 +3846,7 @@ namespace CIAO } // PlanConnectionDescription - // + // PlanConnectionDescription::internalEndpoint_iterator PlanConnectionDescription:: begin_internalEndpoint () { @@ -3836,7 +3897,7 @@ namespace CIAO } // PlanConnectionDescription - // + // PlanConnectionDescription::externalReference_iterator PlanConnectionDescription:: begin_externalReference () { @@ -3887,43 +3948,59 @@ namespace CIAO } // PlanConnectionDescription - // - bool PlanConnectionDescription:: - deployedResource_p () const + // + PlanConnectionDescription::deployedResource_iterator PlanConnectionDescription:: + begin_deployedResource () { - return deployedResource_.get () != 0; + return deployedResource_.begin (); } - ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription const& PlanConnectionDescription:: - deployedResource () const + PlanConnectionDescription::deployedResource_iterator PlanConnectionDescription:: + end_deployedResource () { - return *deployedResource_; + return deployedResource_.end (); } - ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription& PlanConnectionDescription:: - deployedResource () + PlanConnectionDescription::deployedResource_const_iterator PlanConnectionDescription:: + begin_deployedResource () const { - return *deployedResource_; + return deployedResource_.begin (); + } + + PlanConnectionDescription::deployedResource_const_iterator PlanConnectionDescription:: + end_deployedResource () const + { + return deployedResource_.end (); } void PlanConnectionDescription:: - deployedResource (::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription const& e) + add_deployedResource (::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription const& e) { - if (deployedResource_.get ()) + if (deployedResource_.capacity () < deployedResource_.size () + 1) { - *deployedResource_ = e; - } + ::std::vector< ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription > v; + v.reserve (deployedResource_.size () + 1); - else - { - deployedResource_ = ::std::auto_ptr< ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription > (new ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription (e)); - deployedResource_->container (this); + while (deployedResource_.size ()) + { + //@@ VC6 + ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription& t = deployedResource_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + deployedResource_.pop_back (); + } + + deployedResource_.swap (v); } + + deployedResource_.push_back (e); + deployedResource_.back ().container (this); } // ImplementationDependency - // + // ImplementationDependency:: ImplementationDependency (::XMLSchema::string< char > const& requiredType__) @@ -3953,7 +4030,7 @@ namespace CIAO // ImplementationDependency - // + // ::XMLSchema::string< char > const& ImplementationDependency:: requiredType () const { @@ -3974,7 +4051,7 @@ namespace CIAO // Capability - // + // Capability:: Capability (::XMLSchema::string< char > const& name__, @@ -4018,7 +4095,7 @@ namespace CIAO // Capability - // + // ::XMLSchema::string< char > const& Capability:: name () const { @@ -4038,7 +4115,7 @@ namespace CIAO } // Capability - // + // ::XMLSchema::string< char > const& Capability:: resourceType () const { @@ -4058,7 +4135,7 @@ namespace CIAO } // Capability - // + // ::CIAO::Config_Handlers::SatisfierProperty const& Capability:: property () const { @@ -4079,7 +4156,7 @@ namespace CIAO // ImplementationRequirement - // + // ImplementationRequirement:: ImplementationRequirement (::CIAO::Config_Handlers::ResourceUsageKind const& resourceUsage__, @@ -4144,7 +4221,7 @@ namespace CIAO // ImplementationRequirement - // + // ::CIAO::Config_Handlers::ResourceUsageKind const& ImplementationRequirement:: resourceUsage () const { @@ -4164,7 +4241,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::XMLSchema::string< char > const& ImplementationRequirement:: resourcePort () const { @@ -4184,7 +4261,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::XMLSchema::string< char > const& ImplementationRequirement:: componentPort () const { @@ -4204,7 +4281,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::XMLSchema::string< char > const& ImplementationRequirement:: resourceType () const { @@ -4224,7 +4301,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::XMLSchema::string< char > const& ImplementationRequirement:: name () const { @@ -4244,7 +4321,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::CIAO::Config_Handlers::Property const& ImplementationRequirement:: property () const { @@ -4265,7 +4342,7 @@ namespace CIAO // ComponentPackageReference - // + // ComponentPackageReference:: ComponentPackageReference (::XMLSchema::string< char > const& requiredUUID__, @@ -4309,7 +4386,7 @@ namespace CIAO // ComponentPackageReference - // + // ::XMLSchema::string< char > const& ComponentPackageReference:: requiredUUID () const { @@ -4329,7 +4406,7 @@ namespace CIAO } // ComponentPackageReference - // + // ::XMLSchema::string< char > const& ComponentPackageReference:: requiredName () const { @@ -4349,7 +4426,7 @@ namespace CIAO } // ComponentPackageReference - // + // ::XMLSchema::string< char > const& ComponentPackageReference:: requiredType () const { @@ -4370,7 +4447,7 @@ namespace CIAO // SubcomponentPortEndpoint - // + // SubcomponentPortEndpoint:: SubcomponentPortEndpoint (::XMLSchema::string< char > const& portName__, @@ -4407,7 +4484,7 @@ namespace CIAO // SubcomponentPortEndpoint - // + // ::XMLSchema::string< char > const& SubcomponentPortEndpoint:: portName () const { @@ -4427,7 +4504,7 @@ namespace CIAO } // SubcomponentPortEndpoint - // + // ::XMLSchema::IDREF< char > const& SubcomponentPortEndpoint:: instance () const { @@ -4448,7 +4525,7 @@ namespace CIAO // AssemblyConnectionDescription - // + // AssemblyConnectionDescription:: AssemblyConnectionDescription (::XMLSchema::string< char > const& name__) @@ -4527,7 +4604,7 @@ namespace CIAO // AssemblyConnectionDescription - // + // ::XMLSchema::string< char > const& AssemblyConnectionDescription:: name () const { @@ -4547,7 +4624,7 @@ namespace CIAO } // AssemblyConnectionDescription - // + // bool AssemblyConnectionDescription:: deployRequirement_p () const { @@ -4582,7 +4659,7 @@ namespace CIAO } // AssemblyConnectionDescription - // + // AssemblyConnectionDescription::externalEndpoint_iterator AssemblyConnectionDescription:: begin_externalEndpoint () { @@ -4633,7 +4710,7 @@ namespace CIAO } // AssemblyConnectionDescription - // + // AssemblyConnectionDescription::internalEndpoint_iterator AssemblyConnectionDescription:: begin_internalEndpoint () { @@ -4684,7 +4761,7 @@ namespace CIAO } // AssemblyConnectionDescription - // + // AssemblyConnectionDescription::externalReference_iterator AssemblyConnectionDescription:: begin_externalReference () { @@ -4786,7 +4863,7 @@ namespace CIAO else if (v == "tk_component") v_ = tk_component_l; else if (v == "tk_home") v_ = tk_home_l; else if (v == "tk_event") v_ = tk_event_l; - else + else { } } @@ -4834,7 +4911,7 @@ namespace CIAO else if (v == "tk_component") v_ = tk_component_l; else if (v == "tk_home") v_ = tk_home_l; else if (v == "tk_event") v_ = tk_event_l; - else + else { } } @@ -4898,7 +4975,7 @@ namespace CIAO kind (t); } - else + else { } } @@ -5015,7 +5092,7 @@ namespace CIAO typecode (t); } - else + else { } } @@ -5048,7 +5125,7 @@ namespace CIAO value_->container (this); } - else + else { } } @@ -5081,7 +5158,7 @@ namespace CIAO value_->container (this); } - else + else { } } @@ -5114,7 +5191,7 @@ namespace CIAO label_->container (this); } - else + else { } } @@ -5135,7 +5212,7 @@ namespace CIAO else if (v == "Maximum") v_ = Maximum_l; else if (v == "Attribute") v_ = Attribute_l; else if (v == "Selection") v_ = Selection_l; - else + else { } } @@ -5152,7 +5229,7 @@ namespace CIAO else if (v == "Maximum") v_ = Maximum_l; else if (v == "Attribute") v_ = Attribute_l; else if (v == "Selection") v_ = Selection_l; - else + else { } } @@ -5197,7 +5274,7 @@ namespace CIAO value_->container (this); } - else + else { } } @@ -5236,7 +5313,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -5281,7 +5358,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -5320,7 +5397,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -5359,7 +5436,7 @@ namespace CIAO resourceValue_->container (this); } - else + else { } } @@ -5422,7 +5499,7 @@ namespace CIAO add_deployedResource (t); } - else + else { } } @@ -5437,7 +5514,7 @@ namespace CIAO id (t); } - else + else { } } @@ -5488,7 +5565,7 @@ namespace CIAO add_deployRequirement (t); } - else + else { } } @@ -5503,7 +5580,7 @@ namespace CIAO id (t); } - else + else { } } @@ -5523,7 +5600,7 @@ namespace CIAO else if (v == "ResourceUsesInstance") v_ = ResourceUsesInstance_l; else if (v == "PortUsesResource") v_ = PortUsesResource_l; else if (v == "ResourceUsesPort") v_ = ResourceUsesPort_l; - else + else { } } @@ -5539,7 +5616,7 @@ namespace CIAO else if (v == "ResourceUsesInstance") v_ = ResourceUsesInstance_l; else if (v == "PortUsesResource") v_ = PortUsesResource_l; else if (v == "ResourceUsesPort") v_ = ResourceUsesPort_l; - else + else { } } @@ -5589,7 +5666,7 @@ namespace CIAO resourceValue_->container (this); } - else + else { } } @@ -5637,7 +5714,7 @@ namespace CIAO else if (n == "configProperty") { ::CIAO::Config_Handlers::Property t (e); - configProperty (t); + add_configProperty (t); } else if (n == "deployedResource") @@ -5652,7 +5729,7 @@ namespace CIAO deployedSharedResource (t); } - else + else { } } @@ -5667,7 +5744,7 @@ namespace CIAO id (t); } - else + else { } } @@ -5688,7 +5765,7 @@ namespace CIAO else if (v == "EventEmitter") v_ = EventEmitter_l; else if (v == "EventPublisher") v_ = EventPublisher_l; else if (v == "EventConsumer") v_ = EventConsumer_l; - else + else { } } @@ -5705,7 +5782,7 @@ namespace CIAO else if (v == "EventEmitter") v_ = EventEmitter_l; else if (v == "EventPublisher") v_ = EventPublisher_l; else if (v == "EventConsumer") v_ = EventConsumer_l; - else + else { } } @@ -5780,7 +5857,7 @@ namespace CIAO kind_->container (this); } - else + else { } } @@ -5813,7 +5890,7 @@ namespace CIAO type_->container (this); } - else + else { } } @@ -5840,7 +5917,7 @@ namespace CIAO portName_->container (this); } - else + else { } } @@ -5885,7 +5962,7 @@ namespace CIAO instance_->container (this); } - else + else { } } @@ -5912,7 +5989,7 @@ namespace CIAO location_->container (this); } - else + else { } } @@ -5957,7 +6034,7 @@ namespace CIAO resourceValue_->container (this); } - else + else { } } @@ -5993,7 +6070,7 @@ namespace CIAO else if (n == "deployRequirement") { ::CIAO::Config_Handlers::Requirement t (e); - deployRequirement (t); + add_deployRequirement (t); } else if (n == "externalEndpoint") @@ -6017,10 +6094,10 @@ namespace CIAO else if (n == "deployedResource") { ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription t (e); - deployedResource (t); + add_deployedResource (t); } - else + else { } } @@ -6047,7 +6124,7 @@ namespace CIAO requiredType_->container (this); } - else + else { } } @@ -6086,7 +6163,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -6143,7 +6220,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -6182,7 +6259,7 @@ namespace CIAO requiredType_->container (this); } - else + else { } } @@ -6215,7 +6292,7 @@ namespace CIAO instance_->container (this); } - else + else { } } @@ -6266,7 +6343,7 @@ namespace CIAO add_externalReference (t); } - else + else { } } @@ -6280,3 +6357,4 @@ namespace CIAO { } } + diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.hpp b/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.hpp index 551bdf5ebe3..01122adff9a 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.hpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.hpp @@ -1153,13 +1153,16 @@ namespace CIAO // configProperty // public: - bool configProperty_p () const; - ::CIAO::Config_Handlers::Property const& configProperty () const; - ::CIAO::Config_Handlers::Property& configProperty (); - void configProperty (::CIAO::Config_Handlers::Property const& ); + typedef ::std::vector< ::CIAO::Config_Handlers::Property >::iterator configProperty_iterator; + typedef ::std::vector< ::CIAO::Config_Handlers::Property >::const_iterator configProperty_const_iterator; + configProperty_iterator begin_configProperty (); + configProperty_iterator end_configProperty (); + configProperty_const_iterator begin_configProperty () const; + configProperty_const_iterator end_configProperty () const; + void add_configProperty (::CIAO::Config_Handlers::Property const& ); protected: - ::std::auto_ptr< ::CIAO::Config_Handlers::Property > configProperty_; + ::std::vector< ::CIAO::Config_Handlers::Property > configProperty_; // deployedResource // @@ -1600,13 +1603,16 @@ namespace CIAO // deployRequirement // public: - bool deployRequirement_p () const; - ::CIAO::Config_Handlers::Requirement const& deployRequirement () const; - ::CIAO::Config_Handlers::Requirement& deployRequirement (); - void deployRequirement (::CIAO::Config_Handlers::Requirement const& ); + typedef ::std::vector< ::CIAO::Config_Handlers::Requirement >::iterator deployRequirement_iterator; + typedef ::std::vector< ::CIAO::Config_Handlers::Requirement >::const_iterator deployRequirement_const_iterator; + deployRequirement_iterator begin_deployRequirement (); + deployRequirement_iterator end_deployRequirement (); + deployRequirement_const_iterator begin_deployRequirement () const; + deployRequirement_const_iterator end_deployRequirement () const; + void add_deployRequirement (::CIAO::Config_Handlers::Requirement const& ); protected: - ::std::auto_ptr< ::CIAO::Config_Handlers::Requirement > deployRequirement_; + ::std::vector< ::CIAO::Config_Handlers::Requirement > deployRequirement_; // externalEndpoint // @@ -1653,13 +1659,16 @@ namespace CIAO // deployedResource // public: - bool deployedResource_p () const; - ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription const& deployedResource () const; - ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription& deployedResource (); - void deployedResource (::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription const& ); + typedef ::std::vector< ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription >::iterator deployedResource_iterator; + typedef ::std::vector< ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription >::const_iterator deployedResource_const_iterator; + deployedResource_iterator begin_deployedResource (); + deployedResource_iterator end_deployedResource (); + deployedResource_const_iterator begin_deployedResource () const; + deployedResource_const_iterator end_deployedResource () const; + void add_deployedResource (::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription const& ); protected: - ::std::auto_ptr< ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription > deployedResource_; + ::std::vector< ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription > deployedResource_; public: PlanConnectionDescription (::XMLSchema::string< char > const& name__); diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.cpp index 99adc131408..1b534a50ed4 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.cpp @@ -1,161 +1,151 @@ - // $Id$ - #include "CCD_Handler.h" -#include "Basic_Deployment_Data.hpp" -#include "ciao/Deployment_DataC.h" #include "ccd.hpp" #include "Property_Handler.h" #include "CPD_Handler.h" #include "ComponentPropertyDescription_Handler.h" - - +#include "ciao/Deployment_DataC.h" namespace CIAO { namespace Config_Handlers { - - CCD_Handler::CCD_Handler (void) + bool + CCD_Handler::component_interface_descr ( + const ComponentInterfaceDescription &desc, + Deployment::ComponentInterfaceDescription& toconfig) { - } + if (desc.UUID_p ()) + toconfig.UUID = + CORBA::string_dup (desc.UUID ().c_str ()); - CCD_Handler::~CCD_Handler (void) - { - } + if (desc.label_p ()) + { + toconfig.label = + CORBA::string_dup (desc.label ().c_str ()); + } + if (desc.specificType_p ()) + { + toconfig.specificType = + CORBA::string_dup (desc.specificType ().c_str ()); + } - void - CCD_Handler::comp_interface_descr ( - const ComponentInterfaceDescription& desc, - Deployment::ComponentInterfaceDescription& toconfig) - { + ComponentInterfaceDescription::supportedType_const_iterator + end = desc.end_supportedType (); + for (ComponentInterfaceDescription::supportedType_const_iterator s = + desc.begin_supportedType (); + s != end; + ++s) + { + // This loop is going to be very slow! :(! + CORBA::ULong len = + toconfig.supportedType.length (); - - toconfig.UUID= - CORBA::string_dup (desc.UUID ().c_str ()); - - toconfig.label= - CORBA::string_dup (desc.label ().c_str ()); - - toconfig.specificType= - CORBA::string_dup (desc.specificType ().c_str ()); - - ComponentInterfaceDescription::supportedType_const_iterator supportedType_end = - desc.end_supportedType (); - ComponentInterfaceDescription::supportedType_const_iterator supportedType_beg = - desc.begin_supportedType (); - - CORBA::ULong supportedType_length = toconfig.supportedType.length (); - size_t supportedType_delta = supportedType_end - supportedType_beg; - supportedType_length += supportedType_delta; - - toconfig.supportedType.length (supportedType_length); - size_t supportedType_count = 0; - - for (ComponentInterfaceDescription::supportedType_const_iterator - item (desc.begin_supportedType ()); - item != supportedType_end; - ++item) - { - toconfig.supportedType[supportedType_length - (supportedType_delta - supportedType_count)] = - CORBA::string_dup (item->c_str ()); - ++supportedType_count; - } - - ComponentInterfaceDescription::idlFile_const_iterator idlFile_end = - desc.end_idlFile (); - ComponentInterfaceDescription::idlFile_const_iterator idlFile_beg = - desc.begin_idlFile (); - - CORBA::ULong idlFile_length = toconfig.idlFile.length (); - size_t idlFile_delta = idlFile_end - idlFile_beg; - idlFile_length += idlFile_delta; - - toconfig.idlFile.length (idlFile_length); - size_t idlFile_count = 0; - - for (ComponentInterfaceDescription::idlFile_const_iterator - item (desc.begin_idlFile ()); - item != idlFile_end; - ++item) - { - toconfig.idlFile[idlFile_length - (idlFile_delta - idlFile_count)] = - CORBA::string_dup (item->c_str ()); - ++idlFile_count; - } - - ComponentInterfaceDescription::configProperty_const_iterator configProperty_end = - desc.end_configProperty (); - ComponentInterfaceDescription::configProperty_const_iterator configProperty_beg = - desc.begin_configProperty (); - - CORBA::ULong configProperty_length = toconfig.configProperty.length (); - size_t configProperty_delta = configProperty_end - configProperty_beg; - configProperty_length += configProperty_delta; - - toconfig.configProperty.length (configProperty_length); - size_t configProperty_count = 0; - - for (ComponentInterfaceDescription::configProperty_const_iterator - item (configProperty_beg); - item != configProperty_end; - ++item) - { - Property_Handler::property ( - *item, - toconfig.configProperty[configProperty_length - (configProperty_delta - configProperty_count)]); - ++configProperty_count; + toconfig.supportedType.length (len + 1); + toconfig.supportedType[len] = + CORBA::string_dup ((*s).c_str ()); } - - ComponentInterfaceDescription::port_const_iterator port_end = - desc.end_port (); - ComponentInterfaceDescription::port_const_iterator port_beg = - desc.begin_port (); - - CORBA::ULong port_length = toconfig.port.length (); - size_t port_delta = port_end - port_beg; - port_length += port_delta; - - toconfig.port.length (port_length); - size_t port_count = 0; - - for (ComponentInterfaceDescription::port_const_iterator - item (port_beg); - item != port_end; - ++item) - { - CPD_Handler::comp_port_descr ( - *item, - toconfig.port[port_length - (port_delta - port_count)]); - ++port_count; - } - - /* if (desc.property_p ()) + + ComponentInterfaceDescription::idlFile_const_iterator + eidl = desc.end_idlFile (); + + for (ComponentInterfaceDescription::idlFile_const_iterator sidl= + desc.begin_idlFile (); + sidl != eidl; + ++sidl) { - CORBA::ULong length = toconfig.property.length (); - - toconfig.property.length (length + 1); - ComponentPropertyDescription_Handler::comp_property_descr ( - desc.property (), - toconfig.property[length - 1]); + // @@ Another n^2 algorithm + CORBA::ULong len = + toconfig.idlFile.length (); + + toconfig.idlFile.length (len + 1); + + toconfig.idlFile [len] = + (*sidl).c_str (); } - - if (desc.infoProperty_p ()) - { - CORBA::ULong length = toconfig.infoProperty.length (); - - toconfig.infoProperty.length (length + 1); - Property_Handler::property ( - desc.infoProperty (), - toconfig.infoProperty[length - 1]); - }*/ - - - } + ComponentInterfaceDescription::configProperty_const_iterator pend = + desc.end_configProperty (); + + for (ComponentInterfaceDescription::configProperty_const_iterator pstart = + desc.begin_configProperty (); + pstart != pend; + ++pstart) + { + // Need to improve this. This is clearly O(n^2). + CORBA::ULong len = + toconfig.configProperty.length (); + + toconfig.configProperty.length (len + 1); + + Property_Handler::get_property (*pstart, + toconfig.configProperty [len]); + } + + for (ComponentInterfaceDescription::port_const_iterator + port (desc.begin_port ()); + port != desc.end_port (); + ++port) + { + CORBA::ULong len = + toconfig.port.length (); + + toconfig.port.length (len + 1); + + CPD_Handler::component_port_description ( + *port, + toconfig.port[len]); + } + +#if 0 + // @@ MAJO: I don't think we need to handle this now, since they + // are not needed for this round. IOW, we don't really understand + // how to use this stuff ;) + if (desc.property_p ()) + { + //Create the ComponentPropertyDescription handler. + ComponentPropertyDescription_Handler cprop_handler; + + //Increase the size of the property sequence. + toconfig.property.length ( + toconfig.property.length () + 1); + //Now delegate the propogation to the + //<ComponentPropertyDescription_Handler>. + cprop_handler.get_ComponentPropertyDescription ( + toconfig.property [toconfig.property.length () -1], + desc.property ()); + } + + + + //The IDL for the <infoProperty> specifies + //a sequence of <Property> structs but the schema + //specifies <infoProperty> as a single + //<Property>. We construct that single property + //element and assign it to the first position in the + //<infoProperty> sequence. We only do this if it + //is present. + if (desc.infoProperty_p () ) + { + //First construct the <Deployment::Property> + //to configure. + Deployment::Property prop; + + //Now, propogate the values from the <desc> into <prop>. + Property_Handler::get_property (desc.infoProperty (), + prop); + + //Finally, add it to the sequence. + toconfig.infoProperty.length ( + toconfig.infoProperty.length () + 1); + toconfig.infoProperty [toconfig.infoProperty.length () - 1] = prop; + } +#endif /*if 0*/ + + return 1; + } } - } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.h index e9cf8e30a08..b9880694cc6 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.h @@ -1,68 +1,55 @@ - - //============================================================== +//================================================ /** - * @file CCD_Handler.h + * @file CID_Handler.h * * $Id$ * * @author Jules White <jules@dre.vanderbilt.edu> */ -//================================================================ +//================================================ -#ifndef CIAO_CONFIG_HANDLERS_CCD_Handler_H -#define CIAO_CONFIG_HANDLERS_CCD_Handler_H +#ifndef CIAO_CONFIG_HANDLERS_CCD_HANDLER_H +#define CIAO_CONFIG_HANDLERS_CCD_HANDLER_H #include /**/ "ace/pre.h" #include "Config_Handlers/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 ComponentInterfaceDescription; + struct ComponentInterfaceDescription; } - namespace CIAO { - namespace Config_Handlers { - - class ComponentInterfaceDescription; - + class ComponentInterfaceDescription; /* * @class CCD_Handler * * @brief Handler class for <ComponentInterfaceDescription> types. * - * This class defines handler methods to map values from - * XSC ComponentInterfaceDescription objects, parsed from the descriptor files, to the - * corresponding CORBA IDL Any type. - * + * This class is named CCD_Handler but actually fills + * <ComponentInterfaceDescription>. Why is this confusion? We + * want to maintain the correlation between the XSD file and the + * actual datatype. The file name corresponds to the XSD file but + * the data type being filled in is of type + * <ComponentInterfaceDescription> */ - - class Config_Handlers_Export CCD_Handler { - + class Config_Handlers_Export CCD_Handler + { public: - - CCD_Handler (void); - virtual ~CCD_Handler (void); - - static void comp_interface_descr ( - const ComponentInterfaceDescription& desc, - Deployment::ComponentInterfaceDescription& toconfig); - + static bool component_interface_descr ( + const ComponentInterfaceDescription &src, + ::Deployment::ComponentInterfaceDescription& dest); }; } } -#include /**/ "ace/post.h" -#endif /* CIAO_CONFIG_HANDLERS_CCD_Handler_H */ - +#include /**/ "ace/post.h" +#endif /* CID_HANDLER_H */ diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CEPE_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/CEPE_Handler.cpp index 7b96ae526fb..418c52f4765 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CEPE_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/CEPE_Handler.cpp @@ -8,25 +8,39 @@ namespace CIAO { namespace Config_Handlers { - - CEPE_Handler::CEPE_Handler (void) + bool + CEPE_Handler::external_port_endpoints ( + const PlanConnectionDescription &src, + ::Deployment::ComponentExternalPortEndpoints &dest) { - } + PlanConnectionDescription::externalEndpoint_const_iterator eeci_e = + src.end_externalEndpoint (); + + for (PlanConnectionDescription::externalEndpoint_const_iterator eeci_b = + src.begin_externalEndpoint (); + eeci_b != eeci_e; + ++eeci_b) + { + CORBA::ULong len = + dest.length (); + + dest.length (len + 1); + + (void) CEPE_Handler::external_port_endpoint ((*eeci_b), + dest[len]); + } + + return true; - CEPE_Handler::~CEPE_Handler (void) - { } - - ///This method takes a <Deployment::ComponentExternalPortEndpoint> - ///and maps the values from the passed in XSC - ///ComponentExternalPortEndpoint to its members. - void CEPE_Handler::get_ComponentExternalPortEndpoint ( - Deployment::ComponentExternalPortEndpoint& toconfig, - ComponentExternalPortEndpoint& desc) + + void + CEPE_Handler::external_port_endpoint ( + const ComponentExternalPortEndpoint &src, + ::Deployment::ComponentExternalPortEndpoint &dest) { - toconfig.portName = CORBA::string_dup (desc.portName ().c_str ()); + dest.portName = + src.portName ().c_str (); } - } } - diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CEPE_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/CEPE_Handler.h index 43afc78d7a8..30ab640a45a 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CEPE_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/CEPE_Handler.h @@ -20,6 +20,7 @@ namespace Deployment { + struct ComponentExternalPortEndpoints; struct ComponentExternalPortEndpoint; } @@ -27,8 +28,8 @@ namespace CIAO { namespace Config_Handlers { - - struct ComponentExternalPortEndpoint; + class PlanConnectionDescription; + class ComponentExternalPortEndpoint; /* * @class CEPE_Handler @@ -44,17 +45,13 @@ namespace CIAO class Config_Handlers_Export CEPE_Handler { public: - CEPE_Handler (void); - virtual ~CEPE_Handler (void); - - /// This method takes a - /// <Deployment::ComponentExternalPortEndpoint> and maps the - /// values from the passed in XSC ComponentExternalPortEndpoint - /// to its members. - void get_ComponentExternalPortEndpoint ( - Deployment::ComponentExternalPortEndpoint& toconfig, - ComponentExternalPortEndpoint& desc); - + static bool external_port_endpoints ( + const PlanConnectionDescription &src, + ::Deployment::ComponentExternalPortEndpoints &dest); + private: + static void external_port_endpoint ( + const ComponentExternalPortEndpoint &src, + ::Deployment::ComponentExternalPortEndpoint &dest); }; } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.cpp index 91dc9ed8715..00c67a1da37 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.cpp @@ -1,77 +1,33 @@ - // $Id$ - - #include "CPD_Handler.h" #include "Basic_Deployment_Data.hpp" #include "ciao/Deployment_DataC.h" - - - namespace CIAO { namespace Config_Handlers { - - CPD_Handler::CPD_Handler (void) - { - } - - CPD_Handler::~CPD_Handler (void) - { - } - - void - CPD_Handler::comp_port_descr ( - const ComponentPortDescription& desc, - Deployment::ComponentPortDescription& toconfig) + CPD_Handler::component_port_description ( + const ComponentPortDescription& desc, + Deployment::ComponentPortDescription& toconfig) { - - - - toconfig.name= - CORBA::string_dup (desc.name ().c_str ()); - - toconfig.specificType= - CORBA::string_dup (desc.specificType ().c_str ()); - - CORBA::ULong supportedType_length = toconfig.supportedType.length (); - toconfig.supportedType.length (supportedType_length + 1); - toconfig.supportedType[supportedType_length - 1]= - CORBA::string_dup (desc.supportedType ().c_str ()); - - toconfig.provider= - !desc.provider ().empty (); - - toconfig.exclusiveProvider= - !desc.exclusiveProvider ().empty (); - - toconfig.exclusiveUser= - !desc.exclusiveUser ().empty (); - - if (desc.kind () == - CCMComponentPortKind::Facet) - toconfig.kind = Deployment::Facet; - if (desc.kind () == - CCMComponentPortKind::SimplexReceptacle) - toconfig.kind = Deployment::SimplexReceptacle; - if (desc.kind () == - CCMComponentPortKind::MultiplexReceptacle) - toconfig.kind = Deployment::MultiplexReceptacle; - if (desc.kind () == - CCMComponentPortKind::EventEmitter) - toconfig.kind = Deployment::EventEmitter; - if (desc.kind () == - CCMComponentPortKind::EventPublisher) - toconfig.kind = Deployment::EventPublisher; - if (desc.kind () == - CCMComponentPortKind::EventConsumer) - toconfig.kind = Deployment::EventConsumer; - - + toconfig.name = + desc.name ().c_str (); + + toconfig.specificType = + desc.specificType ().c_str (); + + if (!desc.supportedType ().empty ()) + { + toconfig.supportedType.length (1); + toconfig.supportedType[0] = + desc.supportedType ().c_str (); + } + + toconfig.provider = !desc.provider ().empty (); + toconfig.exclusiveProvider = !desc.exclusiveProvider ().empty (); + toconfig.exclusiveUser = !desc.exclusiveUser ().empty (); + toconfig.optional = !desc.optional ().empty (); } - } - } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.h index c55ac979737..2f6634f23d1 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.h @@ -1,5 +1,4 @@ - - //============================================================== +//================================================ /** * @file CPD_Handler.h * @@ -7,62 +6,54 @@ * * @author Jules White <jules@dre.vanderbilt.edu> */ -//================================================================ +//================================================ + +#ifndef CIAO_CONFIG_HANDLERS_CPD_HANDLER_H +#define CIAO_CONFIG_HANDLERS_CPD_HANDLER_H -#ifndef CIAO_CONFIG_HANDLERS_CPD_Handler_H -#define CIAO_CONFIG_HANDLERS_CPD_Handler_H #include /**/ "ace/pre.h" #include "Config_Handlers/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 ComponentPortDescription; + struct ComponentPortDescription; } - namespace CIAO { - namespace Config_Handlers { - - class ComponentPortDescription; - - - /* - * @class CPD_Handler - * - * @brief Handler class for <ComponentPortDescription> types. - * - * This class defines handler methods to map values from - * XSC ComponentPortDescription objects, parsed from the descriptor files, to the - * corresponding CORBA IDL Any type. - * - */ - - class Config_Handlers_Export CPD_Handler { - - public: - - CPD_Handler (void); - virtual ~CPD_Handler (void); - - static void comp_port_descr ( - const ComponentPortDescription& desc, - Deployment::ComponentPortDescription& toconfig); - + class ComponentPortDescription; + /* + * @class CPD_Handler + * + * @brief Handler class for <CCMComponentPortDescription> types. + * + * This class defines handler methods to map values from + * XSC objects, parsed from the descriptor files, to the + * corresponding CORBA IDL type for the schema element. + * + */ + + class Config_Handlers_Export CPD_Handler + { + + public: + /// Maps the values from the XSC object + /// <ComponentInterfaceDescription> to the CORBA IDL type + /// <Deployment::ComponentInterfaceDescription>. + static void component_port_description ( + const ComponentPortDescription &desc, + ::Deployment::ComponentPortDescription &toconfig); }; - } -} -#include /**/ "ace/post.h" -#endif /* CIAO_CONFIG_HANDLERS_CPD_Handler_H */ + } +} +#include /**/ "ace/post.h" +#endif /* CIAO_CONFIG_HANDLERS_CPD_HANDLER_H*/ diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog index a8d98385e3e..af55316e064 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog +++ b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog @@ -1,24 +1,65 @@ +Sun Oct 3 03:38:28 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu> + + * DAnCE/Config_Handlers/ADD_Handler.cpp: + * DAnCE/Config_Handlers/ADD_Handler.h: + * DAnCE/Config_Handlers/Basic_Deployment_Data.cpp: + * DAnCE/Config_Handlers/Basic_Deployment_Data.hpp: + * DAnCE/Config_Handlers/CCD_Handler.cpp: + * DAnCE/Config_Handlers/CCD_Handler.h: + * DAnCE/Config_Handlers/CEPE_Handler.cpp: + * DAnCE/Config_Handlers/CEPE_Handler.h: + * DAnCE/Config_Handlers/CPD_Handler.cpp: + * DAnCE/Config_Handlers/CPD_Handler.h: + * DAnCE/Config_Handlers/Config_Handlers.mpc: + * DAnCE/Config_Handlers/DP_Handler.cpp: + * DAnCE/Config_Handlers/ERE_Handler.cpp: + * DAnCE/Config_Handlers/ERE_Handler.h: + * DAnCE/Config_Handlers/IDD_Handler.cpp: + * DAnCE/Config_Handlers/IDD_Handler.h: + * DAnCE/Config_Handlers/ID_Handler.cpp: + * DAnCE/Config_Handlers/ID_Handler.h: + * DAnCE/Config_Handlers/MDD_Handler.cpp: + * DAnCE/Config_Handlers/MDD_Handler.h: + * DAnCE/Config_Handlers/PSPE_Handler.cpp: + * DAnCE/Config_Handlers/PSPE_Handler.h: + * DAnCE/Config_Handlers/Property_Handler.cpp: + * DAnCE/Config_Handlers/Property_Handler.h: + * DAnCE/Config_Handlers/RDD_Handler.cpp: + * DAnCE/Config_Handlers/RDD_Handler.h: + * DAnCE/Config_Handlers/Req_Handler.cpp: + * DAnCE/Config_Handlers/Req_Handler.h: + * DAnCE/Config_Handlers/ccd.cpp: + * DAnCE/Config_Handlers/ccd.hpp: + * DAnCE/Config_Handlers/cdp.cpp: + * DAnCE/Config_Handlers/cdp.hpp: + + Made the following changes + + (1) Formatting + (2) Improved const correctness and + (3) Made progress on reading the deployment plan. + Wed Sep 29 15:17:23 2004 Jules White <jules@dre.vanderbilt.edu> - - * DAnCE/Config_Handlers/CCD_Handler.cpp: - * DAnCE/Config_Handlers/CCD_Handler.h: - * DAnCE/Config_Handlers/ADD_Handler.cpp: - * DAnCE/Config_Handlers/ADD_Handler.h: - * DAnCE/Config_Handlers/IDD_Handler.cpp: - * DAnCE/Config_Handlers/IDD_Handler.h: - * DAnCE/Config_Handlers/IRDD_Handler.cpp: - * DAnCE/Config_Handlers/IRDD_Handler.h: - * DAnCE/Config_Handlers/RDD_Handler.cpp: - * DAnCE/Config_Handlers/RDD_Handler.h: - * DAnCE/Config_Handlers/MDD_Handler.cpp: - * DAnCE/Config_Handlers/MDD_Handler.h: - * DAnCE/Config_Handlers/Property_Handler.cpp: - * DAnCE/Config_Handlers/Property_Handler.h: - * DAnCE/Config_Handlers/Req_Handler.cpp: - * DAnCE/Config_Handlers/Req_Handler.h: + + * DAnCE/Config_Handlers/CCD_Handler.cpp: + * DAnCE/Config_Handlers/CCD_Handler.h: + * DAnCE/Config_Handlers/ADD_Handler.cpp: + * DAnCE/Config_Handlers/ADD_Handler.h: + * DAnCE/Config_Handlers/IDD_Handler.cpp: + * DAnCE/Config_Handlers/IDD_Handler.h: + * DAnCE/Config_Handlers/IRDD_Handler.cpp: + * DAnCE/Config_Handlers/IRDD_Handler.h: + * DAnCE/Config_Handlers/RDD_Handler.cpp: + * DAnCE/Config_Handlers/RDD_Handler.h: + * DAnCE/Config_Handlers/MDD_Handler.cpp: + * DAnCE/Config_Handlers/MDD_Handler.h: + * DAnCE/Config_Handlers/Property_Handler.cpp: + * DAnCE/Config_Handlers/Property_Handler.h: + * DAnCE/Config_Handlers/Req_Handler.cpp: + * DAnCE/Config_Handlers/Req_Handler.h: - Re-generated the handlers to improve loop efficiency, account - for schema changes, and use the new IDREF handling. + Re-generated the handlers to improve loop efficiency, account + for schema changes, and use the new IDREF handling. Tue Sep 28 15:26:41 2004 Jules White <jules@dre.vanderbilt.edu> diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Config_Handlers.mpc b/TAO/CIAO/DAnCE/Config_Handlers/Config_Handlers.mpc index ebdfbe39270..8430b561173 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Config_Handlers.mpc +++ b/TAO/CIAO/DAnCE/Config_Handlers/Config_Handlers.mpc @@ -24,6 +24,7 @@ project (XSC_Config_Handlers) : ciao_deployment_stub { CCD_Handler.cpp Property_Handler.cpp ComponentPropertyDescription_Handler.cpp + DP_PCD_Handler.cpp CPD_Handler.cpp DataType_Handler.cpp MDD_Handler.cpp @@ -35,7 +36,6 @@ project (XSC_Config_Handlers) : ciao_deployment_stub { DataType_Handler.cpp MDD_Handler.cpp Req_Handler.cpp - PCD_Handler.cpp CEPE_Handler.cpp PSPE_Handler.cpp ERE_Handler.cpp diff --git a/TAO/CIAO/DAnCE/Config_Handlers/DP_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/DP_Handler.cpp index a1ccca65b1c..e68a6389299 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/DP_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/DP_Handler.cpp @@ -2,6 +2,9 @@ #include "ciao/Deployment_DataC.h" #include "ace/Auto_Ptr.h" #include "CCD_Handler.h" +#include "ADD_Handler.h" +#include "MDD_Handler.h" +#include "IDD_Handler.h" #include "cdp.hpp" ACE_RCSID (Config_Handlers, @@ -35,12 +38,36 @@ namespace CIAO auto_idl_dp (tmp); bool retval = - CCD_Handler::component_interface_descr ((*auto_idl_dp).realizes, - this->dp_.realizes ()); + CCD_Handler::component_interface_descr ( + this->dp_.realizes (), + (*auto_idl_dp).realizes); if (!retval) return retval; + retval = + ADD_Handler::artifact_deployment_descrs ( + this->dp_, + (*auto_idl_dp).artifact); + + if (!retval) + return retval; + + retval = + MDD_Handler::mono_deployment_descriptions ( + this->dp_.implementation (), + (*auto_idl_dp).implementation); + + if (!retval) + return retval; + + retval = + IDD_Handler::instance_deployment_descrs ( + this->dp_, + (*auto_idl_dp).instance); + + if (!retval) + return retval; this->idl_dp_ = auto_idl_dp.release (); diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ERE_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/ERE_Handler.cpp index 682af106120..50593fb37b9 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ERE_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/ERE_Handler.cpp @@ -8,24 +8,37 @@ namespace CIAO { namespace Config_Handlers { - - ERE_Handler::ERE_Handler (void) + bool + ERE_Handler::external_ref_endpoints ( + const PlanConnectionDescription &src, + Deployment::ExternalReferenceEndpoints &dest) { - } + PlanConnectionDescription::externalReference_const_iterator erep_e = + src.end_externalReference (); - ERE_Handler::~ERE_Handler (void) - { + for (PlanConnectionDescription::externalReference_const_iterator erep_b = + src.begin_externalReference (); + erep_b != erep_e; + ++erep_b) + { + CORBA::ULong len = + dest.length (); + dest.length (len + 1); + + ERE_Handler::external_ref_endpoint ((*erep_b), + dest[0]); + } + + return true; } - - ///This method takes a <Deployment::ExternalReferenceEndpoint> - ///and maps the values from the passed in XSC - ///ExternalReferenceEndpoint to its members. - void ERE_Handler::get_ExternalReferenceEndpoint ( - Deployment::ExternalReferenceEndpoint& toconfig, - ExternalReferenceEndpoint& desc) + + void + ERE_Handler::external_ref_endpoint ( + const ExternalReferenceEndpoint &src, + Deployment::ExternalReferenceEndpoint &dest) { - toconfig.location = CORBA::string_dup (desc.location ().c_str ()); + dest.location = + src.location ().c_str (); } - } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ERE_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/ERE_Handler.h index cd83b55adb4..e9f69c2462d 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ERE_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/ERE_Handler.h @@ -12,7 +12,7 @@ #define CIAO_CONFIG_HANDLERS_ERE_HANDLER_H #include /**/ "ace/pre.h" -#include "Config_Handlers_export.h" +#include "Config_Handlers/Config_Handlers_Export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -20,7 +20,8 @@ namespace Deployment { - struct ExternalReferenceEndpoint; + class ExternalReferenceEndpoints; + struct ExternalReferenceEndpoint; } namespace CIAO @@ -28,9 +29,9 @@ namespace CIAO namespace Config_Handlers { - - struct ExternalReferenceEndpoint; - + class PlanConnectionDescription; + class ExternalReferenceEndpoint; + /* * @class ERE_Handler * @@ -41,21 +42,18 @@ namespace CIAO * the descriptor files, to the corresponding CORBA IDL type. * */ - - class Config_Handlers_Export ERE_Handler{ - - public: - - ERE_Handler (void); - virtual ~ERE_Handler (void); - - ///This method takes a <Deployment::ExternalReferenceEndpoint> - ///and maps the values from the passed in XSC - ///ExternalReferenceEndpoint to its members. - void get_ExternalReferenceEndpoint ( - Deployment::ExternalReferenceEndpoint& toconfig, - ExternalReferenceEndpoint& desc); + class Config_Handlers_Export ERE_Handler + { + public: + static bool external_ref_endpoints ( + const PlanConnectionDescription &src, + ::Deployment::ExternalReferenceEndpoints &dest); + + private: + static void external_ref_endpoint ( + const ExternalReferenceEndpoint &src, + Deployment::ExternalReferenceEndpoint &dest); }; } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/IDD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/IDD_Handler.cpp index e3966725d20..869c8bb5f91 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/IDD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/IDD_Handler.cpp @@ -1,77 +1,148 @@ - // $Id$ - #include "IDD_Handler.h" +#include "Prop_Handler.h" +#include "ANY_Handler.h" #include "Basic_Deployment_Data.hpp" #include "ciao/Deployment_DataC.h" -#include "MDD_Handler.h" -#include "Property_Handler.h" -#include "IRDD_Handler.h" - - namespace CIAO { namespace Config_Handlers { - - IDD_Handler::IDD_Handler (void) + bool + IDD_Handler::instance_deployment_descrs ( + const DeploymentPlan &src, + Deployment::InstanceDeploymentDescriptions& dest) { + InstanceDeploymentDescription::instance_const_iterator idd_e = + src.end_instance (); + + for (InstanceDeploymentDescription::instance_const_iterator idd_b = + src.begin_instance (); + idd_b != idd_e; + ++idd_b) + { + CORBA::ULong len = + dest.length (); + dest.length (len + 1); + + bool retval = + IDD_Handler::instance_deployment_descr ((*idd_b), + dest[len]); + + if (!retval) + return false; + } + + return true; } - IDD_Handler::~IDD_Handler (void) + void + IDD_Handler::get_InstanceDeploymentDescription ( + const InstanceDeploymentDescription& src, + Deployment::InstanceDeploymentDescription& dest) { - } + dest.name = + src.name ().c_str (); + dest.node = + src.node ().c_str (); + + // We know there should be only one element + dest.source.length (1); + dest.source [0] = + src.source ().c_str (); + + // @@ MAJO:This is where the MDD should be? Need to look into + // this later. + dest.implementationRef = 0; + + InstanceDeploymentDescription::configProperty_iterator pend = + src.end_configProperty (); + for (ComponentInterfaceDescription::configProperty_iterator pstart = + src.begin_configProperty (); + pstart != pend; + ++pstart) + { + // Need to improve this. This is clearly O(n^2). + CORBA::ULong len = + dest.configProperty.length (); + dest.configProperty.length (len + 1); + + Property_Handler::get_property (*pstart, + dest.configProperty[len]); + } + +#if 0 + // @@ MAJO: Need to handle this in the next round + if (desc.deployedResource_p ()) + { + CORBA::ULong length = toconfig.deployedResource.length (); + toconfig.deployedResource.length (length + 1); + + this->get_InstanceResourceDeploymentDescription + (toconfig.deployedResource[length - 1], + desc.deployedResource ()); + } + + if (desc.deployedSharedResource_p ()) + { + CORBA::ULong length = toconfig.deployedSharedResource.length (); + toconfig.deployedSharedResource.length (length + 1); + + this->get_InstanceResourceDeploymentDescription + (toconfig.deployedResource[length], + desc.deployedResource ()); + } +#endif /*if 0*/ + return true; + // Done! + } + +#if 0 void - IDD_Handler::instance_deployment_descr ( - const InstanceDeploymentDescription& desc, - Deployment::InstanceDeploymentDescription& toconfig) + IDD_Handler::get_InstanceResourceDeploymentDescription ( + Deployment::InstanceResourceDeploymentDescription &toconfig, + InstanceResourceDeploymentDescription &desc) { + // resourceUsage is an enumerated type + switch (desc.resourceUsage ().integral ()) + { + case ResourceUsageKind::None_l: + toconfig.resourceUsage = Deployment::None; + break; + case ResourceUsageKind::InstanceUsesResource_l: + toconfig.resourceUsage = Deployment::InstanceUsesResource; + break; - - toconfig.name= - CORBA::string_dup (desc.name ().c_str ()); - - toconfig.node= - CORBA::string_dup (desc.node ().c_str ()); - - CORBA::ULong source_length = toconfig.source.length (); - toconfig.source.length (source_length + 1); - toconfig.source[source_length - 1]= - CORBA::string_dup (desc.source ().c_str ()); - - Singleton_IDREF_Map::instance ()->find_ref ( - toconfig.implementation, - desc.implementation); - - CORBA::ULong configProperty_length = toconfig.configProperty.length (); - - toconfig.configProperty.length (configProperty_length + 1); - Property_Handler::property ( - desc.configProperty (), - toconfig.configProperty[configProperty_length - 1]); - - CORBA::ULong deployedProperty_length = toconfig.deployedProperty.length (); - - toconfig.deployedProperty.length (deployedProperty_length + 1); - IRDD_Handler::instance_resource_deployment_descr ( - desc.deployedProperty (), - toconfig.deployedProperty[deployedProperty_length - 1]); - - CORBA::ULong deployedSharedProperty_length = toconfig.deployedSharedProperty.length (); - - toconfig.deployedSharedProperty.length (deployedSharedProperty_length + 1); - IRDD_Handler::instance_resource_deployment_descr ( - desc.deployedSharedProperty (), - toconfig.deployedSharedProperty[deployedSharedProperty_length - 1]); - - + case ResourceUsageKind::ResourceUsesInstance_l: + toconfig.resourceUsage = Deployment::ResourceUsesInstance; + break; + + case ResourceUsageKind::PortUsesResource_l: + toconfig.resourceUsage = Deployment::PortUsesResource; + break; + + case ResourceUsageKind::ResourceUsesPort_l: + toconfig.resourceUsage = Deployment::ResourceUsesPort; + break; + } + + // requirementName and resourceName are strings + toconfig.requirementName = + CORBA::string_dup (desc.requirementName ().c_str ()); + toconfig.resourceName = + CORBA::string_dup (desc.resourceName ().c_str ()); + + ANY_Handler::get_Any (toconfig.resourceValue, + desc.resourceValue ()); + + // Done! } +#endif /*if 0*/ } - } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/IDD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/IDD_Handler.h index ca2415f475a..f579f5a9f6a 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/IDD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/IDD_Handler.h @@ -1,5 +1,4 @@ - - //============================================================== +//============================================================== /** * @file IDD_Handler.h * @@ -9,33 +8,30 @@ */ //================================================================ -#ifndef CIAO_CONFIG_HANDLERS_IDD_Handler_H -#define CIAO_CONFIG_HANDLERS_IDD_Handler_H +#ifndef CIAO_CONFIG_HANDLERS_IDD_HANDLER_H +#define CIAO_CONFIG_HANDLERS_IDD_HANDLER_H #include /**/ "ace/pre.h" -#include "Config_Handlers/Config_Handlers_Export.h" -#include "ace/config-lite.h" +#include "Config_Handlers_export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - - namespace Deployment { - class InstanceDeploymentDescription; + struct InstanceDeploymentDescription; + struct InstanceResourceDeploymentDescription; } - namespace CIAO { namespace Config_Handlers { - class InstanceDeploymentDescription; - + struct InstanceDeploymentDescription; + struct InstanceResourceDeploymentDescription; /* * @class IDD_Handler @@ -43,26 +39,25 @@ namespace CIAO * @brief Handler class for <InstanceDeploymentDescription> types. * * This class defines handler methods to map values from - * XSC InstanceDeploymentDescription objects, parsed from the descriptor files, to the - * corresponding CORBA IDL Any type. + * XSC InstanceDeploymentDescriptionn objects, parsed from + * the descriptor files, to the corresponding CORBA IDL type. * */ - - class Config_Handlers_Export IDD_Handler { - - public: - - IDD_Handler (void); - virtual ~IDD_Handler (void); - - static void instance_deployment_descr ( - const InstanceDeploymentDescription& desc, - Deployment::InstanceDeploymentDescription& toconfig); + class Config_Handlers_Export IDD_Handler + { + public: + static bool instance_deployment_descrs ( + const DeploymentPlan &src, + Deployment::InstanceDeploymentDescriptions& dest); + + private: + static bool instance_deployment_descr ( + const InstanceDeploymentDescription &src, + Deployment::InstanceDeploymentDescription& dest); }; } } -#include /**/ "ace/post.h" -#endif /* CIAO_CONFIG_HANDLERS_IDD_Handler_H */ - +#include /**/ "ace/post.h" +#endif /* CIAO_CONFIG_HANDLERS_IDD_HANDLER_H*/ diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ID_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/ID_Handler.cpp index 3fb5f7fc06d..8e09f935c03 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ID_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/ID_Handler.cpp @@ -23,9 +23,9 @@ namespace CIAO void - ID_Handler::implementation_dependency ( - const ImplementationDependency& desc, - Deployment::ImplementationDependency& toconfig) + ID_Handler::get_ImplementationDependency ( + Deployment::ImplementationDependency& toconfig, + ImplementationDependency& desc) { diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ID_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/ID_Handler.h index 53da62d1de2..8694fa232ac 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ID_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/ID_Handler.h @@ -1,5 +1,5 @@ - //============================================================== +//============================================================== /** * @file ID_Handler.h * @@ -13,7 +13,7 @@ #define CIAO_CONFIG_HANDLERS_ID_Handler_H #include /**/ "ace/pre.h" -#include "Config_Handlers/Config_Handlers_Export.h" +#include "Config_Handlers_export.h" #include "ace/config-lite.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) @@ -47,22 +47,21 @@ namespace CIAO * corresponding CORBA IDL Any type. * */ - + class Config_Handlers_Export ID_Handler { - + public: ID_Handler (void); virtual ~ID_Handler (void); - static void implementation_dependency ( - const ImplementationDependency& desc, - Deployment::ImplementationDependency& toconfig); + void get_ImplementationDependency ( + Deployment::ImplementationDependency& toconfig, + ImplementationDependency& desc); }; } } -#include /**/ "ace/post.h" +#include /**/ "ace/post.h" #endif /* CIAO_CONFIG_HANDLERS_ID_Handler_H */ - diff --git a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp index 63bac6b6f5c..2096636d850 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp @@ -1,137 +1,113 @@ - // $Id$ - - #include "MDD_Handler.h" #include "Basic_Deployment_Data.hpp" #include "ciao/Deployment_DataC.h" -#include "Singleton_IDREF_Map.h" #include "ADD_Handler.h" #include "Property_Handler.h" #include "Req_Handler.h" - - +#include "Singleton_IDREF_Map.h" namespace CIAO { namespace Config_Handlers { - - MDD_Handler::MDD_Handler (void) + bool + MDD_Handler::mono_deployment_descriptions ( + const MonolithicDeploymentDescription& src, + Deployment::MonolithicDeploymentDescriptions& dest) { + // We know there should be only one.. + dest.length (1); + + return MDD_Handler::mono_deployment_description (src, + dest[0]); } - MDD_Handler::~MDD_Handler (void) + bool + MDD_Handler::mono_deployment_description ( + const MonolithicDeploymentDescription& desc, + Deployment::MonolithicDeploymentDescription& toconfig) { - } + toconfig.name = + CORBA::string_dup (desc.name ().c_str ()); + MonolithicDeploymentDescription::source_const_iterator me = + desc.end_source (); - void - MDD_Handler::monolithic_deployment_descr ( - const MonolithicDeploymentDescription& desc, - Deployment::MonolithicDeploymentDescription& toconfig) - { + for (MonolithicDeploymentDescription::source_const_iterator se = + desc.begin_source (); + se != me; + ++se) + { + CORBA::ULong len = + toconfig.source.length (); + toconfig.source.length (len + 1); - - toconfig.name= - CORBA::string_dup (desc.name ().c_str ()); - - MonolithicDeploymentDescription::source_const_iterator source_end = - desc.end_source (); - MonolithicDeploymentDescription::source_const_iterator source_beg = - desc.begin_source (); - - CORBA::ULong source_length = toconfig.source.length (); - size_t source_delta = source_end - source_beg; - source_length += source_delta; - - toconfig.source.length (source_length); - size_t source_count = 0; - - for (MonolithicDeploymentDescription::source_const_iterator - item (desc.begin_source ()); - item != source_end; - ++item) - { - toconfig.source[source_length - (source_delta - source_count)] = - CORBA::string_dup (item->c_str ()); - ++source_count; + toconfig.source[len] = + CORBA::string_dup ((*se).c_str ()); } - - MonolithicDeploymentDescription::artifact_const_iterator artifact_end = + + MonolithicDeploymentDescription::artifact_const_iterator ae = desc.end_artifact (); - MonolithicDeploymentDescription::artifact_const_iterator artifact_beg = - desc.begin_artifact (); - - CORBA::ULong artifact_length = toconfig.artifactRef.length (); - size_t artifact_delta = artifact_end - artifact_beg; - artifact_length += artifact_delta; - - toconfig.artifactRef.length (artifact_length); - size_t artifact_count = 0; - IDREF_Map* artifact_instance = Singleton_IDREF_Map::instance (); - - + for (MonolithicDeploymentDescription::artifact_const_iterator - item (desc.begin_artifact ()); - item != artifact_end; - ++item) + ab = desc.begin_artifact (); + ae != ab; + ++ab) { - ACE_TString artifact_id (item->id ().c_str ()); - artifact_instance->find_ref ( - artifact_id, - toconfig.artifactRef[artifact_length - (artifact_delta - artifact_count)]); - ++artifact_count; + CORBA::ULong tmp = 0; + + bool r = + Singleton_IDREF_Map::instance ()->find_ref ( + ab->id ().c_str (), + tmp); + + if (!r) + { + // @@MAJO: What should we do if find_ref fails? + return false; + } + + CORBA::ULong len = + toconfig.artifactRef.length (); + + toconfig.artifactRef.length (len + 1); + + toconfig.artifactRef[len] = tmp; } - - MonolithicDeploymentDescription::execParameter_const_iterator execParameter_end = + + MonolithicDeploymentDescription::execParameter_const_iterator epce = desc.end_execParameter (); - MonolithicDeploymentDescription::execParameter_const_iterator execParameter_beg = - desc.begin_execParameter (); - - CORBA::ULong execParameter_length = toconfig.execParameter.length (); - size_t execParameter_delta = execParameter_end - execParameter_beg; - execParameter_length += execParameter_delta; - - toconfig.execParameter.length (execParameter_length); - size_t execParameter_count = 0; - - for (MonolithicDeploymentDescription::execParameter_const_iterator - item (execParameter_beg); - item != execParameter_end; - ++item) - { - Property_Handler::property ( - *item, - toconfig.execParameter[execParameter_length - (execParameter_delta - execParameter_count)]); - ++execParameter_count; + + for (MonolithicDeploymentDescription::execParameter_const_iterator epcb = + desc.begin_execParameter (); + epcb != epce; + ++epcb) + { + CORBA::ULong len = + toconfig.execParameter.length (); + + toconfig.execParameter.length (len + 1); + + Property_Handler::get_property ((*epcb), + toconfig.execParameter[len]); } - - MonolithicDeploymentDescription::deployRequirement_const_iterator deployRequirement_end = - desc.end_deployRequirement (); - MonolithicDeploymentDescription::deployRequirement_const_iterator deployRequirement_beg = - desc.begin_deployRequirement (); - - CORBA::ULong deployRequirement_length = toconfig.deployRequirement.length (); - size_t deployRequirement_delta = deployRequirement_end - deployRequirement_beg; - deployRequirement_length += deployRequirement_delta; - - toconfig.deployRequirement.length (deployRequirement_length); - size_t deployRequirement_count = 0; - - for (MonolithicDeploymentDescription::deployRequirement_const_iterator - item (deployRequirement_beg); - item != deployRequirement_end; - ++item) - { - Req_Handler::requirement ( - *item, - toconfig.deployRequirement[deployRequirement_length - (deployRequirement_delta - deployRequirement_count)]); - ++deployRequirement_count; + +#if 0 + // @@ MAJO: Don't know how to handle this + 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 ()); } +#endif /*if 0*/ - + return true; } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h index a631a54ee3a..ca8564e0e6b 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h @@ -1,5 +1,4 @@ - - //============================================================== +//============================================================== /** * @file MDD_Handler.h * @@ -13,18 +12,17 @@ #define CIAO_CONFIG_HANDLERS_MDD_Handler_H #include /**/ "ace/pre.h" -#include "Config_Handlers/Config_Handlers_Export.h" -#include "ace/config-lite.h" +#include "Config_Handlers_Export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - namespace Deployment { class MonolithicDeploymentDescription; + class MonolithicDeploymentDescriptions; } @@ -33,36 +31,33 @@ 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 Any type. - * - */ - - class Config_Handlers_Export MDD_Handler { - - public: - - MDD_Handler (void); - virtual ~MDD_Handler (void); - - static void monolithic_deployment_descr ( - const MonolithicDeploymentDescription& desc, - Deployment::MonolithicDeploymentDescription& toconfig); - + 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 types. + * + */ + + class Config_Handlers_Export MDD_Handler + { + public: + static bool mono_deployment_descriptions ( + const MonolithicDeploymentDescription& src, + Deployment::MonolithicDeploymentDescriptions &dest); + + private: + static bool mono_deployment_description ( + const MonolithicDeploymentDescription& desc, + Deployment::MonolithicDeploymentDescription& toconfig); }; } } -#include /**/ "ace/post.h" +#include /**/ "ace/post.h" #endif /* CIAO_CONFIG_HANDLERS_MDD_Handler_H */ - diff --git a/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.cpp index 9ce53d4c0bf..c2409351571 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.cpp @@ -8,34 +8,46 @@ namespace CIAO { namespace Config_Handlers { - - PSPE_Handler::PSPE_Handler (void) + bool + PSPE_Handler::sub_component_port_endpoints ( + const PlanConnectionDescription &src, + ::Deployment::PlanSubcomponentPortEndpoints &dest) { - } + PlanConnectionDescription::internalEndpoint_const_iterator iei_e = + src.end_internalEndpoint (); + for (PlanConnectionDescription::internalEndpoint_const_iterator iei_b = + src.begin_internalEndpoint (); + iei_b != iei_e; + ++iei_b) + { + CORBA::ULong len = + dest.length (); - PSPE_Handler::~PSPE_Handler (void) - { + dest.length (len + 1); + + (void) PSPE_Handler::sub_component_port_endpoint ( + (*iei_b), + dest[len]); + } + return true; } - - ///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) + + void + PSPE_Handler::sub_component_port_endpoint ( + const PlanSubcomponentPortEndpoint &src, + ::Deployment::PlanSubcomponentPortEndpoint &dest) { - toconfig.portName = CORBA::string_dup (desc.portName ().c_str ()); - - if (desc.provider_p ()) + dest.portName = + src.portName ().c_str (); + + if (src.provider_p ()) { - toconfig.provider = !(desc.provider ().empty ()); + dest.provider = !(src.provider ().empty ()); } else { - toconfig.provider = 0; - } - + dest.provider = 0; + } } - } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.h index d8d43495cf8..96f8ba9fe69 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/PSPE_Handler.h @@ -12,7 +12,7 @@ #define CIAO_CONFIG_HANDLERS_PSPE_HANDLER_H #include /**/ "ace/pre.h" -#include "Config_Handlers_export.h" +#include "Config_Handlers/Config_Handlers_Export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -20,7 +20,8 @@ namespace Deployment { - struct PlanSubcomponentPortEndpoint; + class PlanSubcomponentPortEndpoints; + struct PlanSubcomponentPortEndpoint; } namespace CIAO @@ -28,34 +29,30 @@ namespace CIAO namespace Config_Handlers { - - struct PlanSubcomponentPortEndpoint; - - /* - * @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); - + class PlanConnectionDescription; + class PlanSubcomponentPortEndpoint; + + /* + * @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: + static bool sub_component_port_endpoints ( + const PlanConnectionDescription &src, + ::Deployment::PlanSubcomponentPortEndpoints &dest); + + private: + static void sub_component_port_endpoint ( + const PlanSubcomponentPortEndpoint &src, + ::Deployment::PlanSubcomponentPortEndpoint &dest); }; } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Property_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/Property_Handler.cpp index 9666b7b81c5..60dacce16ed 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Property_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/Property_Handler.cpp @@ -1,13 +1,9 @@ - -// $Id$ - +//$Id$ #include "Property_Handler.h" +#include "Any_Handler.h" #include "Basic_Deployment_Data.hpp" #include "ciao/Deployment_DataC.h" -#include "Any_Handler.h" - - namespace CIAO { @@ -22,25 +18,17 @@ namespace CIAO { } - void - Property_Handler::property ( - const Property& desc, - Deployment::Property& toconfig) + Property_Handler::get_property ( + const Property& desc, + Deployment::Property& toconfig) { + toconfig.name = + CORBA::string_dup (desc.name ().c_str ()); + Any_Handler::extract_into_any (desc.value (), + toconfig.value); - - toconfig.name= - CORBA::string_dup (desc.name ().c_str ()); - - Any_Handler::extract_into_any ( - desc.value (), - toconfig.value); - - } - } - } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Property_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/Property_Handler.h index af5684085da..253f62b6cbd 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Property_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/Property_Handler.h @@ -1,68 +1,61 @@ - - //============================================================== +//================================================ /** - * @file Property_Handler.h + * @file Prop_Handler.h * * $Id$ * * @author Jules White <jules@dre.vanderbilt.edu> */ -//================================================================ +//================================================ + +#ifndef CIAO_CONFIG_HANDLERS_PROPERTY_HANDLER_H +#define CIAO_CONFIG_HANDLERS_PROPERTY_HANDLER_H -#ifndef CIAO_CONFIG_HANDLERS_Property_Handler_H -#define CIAO_CONFIG_HANDLERS_Property_Handler_H #include /**/ "ace/pre.h" #include "Config_Handlers/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 Property; } - namespace CIAO { - namespace Config_Handlers { - - class Property; - - - /* - * @class Property_Handler - * - * @brief Handler class for <Property> types. - * - * This class defines handler methods to map values from - * XSC Property objects, parsed from the descriptor files, to the - * corresponding CORBA IDL Any type. - * - */ - - class Config_Handlers_Export Property_Handler { - - public: - - Property_Handler (void); - virtual ~Property_Handler (void); - - static void property ( - const Property& desc, - Deployment::Property& toconfig); - - }; - } + class Property; + + /* + * @class Property_Handler + * + * @brief Handler class for <CCMComponentPortDescription> types. + * + * This class defines handler methods to map values from + * XSC objects, parsed from the descriptor files, to the + * corresponding CORBA IDL type for the schema element. + * + */ + + class Config_Handlers_Export Property_Handler + { + public: + Property_Handler (void); + virtual ~Property_Handler (void); + + /// This method maps the values from the XSC object + /// <CIAO::Config_Handlers::Property> to the CORBA IDL type + /// <Deployment::Property>. + static void get_property (const Property& desc, + ::Deployment::Property& toconfig); + }; + + } } -#include /**/ "ace/post.h" -#endif /* CIAO_CONFIG_HANDLERS_Property_Handler_H */ - +#include /**/ "ace/post.h" +#endif /* CIAO_CONFIG_HANDLERS_PROPERTY_HANDLER_H*/ diff --git a/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.cpp index a8dbfc766a3..e6b2b03b596 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.cpp @@ -1,47 +1,27 @@ - // $Id$ - - #include "RDD_Handler.h" #include "Basic_Deployment_Data.hpp" #include "ciao/Deployment_DataC.h" #include "Any_Handler.h" - - namespace CIAO { namespace Config_Handlers { - - RDD_Handler::RDD_Handler (void) - { - } - - RDD_Handler::~RDD_Handler (void) - { - } - - void RDD_Handler::resource_deployment_descr ( - const ResourceDeploymentDescription& desc, - Deployment::ResourceDeploymentDescription& toconfig) + const ResourceDeploymentDescription &src, + ::Deployment::ResourceDeploymentDescription &dest) { + dest.requirementName = + src.requirementName ().c_str (); + dest.resourceName= + src.resourceName ().c_str (); - - toconfig.requirementName= - CORBA::string_dup (desc.requirementName ().c_str ()); - - toconfig.resourceName= - CORBA::string_dup (desc.resourceName ().c_str ()); - - Any_Handler::extract_into_any ( - desc.resourceValue (), - toconfig.resourceValue); + Any_Handler::extract_into_any (src.resourceValue (), + dest.resourceValue); - } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.h index ef4af0ab322..c87056371da 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.h @@ -13,8 +13,7 @@ #define CIAO_CONFIG_HANDLERS_RDD_Handler_H #include /**/ "ace/pre.h" -#include "Config_Handlers/Config_Handlers_Export.h" -#include "ace/config-lite.h" +#include "Config_Handlers_export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -33,36 +32,29 @@ namespace CIAO namespace Config_Handlers { + class ResourceDeploymentDescription; - class ResourceDeploymentDescription; - - - /* + /* * @class RDD_Handler * * @brief Handler class for <ResourceDeploymentDescription> types. * - * This class defines handler methods to map values from - * XSC ResourceDeploymentDescription objects, parsed from the descriptor files, to the - * corresponding CORBA IDL Any type. + * This class defines handler methods to map values from XSC + * ResourceDeploymentDescription objects, parsed from the + * descriptor files, to the corresponding CORBA IDL Any type. * */ - - class Config_Handlers_Export RDD_Handler { - - public: - RDD_Handler (void); - virtual ~RDD_Handler (void); - - static void resource_deployment_descr ( - const ResourceDeploymentDescription& desc, - Deployment::ResourceDeploymentDescription& toconfig); + class Config_Handlers_Export RDD_Handler + { + public: + static void resource_deployment_descr ( + const ResourceDeploymentDescription& desc, + ::Deployment::ResourceDeploymentDescription& toconfig); }; } } -#include /**/ "ace/post.h" +#include /**/ "ace/post.h" #endif /* CIAO_CONFIG_HANDLERS_RDD_Handler_H */ - diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp index 23a427649c8..56dbb7e1eab 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp @@ -1,12 +1,8 @@ - // $Id$ - #include "Req_Handler.h" -#include "Basic_Deployment_Data.hpp" -#include "ciao/Deployment_DataC.h" - - +#include "Property_Handler.h" +#include "ciao/DeploymentC.h" namespace CIAO { @@ -21,24 +17,28 @@ namespace CIAO { } - void - Req_Handler::requirement ( - const Requirement& desc, - Deployment::Requirement& toconfig) + Req_Handler::get_Requirement ( + Deployment::Requirement& toconfig, + Requirement& desc) { - - - - toconfig.name= - CORBA::string_dup (desc.name ().c_str ()); - - toconfig.resourceType= - CORBA::string_dup (desc.resourceType ().c_str ()); - - + //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 Req's property into the next + //position in the IDL Req's sequence. +#if 0 + /// @@ MAJO: + Property_Handler prophandler; + toconfig.property.length (toconfig.property.length () + 1); + Property_Handler::get_property ( + toconfig.property[toconfig.property.length () - 1], + desc.property ()); +#endif /*if 0*/ } } - } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h index 3322344147c..c3a22cc6dc7 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.h @@ -1,7 +1,6 @@ - - //============================================================== +//============================================================== /** - * @file Req_Handler.h + * @file REQ_Handler.h * * $Id$ * @@ -9,60 +8,55 @@ */ //================================================================ -#ifndef CIAO_CONFIG_HANDLERS_Req_Handler_H -#define CIAO_CONFIG_HANDLERS_Req_Handler_H +#ifndef CIAO_CONFIG_HANDLERS_REQ_HANDLER_H +#define CIAO_CONFIG_HANDLERS_REQ_HANDLER_H #include /**/ "ace/pre.h" -#include "Config_Handlers/Config_Handlers_Export.h" -#include "ace/config-lite.h" +#include "Basic_Deployment_Data.hpp" +#include "Config_Handlers_export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - - namespace Deployment { - class Requirement; + struct Requirement; } - namespace CIAO { namespace Config_Handlers { - - class Requirement; - - /* - * @class Req_Handler + * @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 Any type. + * XSC Requirement objects, parsed from + * the descriptor files, to the corresponding CORBA IDL type. * */ - class Config_Handlers_Export Req_Handler { + class Config_Handlers_Export Req_Handler{ public: - + Req_Handler (void); virtual ~Req_Handler (void); - - static void requirement ( - const Requirement& desc, - Deployment::Requirement& toconfig); + + ///This method takes a <Deployment::Requirement> + ///and maps the values from the passed in XSC + ///Requirement to its members. + void get_Requirement ( + Deployment::Requirement& toconfig, + Requirement& desc); }; } } -#include /**/ "ace/post.h" -#endif /* CIAO_CONFIG_HANDLERS_Req_Handler_H */ - +#include /**/ "ace/post.h" +#endif /* CIAO_CONFIG_HANDLERS_REQ_HANDLER_H*/ diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ccd.hpp b/TAO/CIAO/DAnCE/Config_Handlers/ccd.hpp index bb9f3a60d5f..46339e47d8d 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ccd.hpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/ccd.hpp @@ -1,4 +1,4 @@ -//$Id$ +// $Id$ #ifndef CCD_HPP #define CCD_HPP diff --git a/TAO/CIAO/DAnCE/Config_Handlers/cdp.cpp b/TAO/CIAO/DAnCE/Config_Handlers/cdp.cpp index 113c1edc886..02146e0af7b 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/cdp.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/cdp.cpp @@ -6,7 +6,7 @@ namespace CIAO namespace Config_Handlers { // DeploymentPlan - // + // DeploymentPlan:: DeploymentPlan (::CIAO::Config_Handlers::ComponentInterfaceDescription const& realizes__, @@ -127,7 +127,7 @@ namespace CIAO // DeploymentPlan - // + // bool DeploymentPlan:: label_p () const { @@ -162,7 +162,7 @@ namespace CIAO } // DeploymentPlan - // + // bool DeploymentPlan:: UUID_p () const { @@ -197,7 +197,7 @@ namespace CIAO } // DeploymentPlan - // + // ::CIAO::Config_Handlers::ComponentInterfaceDescription const& DeploymentPlan:: realizes () const { @@ -217,7 +217,7 @@ namespace CIAO } // DeploymentPlan - // + // ::CIAO::Config_Handlers::MonolithicDeploymentDescription const& DeploymentPlan:: implementation () const { @@ -237,7 +237,7 @@ namespace CIAO } // DeploymentPlan - // + // DeploymentPlan::instance_iterator DeploymentPlan:: begin_instance () { @@ -288,7 +288,7 @@ namespace CIAO } // DeploymentPlan - // + // DeploymentPlan::connection_iterator DeploymentPlan:: begin_connection () { @@ -339,7 +339,7 @@ namespace CIAO } // DeploymentPlan - // + // DeploymentPlan::dependsOn_iterator DeploymentPlan:: begin_dependsOn () { @@ -390,7 +390,7 @@ namespace CIAO } // DeploymentPlan - // + // DeploymentPlan::artifact_iterator DeploymentPlan:: begin_artifact () { @@ -441,7 +441,7 @@ namespace CIAO } // DeploymentPlan - // + // DeploymentPlan::infoProperty_iterator DeploymentPlan:: begin_infoProperty () { @@ -566,7 +566,7 @@ namespace CIAO add_infoProperty (t); } - else + else { } } @@ -580,4 +580,3 @@ namespace CIAO { } } - diff --git a/TAO/CIAO/DAnCE/Config_Handlers/cdp.hpp b/TAO/CIAO/DAnCE/Config_Handlers/cdp.hpp index a0544fdd059..f61735d422f 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/cdp.hpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/cdp.hpp @@ -29,7 +29,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // label - // + // public: bool label_p () const; ::XMLSchema::string< char > const& label () const; @@ -40,7 +40,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > label_; // UUID - // + // public: bool UUID_p () const; ::XMLSchema::string< char > const& UUID () const; @@ -51,7 +51,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > UUID_; // realizes - // + // public: ::CIAO::Config_Handlers::ComponentInterfaceDescription const& realizes () const; ::CIAO::Config_Handlers::ComponentInterfaceDescription& realizes (); @@ -61,7 +61,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::ComponentInterfaceDescription > realizes_; // implementation - // + // public: ::CIAO::Config_Handlers::MonolithicDeploymentDescription const& implementation () const; ::CIAO::Config_Handlers::MonolithicDeploymentDescription& implementation (); @@ -71,7 +71,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::MonolithicDeploymentDescription > implementation_; // instance - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::InstanceDeploymentDescription >::iterator instance_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::InstanceDeploymentDescription >::const_iterator instance_const_iterator; @@ -85,7 +85,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::InstanceDeploymentDescription > instance_; // connection - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::PlanConnectionDescription >::iterator connection_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::PlanConnectionDescription >::const_iterator connection_const_iterator; @@ -99,7 +99,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::PlanConnectionDescription > connection_; // dependsOn - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::ImplementationDependency >::iterator dependsOn_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::ImplementationDependency >::const_iterator dependsOn_const_iterator; @@ -113,7 +113,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::ImplementationDependency > dependsOn_; // artifact - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::ArtifactDeploymentDescription >::iterator artifact_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::ArtifactDeploymentDescription >::const_iterator artifact_const_iterator; @@ -127,7 +127,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::ArtifactDeploymentDescription > artifact_; // infoProperty - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::Property >::iterator infoProperty_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::Property >::const_iterator infoProperty_const_iterator; |