From eacc550381fcb8924ed5bb95f85eb1b7273dd60b Mon Sep 17 00:00:00 2001 From: "William R. Otte" Date: Thu, 22 Feb 2007 21:40:19 +0000 Subject: ChangeLogTag:Thu Feb 22 21:41:13 UTC 2007 William R. Otte --- config_complex_types_1/ChangeLog | 24 + .../Config_Handlers/Any_Handler.cpp | 2 +- .../Config_Handlers/Basic_Deployment_Data.cpp | 142 +++- .../Config_Handlers/Basic_Deployment_Data.hpp | 67 +- .../Config_Handlers/CIAO_Events/CIAOEvents.hpp | 4 +- .../DynAny_Handler/DynAny_Handler.cpp | 33 +- .../DynAny_Handler/DynAny_Handler.h | 5 +- .../DynAny_Handler/DynSequence_Handler.cpp | 98 +-- .../Config_Handlers/IDD_Handler.cpp | 19 +- .../Config_Handlers/IRDD_Handler.h | 8 +- .../Config_Handlers/RT-CCM/CIAOServerResources.cpp | 936 ++++++++++++++++++++- .../Config_Handlers/RT-CCM/CIAOServerResources.hpp | 473 ++++++++++- .../Config_Handlers/RT-CCM/CNPM_Handler.cpp | 93 ++ .../Config_Handlers/RT-CCM/CNPM_Handler.h | 45 + .../Config_Handlers/RT-CCM/NPM_Handler.cpp | 131 +++ .../Config_Handlers/RT-CCM/NPM_Handler.h | 45 + .../Config_Handlers/RT-CCM/PS_Handler.cpp | 52 +- .../Config_Handlers/RT-CCM/RT-CCM-Handlers.mpc | 2 + .../Config_Handlers/Utils/XercesString.cpp | 3 +- .../Config_Handlers/Utils/XercesString.h | 2 - 20 files changed, 2018 insertions(+), 166 deletions(-) create mode 100755 config_complex_types_1/Config_Handlers/RT-CCM/CNPM_Handler.cpp create mode 100755 config_complex_types_1/Config_Handlers/RT-CCM/CNPM_Handler.h create mode 100755 config_complex_types_1/Config_Handlers/RT-CCM/NPM_Handler.cpp create mode 100755 config_complex_types_1/Config_Handlers/RT-CCM/NPM_Handler.h diff --git a/config_complex_types_1/ChangeLog b/config_complex_types_1/ChangeLog index b7c9cd5dc99..a3a8e38e75d 100644 --- a/config_complex_types_1/ChangeLog +++ b/config_complex_types_1/ChangeLog @@ -1,3 +1,27 @@ +Thu Feb 22 21:41:13 UTC 2007 William R. Otte + + * tools/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp + * tools/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp + * tools/Config_Handlers/DynAny_Handler/DynAny_Handler.h + * tools/Config_Handlers/Any_Handler.cpp + * tools/Config_Handlers/Basic_Deployment_Data.cpp + * tools/Config_Handlers/CIAO_Events/CIAOEvents.hpp + * tools/Config_Handlers/Utils/XercesString.cpp + * tools/Config_Handlers/Utils/XercesString.h + * tools/Config_Handlers/IRDD_Handler.h + * tools/Config_Handlers/RT-CCM/CNPM_Handler.h + * tools/Config_Handlers/RT-CCM/CIAOServerResources.hpp + * tools/Config_Handlers/RT-CCM/PS_Handler.cpp + * tools/Config_Handlers/RT-CCM/RT-CCM-Handlers.mpc + * tools/Config_Handlers/RT-CCM/NPM_Handler.cpp + * tools/Config_Handlers/RT-CCM/CNPM_Handler.cpp + * tools/Config_Handlers/RT-CCM/NPM_Handler.h + * tools/Config_Handlers/RT-CCM/CIAOServerResources.cpp + * tools/Config_Handlers/Basic_Deployment_Data.hpp + * tools/Config_Handlers/IDD_Handler.cpp + + Merge from head to pick up recent changes there. + Wed Feb 21 16:11:05 UTC 2007 William R. Otte * tools/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp diff --git a/config_complex_types_1/Config_Handlers/Any_Handler.cpp b/config_complex_types_1/Config_Handlers/Any_Handler.cpp index 535d5a88d8a..32ec5c6f06c 100644 --- a/config_complex_types_1/Config_Handlers/Any_Handler.cpp +++ b/config_complex_types_1/Config_Handlers/Any_Handler.cpp @@ -29,7 +29,7 @@ namespace CIAO { CIAO_TRACE("Any_Handler::extract_into_any"); DynamicAny::DynAny_var dyn = DYNANY_HANDLER->extract_into_dynany (desc.type (), - desc.value ()); + desc.begin_value ()); toconfig = *dyn->to_any (); diff --git a/config_complex_types_1/Config_Handlers/Basic_Deployment_Data.cpp b/config_complex_types_1/Config_Handlers/Basic_Deployment_Data.cpp index a70e3ad6b38..27682fe0351 100644 --- a/config_complex_types_1/Config_Handlers/Basic_Deployment_Data.cpp +++ b/config_complex_types_1/Config_Handlers/Basic_Deployment_Data.cpp @@ -3090,7 +3090,6 @@ namespace CIAO node_ (new ::XMLSchema::string< ACE_TCHAR > (*s.node_)), source_ (new ::XMLSchema::string< ACE_TCHAR > (*s.source_)), implementation_ (new ::XMLSchema::IDREF< ACE_TCHAR > (*s.implementation_)), - deployedResource_ (s.deployedResource_.get () ? new ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription (*s.deployedResource_) : 0), deployedSharedResource_ (s.deployedSharedResource_.get () ? new ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription (*s.deployedSharedResource_) : 0), id_ (s.id_.get () ? new ::XMLSchema::ID< ACE_TCHAR > (*s.id_) : 0), regulator__ () @@ -3103,7 +3102,10 @@ namespace CIAO for (configProperty_const_iterator i (s.configProperty_.begin ());i != s.configProperty_.end ();++i) add_configProperty (*i); } - if (deployedResource_.get ()) deployedResource_->container (this); + { + for (deployedResource_const_iterator i (s.deployedResource_.begin ());i != s.deployedResource_.end ();++i) add_deployedResource (*i); + } + if (deployedSharedResource_.get ()) deployedSharedResource_->container (this); if (id_.get ()) id_->container (this); } @@ -3124,8 +3126,10 @@ namespace CIAO for (configProperty_const_iterator i (s.configProperty_.begin ());i != s.configProperty_.end ();++i) add_configProperty (*i); } - if (s.deployedResource_.get ()) deployedResource (*(s.deployedResource_)); - else deployedResource_ = ::std::auto_ptr< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription > (0); + deployedResource_.clear (); + { + for (deployedResource_const_iterator i (s.deployedResource_.begin ());i != s.deployedResource_.end ();++i) add_deployedResource (*i); + } if (s.deployedSharedResource_.get ()) deployedSharedResource (*(s.deployedSharedResource_)); else deployedSharedResource_ = ::std::auto_ptr< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription > (0); @@ -3233,31 +3237,40 @@ namespace CIAO // InstanceDeploymentDescription // - bool InstanceDeploymentDescription:: - deployedResource_p () const + InstanceDeploymentDescription::deployedResource_iterator InstanceDeploymentDescription:: + begin_deployedResource () { - return deployedResource_.get () != 0; + return deployedResource_.begin (); } - ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription const& InstanceDeploymentDescription:: - deployedResource () const + InstanceDeploymentDescription::deployedResource_iterator InstanceDeploymentDescription:: + end_deployedResource () { - return *deployedResource_; + return deployedResource_.end (); + } + + InstanceDeploymentDescription::deployedResource_const_iterator InstanceDeploymentDescription:: + begin_deployedResource () const + { + return deployedResource_.begin (); + } + + InstanceDeploymentDescription::deployedResource_const_iterator InstanceDeploymentDescription:: + end_deployedResource () const + { + return deployedResource_.end (); } void InstanceDeploymentDescription:: - deployedResource (::CIAO::Config_Handlers::InstanceResourceDeploymentDescription const& e) + add_deployedResource (::CIAO::Config_Handlers::InstanceResourceDeploymentDescription const& e) { - if (deployedResource_.get ()) - { - *deployedResource_ = e; - } + deployedResource_.push_back (e); + } - else - { - deployedResource_ = ::std::auto_ptr< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription > (new ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription (e)); - deployedResource_->container (this); - } + size_t InstanceDeploymentDescription:: + count_deployedResource(void) const + { + return deployedResource_.size (); } // InstanceDeploymentDescription @@ -6270,7 +6283,7 @@ namespace CIAO else if (n == "deployedResource") { ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription t (e); - deployedResource (t); + add_deployedResource (t); } else if (n == "deployedSharedResource") @@ -11426,8 +11439,7 @@ namespace CIAO source (o); implementation (o); configProperty (o); - if (o.deployedResource_p ()) deployedResource (o); - else deployedResource_none (o); + deployedResource (o); if (o.deployedSharedResource_p ()) deployedSharedResource (o); else deployedSharedResource_none (o); if (o.id_p ()) id (o); @@ -11444,8 +11456,7 @@ namespace CIAO source (o); implementation (o); configProperty (o); - if (o.deployedResource_p ()) deployedResource (o); - else deployedResource_none (o); + deployedResource (o); if (o.deployedSharedResource_p ()) deployedSharedResource (o); else deployedSharedResource_none (o); if (o.id_p ()) id (o); @@ -11598,13 +11609,75 @@ namespace CIAO void InstanceDeploymentDescription:: deployedResource (Type& o) { - dispatch (o.deployedResource ()); + // VC6 anathema strikes again + // + InstanceDeploymentDescription::Type::deployedResource_iterator b (o.begin_deployedResource()), e (o.end_deployedResource()); + + if (b != e) + { + deployedResource_pre (o); + for (; b != e;) + { + dispatch (*b); + if (++b != e) deployedResource_next (o); + } + + deployedResource_post (o); + } + + else deployedResource_none (o); } void InstanceDeploymentDescription:: deployedResource (Type const& o) { - dispatch (o.deployedResource ()); + // VC6 anathema strikes again + // + InstanceDeploymentDescription::Type::deployedResource_const_iterator b (o.begin_deployedResource()), e (o.end_deployedResource()); + + if (b != e) + { + deployedResource_pre (o); + for (; b != e;) + { + dispatch (*b); + if (++b != e) deployedResource_next (o); + } + + deployedResource_post (o); + } + + else deployedResource_none (o); + } + + void InstanceDeploymentDescription:: + deployedResource_pre (Type&) + { + } + + void InstanceDeploymentDescription:: + deployedResource_pre (Type const&) + { + } + + void InstanceDeploymentDescription:: + deployedResource_next (Type&) + { + } + + void InstanceDeploymentDescription:: + deployedResource_next (Type const&) + { + } + + void InstanceDeploymentDescription:: + deployedResource_post (Type&) + { + } + + void InstanceDeploymentDescription:: + deployedResource_post (Type const&) + { } void InstanceDeploymentDescription:: @@ -15470,10 +15543,21 @@ namespace CIAO } void InstanceDeploymentDescription:: - deployedResource (Type const& o) + deployedResource_pre (Type const&) { push_ (::XSCRT::XML::Element< ACE_TCHAR > ("deployedResource", top_ ())); - Traversal::InstanceDeploymentDescription::deployedResource (o); + } + + void InstanceDeploymentDescription:: + deployedResource_next (Type const& o) + { + deployedResource_post (o); + deployedResource_pre (o); + } + + void InstanceDeploymentDescription:: + deployedResource_post (Type const&) + { pop_ (); } diff --git a/config_complex_types_1/Config_Handlers/Basic_Deployment_Data.hpp b/config_complex_types_1/Config_Handlers/Basic_Deployment_Data.hpp index dfbd20ef4c2..72e3893f730 100644 --- a/config_complex_types_1/Config_Handlers/Basic_Deployment_Data.hpp +++ b/config_complex_types_1/Config_Handlers/Basic_Deployment_Data.hpp @@ -118,7 +118,7 @@ namespace CIAO enum Value { - tk_null_l,tk_void_l,tk_short_l,tk_long_l,tk_ushort_l,tk_ulong_l,tk_float_l,tk_double_l,tk_boolean_l,tk_char_l,tk_octet_l,tk_any_l,tk_TypeCode_l,tk_Principal_l,tk_objref_l,tk_struct_l,tk_union_l,tk_enum_l,tk_string_l,tk_sequence_l,tk_array_l,tk_alias_l,tk_except_l,tk_longlong_l,tk_ulonglong_l,tk_longdouble_l,tk_wchar_l,tk_wstring_l,tk_wfixed_l,tk_value_l,tk_value_box_l,tk_native_l,tk_abstract_interface_l,tk_local_interface_l,tk_component_l,tk_home_l,tk_event_l, + tk_null_l, tk_void_l, tk_short_l, tk_long_l, tk_ushort_l, tk_ulong_l, tk_float_l, tk_double_l, tk_boolean_l, tk_char_l, tk_octet_l, tk_any_l, tk_TypeCode_l, tk_Principal_l, tk_objref_l, tk_struct_l, tk_union_l, tk_enum_l, tk_string_l, tk_sequence_l, tk_array_l, tk_alias_l, tk_except_l, tk_longlong_l, tk_ulonglong_l, tk_longdouble_l, tk_wchar_l, tk_wstring_l, tk_wfixed_l, tk_value_l, tk_value_box_l, tk_native_l, tk_abstract_interface_l, tk_local_interface_l, tk_component_l, tk_home_l, tk_event_l }; @@ -882,7 +882,7 @@ namespace CIAO enum Value { - Quantity_l,Capacity_l,Minimum_l,Maximum_l,Attribute_l,Selection_l, + Quantity_l, Capacity_l, Minimum_l, Maximum_l, Attribute_l, Selection_l }; @@ -1365,7 +1365,7 @@ namespace CIAO enum Value { - None_l,InstanceUsesResource_l,ResourceUsesInstance_l,PortUsesResource_l,ResourceUsesPort_l, + None_l, InstanceUsesResource_l, ResourceUsesInstance_l, PortUsesResource_l, ResourceUsesPort_l }; @@ -1511,12 +1511,17 @@ namespace CIAO // deployedResource // public: - bool deployedResource_p () const; - ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription const& deployedResource () const; - void deployedResource (::CIAO::Config_Handlers::InstanceResourceDeploymentDescription const& ); + typedef ::std::list< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription >::iterator deployedResource_iterator; + typedef ::std::list< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription >::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::InstanceResourceDeploymentDescription const& ); + size_t count_deployedResource (void) const; protected: - ::std::auto_ptr< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription > deployedResource_; + ::std::list< ::CIAO::Config_Handlers::InstanceResourceDeploymentDescription > deployedResource_; // deployedSharedResource // @@ -1571,7 +1576,7 @@ namespace CIAO enum Value { - Facet_l,SimplexReceptacle_l,MultiplexReceptacle_l,EventEmitter_l,EventPublisher_l,EventConsumer_l, + Facet_l, SimplexReceptacle_l, MultiplexReceptacle_l, EventEmitter_l, EventPublisher_l, EventConsumer_l }; @@ -4055,6 +4060,24 @@ namespace CIAO virtual void deployedResource (Type const&); + virtual void + deployedResource_pre (Type&); + + virtual void + deployedResource_pre (Type const&); + + virtual void + deployedResource_next (Type&); + + virtual void + deployedResource_next (Type const&); + + virtual void + deployedResource_post (Type&); + + virtual void + deployedResource_post (Type const&); + virtual void deployedResource_none (Type&); @@ -7074,15 +7097,37 @@ namespace CIAO configProperty_post (Type const&); virtual void - deployedResource (Type &o) + deployedResource_pre (Type &o) { - this->deployedResource (const_cast (o)); + this->deployedResource_pre (const_cast (o)); } virtual void - deployedResource (Type const&); + deployedResource_pre (Type const&); + + virtual void + deployedResource_next (Type &o) + { + + this->deployedResource_next (const_cast (o)); + } + + + virtual void + deployedResource_next (Type const&); + + virtual void + deployedResource_post (Type &o) + { + + this->deployedResource_post (const_cast (o)); + } + + + virtual void + deployedResource_post (Type const&); virtual void deployedSharedResource (Type &o) diff --git a/config_complex_types_1/Config_Handlers/CIAO_Events/CIAOEvents.hpp b/config_complex_types_1/Config_Handlers/CIAO_Events/CIAOEvents.hpp index 8ca8e521268..d94aab6d032 100644 --- a/config_complex_types_1/Config_Handlers/CIAO_Events/CIAOEvents.hpp +++ b/config_complex_types_1/Config_Handlers/CIAO_Events/CIAOEvents.hpp @@ -57,7 +57,7 @@ namespace CIAO enum Value { - EC_l,RTEC_l,NOTIFY_l,RTNOTIFY_l, + EC_l, RTEC_l, NOTIFY_l, RTNOTIFY_l }; @@ -268,7 +268,7 @@ namespace CIAO enum Value { - CONJUNCTION_l,DISJUNCTION_l,LOGICAL_AND_l,NEGATE_l, + CONJUNCTION_l, DISJUNCTION_l, LOGICAL_AND_l, NEGATE_l }; diff --git a/config_complex_types_1/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp b/config_complex_types_1/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp index 91cbe881f12..22041847890 100644 --- a/config_complex_types_1/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp +++ b/config_complex_types_1/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp @@ -46,12 +46,11 @@ namespace CIAO } DynamicAny::DynAny_ptr - DynAny_Handler::extract_into_dynany (const DataType& type, - const DataValue& value) + DynAny_Handler::extract_into_dynany (const Any &any) { DynamicAny::DynAny_var retval; - switch (type.kind ().integral ()) + switch (any.type ().kind ().integral ()) { // ========== BASIC TYPES case TCKind::tk_null_l: @@ -60,62 +59,62 @@ namespace CIAO case TCKind::tk_short_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_short); - retval->insert_short (CORBA::Short (static_cast < ::XMLSchema::short_ const & > (*value.begin_short ()))); + retval->insert_short (CORBA::Short (static_cast < ::XMLSchema::short_ const & > (any.value ().begin_short ()))); break; case TCKind::tk_long_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_long); - retval->insert_long (CORBA::Long (static_cast < ::XMLSchema::int_ const& > (*value.begin_long ()))); + retval->insert_long (CORBA::Long (static_cast < ::XMLSchema::int_ const& > (any.value ().begin_long ()))); break; case TCKind::tk_ushort_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_ushort); - retval->insert_ushort (CORBA::UShort (static_cast< ::XMLSchema::unsignedShort const & > (*value.begin_ushort ()))); + retval->insert_ushort (CORBA::UShort (static_cast< ::XMLSchema::unsignedShort const & > (any.value ().begin_ushort ()))); break; case TCKind::tk_ulong_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_ulong); - retval->insert_ulong (CORBA::ULong (static_cast < ::XMLSchema::unsignedInt const& > (*value.begin_ulong ()))); + retval->insert_ulong (CORBA::ULong (static_cast < ::XMLSchema::unsignedInt const& > (any.value ().begin_ulong ()))); break; case TCKind::tk_float_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_float); - retval->insert_float (CORBA::Float (*value.begin_float ())); + retval->insert_float (CORBA::Float (any.value ().begin_float ())); break; case TCKind::tk_double_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_double); - retval->insert_double (CORBA::Double (*value.begin_double ())); + retval->insert_double (CORBA::Double (any.value ().begin_double ())); break; case TCKind::tk_boolean_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_boolean); - retval->insert_boolean (static_cast < ::XMLSchema::boolean const& > (*value.begin_boolean ())); + retval->insert_boolean (static_cast < ::XMLSchema::boolean const& > (any.value ().begin_boolean ())); break; case TCKind::tk_char_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_char); - retval->insert_char (CORBA::Char (*value.begin_string ()->c_str ())); + retval->insert_char (CORBA::Char (any.value ().begin_string ()->c_str ())); break; case TCKind::tk_octet_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_octet); - retval->insert_octet (static_cast (*value.begin_octet ())); + retval->insert_octet (static_cast (any.value ().begin_octet ())); break; case TCKind::tk_string_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_string); - retval->insert_string (value.begin_string ()->c_str ()); + retval->insert_string (value->begin_string ()->c_str ()); break; case TCKind::tk_longlong_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_longlong); - retval->insert_longlong (CORBA::LongLong (static_cast < ::XMLSchema::long_ const& > (*value.begin_longlong ()))); + retval->insert_longlong (CORBA::LongLong (static_cast < ::XMLSchema::long_ const& > (any.value ().begin_longlong ()))); break; case TCKind::tk_ulonglong_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_ulonglong); - retval->insert_ulonglong (CORBA::ULongLong (static_cast < ::XMLSchema::unsignedLong const& > (*value.begin_ulonglong ()))); + retval->insert_ulonglong (CORBA::ULongLong (static_cast < ::XMLSchema::unsignedLong const& > (any.value ().begin_ulonglong ()))); break; case TCKind::tk_longdouble_l: @@ -123,7 +122,7 @@ namespace CIAO case TCKind::tk_wchar_l: retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_wchar); - retval->insert_wchar (CORBA::WChar (*value.begin_string ()->c_str ())); + retval->insert_wchar (CORBA::WChar (any.value ().begin_string ()->c_str ())); break; case TCKind::tk_wstring_l: @@ -131,7 +130,7 @@ namespace CIAO case TCKind::tk_enum_l: ACE_ERROR ((LM_ERROR, "Preparing to extract into enum\n")); - return DynEnum_Handler::extract_into_dynany (type, value); + return DynEnum_Handler::extract_into_dynany (type, *value); case TCKind::tk_wfixed_l: case TCKind::tk_any_l: diff --git a/config_complex_types_1/Config_Handlers/DynAny_Handler/DynAny_Handler.h b/config_complex_types_1/Config_Handlers/DynAny_Handler/DynAny_Handler.h index e76042b2456..7914d55f2a1 100644 --- a/config_complex_types_1/Config_Handlers/DynAny_Handler/DynAny_Handler.h +++ b/config_complex_types_1/Config_Handlers/DynAny_Handler/DynAny_Handler.h @@ -49,9 +49,8 @@ namespace CIAO ~DynAny_Handler (void); - DynamicAny::DynAny_ptr extract_into_dynany (const DataType& type, - const DataValue& value); - + DynamicAny::DynAny_ptr extract_into_dynany (const Any &any); + Any extract_from_dynany (const CORBA::Any &any); CORBA::ORB_ptr orb (); diff --git a/config_complex_types_1/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp b/config_complex_types_1/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp index f2725a42d82..b31243960ca 100644 --- a/config_complex_types_1/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp +++ b/config_complex_types_1/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp @@ -15,107 +15,63 @@ namespace CIAO namespace Config_Handlers { DynamicAny::DynAny_ptr - DynSequence_Handler::extract_into_dynany (const DataType &type, - const DataValue &value) + DynSequence_Handler::extract_into_dynany (const Any &any) { - CORBA::TypeCode_ptr tc = DynSequence_Handler::create_typecode (type); + CORBA::TypeCode_ptr tc = DynSequence_Handler::create_typecode (any.type ()); // Make the actual DynSequence DynamicAny::DynAny_var temp = DYNANY_HANDLER->daf ()->create_dyn_any_from_type_code (tc); DynamicAny::DynSequence_var retval = DynamicAny::DynSequence::_narrow (temp.in ()); - switch (type.kind ().integral ()) + CORBA::TypeCode_ptr element_tc = + DynAny_Handler::create_typecode (any.type ().sequence ().elementType ()); + + switch (any.type ().kind ().integral ()) { // ========== BASIC TYPES case TCKind::tk_null_l: case TCKind::tk_void_l: ACE_ERROR ((LM_WARNING, "I don't know how to handle null or void types\n")); + throw 1; case TCKind::tk_short_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_short); - retval->insert_short (CORBA::Short (static_cast < ::XMLSchema::short_ const & > (*value.begin_short ()))); - break; - case TCKind::tk_long_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_long); - retval->insert_long (CORBA::Long (static_cast < ::XMLSchema::int_ const& > (*value.begin_long ()))); - break; - case TCKind::tk_ushort_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_ushort); - retval->insert_ushort (CORBA::UShort (static_cast< ::XMLSchema::unsignedShort const & > (*value.begin_ushort ()))); - break; - case TCKind::tk_ulong_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_ulong); - retval->insert_ulong (CORBA::ULong (static_cast < ::XMLSchema::unsignedInt const& > (*value.begin_ulong ()))); - break; - case TCKind::tk_float_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_float); - retval->insert_float (CORBA::Float (*value.begin_float ())); - break; - case TCKind::tk_double_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_double); - retval->insert_double (CORBA::Double (*value.begin_double ())); - break; - case TCKind::tk_boolean_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_boolean); - retval->insert_boolean (static_cast < ::XMLSchema::boolean const& > (*value.begin_boolean ())); - break; - - case TCKind::tk_char_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_char); - retval->insert_char (CORBA::Char (*value.begin_string ()->c_str ())); - break; - case TCKind::tk_octet_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_octet); - retval->insert_octet (static_cast (*value.begin_octet ())); - break; - case TCKind::tk_string_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_string); - retval->insert_string (value.begin_string ()->c_str ()); - break; - case TCKind::tk_longlong_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_longlong); - retval->insert_longlong (CORBA::LongLong (static_cast < ::XMLSchema::long_ const& > (*value.begin_longlong ()))); - break; - case TCKind::tk_ulonglong_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_ulonglong); - retval->insert_ulonglong (CORBA::ULongLong (static_cast < ::XMLSchema::unsignedLong const& > (*value.begin_ulonglong ()))); - break; - - case TCKind::tk_longdouble_l: - break; - - case TCKind::tk_wchar_l: - retval = this->daf_->create_dyn_any_from_type_code (CORBA::_tc_wchar); - retval->insert_wchar (CORBA::WChar (*value.begin_string ()->c_str ())); - break; - + case TCKind::tk_longdouble_l: case TCKind::tk_wstring_l: - break; - case TCKind::tk_enum_l: - ACE_ERROR ((LM_ERROR, "Preparing to extract into enum\n")); - return DynEnum_Handler::extract_into_dynany (type, value); - + case TCKind::tk_objref_l: + case TCKind::tk_fixed_l: case TCKind::tk_wfixed_l: + case TCKind::tk_component_l: + case TCKind::tk_home_l: + // special case where multiplicity of data value iterator is greater than one + // and is equal to length of sequence. + for (Any::value_const_iterator i = values; + values + case TCKind::tk_char_l: + case TCKind::tk_wchar_l: + // special case where value iterataor multiplicity should be one, and should + // represent a string, each character of which becomes a element of the sequence. + + case TCKind::tk_sequence_l: + case TCKind::tk_array_l: + // Several special cases here. + case TCKind::tk_any_l: case TCKind::tk_TypeCode_l: case TCKind::tk_Principal_l: - case TCKind::tk_objref_l: case TCKind::tk_struct_l: case TCKind::tk_union_l: - case TCKind::tk_sequence_l: - case TCKind::tk_array_l: case TCKind::tk_alias_l: case TCKind::tk_except_l: case TCKind::tk_value_l: @@ -123,9 +79,9 @@ namespace CIAO case TCKind::tk_native_l: case TCKind::tk_abstract_interface_l: case TCKind::tk_local_interface_l: - case TCKind::tk_component_l: - case TCKind::tk_home_l: case TCKind::tk_event_l: + // Special case where element association in datavalue contains another datavalue. + ACE_ERROR ((LM_ERROR, "Type not supported\n")); throw 1; } diff --git a/config_complex_types_1/Config_Handlers/IDD_Handler.cpp b/config_complex_types_1/Config_Handlers/IDD_Handler.cpp index f82413cad6b..758b395b354 100644 --- a/config_complex_types_1/Config_Handlers/IDD_Handler.cpp +++ b/config_complex_types_1/Config_Handlers/IDD_Handler.cpp @@ -80,12 +80,10 @@ namespace CIAO src.end_configProperty (), Property_Functor (dest.configProperty)); - if (src.deployedResource_p ()) - { - dest.deployedResource.length (1); - IRDD_Handler::instance_resource_deployment_descr (src.deployedResource (), - dest.deployedResource[0]); - } + dest.deployedResource.length (src.count_deployedResource ()); + std::for_each (src.begin_deployedResource (), + src.end_deployedResource (), + IRDD_Functor (dest.deployedResource)); if (src.deployedSharedResource_p ()) { @@ -134,9 +132,12 @@ namespace CIAO src.configProperty[j])); } - //Check if there is a deployedResource, if so store - if(src.deployedResource.length() != 0) - idd.deployedResource(IRDD_Handler::instance_resource_deployment_descr(src.deployedResource[0])); + // Get and store the deployedResource(s) + size_t dp_total = src.deployedResource.length (); + for (size_t k = 0; k < dp_total; k++) + { + idd.add_deployedResource (IRDD_Handler::instance_resource_deployment_descr (src.deployedResource[k])); + } //Check if there is a deployedSharedResource, if so store it if(src.deployedSharedResource.length() != 0) diff --git a/config_complex_types_1/Config_Handlers/IRDD_Handler.h b/config_complex_types_1/Config_Handlers/IRDD_Handler.h index df30ed2e87f..f0dfea04ab3 100644 --- a/config_complex_types_1/Config_Handlers/IRDD_Handler.h +++ b/config_complex_types_1/Config_Handlers/IRDD_Handler.h @@ -15,6 +15,7 @@ #include "Common.h" #include "Config_Handlers_Export.h" #include "ace/config-lite.h" +#include "Utils/Functors.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -25,6 +26,7 @@ namespace Deployment { struct InstanceResourceDeploymentDescription; +class InstanceResourceDeploymentDescriptions; } @@ -60,9 +62,11 @@ static InstanceResourceDeploymentDescription instance_resource_deployment_descr ( const Deployment::InstanceResourceDeploymentDescription& src) throw (Config_Error); - - }; +typedef Sequence_Handler IRDD_Functor; } } diff --git a/config_complex_types_1/Config_Handlers/RT-CCM/CIAOServerResources.cpp b/config_complex_types_1/Config_Handlers/RT-CCM/CIAOServerResources.cpp index 9c626644188..5a495c966c2 100644 --- a/config_complex_types_1/Config_Handlers/RT-CCM/CIAOServerResources.cpp +++ b/config_complex_types_1/Config_Handlers/RT-CCM/CIAOServerResources.cpp @@ -1331,6 +1331,14 @@ namespace CIAO for (priorityModel_const_iterator i (s.priorityModel_.begin ());i != s.priorityModel_.end ();++i) add_priorityModel (*i); } + { + for (nwpriorityModel_const_iterator i (s.nwpriorityModel_.begin ());i != s.nwpriorityModel_.end ();++i) add_nwpriorityModel (*i); + } + + { + for (cnwpriorityModel_const_iterator i (s.cnwpriorityModel_.begin ());i != s.cnwpriorityModel_.end ();++i) add_cnwpriorityModel (*i); + } + { for (threadpool_const_iterator i (s.threadpool_.begin ());i != s.threadpool_.end ();++i) add_threadpool (*i); } @@ -1350,6 +1358,16 @@ namespace CIAO for (priorityModel_const_iterator i (s.priorityModel_.begin ());i != s.priorityModel_.end ();++i) add_priorityModel (*i); } + nwpriorityModel_.clear (); + { + for (nwpriorityModel_const_iterator i (s.nwpriorityModel_.begin ());i != s.nwpriorityModel_.end ();++i) add_nwpriorityModel (*i); + } + + cnwpriorityModel_.clear (); + { + for (cnwpriorityModel_const_iterator i (s.cnwpriorityModel_.begin ());i != s.cnwpriorityModel_.end ();++i) add_cnwpriorityModel (*i); + } + threadpool_.clear (); { for (threadpool_const_iterator i (s.threadpool_.begin ());i != s.threadpool_.end ();++i) add_threadpool (*i); @@ -1405,6 +1423,82 @@ namespace CIAO return priorityModel_.size (); } + // PolicySet + // + PolicySet::nwpriorityModel_iterator PolicySet:: + begin_nwpriorityModel () + { + return nwpriorityModel_.begin (); + } + + PolicySet::nwpriorityModel_iterator PolicySet:: + end_nwpriorityModel () + { + return nwpriorityModel_.end (); + } + + PolicySet::nwpriorityModel_const_iterator PolicySet:: + begin_nwpriorityModel () const + { + return nwpriorityModel_.begin (); + } + + PolicySet::nwpriorityModel_const_iterator PolicySet:: + end_nwpriorityModel () const + { + return nwpriorityModel_.end (); + } + + void PolicySet:: + add_nwpriorityModel (::CIAO::Config_Handlers::NWPriorityModelPolicyDef const& e) + { + nwpriorityModel_.push_back (e); + } + + size_t PolicySet:: + count_nwpriorityModel(void) const + { + return nwpriorityModel_.size (); + } + + // PolicySet + // + PolicySet::cnwpriorityModel_iterator PolicySet:: + begin_cnwpriorityModel () + { + return cnwpriorityModel_.begin (); + } + + PolicySet::cnwpriorityModel_iterator PolicySet:: + end_cnwpriorityModel () + { + return cnwpriorityModel_.end (); + } + + PolicySet::cnwpriorityModel_const_iterator PolicySet:: + begin_cnwpriorityModel () const + { + return cnwpriorityModel_.begin (); + } + + PolicySet::cnwpriorityModel_const_iterator PolicySet:: + end_cnwpriorityModel () const + { + return cnwpriorityModel_.end (); + } + + void PolicySet:: + add_cnwpriorityModel (::CIAO::Config_Handlers::CNWPriorityModelPolicyDef const& e) + { + cnwpriorityModel_.push_back (e); + } + + size_t PolicySet:: + count_cnwpriorityModel(void) const + { + return cnwpriorityModel_.size (); + } + // PolicySet // PolicySet::threadpool_iterator PolicySet:: @@ -1544,6 +1638,33 @@ namespace CIAO { } + // NWPriorityModel + // + + NWPriorityModel::Value NWPriorityModel:: + integral () const + { + return v_; + } + + bool + operator== (::CIAO::Config_Handlers::NWPriorityModel const& a, ::CIAO::Config_Handlers::NWPriorityModel const& b) + { + return a.v_ == b.v_; + } + + bool + operator!= (::CIAO::Config_Handlers::NWPriorityModel const& a, ::CIAO::Config_Handlers::NWPriorityModel const& b) + { + return a.v_ != b.v_; + } + + NWPriorityModel:: + NWPriorityModel (NWPriorityModel::Value v) + : v_ (v) + { + } + // PriorityModelPolicyDef // @@ -1629,6 +1750,163 @@ namespace CIAO server_priority_->container (this); } } + + + // NWPriorityModelPolicyDef + // + + NWPriorityModelPolicyDef:: + NWPriorityModelPolicyDef (::CIAO::Config_Handlers::NWPriorityModel const& nw_priority_model__, + ::XMLSchema::long_ const& request_dscp__, + ::XMLSchema::long_ const& reply_dscp__) + : + ::XSCRT::Type (), + nw_priority_model_ (new ::CIAO::Config_Handlers::NWPriorityModel (nw_priority_model__)), + request_dscp_ (new ::XMLSchema::long_ (request_dscp__)), + reply_dscp_ (new ::XMLSchema::long_ (reply_dscp__)), + regulator__ () + { + nw_priority_model_->container (this); + request_dscp_->container (this); + reply_dscp_->container (this); + } + + NWPriorityModelPolicyDef:: + NWPriorityModelPolicyDef (::CIAO::Config_Handlers::NWPriorityModelPolicyDef const& s) + : + ::XSCRT::Type (), + nw_priority_model_ (new ::CIAO::Config_Handlers::NWPriorityModel (*s.nw_priority_model_)), + request_dscp_ (new ::XMLSchema::long_ (*s.request_dscp_)), + reply_dscp_ (new ::XMLSchema::long_ (*s.reply_dscp_)), + regulator__ () + { + nw_priority_model_->container (this); + request_dscp_->container (this); + reply_dscp_->container (this); + } + + ::CIAO::Config_Handlers::NWPriorityModelPolicyDef& NWPriorityModelPolicyDef:: + operator= (::CIAO::Config_Handlers::NWPriorityModelPolicyDef const& s) + { + nw_priority_model (s.nw_priority_model ()); + + request_dscp (s.request_dscp ()); + + reply_dscp (s.reply_dscp ()); + + return *this; + } + + + // NWPriorityModelPolicyDef + // + ::CIAO::Config_Handlers::NWPriorityModel const& NWPriorityModelPolicyDef:: + nw_priority_model () const + { + return *nw_priority_model_; + } + + void NWPriorityModelPolicyDef:: + nw_priority_model (::CIAO::Config_Handlers::NWPriorityModel const& e) + { + *nw_priority_model_ = e; + } + + // NWPriorityModelPolicyDef + // + ::XMLSchema::long_ const& NWPriorityModelPolicyDef:: + request_dscp () const + { + return *request_dscp_; + } + + void NWPriorityModelPolicyDef:: + request_dscp (::XMLSchema::long_ const& e) + { + *request_dscp_ = e; + } + + // NWPriorityModelPolicyDef + // + ::XMLSchema::long_ const& NWPriorityModelPolicyDef:: + reply_dscp () const + { + return *reply_dscp_; + } + + void NWPriorityModelPolicyDef:: + reply_dscp (::XMLSchema::long_ const& e) + { + *reply_dscp_ = e; + } + + + // CNWPriorityModelPolicyDef + // + + CNWPriorityModelPolicyDef:: + CNWPriorityModelPolicyDef (::XMLSchema::long_ const& request_dscp__, + ::XMLSchema::long_ const& reply_dscp__) + : + ::XSCRT::Type (), + request_dscp_ (new ::XMLSchema::long_ (request_dscp__)), + reply_dscp_ (new ::XMLSchema::long_ (reply_dscp__)), + regulator__ () + { + request_dscp_->container (this); + reply_dscp_->container (this); + } + + CNWPriorityModelPolicyDef:: + CNWPriorityModelPolicyDef (::CIAO::Config_Handlers::CNWPriorityModelPolicyDef const& s) + : + ::XSCRT::Type (), + request_dscp_ (new ::XMLSchema::long_ (*s.request_dscp_)), + reply_dscp_ (new ::XMLSchema::long_ (*s.reply_dscp_)), + regulator__ () + { + request_dscp_->container (this); + reply_dscp_->container (this); + } + + ::CIAO::Config_Handlers::CNWPriorityModelPolicyDef& CNWPriorityModelPolicyDef:: + operator= (::CIAO::Config_Handlers::CNWPriorityModelPolicyDef const& s) + { + request_dscp (s.request_dscp ()); + + reply_dscp (s.reply_dscp ()); + + return *this; + } + + + // CNWPriorityModelPolicyDef + // + ::XMLSchema::long_ const& CNWPriorityModelPolicyDef:: + request_dscp () const + { + return *request_dscp_; + } + + void CNWPriorityModelPolicyDef:: + request_dscp (::XMLSchema::long_ const& e) + { + *request_dscp_ = e; + } + + // CNWPriorityModelPolicyDef + // + ::XMLSchema::long_ const& CNWPriorityModelPolicyDef:: + reply_dscp () const + { + return *reply_dscp_; + } + + void CNWPriorityModelPolicyDef:: + reply_dscp (::XMLSchema::long_ const& e) + { + *reply_dscp_ = e; + } } } @@ -2118,6 +2396,18 @@ namespace CIAO add_priorityModel (t); } + else if (n == "nwpriorityModel") + { + ::CIAO::Config_Handlers::NWPriorityModelPolicyDef t (e); + add_nwpriorityModel (t); + } + + else if (n == "cnwpriorityModel") + { + ::CIAO::Config_Handlers::CNWPriorityModelPolicyDef t (e); + add_cnwpriorityModel (t); + } + else if (n == "threadpool") { ::XMLSchema::IDREF< ACE_TCHAR > t (e); @@ -2183,6 +2473,38 @@ namespace CIAO PriorityModel const PriorityModel::SERVER_DECLARED (PriorityModel::SERVER_DECLARED_l); PriorityModel const PriorityModel::CLIENT_PROPAGATED (PriorityModel::CLIENT_PROPAGATED_l); + // NWPriorityModel + // + + NWPriorityModel:: + NWPriorityModel (::XSCRT::XML::Element< ACE_TCHAR > const& e) + : ::XSCRT::Type (e) + { + ::std::basic_string< ACE_TCHAR > v (e.value ()); + + if (v == "SERVER_DECLARED_NWPRIORITY") v_ = SERVER_DECLARED_NWPRIORITY_l; + else if (v == "CLIENT_PROPAGATED_NWPRIORITY") v_ = CLIENT_PROPAGATED_NWPRIORITY_l; + else + { + } + } + + NWPriorityModel:: + NWPriorityModel (::XSCRT::XML::Attribute< ACE_TCHAR > const& a) + : ::XSCRT::Type (a) + { + ::std::basic_string< ACE_TCHAR > v (a.value ()); + + if (v == "SERVER_DECLARED_NWPRIORITY") v_ = SERVER_DECLARED_NWPRIORITY_l; + else if (v == "CLIENT_PROPAGATED_NWPRIORITY") v_ = CLIENT_PROPAGATED_NWPRIORITY_l; + else + { + } + } + + NWPriorityModel const NWPriorityModel::SERVER_DECLARED_NWPRIORITY (NWPriorityModel::SERVER_DECLARED_NWPRIORITY_l); + NWPriorityModel const NWPriorityModel::CLIENT_PROPAGATED_NWPRIORITY (NWPriorityModel::CLIENT_PROPAGATED_NWPRIORITY_l); + // PriorityModelPolicyDef // @@ -2224,6 +2546,78 @@ namespace CIAO } } } + + // NWPriorityModelPolicyDef + // + + NWPriorityModelPolicyDef:: + NWPriorityModelPolicyDef (::XSCRT::XML::Element< ACE_TCHAR > const& e) + :Base__ (e), regulator__ () + { + + ::XSCRT::Parser< ACE_TCHAR > p (e); + + while (p.more_elements ()) + { + ::XSCRT::XML::Element< ACE_TCHAR > e (p.next_element ()); + ::std::basic_string< ACE_TCHAR > n (::XSCRT::XML::uq_name (e.name ())); + + if (n == "nw_priority_model") + { + nw_priority_model_ = ::std::auto_ptr< ::CIAO::Config_Handlers::NWPriorityModel > (new ::CIAO::Config_Handlers::NWPriorityModel (e)); + nw_priority_model_->container (this); + } + + else if (n == "request_dscp") + { + request_dscp_ = ::std::auto_ptr< ::XMLSchema::long_ > (new ::XMLSchema::long_ (e)); + request_dscp_->container (this); + } + + else if (n == "reply_dscp") + { + reply_dscp_ = ::std::auto_ptr< ::XMLSchema::long_ > (new ::XMLSchema::long_ (e)); + reply_dscp_->container (this); + } + + else + { + } + } + } + + // CNWPriorityModelPolicyDef + // + + CNWPriorityModelPolicyDef:: + CNWPriorityModelPolicyDef (::XSCRT::XML::Element< ACE_TCHAR > const& e) + :Base__ (e), regulator__ () + { + + ::XSCRT::Parser< ACE_TCHAR > p (e); + + while (p.more_elements ()) + { + ::XSCRT::XML::Element< ACE_TCHAR > e (p.next_element ()); + ::std::basic_string< ACE_TCHAR > n (::XSCRT::XML::uq_name (e.name ())); + + if (n == "request_dscp") + { + request_dscp_ = ::std::auto_ptr< ::XMLSchema::long_ > (new ::XMLSchema::long_ (e)); + request_dscp_->container (this); + } + + else if (n == "reply_dscp") + { + reply_dscp_ = ::std::auto_ptr< ::XMLSchema::long_ > (new ::XMLSchema::long_ (e)); + reply_dscp_->container (this); + } + + else + { + } + } + } } } @@ -2442,6 +2836,21 @@ namespace CIAO PriorityModelTypeInfoInitializer PriorityModelTypeInfoInitializer_; + struct NWPriorityModelTypeInfoInitializer + { + NWPriorityModelTypeInfoInitializer () + { + ::XSCRT::TypeId id (typeid (NWPriorityModel)); + ::XSCRT::ExtendedTypeInfo nf (id); + + nf.add_base (::XSCRT::ExtendedTypeInfo::Access::public_, false, typeid (::XSCRT::Type)); + + ::XSCRT::extended_type_info_map ().insert (::std::make_pair (id, nf)); + } + }; + + NWPriorityModelTypeInfoInitializer NWPriorityModelTypeInfoInitializer_; + struct PriorityModelPolicyDefTypeInfoInitializer { PriorityModelPolicyDefTypeInfoInitializer () @@ -2455,17 +2864,45 @@ namespace CIAO }; PriorityModelPolicyDefTypeInfoInitializer PriorityModelPolicyDefTypeInfoInitializer_; - } - } -} -namespace CIAO -{ - namespace Config_Handlers - { - namespace Traversal - { - // ServerResourcesDef + struct NWPriorityModelPolicyDefTypeInfoInitializer + { + NWPriorityModelPolicyDefTypeInfoInitializer () + { + ::XSCRT::TypeId id (typeid (NWPriorityModelPolicyDef)); + ::XSCRT::ExtendedTypeInfo nf (id); + + nf.add_base (::XSCRT::ExtendedTypeInfo::Access::public_, false, typeid (::XSCRT::Type)); + ::XSCRT::extended_type_info_map ().insert (::std::make_pair (id, nf)); + } + }; + + NWPriorityModelPolicyDefTypeInfoInitializer NWPriorityModelPolicyDefTypeInfoInitializer_; + + struct CNWPriorityModelPolicyDefTypeInfoInitializer + { + CNWPriorityModelPolicyDefTypeInfoInitializer () + { + ::XSCRT::TypeId id (typeid (CNWPriorityModelPolicyDef)); + ::XSCRT::ExtendedTypeInfo nf (id); + + nf.add_base (::XSCRT::ExtendedTypeInfo::Access::public_, false, typeid (::XSCRT::Type)); + ::XSCRT::extended_type_info_map ().insert (::std::make_pair (id, nf)); + } + }; + + CNWPriorityModelPolicyDefTypeInfoInitializer CNWPriorityModelPolicyDefTypeInfoInitializer_; + } + } +} + +namespace CIAO +{ + namespace Config_Handlers + { + namespace Traversal + { + // ServerResourcesDef // // @@ -3898,6 +4335,8 @@ namespace CIAO { pre (o); priorityModel (o); + nwpriorityModel (o); + cnwpriorityModel (o); threadpool (o); priorityBandedConnection (o); if (o.id_p ()) id (o); @@ -3910,6 +4349,8 @@ namespace CIAO { pre (o); priorityModel (o); + nwpriorityModel (o); + cnwpriorityModel (o); threadpool (o); priorityBandedConnection (o); if (o.id_p ()) id (o); @@ -4011,6 +4452,174 @@ namespace CIAO { } + void PolicySet:: + nwpriorityModel (Type& o) + { + // VC6 anathema strikes again + // + PolicySet::Type::nwpriorityModel_iterator b (o.begin_nwpriorityModel()), e (o.end_nwpriorityModel()); + + if (b != e) + { + nwpriorityModel_pre (o); + for (; b != e;) + { + dispatch (*b); + if (++b != e) nwpriorityModel_next (o); + } + + nwpriorityModel_post (o); + } + + else nwpriorityModel_none (o); + } + + void PolicySet:: + nwpriorityModel (Type const& o) + { + // VC6 anathema strikes again + // + PolicySet::Type::nwpriorityModel_const_iterator b (o.begin_nwpriorityModel()), e (o.end_nwpriorityModel()); + + if (b != e) + { + nwpriorityModel_pre (o); + for (; b != e;) + { + dispatch (*b); + if (++b != e) nwpriorityModel_next (o); + } + + nwpriorityModel_post (o); + } + + else nwpriorityModel_none (o); + } + + void PolicySet:: + nwpriorityModel_pre (Type&) + { + } + + void PolicySet:: + nwpriorityModel_pre (Type const&) + { + } + + void PolicySet:: + nwpriorityModel_next (Type&) + { + } + + void PolicySet:: + nwpriorityModel_next (Type const&) + { + } + + void PolicySet:: + nwpriorityModel_post (Type&) + { + } + + void PolicySet:: + nwpriorityModel_post (Type const&) + { + } + + void PolicySet:: + nwpriorityModel_none (Type&) + { + } + + void PolicySet:: + nwpriorityModel_none (Type const&) + { + } + + void PolicySet:: + cnwpriorityModel (Type& o) + { + // VC6 anathema strikes again + // + PolicySet::Type::cnwpriorityModel_iterator b (o.begin_cnwpriorityModel()), e (o.end_cnwpriorityModel()); + + if (b != e) + { + cnwpriorityModel_pre (o); + for (; b != e;) + { + dispatch (*b); + if (++b != e) cnwpriorityModel_next (o); + } + + cnwpriorityModel_post (o); + } + + else cnwpriorityModel_none (o); + } + + void PolicySet:: + cnwpriorityModel (Type const& o) + { + // VC6 anathema strikes again + // + PolicySet::Type::cnwpriorityModel_const_iterator b (o.begin_cnwpriorityModel()), e (o.end_cnwpriorityModel()); + + if (b != e) + { + cnwpriorityModel_pre (o); + for (; b != e;) + { + dispatch (*b); + if (++b != e) cnwpriorityModel_next (o); + } + + cnwpriorityModel_post (o); + } + + else cnwpriorityModel_none (o); + } + + void PolicySet:: + cnwpriorityModel_pre (Type&) + { + } + + void PolicySet:: + cnwpriorityModel_pre (Type const&) + { + } + + void PolicySet:: + cnwpriorityModel_next (Type&) + { + } + + void PolicySet:: + cnwpriorityModel_next (Type const&) + { + } + + void PolicySet:: + cnwpriorityModel_post (Type&) + { + } + + void PolicySet:: + cnwpriorityModel_post (Type const&) + { + } + + void PolicySet:: + cnwpriorityModel_none (Type&) + { + } + + void PolicySet:: + cnwpriorityModel_none (Type const&) + { + } + void PolicySet:: threadpool (Type& o) { @@ -4288,6 +4897,152 @@ namespace CIAO post (Type const&) { } + + // NWPriorityModelPolicyDef + // + // + + void NWPriorityModelPolicyDef:: + traverse (Type& o) + { + pre (o); + nw_priority_model (o); + request_dscp (o); + reply_dscp (o); + post (o); + } + + void NWPriorityModelPolicyDef:: + traverse (Type const& o) + { + pre (o); + nw_priority_model (o); + request_dscp (o); + reply_dscp (o); + post (o); + } + + void NWPriorityModelPolicyDef:: + pre (Type&) + { + } + + void NWPriorityModelPolicyDef:: + pre (Type const&) + { + } + + void NWPriorityModelPolicyDef:: + nw_priority_model (Type& o) + { + dispatch (o.nw_priority_model ()); + } + + void NWPriorityModelPolicyDef:: + nw_priority_model (Type const& o) + { + dispatch (o.nw_priority_model ()); + } + + void NWPriorityModelPolicyDef:: + request_dscp (Type& o) + { + dispatch (o.request_dscp ()); + } + + void NWPriorityModelPolicyDef:: + request_dscp (Type const& o) + { + dispatch (o.request_dscp ()); + } + + void NWPriorityModelPolicyDef:: + reply_dscp (Type& o) + { + dispatch (o.reply_dscp ()); + } + + void NWPriorityModelPolicyDef:: + reply_dscp (Type const& o) + { + dispatch (o.reply_dscp ()); + } + + void NWPriorityModelPolicyDef:: + post (Type&) + { + } + + void NWPriorityModelPolicyDef:: + post (Type const&) + { + } + + // CNWPriorityModelPolicyDef + // + // + + void CNWPriorityModelPolicyDef:: + traverse (Type& o) + { + pre (o); + request_dscp (o); + reply_dscp (o); + post (o); + } + + void CNWPriorityModelPolicyDef:: + traverse (Type const& o) + { + pre (o); + request_dscp (o); + reply_dscp (o); + post (o); + } + + void CNWPriorityModelPolicyDef:: + pre (Type&) + { + } + + void CNWPriorityModelPolicyDef:: + pre (Type const&) + { + } + + void CNWPriorityModelPolicyDef:: + request_dscp (Type& o) + { + dispatch (o.request_dscp ()); + } + + void CNWPriorityModelPolicyDef:: + request_dscp (Type const& o) + { + dispatch (o.request_dscp ()); + } + + void CNWPriorityModelPolicyDef:: + reply_dscp (Type& o) + { + dispatch (o.reply_dscp ()); + } + + void CNWPriorityModelPolicyDef:: + reply_dscp (Type const& o) + { + dispatch (o.reply_dscp ()); + } + + void CNWPriorityModelPolicyDef:: + post (Type&) + { + } + + void CNWPriorityModelPolicyDef:: + post (Type const&) + { + } } } } @@ -4915,6 +5670,44 @@ namespace CIAO pop_ (); } + void PolicySet:: + nwpriorityModel_pre (Type const&) + { + push_ (::XSCRT::XML::Element< ACE_TCHAR > ("nwpriorityModel", top_ ())); + } + + void PolicySet:: + nwpriorityModel_next (Type const& o) + { + nwpriorityModel_post (o); + nwpriorityModel_pre (o); + } + + void PolicySet:: + nwpriorityModel_post (Type const&) + { + pop_ (); + } + + void PolicySet:: + cnwpriorityModel_pre (Type const&) + { + push_ (::XSCRT::XML::Element< ACE_TCHAR > ("cnwpriorityModel", top_ ())); + } + + void PolicySet:: + cnwpriorityModel_next (Type const& o) + { + cnwpriorityModel_post (o); + cnwpriorityModel_pre (o); + } + + void PolicySet:: + cnwpriorityModel_post (Type const&) + { + pop_ (); + } + void PolicySet:: threadpool_pre (Type const&) { @@ -4999,6 +5792,43 @@ namespace CIAO } } + // NWPriorityModel + // + // + + NWPriorityModel:: + NWPriorityModel (::XSCRT::XML::Element< ACE_TCHAR >& e) + : ::XSCRT::Writer< ACE_TCHAR > (e) + { + } + + NWPriorityModel:: + NWPriorityModel () + { + } + + void NWPriorityModel:: + traverse (Type const& o) + { + ::std::basic_string< ACE_TCHAR > s; + + if (o == ::CIAO::Config_Handlers::NWPriorityModel::SERVER_DECLARED_NWPRIORITY) s = "SERVER_DECLARED_NWPRIORITY"; + else if (o == ::CIAO::Config_Handlers::NWPriorityModel::CLIENT_PROPAGATED_NWPRIORITY) s = "CLIENT_PROPAGATED_NWPRIORITY"; + else + { + } + + if (::XSCRT::XML::Attribute< ACE_TCHAR >* a = attr_ ()) + { + a->value (s); + } + + else + { + top_().value (s); + } + } + // PriorityModelPolicyDef // // @@ -5036,6 +5866,88 @@ namespace CIAO Traversal::PriorityModelPolicyDef::server_priority (o); attr_ (0); } + + // NWPriorityModelPolicyDef + // + // + + NWPriorityModelPolicyDef:: + NWPriorityModelPolicyDef (::XSCRT::XML::Element< ACE_TCHAR >& e) + : ::XSCRT::Writer< ACE_TCHAR > (e) + { + } + + NWPriorityModelPolicyDef:: + NWPriorityModelPolicyDef () + { + } + + void NWPriorityModelPolicyDef:: + traverse (Type const& o) + { + Traversal::NWPriorityModelPolicyDef::traverse (o); + } + + void NWPriorityModelPolicyDef:: + nw_priority_model (Type const& o) + { + push_ (::XSCRT::XML::Element< ACE_TCHAR > ("nw_priority_model", top_ ())); + Traversal::NWPriorityModelPolicyDef::nw_priority_model (o); + pop_ (); + } + + void NWPriorityModelPolicyDef:: + request_dscp (Type const& o) + { + push_ (::XSCRT::XML::Element< ACE_TCHAR > ("request_dscp", top_ ())); + Traversal::NWPriorityModelPolicyDef::request_dscp (o); + pop_ (); + } + + void NWPriorityModelPolicyDef:: + reply_dscp (Type const& o) + { + push_ (::XSCRT::XML::Element< ACE_TCHAR > ("reply_dscp", top_ ())); + Traversal::NWPriorityModelPolicyDef::reply_dscp (o); + pop_ (); + } + + // CNWPriorityModelPolicyDef + // + // + + CNWPriorityModelPolicyDef:: + CNWPriorityModelPolicyDef (::XSCRT::XML::Element< ACE_TCHAR >& e) + : ::XSCRT::Writer< ACE_TCHAR > (e) + { + } + + CNWPriorityModelPolicyDef:: + CNWPriorityModelPolicyDef () + { + } + + void CNWPriorityModelPolicyDef:: + traverse (Type const& o) + { + Traversal::CNWPriorityModelPolicyDef::traverse (o); + } + + void CNWPriorityModelPolicyDef:: + request_dscp (Type const& o) + { + push_ (::XSCRT::XML::Element< ACE_TCHAR > ("request_dscp", top_ ())); + Traversal::CNWPriorityModelPolicyDef::request_dscp (o); + pop_ (); + } + + void CNWPriorityModelPolicyDef:: + reply_dscp (Type const& o) + { + push_ (::XSCRT::XML::Element< ACE_TCHAR > ("reply_dscp", top_ ())); + Traversal::CNWPriorityModelPolicyDef::reply_dscp (o); + pop_ (); + } } } } @@ -5072,6 +5984,10 @@ namespace CIAO virtual ::CIAO::Config_Handlers::Writer::PolicySet, virtual ::CIAO::Config_Handlers::Writer::PriorityModelPolicyDef, virtual ::CIAO::Config_Handlers::Writer::PriorityModel, + virtual ::CIAO::Config_Handlers::Writer::NWPriorityModelPolicyDef, + virtual ::CIAO::Config_Handlers::Writer::NWPriorityModel, + virtual ::XMLSchema::Writer::FundamentalType< ::XMLSchema::long_, ACE_TCHAR >, + virtual ::CIAO::Config_Handlers::Writer::CNWPriorityModelPolicyDef, virtual ::XMLSchema::Writer::IDREF< ACE_TCHAR >, virtual ::XSCRT::Writer< ACE_TCHAR > { diff --git a/config_complex_types_1/Config_Handlers/RT-CCM/CIAOServerResources.hpp b/config_complex_types_1/Config_Handlers/RT-CCM/CIAOServerResources.hpp index d08ff32fc10..f932f4faf33 100644 --- a/config_complex_types_1/Config_Handlers/RT-CCM/CIAOServerResources.hpp +++ b/config_complex_types_1/Config_Handlers/RT-CCM/CIAOServerResources.hpp @@ -38,7 +38,10 @@ namespace CIAO class PriorityBandDef; class PolicySet; class PriorityModel; + class NWPriorityModel; class PriorityModelPolicyDef; + class NWPriorityModelPolicyDef; + class CNWPriorityModelPolicyDef; } } @@ -643,6 +646,36 @@ namespace CIAO protected: ::std::list< ::CIAO::Config_Handlers::PriorityModelPolicyDef > priorityModel_; + // nwpriorityModel + // + public: + typedef ::std::list< ::CIAO::Config_Handlers::NWPriorityModelPolicyDef >::iterator nwpriorityModel_iterator; + typedef ::std::list< ::CIAO::Config_Handlers::NWPriorityModelPolicyDef >::const_iterator nwpriorityModel_const_iterator; + nwpriorityModel_iterator begin_nwpriorityModel (); + nwpriorityModel_iterator end_nwpriorityModel (); + nwpriorityModel_const_iterator begin_nwpriorityModel () const; + nwpriorityModel_const_iterator end_nwpriorityModel () const; + void add_nwpriorityModel (::CIAO::Config_Handlers::NWPriorityModelPolicyDef const& ); + size_t count_nwpriorityModel (void) const; + + protected: + ::std::list< ::CIAO::Config_Handlers::NWPriorityModelPolicyDef > nwpriorityModel_; + + // cnwpriorityModel + // + public: + typedef ::std::list< ::CIAO::Config_Handlers::CNWPriorityModelPolicyDef >::iterator cnwpriorityModel_iterator; + typedef ::std::list< ::CIAO::Config_Handlers::CNWPriorityModelPolicyDef >::const_iterator cnwpriorityModel_const_iterator; + cnwpriorityModel_iterator begin_cnwpriorityModel (); + cnwpriorityModel_iterator end_cnwpriorityModel (); + cnwpriorityModel_const_iterator begin_cnwpriorityModel () const; + cnwpriorityModel_const_iterator end_cnwpriorityModel () const; + void add_cnwpriorityModel (::CIAO::Config_Handlers::CNWPriorityModelPolicyDef const& ); + size_t count_cnwpriorityModel (void) const; + + protected: + ::std::list< ::CIAO::Config_Handlers::CNWPriorityModelPolicyDef > cnwpriorityModel_; + // threadpool // public: @@ -709,7 +742,7 @@ namespace CIAO enum Value { - SERVER_DECLARED_l,CLIENT_PROPAGATED_l, + SERVER_DECLARED_l, CLIENT_PROPAGATED_l }; @@ -733,6 +766,41 @@ namespace CIAO bool RT_CCM_Handlers_Export operator!= (PriorityModel const &a, PriorityModel const &b); + class RT_CCM_Handlers_Export NWPriorityModel : public ::XSCRT::Type + { + public: + NWPriorityModel (::XSCRT::XML::Element< ACE_TCHAR > const&); + NWPriorityModel (::XSCRT::XML::Attribute< ACE_TCHAR > const&); + + static NWPriorityModel const SERVER_DECLARED_NWPRIORITY; + static NWPriorityModel const CLIENT_PROPAGATED_NWPRIORITY; + + enum Value + { + SERVER_DECLARED_NWPRIORITY_l, CLIENT_PROPAGATED_NWPRIORITY_l + }; + + + Value + integral () const; + + friend bool RT_CCM_Handlers_Export + operator== (NWPriorityModel const& a, NWPriorityModel const& b); + + friend bool RT_CCM_Handlers_Export + operator!= (NWPriorityModel const& a, NWPriorityModel const& b); + + private: + NWPriorityModel (Value v); + + Value v_; + }; + + bool RT_CCM_Handlers_Export operator== (NWPriorityModel const &a, NWPriorityModel const &b); + + bool RT_CCM_Handlers_Export operator!= (NWPriorityModel const &a, NWPriorityModel const &b); + + class RT_CCM_Handlers_Export PriorityModelPolicyDef : public ::XSCRT::Type { //@@ VC6 anathema @@ -770,6 +838,92 @@ namespace CIAO private: char regulator__; }; + + + class RT_CCM_Handlers_Export NWPriorityModelPolicyDef : public ::XSCRT::Type + { + //@@ VC6 anathema + typedef ::XSCRT::Type Base__; + + // nw_priority_model + // + public: + ::CIAO::Config_Handlers::NWPriorityModel const& nw_priority_model () const; + void nw_priority_model (::CIAO::Config_Handlers::NWPriorityModel const& ); + + protected: + ::std::auto_ptr< ::CIAO::Config_Handlers::NWPriorityModel > nw_priority_model_; + + // request_dscp + // + public: + ::XMLSchema::long_ const& request_dscp () const; + void request_dscp (::XMLSchema::long_ const& ); + + protected: + ::std::auto_ptr< ::XMLSchema::long_ > request_dscp_; + + // reply_dscp + // + public: + ::XMLSchema::long_ const& reply_dscp () const; + void reply_dscp (::XMLSchema::long_ const& ); + + protected: + ::std::auto_ptr< ::XMLSchema::long_ > reply_dscp_; + + public: + NWPriorityModelPolicyDef (::CIAO::Config_Handlers::NWPriorityModel const& nw_priority_model__, + ::XMLSchema::long_ const& request_dscp__, + ::XMLSchema::long_ const& reply_dscp__); + + NWPriorityModelPolicyDef (::XSCRT::XML::Element< ACE_TCHAR > const&); + NWPriorityModelPolicyDef (NWPriorityModelPolicyDef const& s); + + NWPriorityModelPolicyDef& + operator= (NWPriorityModelPolicyDef const& s); + + private: + char regulator__; + }; + + + class RT_CCM_Handlers_Export CNWPriorityModelPolicyDef : public ::XSCRT::Type + { + //@@ VC6 anathema + typedef ::XSCRT::Type Base__; + + // request_dscp + // + public: + ::XMLSchema::long_ const& request_dscp () const; + void request_dscp (::XMLSchema::long_ const& ); + + protected: + ::std::auto_ptr< ::XMLSchema::long_ > request_dscp_; + + // reply_dscp + // + public: + ::XMLSchema::long_ const& reply_dscp () const; + void reply_dscp (::XMLSchema::long_ const& ); + + protected: + ::std::auto_ptr< ::XMLSchema::long_ > reply_dscp_; + + public: + CNWPriorityModelPolicyDef (::XMLSchema::long_ const& request_dscp__, + ::XMLSchema::long_ const& reply_dscp__); + + CNWPriorityModelPolicyDef (::XSCRT::XML::Element< ACE_TCHAR > const&); + CNWPriorityModelPolicyDef (CNWPriorityModelPolicyDef const& s); + + CNWPriorityModelPolicyDef& + operator= (CNWPriorityModelPolicyDef const& s); + + private: + char regulator__; + }; } } @@ -1456,6 +1610,66 @@ namespace CIAO virtual void priorityModel_none (Type const&); + virtual void + nwpriorityModel (Type&); + + virtual void + nwpriorityModel (Type const&); + + virtual void + nwpriorityModel_pre (Type&); + + virtual void + nwpriorityModel_pre (Type const&); + + virtual void + nwpriorityModel_next (Type&); + + virtual void + nwpriorityModel_next (Type const&); + + virtual void + nwpriorityModel_post (Type&); + + virtual void + nwpriorityModel_post (Type const&); + + virtual void + nwpriorityModel_none (Type&); + + virtual void + nwpriorityModel_none (Type const&); + + virtual void + cnwpriorityModel (Type&); + + virtual void + cnwpriorityModel (Type const&); + + virtual void + cnwpriorityModel_pre (Type&); + + virtual void + cnwpriorityModel_pre (Type const&); + + virtual void + cnwpriorityModel_next (Type&); + + virtual void + cnwpriorityModel_next (Type const&); + + virtual void + cnwpriorityModel_post (Type&); + + virtual void + cnwpriorityModel_post (Type const&); + + virtual void + cnwpriorityModel_none (Type&); + + virtual void + cnwpriorityModel_none (Type const&); + virtual void threadpool (Type&); @@ -1539,6 +1753,10 @@ namespace CIAO ::XMLSchema::Traversal::Traverser< ::CIAO::Config_Handlers::PriorityModel > PriorityModel; + typedef + ::XMLSchema::Traversal::Traverser< ::CIAO::Config_Handlers::NWPriorityModel > + NWPriorityModel; + struct RT_CCM_Handlers_Export PriorityModelPolicyDef : ::XMLSchema::Traversal::Traverser< ::CIAO::Config_Handlers::PriorityModelPolicyDef > { virtual void @@ -1577,6 +1795,78 @@ namespace CIAO virtual void post (Type const&); }; + + struct RT_CCM_Handlers_Export NWPriorityModelPolicyDef : ::XMLSchema::Traversal::Traverser< ::CIAO::Config_Handlers::NWPriorityModelPolicyDef > + { + virtual void + traverse (Type&); + + virtual void + traverse (Type const&); + + virtual void + pre (Type&); + + virtual void + pre (Type const&); + + virtual void + nw_priority_model (Type&); + + virtual void + nw_priority_model (Type const&); + + virtual void + request_dscp (Type&); + + virtual void + request_dscp (Type const&); + + virtual void + reply_dscp (Type&); + + virtual void + reply_dscp (Type const&); + + virtual void + post (Type&); + + virtual void + post (Type const&); + }; + + struct RT_CCM_Handlers_Export CNWPriorityModelPolicyDef : ::XMLSchema::Traversal::Traverser< ::CIAO::Config_Handlers::CNWPriorityModelPolicyDef > + { + virtual void + traverse (Type&); + + virtual void + traverse (Type const&); + + virtual void + pre (Type&); + + virtual void + pre (Type const&); + + virtual void + request_dscp (Type&); + + virtual void + request_dscp (Type const&); + + virtual void + reply_dscp (Type&); + + virtual void + reply_dscp (Type const&); + + virtual void + post (Type&); + + virtual void + post (Type const&); + }; } } } @@ -2388,6 +2678,72 @@ namespace CIAO virtual void priorityModel_post (Type const&); + virtual void + nwpriorityModel_pre (Type &o) + { + + this->nwpriorityModel_pre (const_cast (o)); + } + + + virtual void + nwpriorityModel_pre (Type const&); + + virtual void + nwpriorityModel_next (Type &o) + { + + this->nwpriorityModel_next (const_cast (o)); + } + + + virtual void + nwpriorityModel_next (Type const&); + + virtual void + nwpriorityModel_post (Type &o) + { + + this->nwpriorityModel_post (const_cast (o)); + } + + + virtual void + nwpriorityModel_post (Type const&); + + virtual void + cnwpriorityModel_pre (Type &o) + { + + this->cnwpriorityModel_pre (const_cast (o)); + } + + + virtual void + cnwpriorityModel_pre (Type const&); + + virtual void + cnwpriorityModel_next (Type &o) + { + + this->cnwpriorityModel_next (const_cast (o)); + } + + + virtual void + cnwpriorityModel_next (Type const&); + + virtual void + cnwpriorityModel_post (Type &o) + { + + this->cnwpriorityModel_post (const_cast (o)); + } + + + virtual void + cnwpriorityModel_post (Type const&); + virtual void threadpool_pre (Type &o) { @@ -2487,6 +2843,24 @@ namespace CIAO PriorityModel (); }; + struct NWPriorityModel : Traversal::NWPriorityModel, + virtual ::XSCRT::Writer< ACE_TCHAR > + { + NWPriorityModel (::XSCRT::XML::Element< ACE_TCHAR >&); + + virtual void + traverse (Type &o) + { + this->traverse (const_cast (o)); + } + + virtual void + traverse (Type const&); + + protected: + NWPriorityModel (); + }; + struct PriorityModelPolicyDef : Traversal::PriorityModelPolicyDef, virtual ::XSCRT::Writer< ACE_TCHAR > { @@ -2529,6 +2903,103 @@ namespace CIAO protected: PriorityModelPolicyDef (); }; + + struct NWPriorityModelPolicyDef : Traversal::NWPriorityModelPolicyDef, + virtual ::XSCRT::Writer< ACE_TCHAR > + { + typedef ::CIAO::Config_Handlers::NWPriorityModelPolicyDef Type; + NWPriorityModelPolicyDef (::XSCRT::XML::Element< ACE_TCHAR >&); + + virtual void + traverse (Type &o) + { + + this->traverse (const_cast (o)); + } + + + virtual void + traverse (Type const&); + + virtual void + nw_priority_model (Type &o) + { + + this->nw_priority_model (const_cast (o)); + } + + + virtual void + nw_priority_model (Type const&); + + virtual void + request_dscp (Type &o) + { + + this->request_dscp (const_cast (o)); + } + + + virtual void + request_dscp (Type const&); + + virtual void + reply_dscp (Type &o) + { + + this->reply_dscp (const_cast (o)); + } + + + virtual void + reply_dscp (Type const&); + + protected: + NWPriorityModelPolicyDef (); + }; + + struct CNWPriorityModelPolicyDef : Traversal::CNWPriorityModelPolicyDef, + virtual ::XSCRT::Writer< ACE_TCHAR > + { + typedef ::CIAO::Config_Handlers::CNWPriorityModelPolicyDef Type; + CNWPriorityModelPolicyDef (::XSCRT::XML::Element< ACE_TCHAR >&); + + virtual void + traverse (Type &o) + { + + this->traverse (const_cast (o)); + } + + + virtual void + traverse (Type const&); + + virtual void + request_dscp (Type &o) + { + + this->request_dscp (const_cast (o)); + } + + + virtual void + request_dscp (Type const&); + + virtual void + reply_dscp (Type &o) + { + + this->reply_dscp (const_cast (o)); + } + + + virtual void + reply_dscp (Type const&); + + protected: + CNWPriorityModelPolicyDef (); + }; } } } diff --git a/config_complex_types_1/Config_Handlers/RT-CCM/CNPM_Handler.cpp b/config_complex_types_1/Config_Handlers/RT-CCM/CNPM_Handler.cpp new file mode 100755 index 00000000000..acc74ca8c99 --- /dev/null +++ b/config_complex_types_1/Config_Handlers/RT-CCM/CNPM_Handler.cpp @@ -0,0 +1,93 @@ +// $Id$ + +#include "CNPM_Handler.h" +#include "CIAOServerResources.hpp" +#include "ace/Auto_Ptr.h" + +#define IPDSFIELD_DSCP_DEFAULT 0x00 +#define IPDSFIELD_DSCP_CS1 0x08 +#define IPDSFIELD_DSCP_CS2 0x10 +#define IPDSFIELD_DSCP_CS3 0x18 +#define IPDSFIELD_DSCP_CS4 0x20 +#define IPDSFIELD_DSCP_CS5 0x28 +#define IPDSFIELD_DSCP_CS6 0x30 +#define IPDSFIELD_DSCP_CS7 0x38 +#define IPDSFIELD_DSCP_AF11 0x0A +#define IPDSFIELD_DSCP_AF12 0x0C +#define IPDSFIELD_DSCP_AF13 0x0E +#define IPDSFIELD_DSCP_AF21 0x12 +#define IPDSFIELD_DSCP_AF22 0x14 +#define IPDSFIELD_DSCP_AF23 0x16 +#define IPDSFIELD_DSCP_AF31 0x1A +#define IPDSFIELD_DSCP_AF32 0x1C +#define IPDSFIELD_DSCP_AF33 0x1E +#define IPDSFIELD_DSCP_AF41 0x22 +#define IPDSFIELD_DSCP_AF42 0x24 +#define IPDSFIELD_DSCP_AF43 0x26 +#define IPDSFIELD_ECT_MASK 0x02 +#define IPDSFIELD_CE_MASK 0x01 +#define IPDSFIELD_DSCP_EF 0x2E + +static int const dscp[] = +{ + IPDSFIELD_DSCP_DEFAULT , + IPDSFIELD_DSCP_CS1 , + IPDSFIELD_DSCP_CS2 , + IPDSFIELD_DSCP_CS3 , + IPDSFIELD_DSCP_CS4 , + IPDSFIELD_DSCP_CS5 , + IPDSFIELD_DSCP_CS6 , + IPDSFIELD_DSCP_CS7 , + IPDSFIELD_DSCP_AF11 , + IPDSFIELD_DSCP_AF12 , + IPDSFIELD_DSCP_AF13 , + IPDSFIELD_DSCP_AF21 , + IPDSFIELD_DSCP_AF22 , + IPDSFIELD_DSCP_AF23 , + IPDSFIELD_DSCP_AF31 , + IPDSFIELD_DSCP_AF32 , + IPDSFIELD_DSCP_AF33 , + IPDSFIELD_DSCP_AF41 , + IPDSFIELD_DSCP_AF42 , + IPDSFIELD_DSCP_AF43 , + IPDSFIELD_DSCP_EF +}; + + +namespace CIAO +{ + namespace Config_Handlers + { + + bool + CNPM_Handler::cnw_priority_pd (const CNWPriorityModelPolicyDef &src, + ::CIAO::DAnCE::CNWPriorityModelPolicyDef &dest) + { + int request_array_slot = 7; + long d = dscp[request_array_slot]; + + int a = static_cast (d); + long b = static_cast (a); + long c = static_cast (a); + + ACE_DEBUG ((LM_DEBUG, "numbers are %d %X %X\n", a, b, c)); + + dest.request_dscp = + static_cast (src.request_dscp ()); + dest.reply_dscp = + static_cast (src.reply_dscp ()); + + return true; + } + + CNWPriorityModelPolicyDef + CNPM_Handler::cnw_priority_pd ( + const ::CIAO::DAnCE::CNWPriorityModelPolicyDef&) + { + auto_ptr pmd; + pmd.reset (new CNWPriorityModelPolicyDef (0, 0)); + return *pmd; + } + } +} + diff --git a/config_complex_types_1/Config_Handlers/RT-CCM/CNPM_Handler.h b/config_complex_types_1/Config_Handlers/RT-CCM/CNPM_Handler.h new file mode 100755 index 00000000000..39da8b2fae4 --- /dev/null +++ b/config_complex_types_1/Config_Handlers/RT-CCM/CNPM_Handler.h @@ -0,0 +1,45 @@ +/** + * @file CNPM_Handler.h + * + * $Id$ + */ + + +#ifndef CIAO_CONFIG_HANDLERS_CNPM_HANDLER_H +#define CIAO_CONFIG_HANDLERS_CNPM_HANDLER_H + +#include /**/ "ace/pre.h" + +#include "RT_CCM_Handlers_Export.h" +#include "DAnCE/Deployment/CIAO_ServerResourcesC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +namespace CIAO +{ + namespace Config_Handlers + { + class CNWPriorityModelPolicyDef; + + /** + * @class CNPM_Handler + * @brief Handler class for client NetworkPriorityModelPolicyDefs + */ + + class RT_CCM_Handlers_Export CNPM_Handler + { + public: + static bool cnw_priority_pd (const CNWPriorityModelPolicyDef &src, + ::CIAO::DAnCE::CNWPriorityModelPolicyDef &dest); + + static CNWPriorityModelPolicyDef cnw_priority_pd ( + const ::CIAO::DAnCE::CNWPriorityModelPolicyDef &src); + }; + } + +} + +#include /**/ "ace/post.h" +#endif /* CIAO_CONFIG_HANDLERS_CNPM_HANDLER_H */ diff --git a/config_complex_types_1/Config_Handlers/RT-CCM/NPM_Handler.cpp b/config_complex_types_1/Config_Handlers/RT-CCM/NPM_Handler.cpp new file mode 100755 index 00000000000..d530b2169e2 --- /dev/null +++ b/config_complex_types_1/Config_Handlers/RT-CCM/NPM_Handler.cpp @@ -0,0 +1,131 @@ +// $Id$ + +#include "NPM_Handler.h" +#include "CIAOServerResources.hpp" +#include "ace/Auto_Ptr.h" + +#define IPDSFIELD_DSCP_DEFAULT 0x00 +#define IPDSFIELD_DSCP_CS1 0x08 +#define IPDSFIELD_DSCP_CS2 0x10 +#define IPDSFIELD_DSCP_CS3 0x18 +#define IPDSFIELD_DSCP_CS4 0x20 +#define IPDSFIELD_DSCP_CS5 0x28 +#define IPDSFIELD_DSCP_CS6 0x30 +#define IPDSFIELD_DSCP_CS7 0x38 +#define IPDSFIELD_DSCP_AF11 0x0A +#define IPDSFIELD_DSCP_AF12 0x0C +#define IPDSFIELD_DSCP_AF13 0x0E +#define IPDSFIELD_DSCP_AF21 0x12 +#define IPDSFIELD_DSCP_AF22 0x14 +#define IPDSFIELD_DSCP_AF23 0x16 +#define IPDSFIELD_DSCP_AF31 0x1A +#define IPDSFIELD_DSCP_AF32 0x1C +#define IPDSFIELD_DSCP_AF33 0x1E +#define IPDSFIELD_DSCP_AF41 0x22 +#define IPDSFIELD_DSCP_AF42 0x24 +#define IPDSFIELD_DSCP_AF43 0x26 +#define IPDSFIELD_ECT_MASK 0x02 +#define IPDSFIELD_CE_MASK 0x01 +#define IPDSFIELD_DSCP_EF 0x2E + +static int const dscp[] = +{ + IPDSFIELD_DSCP_DEFAULT , + IPDSFIELD_DSCP_CS1 , + IPDSFIELD_DSCP_CS2 , + IPDSFIELD_DSCP_CS3 , + IPDSFIELD_DSCP_CS4 , + IPDSFIELD_DSCP_CS5 , + IPDSFIELD_DSCP_CS6 , + IPDSFIELD_DSCP_CS7 , + IPDSFIELD_DSCP_AF11 , + IPDSFIELD_DSCP_AF12 , + IPDSFIELD_DSCP_AF13 , + IPDSFIELD_DSCP_AF21 , + IPDSFIELD_DSCP_AF22 , + IPDSFIELD_DSCP_AF23 , + IPDSFIELD_DSCP_AF31 , + IPDSFIELD_DSCP_AF32 , + IPDSFIELD_DSCP_AF33 , + IPDSFIELD_DSCP_AF41 , + IPDSFIELD_DSCP_AF42 , + IPDSFIELD_DSCP_AF43 , + IPDSFIELD_DSCP_EF +}; + + +namespace CIAO +{ + namespace Config_Handlers + { + + bool + NPM_Handler::nw_priority_model_pd (const NWPriorityModelPolicyDef &src, + ::CIAO::DAnCE::NWPriorityModelPolicyDef &dest) + { + switch (src.nw_priority_model ().integral ()) + { + case NWPriorityModel::SERVER_DECLARED_NWPRIORITY_l: + dest.nw_priority_model = ::CIAO::DAnCE::SERVER_DECLARED_NWPRIORITY; + break; + + case NWPriorityModel::CLIENT_PROPAGATED_NWPRIORITY_l: + dest.nw_priority_model = ::CIAO::DAnCE::CLIENT_PROPAGATED_NWPRIORITY; + break; + + default: + ACE_ERROR ((LM_ERROR, + "Unknown priority model passed to priority_model_pd\n")); + return false; + } + + int request_array_slot = 7; + long d = dscp[request_array_slot]; + + int a = static_cast (d); + long b = static_cast (a); + long c = static_cast (a); + + ACE_DEBUG ((LM_DEBUG, "numbers are %d %X %X\n", a, b, c)); + + dest.request_dscp = + static_cast (src.request_dscp ()); + dest.reply_dscp = + static_cast (src.reply_dscp ()); + + return true; + } + + + NWPriorityModelPolicyDef + NPM_Handler::nw_priority_model_pd ( + const ::CIAO::DAnCE::NWPriorityModelPolicyDef &src) + { + auto_ptr pmd; + + switch (src.nw_priority_model) + { + case ::CIAO::DAnCE::CLIENT_PROPAGATED_NWPRIORITY: + pmd.reset (new NWPriorityModelPolicyDef +(NWPriorityModel::CLIENT_PROPAGATED_NWPRIORITY, 0, 0)); + break; + + case ::CIAO::DAnCE::SERVER_DECLARED_NWPRIORITY: + pmd.reset (new NWPriorityModelPolicyDef +(NWPriorityModel::SERVER_DECLARED_NWPRIORITY, 0, 0)); + break; + + default: + ACE_ERROR ((LM_ERROR, + "Invalid priority model given to nw_priority_model_pd\n")); + throw 1; + } + + return *pmd; + } + + + } + +} + diff --git a/config_complex_types_1/Config_Handlers/RT-CCM/NPM_Handler.h b/config_complex_types_1/Config_Handlers/RT-CCM/NPM_Handler.h new file mode 100755 index 00000000000..bde507ba189 --- /dev/null +++ b/config_complex_types_1/Config_Handlers/RT-CCM/NPM_Handler.h @@ -0,0 +1,45 @@ +/** + * @file NPM_Handler.h + * + * $Id$ + */ + + +#ifndef CIAO_CONFIG_HANDLERS_NPM_HANDLER_H +#define CIAO_CONFIG_HANDLERS_NPM_HANDLER_H + +#include /**/ "ace/pre.h" + +#include "RT_CCM_Handlers_Export.h" +#include "DAnCE/Deployment/CIAO_ServerResourcesC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +namespace CIAO +{ + namespace Config_Handlers + { + class NWPriorityModelPolicyDef; + + /** + * @class NPM_Handler + * @brief Handler class for NetworkPriorityModelPolicyDefs + */ + + class RT_CCM_Handlers_Export NPM_Handler + { + public: + static bool nw_priority_model_pd (const NWPriorityModelPolicyDef &src, + ::CIAO::DAnCE::NWPriorityModelPolicyDef &dest); + + static NWPriorityModelPolicyDef nw_priority_model_pd ( + const ::CIAO::DAnCE::NWPriorityModelPolicyDef &src); + }; + } + +} + +#include /**/ "ace/post.h" +#endif /* CIAO_CONFIG_HANDLERS_NPM_HANDLER_H */ diff --git a/config_complex_types_1/Config_Handlers/RT-CCM/PS_Handler.cpp b/config_complex_types_1/Config_Handlers/RT-CCM/PS_Handler.cpp index 95c5bb76d9d..16a2f71f40a 100644 --- a/config_complex_types_1/Config_Handlers/RT-CCM/PS_Handler.cpp +++ b/config_complex_types_1/Config_Handlers/RT-CCM/PS_Handler.cpp @@ -2,6 +2,8 @@ #include "PS_Handler.h" #include "PM_Handler.h" +#include "NPM_Handler.h" +#include "CNPM_Handler.h" #include "CIAOServerResources.hpp" namespace CIAO @@ -19,6 +21,8 @@ namespace CIAO CORBA::ULong len (dest.policies.length ()); dest.policies.length (len + src.count_priorityModel () + + src.count_nwpriorityModel () + + src.count_cnwpriorityModel () + src.count_threadpool () + src.count_priorityBandedConnection ()); @@ -33,6 +37,30 @@ namespace CIAO dest.policies[len++].PriorityModelDef (pmd); } + for (PolicySet::nwpriorityModel_const_iterator i = + src.begin_nwpriorityModel (); + i != src.end_nwpriorityModel (); + ++i) + { + ::CIAO::DAnCE::NWPriorityModelPolicyDef npmd; + + NPM_Handler::nw_priority_model_pd (*i, npmd); + + dest.policies[len++].NWPriorityModelDef (npmd); + } + + for (PolicySet::cnwpriorityModel_const_iterator i = + src.begin_cnwpriorityModel (); + i != src.end_cnwpriorityModel (); + ++i) + { + ::CIAO::DAnCE::CNWPriorityModelPolicyDef cnpmd; + + CNPM_Handler::cnw_priority_pd (*i, cnpmd); + + dest.policies[len++].CNWPriorityModelDef (cnpmd); + } + for (PolicySet::threadpool_const_iterator i = src.begin_threadpool (); i != src.end_threadpool (); ++i) @@ -55,13 +83,9 @@ namespace CIAO dest.policies[len++].PriorityBandedConnectionDef (pbc); } - - - return true; } - PolicySet PS_Handler::policy_set (const ::CIAO::DAnCE::PolicySet &src) { @@ -74,7 +98,7 @@ namespace CIAO i < src.policies.length (); ++i) { - ACE_ERROR ((LM_ERROR, + ACE_DEBUG ((LM_ERROR, "Attempting switch for i = %d\n", i)); @@ -82,7 +106,20 @@ namespace CIAO { case ::CIAO::DAnCE::PRIORITY_MODEL_POLICY_TYPE: ps.add_priorityModel ( - PM_Handler::priority_model_pd (src.policies[i].PriorityModelDef ())); + PM_Handler::priority_model_pd ( + src.policies[i].PriorityModelDef ())); + break; + + case ::CIAO::DAnCE::NETWORK_PRIORITY_TYPE: + ps.add_nwpriorityModel ( + NPM_Handler::nw_priority_model_pd ( + src.policies[i].NWPriorityModelDef ())); + break; + + case ::CIAO::DAnCE::CLIENT_NETWORK_PRIORITY_TYPE: + ps.add_cnwpriorityModel ( + CNPM_Handler::cnw_priority_pd ( + src.policies[i].CNWPriorityModelDef ())); break; case ::CIAO::DAnCE::THREADPOOL_POLICY_TYPE: @@ -90,7 +127,8 @@ namespace CIAO break; case ::CIAO::DAnCE::PRIORITY_BANDED_CONNECTION_POLICY_TYPE: - ps.add_priorityBandedConnection (src.policies[i].PriorityBandedConnectionDef ().Id.in ()); + ps.add_priorityBandedConnection ( + src.policies[i].PriorityBandedConnectionDef ().Id.in ()); break; case 0: diff --git a/config_complex_types_1/Config_Handlers/RT-CCM/RT-CCM-Handlers.mpc b/config_complex_types_1/Config_Handlers/RT-CCM/RT-CCM-Handlers.mpc index 5061a0b9ea6..707eab51c12 100644 --- a/config_complex_types_1/Config_Handlers/RT-CCM/RT-CCM-Handlers.mpc +++ b/config_complex_types_1/Config_Handlers/RT-CCM/RT-CCM-Handlers.mpc @@ -34,6 +34,8 @@ project (RT_CCM_Config_Handlers) : acelib, ciao_deployment_stub, ciao_xml_utils OR_Handler.cpp PM_Handler.cpp PS_Handler.cpp + CNPM_Handler.cpp + NPM_Handler.cpp SRD_Handler.cpp TP_Handler.cpp TPL_Handler.cpp diff --git a/config_complex_types_1/Config_Handlers/Utils/XercesString.cpp b/config_complex_types_1/Config_Handlers/Utils/XercesString.cpp index db3e704caa5..6f034163e4b 100644 --- a/config_complex_types_1/Config_Handlers/Utils/XercesString.cpp +++ b/config_complex_types_1/Config_Handlers/Utils/XercesString.cpp @@ -1,6 +1,7 @@ // $Id$ #include +#include #include "XercesString.h" using xercesc::XMLString; @@ -39,7 +40,7 @@ namespace Config_Handlers if (&rhs == this) return *this; XStr temp (rhs); - ACE_Swap::swap (this->_wstr, temp._wstr); + std::swap (this->_wstr, temp._wstr); return *this; } diff --git a/config_complex_types_1/Config_Handlers/Utils/XercesString.h b/config_complex_types_1/Config_Handlers/Utils/XercesString.h index a6f1dabe1db..e7f0059086b 100644 --- a/config_complex_types_1/Config_Handlers/Utils/XercesString.h +++ b/config_complex_types_1/Config_Handlers/Utils/XercesString.h @@ -5,8 +5,6 @@ #include /**/ "ace/pre.h" -#include "ace/Swap.h" - #if !defined (ACE_LACKS_PRAGMA_ONCE) #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -- cgit v1.2.1