diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-06-09 04:26:18 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-06-09 04:26:18 +0000 |
commit | 9988f6158764057bbd911a6b36b7e3406d5211c6 (patch) | |
tree | 6ac47dad5dccac53321fa5e706dc87eb250a2021 | |
parent | eee67dbd1132f5dd4f1da70cc28d62be9fa90fb4 (diff) | |
download | ATCD-9988f6158764057bbd911a6b36b7e3406d5211c6.tar.gz |
ChangeLogTag: Sun Jun 8 23:21:45 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 17 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/ComponentDef_i.cpp | 56 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.cpp | 44 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.h | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils_T.cpp | 9 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.cpp | 84 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.h | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.cpp | 101 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.h | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.cpp | 123 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.h | 11 |
12 files changed, 281 insertions, 196 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 958bbd1b311..37628e570ba 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,20 @@ +Sun Jun 8 23:21:45 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + * orbsvcs/orbsvcs/IFRService/ComponentDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/EventPortDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/EventPortDef_i.h: + * orbsvcs/orbsvcs/IFRService/IFR_Service_Utils_T.cpp: + * orbsvcs/orbsvcs/IFRService/ProvidesDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/ProvidesDef_i.h: + * orbsvcs/orbsvcs/IFRService/UsesDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/UsesDef_i.h: + * orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.h: + + More changes toward support of components, valuetypes and eventtypes + in the IFR. + Sun Jun 8 18:50:29 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> * performance-tests/Sequence_Latency/Single_Threaded: New test for diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ComponentDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/ComponentDef_i.cpp index 837fa6c663c..a702ebc7261 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ComponentDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/ComponentDef_i.cpp @@ -176,35 +176,21 @@ CORBA::Contained::Description * TAO_ComponentDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - CORBA::ComponentIR::ComponentDescription *desc_ptr = 0; - ACE_NEW_RETURN (desc_ptr, - CORBA::ComponentIR::ComponentDescription, - 0); - CORBA::ComponentIR::ComponentDescription_var desc_var = desc_ptr; + CORBA::ComponentIR::ComponentDescription cd; + TAO_IFR_Desc_Utils<CORBA::ComponentIR::ComponentDescription, + TAO_ComponentDef_i>::fill_desc_begin ( + cd, + this->repo_, + this->section_key_ + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK_RETURN (0); ACE_TString holder; this->repo_->config ()->get_string_value (this->section_key_, - "name", - holder); - desc_ptr->name = holder.fast_rep ();; - this->repo_->config ()->get_string_value (this->section_key_, - "id", - holder); - desc_ptr->id = holder.fast_rep (); - - this->repo_->config ()->get_string_value (this->section_key_, - "container_id", - holder); - desc_ptr->defined_in = holder.c_str (); - this->repo_->config ()->get_string_value (this->section_key_, - "version", - holder); - desc_ptr->version = holder.fast_rep (); - - this->repo_->config ()->get_string_value (this->section_key_, "base_component", holder); - desc_ptr->base_component = holder.fast_rep (); + cd.base_component = holder.fast_rep (); CORBA::ULong count = 0; ACE_Configuration_Section_Key supports_key; @@ -220,7 +206,7 @@ TAO_ComponentDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) count); } - desc_ptr->supported_interfaces.length (count); + cd.supported_interfaces.length (count); char *stringified = 0; CORBA::ULong i = 0; @@ -231,40 +217,40 @@ TAO_ComponentDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) stringified, holder); - desc_ptr->supported_interfaces[i] = holder.c_str (); + cd.supported_interfaces[i] = holder.c_str (); } TAO_Port_Desc_Seq_Utils< CORBA::ComponentIR::ProvidesDescriptionSeq - >::port_descriptions (desc_ptr->provided_interfaces, + >::port_descriptions (cd.provided_interfaces, this->repo_->config (), this->section_key_, "provides"); TAO_Port_Desc_Seq_Utils< CORBA::ComponentIR::UsesDescriptionSeq - >::port_descriptions (desc_ptr->used_interfaces, + >::port_descriptions (cd.used_interfaces, this->repo_->config (), this->section_key_, "uses"); TAO_Port_Desc_Seq_Utils< CORBA::ComponentIR::EventPortDescriptionSeq - >::port_descriptions (desc_ptr->emits_events, + >::port_descriptions (cd.emits_events, this->repo_->config (), this->section_key_, "emits"); TAO_Port_Desc_Seq_Utils< CORBA::ComponentIR::EventPortDescriptionSeq - >::port_descriptions (desc_ptr->publishes_events, + >::port_descriptions (cd.publishes_events, this->repo_->config (), this->section_key_, "publishes"); TAO_Port_Desc_Seq_Utils< CORBA::ComponentIR::EventPortDescriptionSeq - >::port_descriptions (desc_ptr->consumes_events, + >::port_descriptions (cd.consumes_events, this->repo_->config (), this->section_key_, "consumes"); @@ -283,7 +269,7 @@ TAO_ComponentDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) count); } - desc_ptr->attributes.length (count); + cd.attributes.length (count); ACE_Configuration_Section_Key attr_key; for (i = 0; i < count; ++i) @@ -298,12 +284,12 @@ TAO_ComponentDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) 0); TAO_ExtAttributeDef_i impl (this->repo_); impl.section_key (attr_key); - impl.fill_description (desc_ptr->attributes[i] + impl.fill_description (cd.attributes[i] ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); } - desc_ptr->type = this->type_i (ACE_ENV_SINGLE_ARG_PARAMETER); + cd.type = this->type_i (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); CORBA::Contained::Description *cont_desc_ptr = 0; @@ -315,7 +301,7 @@ TAO_ComponentDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) cont_desc_ptr->kind = CORBA::dk_Component; - cont_desc_ptr->value <<= desc_ptr; + cont_desc_ptr->value <<= cd; return retval._retn (); } diff --git a/TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.cpp index c7b60922d33..a2c21fb44e2 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.cpp @@ -4,6 +4,7 @@ #include "Repository_i.h" #include "EventPortDef_i.h" #include "EventDef_i.h" +#include "IFR_Service_Utils_T.h" ACE_RCSID (IFRService, EventPortDef_i, @@ -135,35 +136,24 @@ TAO_EventPortDef_i::describe (ACE_ENV_SINGLE_ARG_DECL) } CORBA::Contained::Description * -TAO_EventPortDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +TAO_EventPortDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - CORBA::ComponentIR::EventPortDescription *ev_desc = 0; - ACE_NEW_RETURN (ev_desc, - CORBA::ComponentIR::EventPortDescription, - 0); + CORBA::ComponentIR::EventPortDescription epd; + TAO_IFR_Desc_Utils<CORBA::ComponentIR::EventPortDescription, + TAO_EventPortDef_i>::fill_desc_begin ( + epd, + this->repo_, + this->section_key_ + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK_RETURN (0); ACE_TString holder; this->repo_->config ()->get_string_value (this->section_key_, - "name", - holder); - ev_desc->name = holder.fast_rep (); - this->repo_->config ()->get_string_value (this->section_key_, - "id", - holder); - ev_desc->id = holder.fast_rep (); - this->repo_->config ()->get_string_value (this->section_key_, - "container_id", - holder); - ev_desc->defined_in = holder.fast_rep (); - this->repo_->config ()->get_string_value (this->section_key_, - "version", - holder); - ev_desc->version = holder.fast_rep (); - this->repo_->config ()->get_string_value (this->section_key_, "base_type", holder); - ev_desc->event = holder.fast_rep (); + epd.event = holder.fast_rep (); CORBA::Contained::Description *retval = 0; ACE_NEW_RETURN (retval, @@ -171,6 +161,14 @@ TAO_EventPortDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) 0); retval->kind = this->def_kind (); - retval->value <<= ev_desc; + retval->value <<= epd; return retval; } + +CORBA::DefinitionKind +TAO_EventPortDef_i::def_kind (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return CORBA::dk_none; +} + diff --git a/TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.h b/TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.h index 4c5f6e923b2..2501f5eba54 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.h +++ b/TAO/orbsvcs/orbsvcs/IFRService/EventPortDef_i.h @@ -101,6 +101,14 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + +private: + virtual CORBA::DefinitionKind def_kind ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // Dummy method so we can consolidate derived class methods + // in this 'abstract' base class. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils_T.cpp b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils_T.cpp index d060ada8c22..46469d85ad6 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils_T.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils_T.cpp @@ -299,14 +299,11 @@ TAO_Port_Utils<T>::create_entry (const char *id, template<typename T> void -TAO_Port_Utils<T>::set_is_multiple (CORBA::Boolean is_multiple, - ACE_Configuration *config, - ACE_Configuration_Section_Key &key) +TAO_Port_Utils<T>::set_is_multiple (CORBA::Boolean /* is_multiple */, + ACE_Configuration * /*config */, + ACE_Configuration_Section_Key & /* key */) { /// Do nothing for eveything except UsesDef. - ACE_UNUSED_ARG (is_multiple); - ACE_UNUSED_ARG (config); - ACE_UNUSED_ARG (key); } #endif /* TAO_IFR_SERVICE_UTILS_T_CPP */ diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.cpp index 05c93692753..a92d526d7c1 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.cpp @@ -3,6 +3,8 @@ #include "Repository_i.h" #include "ProvidesDef_i.h" +#include "IFR_ComponentsS.h" +#include "IFR_Service_Utils_T.h" ACE_RCSID (IFRService, ProvidesDef_i, @@ -27,25 +29,6 @@ TAO_ProvidesDef_i::def_kind (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) return CORBA::dk_Provides; } -void -TAO_ProvidesDef_i::destroy (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_IFR_WRITE_GUARD; - - this->update_key (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->destroy_i (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -void -TAO_ProvidesDef_i::destroy_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // TODO -} - CORBA::Contained::Description * TAO_ProvidesDef_i::describe (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) @@ -59,11 +42,33 @@ TAO_ProvidesDef_i::describe (ACE_ENV_SINGLE_ARG_DECL) } CORBA::Contained::Description * -TAO_ProvidesDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) +TAO_ProvidesDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO - return 0; + CORBA::ComponentIR::ProvidesDescription pd; + TAO_IFR_Desc_Utils<CORBA::ComponentIR::ProvidesDescription, + TAO_ProvidesDef_i>::fill_desc_begin ( + pd, + this->repo_, + this->section_key_ + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK_RETURN (0); + + ACE_TString base_type_id; + this->repo_->config ()->get_string_value (this->section_key_, + "base_type", + base_type_id); + pd.interface_type = base_type_id.fast_rep (); + + CORBA::Contained::Description *retval = 0; + ACE_NEW_RETURN (retval, + CORBA::Contained::Description, + 0); + + retval->kind = CORBA::dk_Provides; + retval->value <<= pd; + return retval; } CORBA::InterfaceDef_ptr @@ -79,11 +84,24 @@ TAO_ProvidesDef_i::interface_type (ACE_ENV_SINGLE_ARG_DECL) } CORBA::InterfaceDef_ptr -TAO_ProvidesDef_i::interface_type_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) +TAO_ProvidesDef_i::interface_type_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO - return 0; + ACE_TString holder; + this->repo_->config ()->get_string_value (this->section_key_, + "base_type", + holder); + this->repo_->config ()->get_string_value (this->repo_->repo_ids_key (), + holder.fast_rep (), + holder); + CORBA::Object_var obj = + TAO_IFR_Service_Utils::path_to_ir_object (holder, + this->repo_ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (CORBA::InterfaceDef::_nil ()); + + return CORBA::InterfaceDef::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); } void @@ -104,10 +122,22 @@ TAO_ProvidesDef_i::interface_type ( void TAO_ProvidesDef_i::interface_type_i ( - CORBA::InterfaceDef_ptr /* interface_type */ + CORBA::InterfaceDef_ptr interface_type ACE_ENV_ARG_DECL_NOT_USED ) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO + this->repo_->config ()->remove_value (this->section_key_, + "base_type"); + + if (CORBA::is_nil (interface_type)) + { + return; + } + + this->repo_->config ()->set_string_value ( + this->section_key_, + "base_type", + interface_type->_interface_repository_id () + ); } diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.h b/TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.h index 05090030344..034a1d3ee0a 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.h +++ b/TAO/orbsvcs/orbsvcs/IFRService/ProvidesDef_i.h @@ -55,17 +55,6 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Return our definition kind. - virtual void destroy ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS - ) - ACE_THROW_SPEC ((CORBA::SystemException)); - // Remove the repository entry. - - virtual void destroy_i ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS - ) - ACE_THROW_SPEC ((CORBA::SystemException)); - virtual CORBA::Contained::Description *describe ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) diff --git a/TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.cpp index 0941d5b781a..d744af2d181 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.cpp @@ -3,6 +3,7 @@ #include "Repository_i.h" #include "UsesDef_i.h" +#include "IFR_Service_Utils_T.h" ACE_RCSID (IFRService, UsesDef_i, @@ -25,25 +26,6 @@ TAO_UsesDef_i::def_kind (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) return CORBA::dk_Uses; } -void -TAO_UsesDef_i::destroy (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_IFR_WRITE_GUARD; - - this->update_key (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->destroy_i (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -void -TAO_UsesDef_i::destroy_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // TODO -} - CORBA::Contained::Description * TAO_UsesDef_i::describe (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) @@ -57,11 +39,35 @@ TAO_UsesDef_i::describe (ACE_ENV_SINGLE_ARG_DECL) } CORBA::Contained::Description * -TAO_UsesDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) +TAO_UsesDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO - return 0; + CORBA::ComponentIR::UsesDescription ud; + TAO_IFR_Desc_Utils<CORBA::ComponentIR::UsesDescription, + TAO_UsesDef_i>::fill_desc_begin ( + ud, + this->repo_, + this->section_key_ + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK_RETURN (0); + + ACE_TString base_type_id; + this->repo_->config ()->get_string_value (this->section_key_, + "base_type", + base_type_id); + ud.interface_type = base_type_id.fast_rep (); + ud.is_multiple = this->is_multiple_i (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + CORBA::Contained::Description *retval = 0; + ACE_NEW_RETURN (retval, + CORBA::Contained::Description, + 0); + + retval->kind = CORBA::dk_Uses; + retval->value <<= ud; + return retval; } CORBA::InterfaceDef_ptr @@ -77,11 +83,24 @@ TAO_UsesDef_i::interface_type (ACE_ENV_SINGLE_ARG_DECL) } CORBA::InterfaceDef_ptr -TAO_UsesDef_i::interface_type_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) +TAO_UsesDef_i::interface_type_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO - return 0; + ACE_TString holder; + this->repo_->config ()->get_string_value (this->section_key_, + "base_type", + holder); + this->repo_->config ()->get_string_value (this->repo_->repo_ids_key (), + holder.fast_rep (), + holder); + CORBA::Object_var obj = + TAO_IFR_Service_Utils::path_to_ir_object (holder, + this->repo_ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (CORBA::InterfaceDef::_nil ()); + + return CORBA::InterfaceDef::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); } void @@ -102,12 +121,24 @@ TAO_UsesDef_i::interface_type ( void TAO_UsesDef_i::interface_type_i ( - CORBA::InterfaceDef_ptr /* interface_type */ + CORBA::InterfaceDef_ptr interface_type ACE_ENV_ARG_DECL_NOT_USED ) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO + this->repo_->config ()->remove_value (this->section_key_, + "base_type"); + + if (CORBA::is_nil (interface_type)) + { + return; + } + + this->repo_->config ()->set_string_value ( + this->section_key_, + "base_type", + interface_type->_interface_repository_id () + ); } CORBA::Boolean @@ -123,11 +154,15 @@ TAO_UsesDef_i::is_multiple (ACE_ENV_SINGLE_ARG_DECL) } CORBA::Boolean -TAO_UsesDef_i::is_multiple_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) +TAO_UsesDef_i::is_multiple_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO - return 0; + CORBA::ULong val = 0; + this->repo_->config ()->get_integer_value (this->section_key_, + "is_multiple", + val); + return ACE_static_cast (CORBA::Boolean, + val); } void @@ -148,11 +183,13 @@ TAO_UsesDef_i::is_multiple ( void TAO_UsesDef_i::is_multiple_i ( - CORBA::Boolean /* is_multiple */ + CORBA::Boolean is_multiple ACE_ENV_ARG_DECL_NOT_USED ) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO + this->repo_->config ()->set_integer_value (this->section_key_, + "is_multiple", + is_multiple); } diff --git a/TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.h b/TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.h index d0df099c200..bf367bef88f 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.h +++ b/TAO/orbsvcs/orbsvcs/IFRService/UsesDef_i.h @@ -55,17 +55,6 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Return our definition kind. - virtual void destroy ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS - ) - ACE_THROW_SPEC ((CORBA::SystemException)); - // Remove the repository entry. - - virtual void destroy_i ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS - ) - ACE_THROW_SPEC ((CORBA::SystemException)); - virtual CORBA::Contained::Description *describe ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp index ac3631766a1..07d9ec4fa23 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp @@ -1410,7 +1410,7 @@ TAO_ValueDef_i::describe_value_i (ACE_ENV_SINGLE_ARG_DECL) param_count); fv_desc->initializers[i].members.length (param_count); - for (j = 0; j < param_count; +j) + for (j = 0; j < param_count; ++j) { stringified = TAO_IFR_Service_Utils::int_to_string (j); this->repo_->config ()->open_section (params_key, diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.cpp index f6f1cb35bf1..827319772c2 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.cpp @@ -3,6 +3,8 @@ #include "Repository_i.h" #include "ValueMemberDef_i.h" +#include "IDLType_i.h" +#include "IFR_Service_Utils_T.h" ACE_RCSID (IFRService, ValueMemberDef_i, @@ -27,25 +29,6 @@ TAO_ValueMemberDef_i::def_kind (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) return CORBA::dk_ValueMember; } -void -TAO_ValueMemberDef_i::destroy (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_IFR_WRITE_GUARD; - - this->update_key (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->destroy_i (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -void -TAO_ValueMemberDef_i::destroy_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // TODO -} - CORBA::Contained::Description * TAO_ValueMemberDef_i::describe (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) @@ -59,11 +42,48 @@ TAO_ValueMemberDef_i::describe (ACE_ENV_SINGLE_ARG_DECL) } CORBA::Contained::Description * -TAO_ValueMemberDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) +TAO_ValueMemberDef_i::describe_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO - return 0; + CORBA::ValueMember vm; + TAO_IFR_Desc_Utils<CORBA::ValueMember, + TAO_ValueMemberDef_i>::fill_desc_begin_ex ( + vm, + this->repo_, + this->section_key_ + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK_RETURN (0); + + ACE_TString holder; + this->repo_->config ()->get_string_value (this->section_key_, + "type_path", + holder); + CORBA::Object_var obj = + TAO_IFR_Service_Utils::path_to_ir_object (holder, + this->repo_ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + vm.type_def = CORBA::IDLType::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + CORBA::ULong val = 0; + this->repo_->config ()->get_integer_value (this->section_key_, + "access", + val); + vm.access = ACE_static_cast (CORBA::Visibility, + val); + + CORBA::Contained::Description *retval = 0; + ACE_NEW_RETURN (retval, + CORBA::Contained::Description, + 0); + + retval->kind = CORBA::dk_ValueMember; + retval->value <<= vm; + return retval; } CORBA::TypeCode_ptr @@ -79,11 +99,17 @@ TAO_ValueMemberDef_i::type (ACE_ENV_SINGLE_ARG_DECL) } CORBA::TypeCode_ptr -TAO_ValueMemberDef_i::type_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) +TAO_ValueMemberDef_i::type_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO - return 0; + ACE_TString holder; + this->repo_->config ()->get_string_value (this->section_key_, + "type_path", + holder); + TAO_IDLType_i *impl = + TAO_IFR_Service_Utils::path_to_idltype (holder, + this->repo_); + return impl->type_i (ACE_ENV_SINGLE_ARG_PARAMETER); } CORBA::IDLType_ptr @@ -99,11 +125,21 @@ TAO_ValueMemberDef_i::type_def (ACE_ENV_SINGLE_ARG_DECL) } CORBA::IDLType_ptr -TAO_ValueMemberDef_i::type_def_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) +TAO_ValueMemberDef_i::type_def_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO - return 0; + ACE_TString holder; + this->repo_->config ()->get_string_value (this->section_key_, + "type_path", + holder); + CORBA::Object_var obj = + TAO_IFR_Service_Utils::path_to_ir_object (holder, + this->repo_ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (CORBA::IDLType::_nil ()); + + return CORBA::IDLType::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); } void @@ -121,11 +157,14 @@ TAO_ValueMemberDef_i::type_def (CORBA::IDLType_ptr type_def } void -TAO_ValueMemberDef_i::type_def_i (CORBA::IDLType_ptr /* type_def */ - ACE_ENV_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */) +TAO_ValueMemberDef_i::type_def_i (CORBA::IDLType_ptr type_def + ACE_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO + const char *path = TAO_IFR_Service_Utils::reference_to_path (type_def); + this->repo_->config ()->set_string_value (this->section_key_, + "type_path", + path); } CORBA::Visibility @@ -141,11 +180,15 @@ TAO_ValueMemberDef_i::access (ACE_ENV_SINGLE_ARG_DECL) } CORBA::Visibility -TAO_ValueMemberDef_i::access_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */ ) +TAO_ValueMemberDef_i::access_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO - return 0; + CORBA::ULong val = 0; + this->repo_->config ()->get_integer_value (this->section_key_, + "access", + val); + return ACE_static_cast (CORBA::Visibility, + val); } void @@ -158,14 +201,16 @@ TAO_ValueMemberDef_i::access (CORBA::Visibility access this->update_key (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->access (access - ACE_ENV_ARG_PARAMETER); + this->access_i (access + ACE_ENV_ARG_PARAMETER); } void -TAO_ValueMemberDef_i::access_i (CORBA::Visibility /* access */ - ACE_ENV_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */ ) +TAO_ValueMemberDef_i::access_i (CORBA::Visibility access + ACE_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { - // TODO + this->repo_->config ()->set_integer_value (this->section_key_, + "access", + access); } diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.h b/TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.h index 63d944b2f77..b6df1e8fa3d 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.h +++ b/TAO/orbsvcs/orbsvcs/IFRService/ValueMemberDef_i.h @@ -55,17 +55,6 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Return our definition kind. - virtual void destroy ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - - ACE_THROW_SPEC ((CORBA::SystemException)); - // Remove the repository entry. - - virtual void destroy_i ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - - ACE_THROW_SPEC ((CORBA::SystemException)); - virtual CORBA::Contained::Description *describe ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) |