diff options
author | bala <balanatarajan@users.noreply.github.com> | 2004-09-28 14:48:42 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2004-09-28 14:48:42 +0000 |
commit | 37de2255dfb5b55a4e3595f8dd4caa34902d8aa0 (patch) | |
tree | 24792facb98c866d9095f3a68ed28852fc61008c | |
parent | da3ebb0a453d8463e797e54ae2a0531c4aac4158 (diff) | |
download | ATCD-37de2255dfb5b55a4e3595f8dd4caa34902d8aa0.tar.gz |
ChangeLogTag:Tue Sep 28 14:43:48 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
23 files changed, 1381 insertions, 971 deletions
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp index 8ad8b92c971..7eacaf1913c 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.cpp @@ -2,7 +2,7 @@ #include "ADD_Handler.h" #include "Basic_Deployment_Data.hpp" #include "ciao/Deployment_DataC.h" -#include "Prop_Handler.h" +#include "Property_Handler.h" #include "Req_Handler.h" #include "RDD_Handler.h" @@ -14,77 +14,95 @@ namespace CIAO { namespace Config_Handlers { - - ADD_Handler::ADD_Handler (void) + void + ADD_Handler::artifact_deployment_descr ( + const ArtifactDeploymentDescription &src, + Deployment::ArtifactDeploymentDescription &dest) { - } + dest.name = + CORBA::string_dup (src.name ().c_str ()); - ADD_Handler::~ADD_Handler (void) - { - } + dest.node = + CORBA::string_dup (src.node ().c_str ()); + ArtifactDeploymentDescription::location_const_iterator end = + src.end_location (); - void - ADD_Handler::get_ArtifactDeploymentDescription ( - Deployment::ArtifactDeploymentDescription& add, - ArtifactDeploymentDescription& desc) - { - add.name= - CORBA::string_dup (desc.name ().c_str ()); + for (ArtifactDeploymentDescription::location_const_iterator + start = src.begin_location (); + start != end; + ++start) + { + CORBA::ULong l = + dest.location.length (); - add.source.length (add.source.length () + 1); + dest.location.length (l + 1); - add.source[add.source.length () - 1]= - CORBA::string_dup (desc.source ().c_str ()); + dest.location[l] = start->c_str (); + } - if (desc.node_p ()) - { - add.node= - CORBA::string_dup (desc.node ().c_str ()); - } + ArtifactDeploymentDescription::source_const_iterator sce = + src.end_source (); - for (ArtifactDeploymentDescription::location_iterator - item (desc.begin_location ()); - item != desc.end_location (); - ++item) + for (ArtifactDeploymentDescription::source_const_iterator + scb = src.begin_source (); + scb != sce; + ++scb) { - add.location.length ( - add.location.length () + 1); - add.location[add.location.length () - 1] = - CORBA::string_dup (item->c_str ()); + CORBA::ULong l = + dest.location.length (); + + dest.location.length (l + 1); + + dest.location[l] = scb->c_str (); } - if (desc.execParameter_p ()) + // @@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) { - Prop_Handler handler; + CORBA::ULong len = + dest.execParameter.length (); - add.execParameter.length ( - add.execParameter.length () + 1); + dest.execParameter.length (len + 1); + + Property_Handler::get_property ((*adcb), + dest.execParameter[len]); + } + +#if 0 + // @@ MAJO: Don't know how to handle this. + if (src.id_p ()) + { - handler.get_Property ( - add.execParameter[add.execParameter.length () - 1], - desc.execParameter ()); } - if (desc.deployRequirement_p ()) + // @@ 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], - desc.deployRequirement ()); + src.deployRequirement ()); } - if (desc.deployedResource_p ()) + if (src.deployedResource_p ()) { RDD_Handler handler; add.deployedResource.length ( add.deployedResource.length () + 1); handler.get_ResourceDeploymentDescription ( add.deployedResource[add.deployedResource.length () - 1], - desc.deployedResource ()); + src.deployedResource ()); } +#endif /* if 0*/ } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h index 0fc73221e96..0467f86cc93 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/ADD_Handler.h @@ -12,9 +12,7 @@ #define CIAO_CONFIG_HANDLERS_ADD_Handler_H #include /**/ "ace/pre.h" - #include "Config_Handlers_Export.h" -#include "ace/config-lite.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -45,16 +43,12 @@ namespace CIAO * // @@ Jules, why Any type? * descriptor files, to the corresponding CORBA IDL Any type. */ - class Config_Handlers_Export ADD_Handler + class Config_Handlers_Export ADD_Handler { public: - ADD_Handler (void); - virtual ~ADD_Handler (void); - - void get_ArtifactDeploymentDescription ( - Deployment::ArtifactDeploymentDescription& toconfig, - ArtifactDeploymentDescription& desc); - + static void artifact_deployment_descr ( + const ArtifactDeploymentDescription& desc, + ::Deployment::ArtifactDeploymentDescription &dest); }; } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Any_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/Any_Handler.cpp index 807f9c69962..76aa5fdb4c4 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Any_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/Any_Handler.cpp @@ -1,6 +1,7 @@ // $Id$ #include "Any_Handler.h" +#include "Basic_Deployment_Data.hpp" #include "tao/Any.h" namespace CIAO @@ -28,21 +29,18 @@ namespace CIAO if (value.short_p ()) { - CORBA::Short val = value.short_ (); - - toconfig <<= val; + toconfig <<= + static_cast<CORBA::Short> (value.short_ ()); } else if (value.ushort_p ()) { - CORBA::UShort val = value.ushort (); - - toconfig <<= val; + toconfig <<= + static_cast<CORBA::UShort> (value.ushort ()); } else if (value.long_p ()) { - CORBA::Long val = value.long_ (); - - toconfig <<= val; + toconfig <<= + static_cast <CORBA::Long> (value.long_ ()); } else if (value.ulong_p ()) { diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.cpp b/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.cpp index b67541c0615..bf7c71bf978 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,35 +1576,37 @@ namespace CIAO // ArtifactDeploymentDescription - // + // ArtifactDeploymentDescription:: ArtifactDeploymentDescription (::XMLSchema::string< char > const& name__, - ::XMLSchema::string< char > const& source__) + ::XMLSchema::string< char > const& node__) : name_ (new ::XMLSchema::string< char > (name__)), - source_ (new ::XMLSchema::string< char > (source__)), + node_ (new ::XMLSchema::string< char > (node__)), regulator__ () { name_->container (this); - source_->container (this); + node_->container (this); } ArtifactDeploymentDescription:: ArtifactDeploymentDescription (::CIAO::Config_Handlers::ArtifactDeploymentDescription const& s) : name_ (new ::XMLSchema::string< char > (*s.name_)), - source_ (new ::XMLSchema::string< char > (*s.source_)), - node_ (s.node_.get () ? new ::XMLSchema::string< char > (*s.node_) : 0), - execParameter_ (s.execParameter_.get () ? new ::CIAO::Config_Handlers::Property (*s.execParameter_) : 0), - deployRequirement_ (s.deployRequirement_.get () ? new ::CIAO::Config_Handlers::Requirement (*s.deployRequirement_) : 0), - deployedResource_ (s.deployedResource_.get () ? new ::CIAO::Config_Handlers::ResourceDeploymentDescription (*s.deployedResource_) : 0), + node_ (new ::XMLSchema::string< char > (*s.node_)), id_ (s.id_.get () ? new ::XMLSchema::ID< char > (*s.id_) : 0), regulator__ () { name_->container (this); - source_->container (this); - if (node_.get ()) node_->container (this); + source_.reserve (s.source_.size ()); + { + for (source_const_iterator i (s.source_.begin ()); + i != s.source_.end (); + ++i) add_source (*i); + } + + node_->container (this); location_.reserve (s.location_.size ()); { for (location_const_iterator i (s.location_.begin ()); @@ -1612,9 +1614,27 @@ namespace CIAO ++i) add_location (*i); } - if (execParameter_.get ()) execParameter_->container (this); - if (deployRequirement_.get ()) deployRequirement_->container (this); - if (deployedResource_.get ()) deployedResource_->container (this); + execParameter_.reserve (s.execParameter_.size ()); + { + for (execParameter_const_iterator i (s.execParameter_.begin ()); + i != s.execParameter_.end (); + ++i) add_execParameter (*i); + } + + deployRequirement_.reserve (s.deployRequirement_.size ()); + { + for (deployRequirement_const_iterator i (s.deployRequirement_.begin ()); + i != s.deployRequirement_.end (); + ++i) add_deployRequirement (*i); + } + + deployedResource_.reserve (s.deployedResource_.size ()); + { + for (deployedResource_const_iterator i (s.deployedResource_.begin ()); + i != s.deployedResource_.end (); + ++i) add_deployedResource (*i); + } + if (id_.get ()) id_->container (this); } @@ -1623,10 +1643,15 @@ namespace CIAO { name (s.name ()); - source (s.source ()); + source_.clear (); + source_.reserve (s.source_.size ()); + { + for (source_const_iterator i (s.source_.begin ()); + i != s.source_.end (); + ++i) add_source (*i); + } - if (s.node_.get ()) node (*(s.node_)); - else node_ = ::std::auto_ptr< ::XMLSchema::string< char > > (0); + node (s.node ()); location_.clear (); location_.reserve (s.location_.size ()); @@ -1636,14 +1661,29 @@ namespace CIAO ++i) add_location (*i); } - if (s.execParameter_.get ()) execParameter (*(s.execParameter_)); - else execParameter_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Property > (0); + execParameter_.clear (); + execParameter_.reserve (s.execParameter_.size ()); + { + for (execParameter_const_iterator i (s.execParameter_.begin ()); + i != s.execParameter_.end (); + ++i) add_execParameter (*i); + } - 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); + } - if (s.deployedResource_.get ()) deployedResource (*(s.deployedResource_)); - else deployedResource_ = ::std::auto_ptr< ::CIAO::Config_Handlers::ResourceDeploymentDescription > (0); + deployedResource_.clear (); + deployedResource_.reserve (s.deployedResource_.size ()); + { + for (deployedResource_const_iterator i (s.deployedResource_.begin ()); + i != s.deployedResource_.end (); + ++i) add_deployedResource (*i); + } if (s.id_.get ()) id (*(s.id_)); else id_ = ::std::auto_ptr< ::XMLSchema::ID< char > > (0); @@ -1653,7 +1693,7 @@ namespace CIAO // ArtifactDeploymentDescription - // + // ::XMLSchema::string< char > const& ArtifactDeploymentDescription:: name () const { @@ -1673,33 +1713,58 @@ namespace CIAO } // ArtifactDeploymentDescription - // - ::XMLSchema::string< char > const& ArtifactDeploymentDescription:: - source () const + // + ArtifactDeploymentDescription::source_iterator ArtifactDeploymentDescription:: + begin_source () { - return *source_; + return source_.begin (); } - ::XMLSchema::string< char >& ArtifactDeploymentDescription:: - source () + ArtifactDeploymentDescription::source_iterator ArtifactDeploymentDescription:: + end_source () { - return *source_; + return source_.end (); } - void ArtifactDeploymentDescription:: - source (::XMLSchema::string< char > const& e) + ArtifactDeploymentDescription::source_const_iterator ArtifactDeploymentDescription:: + begin_source () const { - *source_ = e; + return source_.begin (); } - // ArtifactDeploymentDescription - // - bool ArtifactDeploymentDescription:: - node_p () const + ArtifactDeploymentDescription::source_const_iterator ArtifactDeploymentDescription:: + end_source () const { - return node_.get () != 0; + return source_.end (); } + void ArtifactDeploymentDescription:: + add_source (::XMLSchema::string< char > const& e) + { + if (source_.capacity () < source_.size () + 1) + { + ::std::vector< ::XMLSchema::string< char > > v; + v.reserve (source_.size () + 1); + + while (source_.size ()) + { + //@@ VC6 + ::XMLSchema::string< char >& t = source_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + source_.pop_back (); + } + + source_.swap (v); + } + + source_.push_back (e); + source_.back ().container (this); + } + + // ArtifactDeploymentDescription + // ::XMLSchema::string< char > const& ArtifactDeploymentDescription:: node () const { @@ -1715,20 +1780,11 @@ namespace CIAO void ArtifactDeploymentDescription:: node (::XMLSchema::string< char > const& e) { - if (node_.get ()) - { - *node_ = e; - } - - else - { - node_ = ::std::auto_ptr< ::XMLSchema::string< char > > (new ::XMLSchema::string< char > (e)); - node_->container (this); - } + *node_ = e; } // ArtifactDeploymentDescription - // + // ArtifactDeploymentDescription::location_iterator ArtifactDeploymentDescription:: begin_location () { @@ -1779,112 +1835,160 @@ namespace CIAO } // ArtifactDeploymentDescription - // - bool ArtifactDeploymentDescription:: - execParameter_p () const + // + ArtifactDeploymentDescription::execParameter_iterator ArtifactDeploymentDescription:: + begin_execParameter () { - return execParameter_.get () != 0; + return execParameter_.begin (); } - ::CIAO::Config_Handlers::Property const& ArtifactDeploymentDescription:: - execParameter () const + ArtifactDeploymentDescription::execParameter_iterator ArtifactDeploymentDescription:: + end_execParameter () { - return *execParameter_; + return execParameter_.end (); } - ::CIAO::Config_Handlers::Property& ArtifactDeploymentDescription:: - execParameter () + ArtifactDeploymentDescription::execParameter_const_iterator ArtifactDeploymentDescription:: + begin_execParameter () const { - return *execParameter_; + return execParameter_.begin (); + } + + ArtifactDeploymentDescription::execParameter_const_iterator ArtifactDeploymentDescription:: + end_execParameter () const + { + return execParameter_.end (); } void ArtifactDeploymentDescription:: - execParameter (::CIAO::Config_Handlers::Property const& e) + add_execParameter (::CIAO::Config_Handlers::Property const& e) { - if (execParameter_.get ()) + if (execParameter_.capacity () < execParameter_.size () + 1) { - *execParameter_ = e; - } + ::std::vector< ::CIAO::Config_Handlers::Property > v; + v.reserve (execParameter_.size () + 1); - else - { - execParameter_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Property > (new ::CIAO::Config_Handlers::Property (e)); - execParameter_->container (this); + while (execParameter_.size ()) + { + //@@ VC6 + ::CIAO::Config_Handlers::Property& t = execParameter_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + execParameter_.pop_back (); + } + + execParameter_.swap (v); } + + execParameter_.push_back (e); + execParameter_.back ().container (this); } // ArtifactDeploymentDescription - // - bool ArtifactDeploymentDescription:: - deployRequirement_p () const + // + ArtifactDeploymentDescription::deployRequirement_iterator ArtifactDeploymentDescription:: + begin_deployRequirement () { - return deployRequirement_.get () != 0; + return deployRequirement_.begin (); } - ::CIAO::Config_Handlers::Requirement const& ArtifactDeploymentDescription:: - deployRequirement () const + ArtifactDeploymentDescription::deployRequirement_iterator ArtifactDeploymentDescription:: + end_deployRequirement () { - return *deployRequirement_; + return deployRequirement_.end (); } - ::CIAO::Config_Handlers::Requirement& ArtifactDeploymentDescription:: - deployRequirement () + ArtifactDeploymentDescription::deployRequirement_const_iterator ArtifactDeploymentDescription:: + begin_deployRequirement () const { - return *deployRequirement_; + return deployRequirement_.begin (); + } + + ArtifactDeploymentDescription::deployRequirement_const_iterator ArtifactDeploymentDescription:: + end_deployRequirement () const + { + return deployRequirement_.end (); } void ArtifactDeploymentDescription:: - 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); } // ArtifactDeploymentDescription - // - bool ArtifactDeploymentDescription:: - deployedResource_p () const + // + ArtifactDeploymentDescription::deployedResource_iterator ArtifactDeploymentDescription:: + begin_deployedResource () { - return deployedResource_.get () != 0; + return deployedResource_.begin (); } - ::CIAO::Config_Handlers::ResourceDeploymentDescription const& ArtifactDeploymentDescription:: - deployedResource () const + ArtifactDeploymentDescription::deployedResource_iterator ArtifactDeploymentDescription:: + end_deployedResource () { - return *deployedResource_; + return deployedResource_.end (); } - ::CIAO::Config_Handlers::ResourceDeploymentDescription& ArtifactDeploymentDescription:: - deployedResource () + ArtifactDeploymentDescription::deployedResource_const_iterator ArtifactDeploymentDescription:: + begin_deployedResource () const { - return *deployedResource_; + return deployedResource_.begin (); + } + + ArtifactDeploymentDescription::deployedResource_const_iterator ArtifactDeploymentDescription:: + end_deployedResource () const + { + return deployedResource_.end (); } void ArtifactDeploymentDescription:: - deployedResource (::CIAO::Config_Handlers::ResourceDeploymentDescription const& e) + add_deployedResource (::CIAO::Config_Handlers::ResourceDeploymentDescription const& e) { - if (deployedResource_.get ()) + if (deployedResource_.capacity () < deployedResource_.size () + 1) { - *deployedResource_ = e; - } + ::std::vector< ::CIAO::Config_Handlers::ResourceDeploymentDescription > v; + v.reserve (deployedResource_.size () + 1); - else - { - deployedResource_ = ::std::auto_ptr< ::CIAO::Config_Handlers::ResourceDeploymentDescription > (new ::CIAO::Config_Handlers::ResourceDeploymentDescription (e)); - deployedResource_->container (this); + while (deployedResource_.size ()) + { + //@@ VC6 + ::CIAO::Config_Handlers::ResourceDeploymentDescription& 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); } // ArtifactDeploymentDescription - // + // bool ArtifactDeploymentDescription:: id_p () const { @@ -1920,32 +2024,32 @@ namespace CIAO // MonolithicDeploymentDescription - // + // MonolithicDeploymentDescription:: - MonolithicDeploymentDescription (::XMLSchema::string< char > const& name__, - ::XMLSchema::string< char > const& source__) + MonolithicDeploymentDescription (::XMLSchema::string< char > const& name__) : name_ (new ::XMLSchema::string< char > (name__)), - source_ (new ::XMLSchema::string< char > (source__)), regulator__ () { name_->container (this); - source_->container (this); } MonolithicDeploymentDescription:: MonolithicDeploymentDescription (::CIAO::Config_Handlers::MonolithicDeploymentDescription const& s) : name_ (new ::XMLSchema::string< char > (*s.name_)), - source_ (new ::XMLSchema::string< char > (*s.source_)), - execParameter_ (s.execParameter_.get () ? new ::CIAO::Config_Handlers::Property (*s.execParameter_) : 0), - deployRequirement_ (s.deployRequirement_.get () ? new ::CIAO::Config_Handlers::Requirement (*s.deployRequirement_) : 0), id_ (s.id_.get () ? new ::XMLSchema::ID< char > (*s.id_) : 0), regulator__ () { name_->container (this); - source_->container (this); + source_.reserve (s.source_.size ()); + { + for (source_const_iterator i (s.source_.begin ()); + i != s.source_.end (); + ++i) add_source (*i); + } + artifact_.reserve (s.artifact_.size ()); { for (artifact_const_iterator i (s.artifact_.begin ()); @@ -1953,8 +2057,20 @@ namespace CIAO ++i) add_artifact (*i); } - if (execParameter_.get ()) execParameter_->container (this); - if (deployRequirement_.get ()) deployRequirement_->container (this); + execParameter_.reserve (s.execParameter_.size ()); + { + for (execParameter_const_iterator i (s.execParameter_.begin ()); + i != s.execParameter_.end (); + ++i) add_execParameter (*i); + } + + deployRequirement_.reserve (s.deployRequirement_.size ()); + { + for (deployRequirement_const_iterator i (s.deployRequirement_.begin ()); + i != s.deployRequirement_.end (); + ++i) add_deployRequirement (*i); + } + if (id_.get ()) id_->container (this); } @@ -1963,7 +2079,13 @@ namespace CIAO { name (s.name ()); - source (s.source ()); + source_.clear (); + source_.reserve (s.source_.size ()); + { + for (source_const_iterator i (s.source_.begin ()); + i != s.source_.end (); + ++i) add_source (*i); + } artifact_.clear (); artifact_.reserve (s.artifact_.size ()); @@ -1973,11 +2095,21 @@ namespace CIAO ++i) add_artifact (*i); } - if (s.execParameter_.get ()) execParameter (*(s.execParameter_)); - else execParameter_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Property > (0); + execParameter_.clear (); + execParameter_.reserve (s.execParameter_.size ()); + { + for (execParameter_const_iterator i (s.execParameter_.begin ()); + i != s.execParameter_.end (); + ++i) add_execParameter (*i); + } - 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); + } if (s.id_.get ()) id (*(s.id_)); else id_ = ::std::auto_ptr< ::XMLSchema::ID< char > > (0); @@ -1987,7 +2119,7 @@ namespace CIAO // MonolithicDeploymentDescription - // + // ::XMLSchema::string< char > const& MonolithicDeploymentDescription:: name () const { @@ -2007,27 +2139,58 @@ namespace CIAO } // MonolithicDeploymentDescription - // - ::XMLSchema::string< char > const& MonolithicDeploymentDescription:: - source () const + // + MonolithicDeploymentDescription::source_iterator MonolithicDeploymentDescription:: + begin_source () { - return *source_; + return source_.begin (); } - ::XMLSchema::string< char >& MonolithicDeploymentDescription:: - source () + MonolithicDeploymentDescription::source_iterator MonolithicDeploymentDescription:: + end_source () { - return *source_; + return source_.end (); + } + + MonolithicDeploymentDescription::source_const_iterator MonolithicDeploymentDescription:: + begin_source () const + { + return source_.begin (); + } + + MonolithicDeploymentDescription::source_const_iterator MonolithicDeploymentDescription:: + end_source () const + { + return source_.end (); } void MonolithicDeploymentDescription:: - source (::XMLSchema::string< char > const& e) + add_source (::XMLSchema::string< char > const& e) { - *source_ = e; + if (source_.capacity () < source_.size () + 1) + { + ::std::vector< ::XMLSchema::string< char > > v; + v.reserve (source_.size () + 1); + + while (source_.size ()) + { + //@@ VC6 + ::XMLSchema::string< char >& t = source_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + source_.pop_back (); + } + + source_.swap (v); + } + + source_.push_back (e); + source_.back ().container (this); } // MonolithicDeploymentDescription - // + // MonolithicDeploymentDescription::artifact_iterator MonolithicDeploymentDescription:: begin_artifact () { @@ -2078,77 +2241,109 @@ namespace CIAO } // MonolithicDeploymentDescription - // - bool MonolithicDeploymentDescription:: - execParameter_p () const + // + MonolithicDeploymentDescription::execParameter_iterator MonolithicDeploymentDescription:: + begin_execParameter () { - return execParameter_.get () != 0; + return execParameter_.begin (); } - ::CIAO::Config_Handlers::Property const& MonolithicDeploymentDescription:: - execParameter () const + MonolithicDeploymentDescription::execParameter_iterator MonolithicDeploymentDescription:: + end_execParameter () { - return *execParameter_; + return execParameter_.end (); } - ::CIAO::Config_Handlers::Property& MonolithicDeploymentDescription:: - execParameter () + MonolithicDeploymentDescription::execParameter_const_iterator MonolithicDeploymentDescription:: + begin_execParameter () const { - return *execParameter_; + return execParameter_.begin (); + } + + MonolithicDeploymentDescription::execParameter_const_iterator MonolithicDeploymentDescription:: + end_execParameter () const + { + return execParameter_.end (); } void MonolithicDeploymentDescription:: - execParameter (::CIAO::Config_Handlers::Property const& e) + add_execParameter (::CIAO::Config_Handlers::Property const& e) { - if (execParameter_.get ()) + if (execParameter_.capacity () < execParameter_.size () + 1) { - *execParameter_ = e; - } + ::std::vector< ::CIAO::Config_Handlers::Property > v; + v.reserve (execParameter_.size () + 1); - else - { - execParameter_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Property > (new ::CIAO::Config_Handlers::Property (e)); - execParameter_->container (this); + while (execParameter_.size ()) + { + //@@ VC6 + ::CIAO::Config_Handlers::Property& t = execParameter_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + execParameter_.pop_back (); + } + + execParameter_.swap (v); } + + execParameter_.push_back (e); + execParameter_.back ().container (this); } // MonolithicDeploymentDescription - // - bool MonolithicDeploymentDescription:: - deployRequirement_p () const + // + MonolithicDeploymentDescription::deployRequirement_iterator MonolithicDeploymentDescription:: + begin_deployRequirement () { - return deployRequirement_.get () != 0; + return deployRequirement_.begin (); } - ::CIAO::Config_Handlers::Requirement const& MonolithicDeploymentDescription:: - deployRequirement () const + MonolithicDeploymentDescription::deployRequirement_iterator MonolithicDeploymentDescription:: + end_deployRequirement () { - return *deployRequirement_; + return deployRequirement_.end (); } - ::CIAO::Config_Handlers::Requirement& MonolithicDeploymentDescription:: - deployRequirement () + MonolithicDeploymentDescription::deployRequirement_const_iterator MonolithicDeploymentDescription:: + begin_deployRequirement () const { - return *deployRequirement_; + return deployRequirement_.begin (); + } + + MonolithicDeploymentDescription::deployRequirement_const_iterator MonolithicDeploymentDescription:: + end_deployRequirement () const + { + return deployRequirement_.end (); } void MonolithicDeploymentDescription:: - 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); } // MonolithicDeploymentDescription - // + // bool MonolithicDeploymentDescription:: id_p () const { @@ -2184,7 +2379,7 @@ namespace CIAO // ResourceUsageKind - // + // ResourceUsageKind::Value ResourceUsageKind:: integral () const @@ -2211,7 +2406,7 @@ namespace CIAO } // InstanceResourceDeploymentDescription - // + // InstanceResourceDeploymentDescription:: InstanceResourceDeploymentDescription (::CIAO::Config_Handlers::ResourceUsageKind const& resourceUsage__, @@ -2262,7 +2457,7 @@ namespace CIAO // InstanceResourceDeploymentDescription - // + // ::CIAO::Config_Handlers::ResourceUsageKind const& InstanceResourceDeploymentDescription:: resourceUsage () const { @@ -2282,7 +2477,7 @@ namespace CIAO } // InstanceResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceResourceDeploymentDescription:: requirementName () const { @@ -2302,7 +2497,7 @@ namespace CIAO } // InstanceResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceResourceDeploymentDescription:: resourceName () const { @@ -2322,7 +2517,7 @@ namespace CIAO } // InstanceResourceDeploymentDescription - // + // ::CIAO::Config_Handlers::Any const& InstanceResourceDeploymentDescription:: resourceValue () const { @@ -2343,7 +2538,7 @@ namespace CIAO // InstanceDeploymentDescription - // + // InstanceDeploymentDescription:: InstanceDeploymentDescription (::XMLSchema::string< char > const& name__, @@ -2414,7 +2609,7 @@ namespace CIAO // InstanceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceDeploymentDescription:: name () const { @@ -2434,7 +2629,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceDeploymentDescription:: node () const { @@ -2454,7 +2649,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // ::XMLSchema::string< char > const& InstanceDeploymentDescription:: source () const { @@ -2474,7 +2669,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // ::XMLSchema::IDREF< char > const& InstanceDeploymentDescription:: implementation () const { @@ -2494,7 +2689,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // bool InstanceDeploymentDescription:: configProperty_p () const { @@ -2529,7 +2724,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // bool InstanceDeploymentDescription:: deployedResource_p () const { @@ -2564,7 +2759,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // bool InstanceDeploymentDescription:: deployedSharedResource_p () const { @@ -2599,7 +2794,7 @@ namespace CIAO } // InstanceDeploymentDescription - // + // bool InstanceDeploymentDescription:: id_p () const { @@ -2635,7 +2830,7 @@ namespace CIAO // CCMComponentPortKind - // + // CCMComponentPortKind::Value CCMComponentPortKind:: integral () const @@ -2662,7 +2857,7 @@ namespace CIAO } // ComponentPortDescription - // + // ComponentPortDescription:: ComponentPortDescription (::XMLSchema::string< char > const& name__, @@ -2741,7 +2936,7 @@ namespace CIAO // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: name () const { @@ -2761,7 +2956,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: specificType () const { @@ -2781,7 +2976,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: supportedType () const { @@ -2801,7 +2996,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: provider () const { @@ -2821,7 +3016,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: exclusiveProvider () const { @@ -2841,7 +3036,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: exclusiveUser () const { @@ -2861,7 +3056,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::XMLSchema::string< char > const& ComponentPortDescription:: optional () const { @@ -2881,7 +3076,7 @@ namespace CIAO } // ComponentPortDescription - // + // ::CIAO::Config_Handlers::CCMComponentPortKind const& ComponentPortDescription:: kind () const { @@ -2902,7 +3097,7 @@ namespace CIAO // ComponentPropertyDescription - // + // ComponentPropertyDescription:: ComponentPropertyDescription (::XMLSchema::string< char > const& name__, @@ -2939,7 +3134,7 @@ namespace CIAO // ComponentPropertyDescription - // + // ::XMLSchema::string< char > const& ComponentPropertyDescription:: name () const { @@ -2959,7 +3154,7 @@ namespace CIAO } // ComponentPropertyDescription - // + // ::CIAO::Config_Handlers::DataType const& ComponentPropertyDescription:: type () const { @@ -2980,7 +3175,7 @@ namespace CIAO // ComponentExternalPortEndpoint - // + // ComponentExternalPortEndpoint:: ComponentExternalPortEndpoint (::XMLSchema::string< char > const& portName__) @@ -3010,7 +3205,7 @@ namespace CIAO // ComponentExternalPortEndpoint - // + // ::XMLSchema::string< char > const& ComponentExternalPortEndpoint:: portName () const { @@ -3031,7 +3226,7 @@ namespace CIAO // PlanSubcomponentPortEndpoint - // + // PlanSubcomponentPortEndpoint:: PlanSubcomponentPortEndpoint (::XMLSchema::string< char > const& portName__, @@ -3080,7 +3275,7 @@ namespace CIAO // PlanSubcomponentPortEndpoint - // + // ::XMLSchema::string< char > const& PlanSubcomponentPortEndpoint:: portName () const { @@ -3100,7 +3295,7 @@ namespace CIAO } // PlanSubcomponentPortEndpoint - // + // bool PlanSubcomponentPortEndpoint:: provider_p () const { @@ -3135,7 +3330,7 @@ namespace CIAO } // PlanSubcomponentPortEndpoint - // + // ::CIAO::Config_Handlers::CCMComponentPortKind const& PlanSubcomponentPortEndpoint:: kind () const { @@ -3155,7 +3350,7 @@ namespace CIAO } // PlanSubcomponentPortEndpoint - // + // ::XMLSchema::IDREF< char > const& PlanSubcomponentPortEndpoint:: instance () const { @@ -3176,7 +3371,7 @@ namespace CIAO // ExternalReferenceEndpoint - // + // ExternalReferenceEndpoint:: ExternalReferenceEndpoint (::XMLSchema::string< char > const& location__) @@ -3206,7 +3401,7 @@ namespace CIAO // ExternalReferenceEndpoint - // + // ::XMLSchema::string< char > const& ExternalReferenceEndpoint:: location () const { @@ -3227,7 +3422,7 @@ namespace CIAO // ConnectionResourceDeploymentDescription - // + // ConnectionResourceDeploymentDescription:: ConnectionResourceDeploymentDescription (::XMLSchema::string< char > const& targetName__, @@ -3278,7 +3473,7 @@ namespace CIAO // ConnectionResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& ConnectionResourceDeploymentDescription:: targetName () const { @@ -3298,7 +3493,7 @@ namespace CIAO } // ConnectionResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& ConnectionResourceDeploymentDescription:: requirementName () const { @@ -3318,7 +3513,7 @@ namespace CIAO } // ConnectionResourceDeploymentDescription - // + // ::XMLSchema::string< char > const& ConnectionResourceDeploymentDescription:: resourceName () const { @@ -3338,7 +3533,7 @@ namespace CIAO } // ConnectionResourceDeploymentDescription - // + // ::CIAO::Config_Handlers::Any const& ConnectionResourceDeploymentDescription:: resourceValue () const { @@ -3359,7 +3554,7 @@ namespace CIAO // PlanConnectionDescription - // + // PlanConnectionDescription:: PlanConnectionDescription (::XMLSchema::string< char > const& name__) @@ -3449,7 +3644,7 @@ namespace CIAO // PlanConnectionDescription - // + // ::XMLSchema::string< char > const& PlanConnectionDescription:: name () const { @@ -3469,7 +3664,7 @@ namespace CIAO } // PlanConnectionDescription - // + // bool PlanConnectionDescription:: source_p () const { @@ -3504,7 +3699,7 @@ namespace CIAO } // PlanConnectionDescription - // + // bool PlanConnectionDescription:: deployRequirement_p () const { @@ -3539,7 +3734,7 @@ namespace CIAO } // PlanConnectionDescription - // + // PlanConnectionDescription::externalEndpoint_iterator PlanConnectionDescription:: begin_externalEndpoint () { @@ -3590,7 +3785,7 @@ namespace CIAO } // PlanConnectionDescription - // + // PlanConnectionDescription::internalEndpoint_iterator PlanConnectionDescription:: begin_internalEndpoint () { @@ -3641,7 +3836,7 @@ namespace CIAO } // PlanConnectionDescription - // + // PlanConnectionDescription::externalReference_iterator PlanConnectionDescription:: begin_externalReference () { @@ -3692,7 +3887,7 @@ namespace CIAO } // PlanConnectionDescription - // + // bool PlanConnectionDescription:: deployedResource_p () const { @@ -3728,7 +3923,7 @@ namespace CIAO // ImplementationDependency - // + // ImplementationDependency:: ImplementationDependency (::XMLSchema::string< char > const& requiredType__) @@ -3758,7 +3953,7 @@ namespace CIAO // ImplementationDependency - // + // ::XMLSchema::string< char > const& ImplementationDependency:: requiredType () const { @@ -3779,7 +3974,7 @@ namespace CIAO // Capability - // + // Capability:: Capability (::XMLSchema::string< char > const& name__, @@ -3823,7 +4018,7 @@ namespace CIAO // Capability - // + // ::XMLSchema::string< char > const& Capability:: name () const { @@ -3843,7 +4038,7 @@ namespace CIAO } // Capability - // + // ::XMLSchema::string< char > const& Capability:: resourceType () const { @@ -3863,7 +4058,7 @@ namespace CIAO } // Capability - // + // ::CIAO::Config_Handlers::SatisfierProperty const& Capability:: property () const { @@ -3884,7 +4079,7 @@ namespace CIAO // ImplementationRequirement - // + // ImplementationRequirement:: ImplementationRequirement (::CIAO::Config_Handlers::ResourceUsageKind const& resourceUsage__, @@ -3949,7 +4144,7 @@ namespace CIAO // ImplementationRequirement - // + // ::CIAO::Config_Handlers::ResourceUsageKind const& ImplementationRequirement:: resourceUsage () const { @@ -3969,7 +4164,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::XMLSchema::string< char > const& ImplementationRequirement:: resourcePort () const { @@ -3989,7 +4184,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::XMLSchema::string< char > const& ImplementationRequirement:: componentPort () const { @@ -4009,7 +4204,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::XMLSchema::string< char > const& ImplementationRequirement:: resourceType () const { @@ -4029,7 +4224,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::XMLSchema::string< char > const& ImplementationRequirement:: name () const { @@ -4049,7 +4244,7 @@ namespace CIAO } // ImplementationRequirement - // + // ::CIAO::Config_Handlers::Property const& ImplementationRequirement:: property () const { @@ -4070,7 +4265,7 @@ namespace CIAO // ComponentPackageReference - // + // ComponentPackageReference:: ComponentPackageReference (::XMLSchema::string< char > const& requiredUUID__, @@ -4114,7 +4309,7 @@ namespace CIAO // ComponentPackageReference - // + // ::XMLSchema::string< char > const& ComponentPackageReference:: requiredUUID () const { @@ -4134,7 +4329,7 @@ namespace CIAO } // ComponentPackageReference - // + // ::XMLSchema::string< char > const& ComponentPackageReference:: requiredName () const { @@ -4154,7 +4349,7 @@ namespace CIAO } // ComponentPackageReference - // + // ::XMLSchema::string< char > const& ComponentPackageReference:: requiredType () const { @@ -4175,7 +4370,7 @@ namespace CIAO // SubcomponentPortEndpoint - // + // SubcomponentPortEndpoint:: SubcomponentPortEndpoint (::XMLSchema::string< char > const& portName__, @@ -4212,7 +4407,7 @@ namespace CIAO // SubcomponentPortEndpoint - // + // ::XMLSchema::string< char > const& SubcomponentPortEndpoint:: portName () const { @@ -4232,7 +4427,7 @@ namespace CIAO } // SubcomponentPortEndpoint - // + // ::XMLSchema::IDREF< char > const& SubcomponentPortEndpoint:: instance () const { @@ -4253,7 +4448,7 @@ namespace CIAO // AssemblyConnectionDescription - // + // AssemblyConnectionDescription:: AssemblyConnectionDescription (::XMLSchema::string< char > const& name__) @@ -4332,7 +4527,7 @@ namespace CIAO // AssemblyConnectionDescription - // + // ::XMLSchema::string< char > const& AssemblyConnectionDescription:: name () const { @@ -4352,7 +4547,7 @@ namespace CIAO } // AssemblyConnectionDescription - // + // bool AssemblyConnectionDescription:: deployRequirement_p () const { @@ -4387,7 +4582,7 @@ namespace CIAO } // AssemblyConnectionDescription - // + // AssemblyConnectionDescription::externalEndpoint_iterator AssemblyConnectionDescription:: begin_externalEndpoint () { @@ -4438,7 +4633,7 @@ namespace CIAO } // AssemblyConnectionDescription - // + // AssemblyConnectionDescription::internalEndpoint_iterator AssemblyConnectionDescription:: begin_internalEndpoint () { @@ -4489,7 +4684,7 @@ namespace CIAO } // AssemblyConnectionDescription - // + // AssemblyConnectionDescription::externalReference_iterator AssemblyConnectionDescription:: begin_externalReference () { @@ -4591,7 +4786,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 { } } @@ -4639,7 +4834,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 { } } @@ -4703,7 +4898,7 @@ namespace CIAO kind (t); } - else + else { } } @@ -4820,7 +5015,7 @@ namespace CIAO typecode (t); } - else + else { } } @@ -4853,7 +5048,7 @@ namespace CIAO value_->container (this); } - else + else { } } @@ -4886,7 +5081,7 @@ namespace CIAO value_->container (this); } - else + else { } } @@ -4919,7 +5114,7 @@ namespace CIAO label_->container (this); } - else + else { } } @@ -4940,7 +5135,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 { } } @@ -4957,7 +5152,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 { } } @@ -5002,7 +5197,7 @@ namespace CIAO value_->container (this); } - else + else { } } @@ -5041,7 +5236,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -5086,7 +5281,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -5125,7 +5320,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -5164,7 +5359,7 @@ namespace CIAO resourceValue_->container (this); } - else + else { } } @@ -5193,14 +5388,14 @@ namespace CIAO else if (n == "source") { - source_ = ::std::auto_ptr< ::XMLSchema::string< char > > (new ::XMLSchema::string< char > (e)); - source_->container (this); + ::XMLSchema::string< char > t (e); + add_source (t); } else if (n == "node") { - ::XMLSchema::string< char > t (e); - node (t); + node_ = ::std::auto_ptr< ::XMLSchema::string< char > > (new ::XMLSchema::string< char > (e)); + node_->container (this); } else if (n == "location") @@ -5212,22 +5407,22 @@ namespace CIAO else if (n == "execParameter") { ::CIAO::Config_Handlers::Property t (e); - execParameter (t); + add_execParameter (t); } else if (n == "deployRequirement") { ::CIAO::Config_Handlers::Requirement t (e); - deployRequirement (t); + add_deployRequirement (t); } else if (n == "deployedResource") { ::CIAO::Config_Handlers::ResourceDeploymentDescription t (e); - deployedResource (t); + add_deployedResource (t); } - else + else { } } @@ -5242,7 +5437,7 @@ namespace CIAO id (t); } - else + else { } } @@ -5271,8 +5466,8 @@ namespace CIAO else if (n == "source") { - source_ = ::std::auto_ptr< ::XMLSchema::string< char > > (new ::XMLSchema::string< char > (e)); - source_->container (this); + ::XMLSchema::string< char > t (e); + add_source (t); } else if (n == "artifact") @@ -5284,16 +5479,16 @@ namespace CIAO else if (n == "execParameter") { ::CIAO::Config_Handlers::Property t (e); - execParameter (t); + add_execParameter (t); } else if (n == "deployRequirement") { ::CIAO::Config_Handlers::Requirement t (e); - deployRequirement (t); + add_deployRequirement (t); } - else + else { } } @@ -5308,7 +5503,7 @@ namespace CIAO id (t); } - else + else { } } @@ -5328,7 +5523,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 { } } @@ -5344,7 +5539,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 { } } @@ -5394,7 +5589,7 @@ namespace CIAO resourceValue_->container (this); } - else + else { } } @@ -5457,7 +5652,7 @@ namespace CIAO deployedSharedResource (t); } - else + else { } } @@ -5472,7 +5667,7 @@ namespace CIAO id (t); } - else + else { } } @@ -5493,7 +5688,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 { } } @@ -5510,7 +5705,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 { } } @@ -5585,7 +5780,7 @@ namespace CIAO kind_->container (this); } - else + else { } } @@ -5618,7 +5813,7 @@ namespace CIAO type_->container (this); } - else + else { } } @@ -5645,7 +5840,7 @@ namespace CIAO portName_->container (this); } - else + else { } } @@ -5690,7 +5885,7 @@ namespace CIAO instance_->container (this); } - else + else { } } @@ -5717,7 +5912,7 @@ namespace CIAO location_->container (this); } - else + else { } } @@ -5762,7 +5957,7 @@ namespace CIAO resourceValue_->container (this); } - else + else { } } @@ -5825,7 +6020,7 @@ namespace CIAO deployedResource (t); } - else + else { } } @@ -5852,7 +6047,7 @@ namespace CIAO requiredType_->container (this); } - else + else { } } @@ -5891,7 +6086,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -5948,7 +6143,7 @@ namespace CIAO property_->container (this); } - else + else { } } @@ -5987,7 +6182,7 @@ namespace CIAO requiredType_->container (this); } - else + else { } } @@ -6020,7 +6215,7 @@ namespace CIAO instance_->container (this); } - else + else { } } @@ -6071,7 +6266,7 @@ namespace CIAO add_externalReference (t); } - else + else { } } @@ -6085,4 +6280,3 @@ 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 beedff7b7d5..551bdf5ebe3 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.hpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/Basic_Deployment_Data.hpp @@ -1,4 +1,4 @@ -//$Id$ +// $Id$ #ifndef BASIC_DEPLOYMENT_DATA_HPP #define BASIC_DEPLOYMENT_DATA_HPP @@ -158,7 +158,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // kind - // + // public: bool kind_p () const; ::CIAO::Config_Handlers::TCKind const& kind () const; @@ -187,7 +187,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // short - // + // public: bool short_p () const; ::XMLSchema::short_ const& short_ () const; @@ -198,7 +198,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::short_ > short__; // long - // + // public: bool long_p () const; ::XMLSchema::int_ const& long_ () const; @@ -209,7 +209,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::int_ > long__; // ushort - // + // public: bool ushort_p () const; ::XMLSchema::unsignedShort const& ushort () const; @@ -220,7 +220,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::unsignedShort > ushort_; // ulong - // + // public: bool ulong_p () const; ::XMLSchema::unsignedInt const& ulong () const; @@ -231,7 +231,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::unsignedInt > ulong_; // float - // + // public: bool float_p () const; ::XMLSchema::float_ const& float_ () const; @@ -242,7 +242,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::float_ > float__; // double - // + // public: bool double_p () const; ::XMLSchema::double_ const& double_ () const; @@ -253,7 +253,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::double_ > double__; // boolean - // + // public: bool boolean_p () const; ::XMLSchema::boolean const& boolean () const; @@ -264,7 +264,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::boolean > boolean_; // octet - // + // public: bool octet_p () const; ::XMLSchema::unsignedByte const& octet () const; @@ -275,7 +275,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::unsignedByte > octet_; // objref - // + // public: bool objref_p () const; ::XMLSchema::string< char > const& objref () const; @@ -286,7 +286,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > objref_; // enum - // + // public: bool enum_p () const; ::XMLSchema::string< char > const& enum_ () const; @@ -297,7 +297,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > enum__; // string - // + // public: bool string_p () const; ::XMLSchema::string< char > const& string () const; @@ -308,7 +308,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > string_; // longlong - // + // public: bool longlong_p () const; ::XMLSchema::long_ const& longlong () const; @@ -319,7 +319,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::long_ > longlong_; // ulonglong - // + // public: bool ulonglong_p () const; ::XMLSchema::unsignedLong const& ulonglong () const; @@ -330,7 +330,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::unsignedLong > ulonglong_; // longdouble - // + // public: bool longdouble_p () const; ::XMLSchema::double_ const& longdouble () const; @@ -341,7 +341,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::double_ > longdouble_; // fixed - // + // public: bool fixed_p () const; ::XMLSchema::string< char > const& fixed () const; @@ -352,7 +352,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > fixed_; // typecode - // + // public: bool typecode_p () const; ::CIAO::Config_Handlers::DataType const& typecode () const; @@ -381,7 +381,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // type - // + // public: ::CIAO::Config_Handlers::DataType const& type () const; ::CIAO::Config_Handlers::DataType& type (); @@ -391,7 +391,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::DataType > type_; // value - // + // public: ::CIAO::Config_Handlers::DataValue const& value () const; ::CIAO::Config_Handlers::DataValue& value (); @@ -420,7 +420,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -430,7 +430,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // value - // + // public: ::CIAO::Config_Handlers::Any const& value () const; ::CIAO::Config_Handlers::Any& value (); @@ -459,7 +459,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -469,7 +469,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // label - // + // public: ::XMLSchema::string< char > const& label () const; ::XMLSchema::string< char >& label (); @@ -537,7 +537,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -547,7 +547,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // kind - // + // public: ::CIAO::Config_Handlers::SatisfierPropertyKind const& kind () const; ::CIAO::Config_Handlers::SatisfierPropertyKind& kind (); @@ -557,7 +557,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::SatisfierPropertyKind > kind_; // value - // + // public: ::CIAO::Config_Handlers::Any const& value () const; ::CIAO::Config_Handlers::Any& value (); @@ -587,7 +587,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -597,7 +597,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // resourceType - // + // public: ::XMLSchema::string< char > const& resourceType () const; ::XMLSchema::string< char >& resourceType (); @@ -607,7 +607,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > resourceType_; // property - // + // public: ::CIAO::Config_Handlers::SatisfierProperty const& property () const; ::CIAO::Config_Handlers::SatisfierProperty& property (); @@ -637,7 +637,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -647,7 +647,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // resourceType - // + // public: ::XMLSchema::string< char > const& resourceType () const; ::XMLSchema::string< char >& resourceType (); @@ -657,7 +657,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > resourceType_; // node - // + // public: ::CIAO::Config_Handlers::Node const& node () const; ::CIAO::Config_Handlers::Node& node (); @@ -667,7 +667,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::Node > node_; // property - // + // public: ::CIAO::Config_Handlers::SatisfierProperty const& property () const; ::CIAO::Config_Handlers::SatisfierProperty& property (); @@ -698,7 +698,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // resourceType - // + // public: ::XMLSchema::string< char > const& resourceType () const; ::XMLSchema::string< char >& resourceType (); @@ -708,7 +708,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > resourceType_; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -718,7 +718,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // property - // + // public: ::CIAO::Config_Handlers::Property const& property () const; ::CIAO::Config_Handlers::Property& property (); @@ -748,7 +748,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // requirementName - // + // public: ::XMLSchema::string< char > const& requirementName () const; ::XMLSchema::string< char >& requirementName (); @@ -758,7 +758,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > requirementName_; // resourceName - // + // public: ::XMLSchema::string< char > const& resourceName () const; ::XMLSchema::string< char >& resourceName (); @@ -768,7 +768,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > resourceName_; // resourceValue - // + // public: ::CIAO::Config_Handlers::Any const& resourceValue () const; ::CIAO::Config_Handlers::Any& resourceValue (); @@ -798,7 +798,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -808,19 +808,22 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // source - // + // public: - ::XMLSchema::string< char > const& source () const; - ::XMLSchema::string< char >& source (); - void source (::XMLSchema::string< char > const& ); + typedef ::std::vector< ::XMLSchema::string< char > >::iterator source_iterator; + typedef ::std::vector< ::XMLSchema::string< char > >::const_iterator source_const_iterator; + source_iterator begin_source (); + source_iterator end_source (); + source_const_iterator begin_source () const; + source_const_iterator end_source () const; + void add_source (::XMLSchema::string< char > const& ); protected: - ::std::auto_ptr< ::XMLSchema::string< char > > source_; + ::std::vector< ::XMLSchema::string< char > > source_; // node - // + // public: - bool node_p () const; ::XMLSchema::string< char > const& node () const; ::XMLSchema::string< char >& node (); void node (::XMLSchema::string< char > const& ); @@ -829,7 +832,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > node_; // location - // + // public: typedef ::std::vector< ::XMLSchema::string< char > >::iterator location_iterator; typedef ::std::vector< ::XMLSchema::string< char > >::const_iterator location_const_iterator; @@ -843,40 +846,49 @@ namespace CIAO ::std::vector< ::XMLSchema::string< char > > location_; // execParameter - // + // public: - bool execParameter_p () const; - ::CIAO::Config_Handlers::Property const& execParameter () const; - ::CIAO::Config_Handlers::Property& execParameter (); - void execParameter (::CIAO::Config_Handlers::Property const& ); + typedef ::std::vector< ::CIAO::Config_Handlers::Property >::iterator execParameter_iterator; + typedef ::std::vector< ::CIAO::Config_Handlers::Property >::const_iterator execParameter_const_iterator; + execParameter_iterator begin_execParameter (); + execParameter_iterator end_execParameter (); + execParameter_const_iterator begin_execParameter () const; + execParameter_const_iterator end_execParameter () const; + void add_execParameter (::CIAO::Config_Handlers::Property const& ); protected: - ::std::auto_ptr< ::CIAO::Config_Handlers::Property > execParameter_; + ::std::vector< ::CIAO::Config_Handlers::Property > execParameter_; // 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_; // deployedResource - // + // public: - bool deployedResource_p () const; - ::CIAO::Config_Handlers::ResourceDeploymentDescription const& deployedResource () const; - ::CIAO::Config_Handlers::ResourceDeploymentDescription& deployedResource (); - void deployedResource (::CIAO::Config_Handlers::ResourceDeploymentDescription const& ); + typedef ::std::vector< ::CIAO::Config_Handlers::ResourceDeploymentDescription >::iterator deployedResource_iterator; + typedef ::std::vector< ::CIAO::Config_Handlers::ResourceDeploymentDescription >::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::ResourceDeploymentDescription const& ); protected: - ::std::auto_ptr< ::CIAO::Config_Handlers::ResourceDeploymentDescription > deployedResource_; + ::std::vector< ::CIAO::Config_Handlers::ResourceDeploymentDescription > deployedResource_; // id - // + // public: bool id_p () const; ::XMLSchema::ID< char > const& id () const; @@ -888,7 +900,7 @@ namespace CIAO public: ArtifactDeploymentDescription (::XMLSchema::string< char > const& name__, - ::XMLSchema::string< char > const& source__); + ::XMLSchema::string< char > const& node__); ArtifactDeploymentDescription (::XSCRT::XML::Element< char > const&); ArtifactDeploymentDescription (ArtifactDeploymentDescription const& s); @@ -906,7 +918,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -916,17 +928,21 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // source - // + // public: - ::XMLSchema::string< char > const& source () const; - ::XMLSchema::string< char >& source (); - void source (::XMLSchema::string< char > const& ); + typedef ::std::vector< ::XMLSchema::string< char > >::iterator source_iterator; + typedef ::std::vector< ::XMLSchema::string< char > >::const_iterator source_const_iterator; + source_iterator begin_source (); + source_iterator end_source (); + source_const_iterator begin_source () const; + source_const_iterator end_source () const; + void add_source (::XMLSchema::string< char > const& ); protected: - ::std::auto_ptr< ::XMLSchema::string< char > > source_; + ::std::vector< ::XMLSchema::string< char > > source_; // artifact - // + // public: typedef ::std::vector< ::XMLSchema::IDREF< char > >::iterator artifact_iterator; typedef ::std::vector< ::XMLSchema::IDREF< char > >::const_iterator artifact_const_iterator; @@ -940,29 +956,35 @@ namespace CIAO ::std::vector< ::XMLSchema::IDREF< char > > artifact_; // execParameter - // + // public: - bool execParameter_p () const; - ::CIAO::Config_Handlers::Property const& execParameter () const; - ::CIAO::Config_Handlers::Property& execParameter (); - void execParameter (::CIAO::Config_Handlers::Property const& ); + typedef ::std::vector< ::CIAO::Config_Handlers::Property >::iterator execParameter_iterator; + typedef ::std::vector< ::CIAO::Config_Handlers::Property >::const_iterator execParameter_const_iterator; + execParameter_iterator begin_execParameter (); + execParameter_iterator end_execParameter (); + execParameter_const_iterator begin_execParameter () const; + execParameter_const_iterator end_execParameter () const; + void add_execParameter (::CIAO::Config_Handlers::Property const& ); protected: - ::std::auto_ptr< ::CIAO::Config_Handlers::Property > execParameter_; + ::std::vector< ::CIAO::Config_Handlers::Property > execParameter_; // 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_; // id - // + // public: bool id_p () const; ::XMLSchema::ID< char > const& id () const; @@ -973,8 +995,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::ID< char > > id_; public: - MonolithicDeploymentDescription (::XMLSchema::string< char > const& name__, - ::XMLSchema::string< char > const& source__); + MonolithicDeploymentDescription (::XMLSchema::string< char > const& name__); MonolithicDeploymentDescription (::XSCRT::XML::Element< char > const&); MonolithicDeploymentDescription (MonolithicDeploymentDescription const& s); @@ -1029,7 +1050,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // resourceUsage - // + // public: ::CIAO::Config_Handlers::ResourceUsageKind const& resourceUsage () const; ::CIAO::Config_Handlers::ResourceUsageKind& resourceUsage (); @@ -1039,7 +1060,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::ResourceUsageKind > resourceUsage_; // requirementName - // + // public: ::XMLSchema::string< char > const& requirementName () const; ::XMLSchema::string< char >& requirementName (); @@ -1049,7 +1070,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > requirementName_; // resourceName - // + // public: ::XMLSchema::string< char > const& resourceName () const; ::XMLSchema::string< char >& resourceName (); @@ -1059,7 +1080,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > resourceName_; // resourceValue - // + // public: ::CIAO::Config_Handlers::Any const& resourceValue () const; ::CIAO::Config_Handlers::Any& resourceValue (); @@ -1090,7 +1111,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -1100,7 +1121,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // node - // + // public: ::XMLSchema::string< char > const& node () const; ::XMLSchema::string< char >& node (); @@ -1110,7 +1131,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > node_; // source - // + // public: ::XMLSchema::string< char > const& source () const; ::XMLSchema::string< char >& source (); @@ -1120,7 +1141,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > source_; // implementation - // + // public: ::XMLSchema::IDREF< char > const& implementation () const; ::XMLSchema::IDREF< char >& implementation (); @@ -1130,7 +1151,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::IDREF< char > > implementation_; // configProperty - // + // public: bool configProperty_p () const; ::CIAO::Config_Handlers::Property const& configProperty () const; @@ -1141,7 +1162,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::Property > configProperty_; // deployedResource - // + // public: bool deployedResource_p () const; ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription const& deployedResource () const; @@ -1152,7 +1173,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription > deployedResource_; // deployedSharedResource - // + // public: bool deployedSharedResource_p () const; ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription const& deployedSharedResource () const; @@ -1163,7 +1184,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription > deployedSharedResource_; // id - // + // public: bool id_p () const; ::XMLSchema::ID< char > const& id () const; @@ -1234,7 +1255,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -1244,7 +1265,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // specificType - // + // public: ::XMLSchema::string< char > const& specificType () const; ::XMLSchema::string< char >& specificType (); @@ -1254,7 +1275,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > specificType_; // supportedType - // + // public: ::XMLSchema::string< char > const& supportedType () const; ::XMLSchema::string< char >& supportedType (); @@ -1264,7 +1285,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > supportedType_; // provider - // + // public: ::XMLSchema::string< char > const& provider () const; ::XMLSchema::string< char >& provider (); @@ -1274,7 +1295,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > provider_; // exclusiveProvider - // + // public: ::XMLSchema::string< char > const& exclusiveProvider () const; ::XMLSchema::string< char >& exclusiveProvider (); @@ -1284,7 +1305,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > exclusiveProvider_; // exclusiveUser - // + // public: ::XMLSchema::string< char > const& exclusiveUser () const; ::XMLSchema::string< char >& exclusiveUser (); @@ -1294,7 +1315,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > exclusiveUser_; // optional - // + // public: ::XMLSchema::string< char > const& optional () const; ::XMLSchema::string< char >& optional (); @@ -1304,7 +1325,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > optional_; // kind - // + // public: ::CIAO::Config_Handlers::CCMComponentPortKind const& kind () const; ::CIAO::Config_Handlers::CCMComponentPortKind& kind (); @@ -1339,7 +1360,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -1349,7 +1370,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // type - // + // public: ::CIAO::Config_Handlers::DataType const& type () const; ::CIAO::Config_Handlers::DataType& type (); @@ -1378,7 +1399,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // portName - // + // public: ::XMLSchema::string< char > const& portName () const; ::XMLSchema::string< char >& portName (); @@ -1406,7 +1427,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // portName - // + // public: ::XMLSchema::string< char > const& portName () const; ::XMLSchema::string< char >& portName (); @@ -1416,7 +1437,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > portName_; // provider - // + // public: bool provider_p () const; ::XMLSchema::string< char > const& provider () const; @@ -1427,7 +1448,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > provider_; // kind - // + // public: ::CIAO::Config_Handlers::CCMComponentPortKind const& kind () const; ::CIAO::Config_Handlers::CCMComponentPortKind& kind (); @@ -1437,7 +1458,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::CCMComponentPortKind > kind_; // instance - // + // public: ::XMLSchema::IDREF< char > const& instance () const; ::XMLSchema::IDREF< char >& instance (); @@ -1467,7 +1488,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // location - // + // public: ::XMLSchema::string< char > const& location () const; ::XMLSchema::string< char >& location (); @@ -1495,7 +1516,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // targetName - // + // public: ::XMLSchema::string< char > const& targetName () const; ::XMLSchema::string< char >& targetName (); @@ -1505,7 +1526,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > targetName_; // requirementName - // + // public: ::XMLSchema::string< char > const& requirementName () const; ::XMLSchema::string< char >& requirementName (); @@ -1515,7 +1536,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > requirementName_; // resourceName - // + // public: ::XMLSchema::string< char > const& resourceName () const; ::XMLSchema::string< char >& resourceName (); @@ -1525,7 +1546,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > resourceName_; // resourceValue - // + // public: ::CIAO::Config_Handlers::Any const& resourceValue () const; ::CIAO::Config_Handlers::Any& resourceValue (); @@ -1556,7 +1577,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -1566,7 +1587,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // source - // + // public: bool source_p () const; ::XMLSchema::string< char > const& source () const; @@ -1577,7 +1598,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > source_; // deployRequirement - // + // public: bool deployRequirement_p () const; ::CIAO::Config_Handlers::Requirement const& deployRequirement () const; @@ -1588,7 +1609,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::Requirement > deployRequirement_; // externalEndpoint - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::ComponentExternalPortEndpoint >::iterator externalEndpoint_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::ComponentExternalPortEndpoint >::const_iterator externalEndpoint_const_iterator; @@ -1602,7 +1623,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::ComponentExternalPortEndpoint > externalEndpoint_; // internalEndpoint - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::PlanSubcomponentPortEndpoint >::iterator internalEndpoint_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::PlanSubcomponentPortEndpoint >::const_iterator internalEndpoint_const_iterator; @@ -1616,7 +1637,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::PlanSubcomponentPortEndpoint > internalEndpoint_; // externalReference - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::ExternalReferenceEndpoint >::iterator externalReference_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::ExternalReferenceEndpoint >::const_iterator externalReference_const_iterator; @@ -1630,7 +1651,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::ExternalReferenceEndpoint > externalReference_; // deployedResource - // + // public: bool deployedResource_p () const; ::CIAO::Config_Handlers::ConnectionResourceDeploymentDescription const& deployedResource () const; @@ -1659,7 +1680,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // requiredType - // + // public: ::XMLSchema::string< char > const& requiredType () const; ::XMLSchema::string< char >& requiredType (); @@ -1687,7 +1708,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -1697,7 +1718,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // resourceType - // + // public: ::XMLSchema::string< char > const& resourceType () const; ::XMLSchema::string< char >& resourceType (); @@ -1707,7 +1728,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > resourceType_; // property - // + // public: ::CIAO::Config_Handlers::SatisfierProperty const& property () const; ::CIAO::Config_Handlers::SatisfierProperty& property (); @@ -1737,7 +1758,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // resourceUsage - // + // public: ::CIAO::Config_Handlers::ResourceUsageKind const& resourceUsage () const; ::CIAO::Config_Handlers::ResourceUsageKind& resourceUsage (); @@ -1747,7 +1768,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::ResourceUsageKind > resourceUsage_; // resourcePort - // + // public: ::XMLSchema::string< char > const& resourcePort () const; ::XMLSchema::string< char >& resourcePort (); @@ -1757,7 +1778,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > resourcePort_; // componentPort - // + // public: ::XMLSchema::string< char > const& componentPort () const; ::XMLSchema::string< char >& componentPort (); @@ -1767,7 +1788,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > componentPort_; // resourceType - // + // public: ::XMLSchema::string< char > const& resourceType () const; ::XMLSchema::string< char >& resourceType (); @@ -1777,7 +1798,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > resourceType_; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -1787,7 +1808,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // property - // + // public: ::CIAO::Config_Handlers::Property const& property () const; ::CIAO::Config_Handlers::Property& property (); @@ -1820,7 +1841,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // requiredUUID - // + // public: ::XMLSchema::string< char > const& requiredUUID () const; ::XMLSchema::string< char >& requiredUUID (); @@ -1830,7 +1851,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > requiredUUID_; // requiredName - // + // public: ::XMLSchema::string< char > const& requiredName () const; ::XMLSchema::string< char >& requiredName (); @@ -1840,7 +1861,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > requiredName_; // requiredType - // + // public: ::XMLSchema::string< char > const& requiredType () const; ::XMLSchema::string< char >& requiredType (); @@ -1870,7 +1891,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // portName - // + // public: ::XMLSchema::string< char > const& portName () const; ::XMLSchema::string< char >& portName (); @@ -1880,7 +1901,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > portName_; // instance - // + // public: ::XMLSchema::IDREF< char > const& instance () const; ::XMLSchema::IDREF< char >& instance (); @@ -1909,7 +1930,7 @@ namespace CIAO typedef ::XSCRT::Type Base__; // name - // + // public: ::XMLSchema::string< char > const& name () const; ::XMLSchema::string< char >& name (); @@ -1919,7 +1940,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > name_; // deployRequirement - // + // public: bool deployRequirement_p () const; ::CIAO::Config_Handlers::Requirement const& deployRequirement () const; @@ -1930,7 +1951,7 @@ namespace CIAO ::std::auto_ptr< ::CIAO::Config_Handlers::Requirement > deployRequirement_; // externalEndpoint - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::ComponentExternalPortEndpoint >::iterator externalEndpoint_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::ComponentExternalPortEndpoint >::const_iterator externalEndpoint_const_iterator; @@ -1944,7 +1965,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::ComponentExternalPortEndpoint > externalEndpoint_; // internalEndpoint - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::SubcomponentPortEndpoint >::iterator internalEndpoint_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::SubcomponentPortEndpoint >::const_iterator internalEndpoint_const_iterator; @@ -1958,7 +1979,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::SubcomponentPortEndpoint > internalEndpoint_; // externalReference - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::ExternalReferenceEndpoint >::iterator externalReference_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::ExternalReferenceEndpoint >::const_iterator externalReference_const_iterator; diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.cpp index 4c2723462dd..9b9bc45fddf 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/CCD_Handler.cpp @@ -49,19 +49,23 @@ namespace CIAO CORBA::string_dup ((*s).c_str ()); } - if (desc.idlFile_p ()) - { - CORBA::ULong len = - toconfig.supportedType.length (); - - if (!desc.idlFile ().empty ()) - { - toconfig.supportedType.length (len + 1); - toconfig.idlFile [len] = - CORBA::string_dup (desc.idlFile ().c_str ()); - } - } + ComponentInterfaceDescription::idlFile_iterator + eidl = desc.end_idlFile (); + + for (ComponentInterfaceDescription::idlFile_iterator sidl= + desc.begin_idlFile (); + sidl != eidl; + ++sidl) + { + // @@ Another n^2 algorithm + CORBA::ULong len = + toconfig.idlFile.length (); + toconfig.idlFile.length (len + 1); + + toconfig.idlFile [len] = + (*sidl).c_str (); + } ComponentInterfaceDescription::configProperty_iterator pend = desc.end_configProperty (); @@ -81,38 +85,25 @@ namespace CIAO toconfig.configProperty [len]); } - - /******************************* - * Will need to rework the ones in the bottom like the above. - * - */ - - //Create the handler for the - //<ComponentPortDescriptions>. - CPD_Handler cpd_handler; - - - //Iterate through each of the XSC Component - //Port Descriptions and use the CPD_Handler - //to propogate their values into the <port> - //sequence of <Deployment::ComponentInterfaceDescription> for (ComponentInterfaceDescription::port_iterator port (desc.begin_port ()); port != desc.end_port (); ++port) { - toconfig.port.length (toconfig.port.length () + 1); + CORBA::ULong len = + toconfig.port.length (); - cpd_handler.get_ComponentPortDescription ( - toconfig.port [toconfig.port.length () - 1], - *port); - } + toconfig.port.length (len + 1); + CPD_Handler::component_port_description ( + toconfig.port[len], + *port); + } - //If there is a - //<CIAO::ConfigHandlers::ComponentPropertyDescription> - //then propogate its value to the - //<Deployment::ComponentInterfaceDescription>. +#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. @@ -152,7 +143,7 @@ namespace CIAO toconfig.infoProperty.length () + 1); toconfig.infoProperty [toconfig.infoProperty.length () - 1] = prop; } - +#endif /*if 0*/ return 1; } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.cpp index 9aa57aa10e6..225e2035586 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.cpp @@ -1,53 +1,33 @@ // $Id$ - #include "CPD_Handler.h" namespace CIAO { namespace Config_Handlers { - - CPD_Handler::CPD_Handler (void) - { - } - CPD_Handler::~CPD_Handler (void) - { - } - - ///This method maps the values from the - ///XSC object <ComponentPortDescription> to - ///the CORBA IDL type <Deployment::ComponentPortDescription>. void - CPD_Handler::get_ComponentPortDescription ( - Deployment::ComponentPortDescription& toconfig, - ComponentPortDescription& desc) + CPD_Handler::component_port_description ( + Deployment::ComponentPortDescription& toconfig, + ComponentPortDescription& desc) { - //We make sure that a value exists for supportedType - //before increasing the size of the sequence. - if (!desc.supportedType ().empty ()) - { - toconfig.supportedType.length (1); - toconfig.supportedType[0] = - CORBA::string_dup (desc.supportedType ().c_str ()); - } - - - - toconfig.name = CORBA::string_dup (desc.name ().c_str ()); - toconfig.specificType = - CORBA::string_dup (desc.specificType ().c_str ()); - - - //The DnC spec maps these CORBA IDL booleans to - //strings. Therefore, we set them to true if a - //value was provided (and they aren't an empty string) - //and false otherwise. - toconfig.provider = !desc.provider ().empty (); - toconfig.exclusiveProvider = !desc.exclusiveProvider ().empty (); - toconfig.exclusiveUser = !desc.exclusiveUser ().empty (); - toconfig.optional = !desc.optional ().empty (); - + 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 3cbbdd8cb43..d6ce8eb9044 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/CPD_Handler.h @@ -8,8 +8,8 @@ */ //================================================ -#ifndef CPD_HANDLER_H -#define CPD_HANDLER_H +#ifndef CIAO_CONFIG_HANDLERS_CPD_HANDLER_H +#define CIAO_CONFIG_HANDLERS_CPD_HANDLER_H #include /**/ "ace/pre.h" @@ -42,20 +42,16 @@ namespace CIAO{ public: - CPD_Handler (void); - virtual ~CPD_Handler (void); - - ///This method maps the values from the - ///XSC object <ComponentInterfaceDescription> to - ///the CORBA IDL type <Deployment::ComponentInterfaceDescription>. - void - get_ComponentPortDescription ( - Deployment::ComponentPortDescription& toconfig, - ComponentPortDescription& desc); - }; + /// Maps the values from the XSC object + /// <ComponentInterfaceDescription> to the CORBA IDL type + /// <Deployment::ComponentInterfaceDescription>. + static void component_port_description ( + ::Deployment::ComponentPortDescription& toconfig, + ComponentPortDescription& desc); + }; } } #include /**/ "ace/post.h" -#endif /* CPD_HANDLER_H */ +#endif /* CIAO_CONFIG_HANDLERS_CPD_HANDLER_H*/ diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.cpp index ede65f39f61..2131349c09a 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/CRDD_Handler.cpp @@ -1,7 +1,7 @@ // $Id$ #include "CRDD_Handler.h" -#include "ANY_Handler.h" +#include "Any_Handler.h" #include "Basic_Deployment_Data.hpp" #include "ciao/Deployment_DataC.h" @@ -17,24 +17,23 @@ namespace CIAO CRDD_Handler::~CRDD_Handler (void) { } - + ///This method takes a <Deployment::ConnectionResourceDeploymentDescription> - ///and maps the values from the passed in XSC + ///and maps the values from the passed in XSC ///ConnectionResourceDeploymentDescription to its members. void CRDD_Handler::get_ConnectionResourceDeploymentDescription ( Deployment::ConnectionResourceDeploymentDescription& toconfig, ConnectionResourceDeploymentDescription& desc) { toconfig.targetName = CORBA::string_dup (desc.targetName ().c_str ()); - toconfig.requirementName = + toconfig.requirementName = CORBA::string_dup (desc.requirementName ().c_str ()); toconfig.resourceName = CORBA::string_dup (desc.resourceName ().c_str ()); - - ANY_Handler anyhandler; - anyhandler.get_Any (toconfig.resourceValue, desc.resourceValue ()); - + + Any_Handler::extract_into_any (desc.resourceValue (), + toconfig.resourceValue); } - + } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog index a0f3bbbb602..df36467cff4 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog +++ b/TAO/CIAO/DAnCE/Config_Handlers/ChangeLog @@ -1,12 +1,44 @@ +Tue Sep 28 14:43:48 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu> + + * DAnCE/Config_Handlers/Basic_Deployment_Data.cpp: + * DAnCE/Config_Handlers/Basic_Deployment_Data.hpp: + * DAnCE/Config_Handlers/ccd.cpp: + * DAnCE/Config_Handlers/ccd.hpp: + + Newly generated XSC code. + + * DAnCE/Config_Handlers/ADD_Handler.cpp: + * DAnCE/Config_Handlers/ADD_Handler.h: + * DAnCE/Config_Handlers/Any_Handler.cpp: + * DAnCE/Config_Handlers/CCD_Handler.cpp: + * DAnCE/Config_Handlers/CPD_Handler.cpp: + * DAnCE/Config_Handlers/CPD_Handler.h: + * DAnCE/Config_Handlers/CRDD_Handler.cpp: + * DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.cpp: + * DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.h: + * DAnCE/Config_Handlers/Config_Handlers.mpc: + * DAnCE/Config_Handlers/MDD_Handler.cpp: + * DAnCE/Config_Handlers/MDD_Handler.h: + * DAnCE/Config_Handlers/PCD_Handler.cpp: + * DAnCE/Config_Handlers/RDD_Handler.cpp: + * DAnCE/Config_Handlers/RDD_Handler.h: + * DAnCE/Config_Handlers/Req_Handler.cpp: + * DAnCE/Config_Handlers/Singleton_IDREF_Map.cpp: + * DAnCE/Config_Handlers/Singleton_IDREF_Map.h: + + Updated files. Not everything is dandy. We still have issues + with IDREF's. Need to talk with Boris. Lots of work remains to + be done. Everything compiles fine. + Mon Sep 27 15:42:12 2004 Jules White <jules@dre.vanderbilt.edu> - * DAnCE/Config_Handlers/ID_Handler.h: - * DAnCE/Config_Handlers/IDD_Handler.h: - * DAnCE/Config_Handlers/ADD_Handler.h: - * DAnCE/Config_Handlers/RDD_Handler.h: - * DAnCE/Config_Handelrs/ComponentPropertyDescription_Handler.h: + * DAnCE/Config_Handlers/ID_Handler.h: + * DAnCE/Config_Handlers/IDD_Handler.h: + * DAnCE/Config_Handlers/ADD_Handler.h: + * DAnCE/Config_Handlers/RDD_Handler.h: + * DAnCE/Config_Handelrs/ComponentPropertyDescription_Handler.h: - Removed references to Base_Handler. + Removed references to Base_Handler. Sat Sep 25 14:56:37 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu> diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.cpp index b55b1bd2cf4..8574a9e8e11 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.cpp @@ -2,33 +2,28 @@ #include "ComponentPropertyDescription_Handler.h" #include "DataType_Handler.h" +#include "ciao/Deployment_DataC.h" - -namespace CIAO{ - - namespace Config_Handlers{ - - CIAO::Config_Handlers::ComponentPropertyDescription_Handler::ComponentPropertyDescription_Handler(void) - { - } - CIAO::Config_Handlers::ComponentPropertyDescription_Handler::~ComponentPropertyDescription_Handler(void) - { - } - +namespace CIAO +{ + namespace Config_Handlers + { void - CIAO::Config_Handlers::ComponentPropertyDescription_Handler::get_ComponentPropertyDescription ( - Deployment::ComponentPropertyDescription& toconfig, - ComponentPropertyDescription& desc) + ComponentPropertyDescription_Handler::component_property_description ( + const ComponentPropertyDescription& desc, + ::Deployment::ComponentPropertyDescription& toconfig) { - //Copy the name to the CPD. toconfig.name = CORBA::string_dup (desc.name ().c_str ()); - //Delegate the DataType to the - //DataType_Handler. + // Delegate the DataType to the + // DataType_Handler. + + // @@ There is a lurking bug here. +#if 0 DataType_Handler dtypehandler; CORBA::TypeCode_ptr tcptr = toconfig.type.in (); dtypehandler.get_DataType (tcptr,desc.type ()); - +#endif /*if 0*/ } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.h index 5ab46a0aca3..21a565ec37c 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/ComponentPropertyDescription_Handler.h @@ -13,57 +13,46 @@ #include /**/ "ace/pre.h" -#include "Basic_Deployment_Data.hpp" -#include "Config_Handlers_export.h" -#include "ace/config-lite.h" +#include "Config_Handlers/Config_Handlers_Export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - - namespace Deployment { - class ComponentPropertyDescription; + struct ComponentPropertyDescription; } - namespace CIAO { - namespace Config_Handlers { - - class ComponentPropertyDescription; - - - /* - * @class ComponentPropertyDescription_Handler - * - * @brief Handler class for <ComponentPropertyDescription> types. - * - * This class defines handler methods to map values from - * XSC ComponentPropertyDescription objects, parsed from the descriptor files, to the - * corresponding CORBA IDL Any type. - * - */ - - class Config_Handlers_Export ComponentPropertyDescription_Handler{ - - public: - - ComponentPropertyDescription_Handler (void); - virtual ~ComponentPropertyDescription_Handler (void); - - void get_ComponentPropertyDescription ( - Deployment::ComponentPropertyDescription& toconfig, - ComponentPropertyDescription& desc); - + class ComponentPropertyDescription; + + /* + * @class ComponentPropertyDescription_Handler + * + * @brief Handler class for <ComponentPortDescription> 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 ComponentPropertyDescription_Handler + { + public: + + /// This method maps the values from the XSC object + /// <ComponentPropertyDescription> to the CORBA IDL type + /// <Deployment::ComponentPropertyDescription>. + static void component_property_description ( + const ComponentPropertyDescription& desc, + ::Deployment::ComponentPropertyDescription& toconfig); }; } } -#include /**/ "ace/post.h" +#include /**/ "ace/post.h" #endif /* CIAO_CONFIG_HANDLERS_ComponentPropertyDescription_Handler_H */ - diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Config_Handlers.mpc b/TAO/CIAO/DAnCE/Config_Handlers/Config_Handlers.mpc index bf844295058..406bf86b33e 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Config_Handlers.mpc +++ b/TAO/CIAO/DAnCE/Config_Handlers/Config_Handlers.mpc @@ -27,6 +27,7 @@ project (XSC_Config_Handlers) : ciao_deployment_stub { CPD_Handler.cpp DataType_Handler.cpp MDD_Handler.cpp + Singleton_IDREF_Map.cpp Req_Handler.cpp CPD_Handler.cpp Any_Handler.cpp @@ -39,7 +40,6 @@ project (XSC_Config_Handlers) : ciao_deployment_stub { PSPE_Handler.cpp ERE_Handler.cpp CRDD_Handler.cpp - Base_Handler.cpp ADD_Handler.cpp ComponentPropertyDescription_Handler.cpp RDD_Handler.cpp diff --git a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp index 62250b4493a..2efe1535abe 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.cpp @@ -5,66 +5,90 @@ #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) + void + MDD_Handler::mono_deployment_description ( + const MonolithicDeploymentDescription& desc, + Deployment::MonolithicDeploymentDescription& toconfig) { - } + toconfig.name = + CORBA::string_dup (desc.name ().c_str ()); - MDD_Handler::~MDD_Handler (void) - { - } + MonolithicDeploymentDescription::source_const_iterator me = + desc.end_source (); + for (MonolithicDeploymentDescription::source_const_iterator se = + desc.begin_source (); + se != me; + ++se) + { + CORBA::ULong len = + toconfig.source.length (); - void - MDD_Handler::get_MonolithicDeploymentDescription ( - Deployment::MonolithicDeploymentDescription& toconfig, - MonolithicDeploymentDescription& desc) - { + toconfig.source.length (len + 1); - toconfig.name= - CORBA::string_dup (desc.name ().c_str ()); + toconfig.source[len] = + CORBA::string_dup ((*se).c_str ()); + } - toconfig.source.length ( - toconfig.source.length () + 1); + MonolithicDeploymentDescription::artifact_const_iterator ae = + desc.end_artifact (); - toconfig.source[toconfig.source.length () - 1] = - CORBA::string_dup (desc.source ().c_str ()); + for (MonolithicDeploymentDescription::artifact_const_iterator + ab = desc.begin_artifact (); + ae != ab; + ++ab) + { + CORBA::ULong tmp = 0; - ADD_Handler artifact_handler; - ACE_TString artifact_id; +#if 0 + ACE_CString cstr = *ab; - for (MonolithicDeploymentDescription::artifact_iterator - item (desc.begin_artifact ()); - item != desc.end_artifact (); - ++item) - { - toconfig.artifactRef.length ( - toconfig.artifactRef.length () + 1); - artifact_id = item->id ().c_str (); - artifact_handler.get_ref ( - artifact_id, - toconfig.artifactRef[toconfig.artifactRef.length () - 1]); + // @@ MAJO: What should be do + bool r = + Singleton_IDREF_Map::instance ()->find_ref (cstr, + tmp); + + if (!r) + // @@MAJO: What should we do if find_ref fails? + continue; +#endif /*if 0*/ + + + + CORBA::ULong len = + toconfig.artifactRef.length (); + + toconfig.artifactRef.length (len + 1); + toconfig.artifactRef[len] = tmp; } - if (desc.execParameter_p ()) + MonolithicDeploymentDescription::execParameter_const_iterator epce = + desc.end_execParameter (); + + for (MonolithicDeploymentDescription::execParameter_const_iterator epcb = + desc.begin_execParameter (); + epcb != epce; + ++epcb) { - Property_Handler handler; - toconfig.execParameter.length ( - toconfig.execParameter.length () + 1); - handler.get_Property ( - toconfig.execParameter[toconfig.execParameter.length () - 1], - desc.execParameter ()); + CORBA::ULong len = + toconfig.execParameter.length (); + + toconfig.execParameter.length (len + 1); + + Property_Handler::get_property ((*epcb), + toconfig.execParameter[len]); } +#if 0 + // @@ MAJO: Don't know how to handle this if (desc.deployRequirement_p ()) { Req_Handler handler; @@ -74,8 +98,7 @@ namespace CIAO toconfig.deployRequirement[toconfig.deployRequirement.length () - 1], desc.deployRequirement ()); } - - +#endif /*if 0*/ } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h index a97490504c5..d34792baf75 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/MDD_Handler.h @@ -13,14 +13,12 @@ #define CIAO_CONFIG_HANDLERS_MDD_Handler_H #include /**/ "ace/pre.h" +#include "Config_Handlers_Export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "Config_Handlers_export.h" -#include "ace/config-lite.h" - namespace Deployment { @@ -33,31 +31,25 @@ 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 types. - * - */ + * @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: - - MDD_Handler (void); - virtual ~MDD_Handler (void); - - void get_MonolithicDeploymentDescription ( - Deployment::MonolithicDeploymentDescription& toconfig, - MonolithicDeploymentDescription& desc); - + static void mono_deployment_description ( + const MonolithicDeploymentDescription& desc, + Deployment::MonolithicDeploymentDescription& toconfig); }; } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp index 56f2ac83de0..ed43410e824 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/PCD_Handler.cpp @@ -21,16 +21,16 @@ namespace CIAO PCD_Handler::~PCD_Handler (void) { } - + ///This method takes a <Deployment::PlanConnectionDescription> - ///and maps the values from the passed in XSC + ///and maps the values from the passed in XSC ///PlanConnectionDescription to its members. void PCD_Handler::get_PlanConnectionDescription ( Deployment::PlanConnectionDescription& toconfig, PlanConnectionDescription& desc) { toconfig.name = CORBA::string_dup (desc.name ().c_str ()); - + //Source is mapped to a string in the schema and a sequence //in the IDL. We just assign the source string from the xml //to the first position in the IDL type's sequence. We @@ -38,30 +38,33 @@ namespace CIAO //the sequence. if (desc.source_p ()) { - toconfig.source.length (toconfig.source.length () + 1); + toconfig.source.length (toconfig.source.length () + 1); toconfig.source[toconfig.source.length () - 1] = CORBA::string_dup (desc.source ().c_str ()); } - - + + if (desc.deployRequirement_p ()) { +#if 0 + // @@ MAJO: //Create the handler for the requirements. Requirement_Handler reqhandler; - + //Increase the sequence length and delgate //the Requirement to the Req_Handler. toconfig.deployRequirement.length ( toconfig.deployRequirement.length () + 1); - reqhandler.get_Requirement ( + reqhandler.get_Requirement ( toconfig.deployRequirement[toconfig.deployRequirement.length () - 1], desc.deployRequirement ()); +#endif /*if 0*/ } - + //Create the ComponentExternalPortEndpoint handler. CEPE_Handler cepehandler; - - //Iterate through and configure each port in the + + //Iterate through and configure each port in the //externalEndpoint sequence. for (PlanConnectionDescription::externalEndpoint_iterator port (desc.begin_externalEndpoint ()); @@ -70,15 +73,15 @@ namespace CIAO { toconfig.externalEndpoint.length ( toconfig.externalEndpoint.length () + 1); - + cepehandler.get_ComponentExternalPortEndpoint ( toconfig.externalEndpoint [toconfig.externalEndpoint.length () - 1], - *port); + *port); } - - //Configure the PlanSubcomponentPortEndpoint's. + + //Configure the PlanSubcomponentPortEndpoint's. PSPE_Handler pspehandler; - + for (PlanConnectionDescription::internalEndpoint_iterator ipoint (desc.begin_internalEndpoint ()); ipoint != desc.end_internalEndpoint (); @@ -86,15 +89,15 @@ namespace CIAO { toconfig.internalEndpoint.length ( toconfig.internalEndpoint.length () + 1); - + pspehandler.get_PlanSubcomponentPortEndpoint ( toconfig.internalEndpoint [toconfig.internalEndpoint.length () - 1], - *ipoint); + *ipoint); } - - //Configure the ExternalReferenceEndpoint's. + + //Configure the ExternalReferenceEndpoint's. ERE_Handler erehandler; - + for (PlanConnectionDescription::externalReference_iterator ipoint (desc.begin_externalReference ()); ipoint != desc.end_externalReference (); @@ -102,26 +105,26 @@ namespace CIAO { toconfig.externalReference.length ( toconfig.externalReference.length () + 1); - + erehandler.get_ExternalReferenceEndpoint ( toconfig.externalReference [toconfig.externalReference.length () - 1], - *ipoint); + *ipoint); } - + //Configure the resource value. if (desc.deployedResource_p ()) { CRDD_Handler crddhandler; - + toconfig.deployedResource.length ( toconfig.deployedResource.length () + 1); - + crddhandler.get_ConnectionResourceDeploymentDescription ( toconfig.deployedResource[toconfig.deployedResource.length () - 1], - desc.deployedResource ()); + desc.deployedResource ()); } - + } - + } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.cpp index 730fc9bb711..e6b2b03b596 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.cpp @@ -1,48 +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::get_ResourceDeploymentDescription ( - Deployment::ResourceDeploymentDescription& toconfig, - ResourceDeploymentDescription& desc) + RDD_Handler::resource_deployment_descr ( + 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 resourceValue_handler; - resourceValue_handler.get_Any ( - toconfig.resourceValue, - desc.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 4c67166954d..c87056371da 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.h +++ b/TAO/CIAO/DAnCE/Config_Handlers/RDD_Handler.h @@ -14,7 +14,6 @@ #include /**/ "ace/pre.h" #include "Config_Handlers_export.h" -#include "ace/config-lite.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); - - void get_ResourceDeploymentDescription ( - Deployment::ResourceDeploymentDescription& toconfig, - ResourceDeploymentDescription& desc); + 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 4c094086ce9..56dbb7e1eab 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/Req_Handler.cpp @@ -1,7 +1,7 @@ // $Id$ #include "Req_Handler.h" -#include "Prop_Handler.h" +#include "Property_Handler.h" #include "ciao/DeploymentC.h" namespace CIAO @@ -25,17 +25,20 @@ namespace CIAO //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 ()); - + 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. - Prop_Handler prophandler; +#if 0 + /// @@ MAJO: + Property_Handler prophandler; toconfig.property.length (toconfig.property.length () + 1); - prophandler.get_Property ( + Property_Handler::get_property ( toconfig.property[toconfig.property.length () - 1], desc.property ()); +#endif /*if 0*/ } - + } } diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Singleton_IDREF_Map.cpp b/TAO/CIAO/DAnCE/Config_Handlers/Singleton_IDREF_Map.cpp new file mode 100644 index 00000000000..e1c973b490a --- /dev/null +++ b/TAO/CIAO/DAnCE/Config_Handlers/Singleton_IDREF_Map.cpp @@ -0,0 +1,41 @@ +// $Id$ +#include "Singleton_IDREF_Map.h" +#include "tao/CORBA_String.h" +#include "tao/StringSeqC.h" + +namespace CIAO +{ + namespace Config_Handlers + { + IDREF_Map::IDREF_Map (void) + // @@ MAJO, shodl be configured with some decent value. + : idref_map_ () + { + } + + bool + IDREF_Map::bind_ref (ACE_CString& id, size_t index) + { + int retval = + this->idref_map_.bind (id, index); + + if (retval < 0) + return false; + + return true; + } + + bool + IDREF_Map::find_ref (const ACE_CString& id, size_t val) + { + int retval = + this->idref_map_.find (id, val); + + if (retval < 0) + return false; + + return true; + } + + } +} diff --git a/TAO/CIAO/DAnCE/Config_Handlers/Singleton_IDREF_Map.h b/TAO/CIAO/DAnCE/Config_Handlers/Singleton_IDREF_Map.h new file mode 100644 index 00000000000..23e003938a9 --- /dev/null +++ b/TAO/CIAO/DAnCE/Config_Handlers/Singleton_IDREF_Map.h @@ -0,0 +1,84 @@ +//============================================================== +/** + * @file Singleton_IDREF_Map.h + * + * $Id$ + * + * @author Jules White <jules@dre.vanderbilt.edu> + */ +//================================================================ + +#ifndef CIAO_CONFIG_HANDLERS_SINGLETON_IDREF_MAP_H +#define CIAO_CONFIG_HANDLERS_SINGLETON_IDREF_MAP_H +#include /**/ "ace/pre.h" + +#include "Config_Handlers/Config_Handlers_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Hash_Map_Manager.h" +#include "ace/Null_Mutex.h" +#include "ace/Singleton.h" +#include "Config_Handlers/XSCRT/XMLSchema.hpp" + +namespace CORBA +{ + class String_out; + class StringSeq; +} + +namespace CIAO +{ + namespace Config_Handlers + { + /* + * @class IDREF_Map + * + * @brief This class provides a basic definition which is part of + * the singleton for mapping arbitrary UUID's to indexes that are + * used throughout the D+C spec. + * + * This class provides NO synchronization whatsoever. It's up to + * the + */ + class Config_Handlers_Export IDREF_Map + { + public: + IDREF_Map (void); + + /// The Deployment spec references elements by their position + /// within their parent sequence. + /** + * These two methods allow an element's index to be + * stored/retrieved. Map the index <index> of an element to its + * IDREF <id>. + */ + bool bind_ref (ACE_CString& id, size_t index); + + /// Retrieve the index of an element with its IDREF <id>. + /** + * @\return true if the <id> was found. + */ + bool find_ref (const ACE_CString& id, size_t val); + + private: + typedef ACE_Hash_Map_Manager<ACE_CString, + size_t, + ACE_Null_Mutex> MAP; + + /// The map used to store and look up the indexes of elements + /// referenced by their index. + MAP idref_map_; + }; + + typedef ACE_Singleton<IDREF_Map, + ACE_Null_Mutex> Singleton_IDREF_Map; + } +} + + + +#include /**/ "ace/post.h" +#endif /* CIAO_CONFIG_HANDLERS_BASE_HANDLER_H*/ diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ccd.cpp b/TAO/CIAO/DAnCE/Config_Handlers/ccd.cpp index 63e0b33f29c..1708ce7c338 100644 --- a/TAO/CIAO/DAnCE/Config_Handlers/ccd.cpp +++ b/TAO/CIAO/DAnCE/Config_Handlers/ccd.cpp @@ -6,7 +6,7 @@ namespace CIAO namespace Config_Handlers { // ComponentInterfaceDescription - // + // ComponentInterfaceDescription:: ComponentInterfaceDescription () @@ -21,9 +21,6 @@ namespace CIAO label_ (s.label_.get () ? new ::XMLSchema::string< char > (*s.label_) : 0), UUID_ (s.UUID_.get () ? new ::XMLSchema::string< char > (*s.UUID_) : 0), specificType_ (s.specificType_.get () ? new ::XMLSchema::string< char > (*s.specificType_) : 0), - idlFile_ (s.idlFile_.get () ? new ::XMLSchema::string< char > (*s.idlFile_) : 0), - property_ (s.property_.get () ? new ::CIAO::Config_Handlers::ComponentPropertyDescription (*s.property_) : 0), - infoProperty_ (s.infoProperty_.get () ? new ::CIAO::Config_Handlers::Property (*s.infoProperty_) : 0), contentLocation_ (s.contentLocation_.get () ? new ::XMLSchema::string< char > (*s.contentLocation_) : 0), regulator__ () { @@ -37,7 +34,13 @@ namespace CIAO ++i) add_supportedType (*i); } - if (idlFile_.get ()) idlFile_->container (this); + idlFile_.reserve (s.idlFile_.size ()); + { + for (idlFile_const_iterator i (s.idlFile_.begin ()); + i != s.idlFile_.end (); + ++i) add_idlFile (*i); + } + configProperty_.reserve (s.configProperty_.size ()); { for (configProperty_const_iterator i (s.configProperty_.begin ()); @@ -52,8 +55,20 @@ namespace CIAO ++i) add_port (*i); } - if (property_.get ()) property_->container (this); - if (infoProperty_.get ()) infoProperty_->container (this); + property_.reserve (s.property_.size ()); + { + for (property_const_iterator i (s.property_.begin ()); + i != s.property_.end (); + ++i) add_property (*i); + } + + infoProperty_.reserve (s.infoProperty_.size ()); + { + for (infoProperty_const_iterator i (s.infoProperty_.begin ()); + i != s.infoProperty_.end (); + ++i) add_infoProperty (*i); + } + if (contentLocation_.get ()) contentLocation_->container (this); } @@ -77,8 +92,13 @@ namespace CIAO ++i) add_supportedType (*i); } - if (s.idlFile_.get ()) idlFile (*(s.idlFile_)); - else idlFile_ = ::std::auto_ptr< ::XMLSchema::string< char > > (0); + idlFile_.clear (); + idlFile_.reserve (s.idlFile_.size ()); + { + for (idlFile_const_iterator i (s.idlFile_.begin ()); + i != s.idlFile_.end (); + ++i) add_idlFile (*i); + } configProperty_.clear (); configProperty_.reserve (s.configProperty_.size ()); @@ -96,11 +116,21 @@ namespace CIAO ++i) add_port (*i); } - if (s.property_.get ()) property (*(s.property_)); - else property_ = ::std::auto_ptr< ::CIAO::Config_Handlers::ComponentPropertyDescription > (0); + property_.clear (); + property_.reserve (s.property_.size ()); + { + for (property_const_iterator i (s.property_.begin ()); + i != s.property_.end (); + ++i) add_property (*i); + } - if (s.infoProperty_.get ()) infoProperty (*(s.infoProperty_)); - else infoProperty_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Property > (0); + infoProperty_.clear (); + infoProperty_.reserve (s.infoProperty_.size ()); + { + for (infoProperty_const_iterator i (s.infoProperty_.begin ()); + i != s.infoProperty_.end (); + ++i) add_infoProperty (*i); + } if (s.contentLocation_.get ()) contentLocation (*(s.contentLocation_)); else contentLocation_ = ::std::auto_ptr< ::XMLSchema::string< char > > (0); @@ -110,7 +140,7 @@ namespace CIAO // ComponentInterfaceDescription - // + // bool ComponentInterfaceDescription:: label_p () const { @@ -145,7 +175,7 @@ namespace CIAO } // ComponentInterfaceDescription - // + // bool ComponentInterfaceDescription:: UUID_p () const { @@ -180,7 +210,7 @@ namespace CIAO } // ComponentInterfaceDescription - // + // bool ComponentInterfaceDescription:: specificType_p () const { @@ -215,7 +245,7 @@ namespace CIAO } // ComponentInterfaceDescription - // + // ComponentInterfaceDescription::supportedType_iterator ComponentInterfaceDescription:: begin_supportedType () { @@ -266,42 +296,58 @@ namespace CIAO } // ComponentInterfaceDescription - // - bool ComponentInterfaceDescription:: - idlFile_p () const + // + ComponentInterfaceDescription::idlFile_iterator ComponentInterfaceDescription:: + begin_idlFile () { - return idlFile_.get () != 0; + return idlFile_.begin (); } - ::XMLSchema::string< char > const& ComponentInterfaceDescription:: - idlFile () const + ComponentInterfaceDescription::idlFile_iterator ComponentInterfaceDescription:: + end_idlFile () { - return *idlFile_; + return idlFile_.end (); } - ::XMLSchema::string< char >& ComponentInterfaceDescription:: - idlFile () + ComponentInterfaceDescription::idlFile_const_iterator ComponentInterfaceDescription:: + begin_idlFile () const { - return *idlFile_; + return idlFile_.begin (); + } + + ComponentInterfaceDescription::idlFile_const_iterator ComponentInterfaceDescription:: + end_idlFile () const + { + return idlFile_.end (); } void ComponentInterfaceDescription:: - idlFile (::XMLSchema::string< char > const& e) + add_idlFile (::XMLSchema::string< char > const& e) { - if (idlFile_.get ()) + if (idlFile_.capacity () < idlFile_.size () + 1) { - *idlFile_ = e; - } + ::std::vector< ::XMLSchema::string< char > > v; + v.reserve (idlFile_.size () + 1); - else - { - idlFile_ = ::std::auto_ptr< ::XMLSchema::string< char > > (new ::XMLSchema::string< char > (e)); - idlFile_->container (this); + while (idlFile_.size ()) + { + //@@ VC6 + ::XMLSchema::string< char >& t = idlFile_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + idlFile_.pop_back (); + } + + idlFile_.swap (v); } + + idlFile_.push_back (e); + idlFile_.back ().container (this); } // ComponentInterfaceDescription - // + // ComponentInterfaceDescription::configProperty_iterator ComponentInterfaceDescription:: begin_configProperty () { @@ -352,7 +398,7 @@ namespace CIAO } // ComponentInterfaceDescription - // + // ComponentInterfaceDescription::port_iterator ComponentInterfaceDescription:: begin_port () { @@ -403,77 +449,109 @@ namespace CIAO } // ComponentInterfaceDescription - // - bool ComponentInterfaceDescription:: - property_p () const + // + ComponentInterfaceDescription::property_iterator ComponentInterfaceDescription:: + begin_property () { - return property_.get () != 0; + return property_.begin (); } - ::CIAO::Config_Handlers::ComponentPropertyDescription const& ComponentInterfaceDescription:: - property () const + ComponentInterfaceDescription::property_iterator ComponentInterfaceDescription:: + end_property () { - return *property_; + return property_.end (); } - ::CIAO::Config_Handlers::ComponentPropertyDescription& ComponentInterfaceDescription:: - property () + ComponentInterfaceDescription::property_const_iterator ComponentInterfaceDescription:: + begin_property () const { - return *property_; + return property_.begin (); + } + + ComponentInterfaceDescription::property_const_iterator ComponentInterfaceDescription:: + end_property () const + { + return property_.end (); } void ComponentInterfaceDescription:: - property (::CIAO::Config_Handlers::ComponentPropertyDescription const& e) + add_property (::CIAO::Config_Handlers::ComponentPropertyDescription const& e) { - if (property_.get ()) + if (property_.capacity () < property_.size () + 1) { - *property_ = e; - } + ::std::vector< ::CIAO::Config_Handlers::ComponentPropertyDescription > v; + v.reserve (property_.size () + 1); - else - { - property_ = ::std::auto_ptr< ::CIAO::Config_Handlers::ComponentPropertyDescription > (new ::CIAO::Config_Handlers::ComponentPropertyDescription (e)); - property_->container (this); + while (property_.size ()) + { + //@@ VC6 + ::CIAO::Config_Handlers::ComponentPropertyDescription& t = property_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + property_.pop_back (); + } + + property_.swap (v); } + + property_.push_back (e); + property_.back ().container (this); } // ComponentInterfaceDescription - // - bool ComponentInterfaceDescription:: - infoProperty_p () const + // + ComponentInterfaceDescription::infoProperty_iterator ComponentInterfaceDescription:: + begin_infoProperty () + { + return infoProperty_.begin (); + } + + ComponentInterfaceDescription::infoProperty_iterator ComponentInterfaceDescription:: + end_infoProperty () { - return infoProperty_.get () != 0; + return infoProperty_.end (); } - ::CIAO::Config_Handlers::Property const& ComponentInterfaceDescription:: - infoProperty () const + ComponentInterfaceDescription::infoProperty_const_iterator ComponentInterfaceDescription:: + begin_infoProperty () const { - return *infoProperty_; + return infoProperty_.begin (); } - ::CIAO::Config_Handlers::Property& ComponentInterfaceDescription:: - infoProperty () + ComponentInterfaceDescription::infoProperty_const_iterator ComponentInterfaceDescription:: + end_infoProperty () const { - return *infoProperty_; + return infoProperty_.end (); } void ComponentInterfaceDescription:: - infoProperty (::CIAO::Config_Handlers::Property const& e) + add_infoProperty (::CIAO::Config_Handlers::Property const& e) { - if (infoProperty_.get ()) + if (infoProperty_.capacity () < infoProperty_.size () + 1) { - *infoProperty_ = e; - } + ::std::vector< ::CIAO::Config_Handlers::Property > v; + v.reserve (infoProperty_.size () + 1); - else - { - infoProperty_ = ::std::auto_ptr< ::CIAO::Config_Handlers::Property > (new ::CIAO::Config_Handlers::Property (e)); - infoProperty_->container (this); + while (infoProperty_.size ()) + { + //@@ VC6 + ::CIAO::Config_Handlers::Property& t = infoProperty_.back (); + t.container (0); + v.push_back (t); + v.back ().container (this); + infoProperty_.pop_back (); + } + + infoProperty_.swap (v); } + + infoProperty_.push_back (e); + infoProperty_.back ().container (this); } // ComponentInterfaceDescription - // + // bool ComponentInterfaceDescription:: contentLocation_p () const { @@ -555,7 +633,7 @@ namespace CIAO else if (n == "idlFile") { ::XMLSchema::string< char > t (e); - idlFile (t); + add_idlFile (t); } else if (n == "configProperty") @@ -573,13 +651,13 @@ namespace CIAO else if (n == "property") { ::CIAO::Config_Handlers::ComponentPropertyDescription t (e); - property (t); + add_property (t); } else if (n == "infoProperty") { ::CIAO::Config_Handlers::Property t (e); - infoProperty (t); + add_infoProperty (t); } else if (n == "contentLocation") @@ -588,7 +666,7 @@ namespace CIAO contentLocation (t); } - else + else { } } @@ -602,4 +680,3 @@ namespace CIAO { } } - diff --git a/TAO/CIAO/DAnCE/Config_Handlers/ccd.hpp b/TAO/CIAO/DAnCE/Config_Handlers/ccd.hpp index 703e5560c99..bb9f3a60d5f 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 @@ -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_; // specificType - // + // public: bool specificType_p () const; ::XMLSchema::string< char > const& specificType () const; @@ -62,7 +62,7 @@ namespace CIAO ::std::auto_ptr< ::XMLSchema::string< char > > specificType_; // supportedType - // + // public: typedef ::std::vector< ::XMLSchema::string< char > >::iterator supportedType_iterator; typedef ::std::vector< ::XMLSchema::string< char > >::const_iterator supportedType_const_iterator; @@ -76,18 +76,21 @@ namespace CIAO ::std::vector< ::XMLSchema::string< char > > supportedType_; // idlFile - // + // public: - bool idlFile_p () const; - ::XMLSchema::string< char > const& idlFile () const; - ::XMLSchema::string< char >& idlFile (); - void idlFile (::XMLSchema::string< char > const& ); + typedef ::std::vector< ::XMLSchema::string< char > >::iterator idlFile_iterator; + typedef ::std::vector< ::XMLSchema::string< char > >::const_iterator idlFile_const_iterator; + idlFile_iterator begin_idlFile (); + idlFile_iterator end_idlFile (); + idlFile_const_iterator begin_idlFile () const; + idlFile_const_iterator end_idlFile () const; + void add_idlFile (::XMLSchema::string< char > const& ); protected: - ::std::auto_ptr< ::XMLSchema::string< char > > idlFile_; + ::std::vector< ::XMLSchema::string< char > > idlFile_; // configProperty - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::Property >::iterator configProperty_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::Property >::const_iterator configProperty_const_iterator; @@ -101,7 +104,7 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::Property > configProperty_; // port - // + // public: typedef ::std::vector< ::CIAO::Config_Handlers::ComponentPortDescription >::iterator port_iterator; typedef ::std::vector< ::CIAO::Config_Handlers::ComponentPortDescription >::const_iterator port_const_iterator; @@ -115,29 +118,35 @@ namespace CIAO ::std::vector< ::CIAO::Config_Handlers::ComponentPortDescription > port_; // property - // + // public: - bool property_p () const; - ::CIAO::Config_Handlers::ComponentPropertyDescription const& property () const; - ::CIAO::Config_Handlers::ComponentPropertyDescription& property (); - void property (::CIAO::Config_Handlers::ComponentPropertyDescription const& ); + typedef ::std::vector< ::CIAO::Config_Handlers::ComponentPropertyDescription >::iterator property_iterator; + typedef ::std::vector< ::CIAO::Config_Handlers::ComponentPropertyDescription >::const_iterator property_const_iterator; + property_iterator begin_property (); + property_iterator end_property (); + property_const_iterator begin_property () const; + property_const_iterator end_property () const; + void add_property (::CIAO::Config_Handlers::ComponentPropertyDescription const& ); protected: - ::std::auto_ptr< ::CIAO::Config_Handlers::ComponentPropertyDescription > property_; + ::std::vector< ::CIAO::Config_Handlers::ComponentPropertyDescription > property_; // infoProperty - // + // public: - bool infoProperty_p () const; - ::CIAO::Config_Handlers::Property const& infoProperty () const; - ::CIAO::Config_Handlers::Property& infoProperty (); - void infoProperty (::CIAO::Config_Handlers::Property const& ); + typedef ::std::vector< ::CIAO::Config_Handlers::Property >::iterator infoProperty_iterator; + typedef ::std::vector< ::CIAO::Config_Handlers::Property >::const_iterator infoProperty_const_iterator; + infoProperty_iterator begin_infoProperty (); + infoProperty_iterator end_infoProperty (); + infoProperty_const_iterator begin_infoProperty () const; + infoProperty_const_iterator end_infoProperty () const; + void add_infoProperty (::CIAO::Config_Handlers::Property const& ); protected: - ::std::auto_ptr< ::CIAO::Config_Handlers::Property > infoProperty_; + ::std::vector< ::CIAO::Config_Handlers::Property > infoProperty_; // contentLocation - // + // public: bool contentLocation_p () const; ::XMLSchema::string< char > const& contentLocation () const; |