diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-18 16:39:52 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-18 16:39:52 +0000 |
commit | 901866ddf8b59369fe7618119cb8af1543d5384f (patch) | |
tree | 649111d95aeeaf58d34e1af255ab8d8e7341ec21 /TAO | |
parent | 9a6a3202e245f33e58fdef044d69b2cf52eeb91c (diff) | |
download | ATCD-901866ddf8b59369fe7618119cb8af1543d5384f.tar.gz |
Added read/write locking option.
Diffstat (limited to 'TAO')
77 files changed, 4477 insertions, 613 deletions
diff --git a/TAO/orbsvcs/IFR_Service/AliasDef_i.cpp b/TAO/orbsvcs/IFR_Service/AliasDef_i.cpp index d49854d407c..07b85b3db60 100644 --- a/TAO/orbsvcs/IFR_Service/AliasDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/AliasDef_i.cpp @@ -32,6 +32,15 @@ CORBA::TypeCode_ptr TAO_AliasDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_AliasDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString id; this->repo_->config ()->get_string_value (this->section_key_, "id", @@ -60,7 +69,7 @@ TAO_AliasDef_i::type (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_IDLType_i> safety (impl); - CORBA::TypeCode_var tc = impl->type (ACE_TRY_ENV); + CORBA::TypeCode_var tc = impl->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->repo_->tc_factory ()->create_alias_tc (id.c_str (), @@ -73,6 +82,15 @@ IR::IDLType_ptr TAO_AliasDef_i::original_type_def (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (IR::IDLType::_nil ()); + + return this->original_type_def_i (ACE_TRY_ENV); +} + +IR::IDLType_ptr +TAO_AliasDef_i::original_type_def_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString original_type; this->repo_->config ()->get_string_value (this->section_key_, "original_type", @@ -107,6 +125,17 @@ TAO_AliasDef_i::original_type_def (IR::IDLType_ptr original_type_def, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->original_type_def_i (original_type_def, + ACE_TRY_ENV); +} + +void +TAO_AliasDef_i::original_type_def_i (IR::IDLType_ptr original_type_def, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (original_type_def, ACE_TRY_ENV); diff --git a/TAO/orbsvcs/IFR_Service/AliasDef_i.h b/TAO/orbsvcs/IFR_Service/AliasDef_i.h index c1167da3afd..876bce60728 100644 --- a/TAO/orbsvcs/IFR_Service/AliasDef_i.h +++ b/TAO/orbsvcs/IFR_Service/AliasDef_i.h @@ -64,18 +64,38 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual IR::IDLType_ptr original_type_def ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::IDLType_ptr original_type_def_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void original_type_def ( IR::IDLType_ptr original_type_def, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void original_type_def_i ( + IR::IDLType_ptr original_type_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/ArrayDef_i.cpp b/TAO/orbsvcs/IFR_Service/ArrayDef_i.cpp index d30f5b4a1b6..fcf062eb5bb 100644 --- a/TAO/orbsvcs/IFR_Service/ArrayDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ArrayDef_i.cpp @@ -30,6 +30,15 @@ void TAO_ArrayDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_ArrayDef_i::destroy_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Only if it is (w)string, fixed, array or sequence. this->destroy_element_type (ACE_TRY_ENV); ACE_CHECK; @@ -48,8 +57,17 @@ CORBA::TypeCode_ptr TAO_ArrayDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_ArrayDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::TypeCode_var element_typecode = - this->element_type (ACE_TRY_ENV); + this->element_type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); CORBA::ULong length = this->length (ACE_TRY_ENV); @@ -63,7 +81,16 @@ TAO_ArrayDef_i::type (CORBA::Environment &ACE_TRY_ENV) } CORBA::ULong -TAO_ArrayDef_i::length (CORBA::Environment &) +TAO_ArrayDef_i::length (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->length_i (ACE_TRY_ENV); +} + +CORBA::ULong +TAO_ArrayDef_i::length_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int length = 0; @@ -76,7 +103,18 @@ TAO_ArrayDef_i::length (CORBA::Environment &) void TAO_ArrayDef_i::length (CORBA::ULong length, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->length_i (length, + ACE_TRY_ENV); +} + +void +TAO_ArrayDef_i::length_i (CORBA::ULong length, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->set_integer_value (this->section_key_, @@ -88,6 +126,15 @@ CORBA::TypeCode_ptr TAO_ArrayDef_i::element_type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->element_type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_ArrayDef_i::element_type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString element_path; this->repo_->config ()->get_string_value (this->section_key_, "element_path", @@ -106,13 +153,22 @@ TAO_ArrayDef_i::element_type (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_IDLType_i> safety (impl); - return impl->type (ACE_TRY_ENV); + return impl->type_i (ACE_TRY_ENV); } IR::IDLType_ptr TAO_ArrayDef_i::element_type_def (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (IR::IDLType::_nil ()); + + return this->element_type_def_i (ACE_TRY_ENV); +} + +IR::IDLType_ptr +TAO_ArrayDef_i::element_type_def_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString element_path; this->repo_->config ()->get_string_value (this->section_key_, "element_path", @@ -147,6 +203,17 @@ TAO_ArrayDef_i::element_type_def (IR::IDLType_ptr element_type_def, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->element_type_def_i (element_type_def, + ACE_TRY_ENV); +} + +void +TAO_ArrayDef_i::element_type_def_i (IR::IDLType_ptr element_type_def, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ this->destroy_element_type (ACE_TRY_ENV); ACE_CHECK; @@ -205,7 +272,7 @@ TAO_ArrayDef_i::destroy_element_type ( auto_ptr<TAO_IDLType_i> safety (impl); - impl->destroy (ACE_TRY_ENV); + impl->destroy_i (ACE_TRY_ENV); ACE_CHECK; break; } diff --git a/TAO/orbsvcs/IFR_Service/ArrayDef_i.h b/TAO/orbsvcs/IFR_Service/ArrayDef_i.h index e955280f767..cf286f337a2 100644 --- a/TAO/orbsvcs/IFR_Service/ArrayDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ArrayDef_i.h @@ -63,18 +63,36 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::ULong length ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::ULong length_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void length ( CORBA::ULong length, CORBA::Environment &ACE_TRY_ENV = @@ -82,18 +100,37 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void length_i ( + CORBA::ULong length, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr element_type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::TypeCode_ptr element_type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::IDLType_ptr element_type_def ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::IDLType_ptr element_type_def_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void element_type_def ( IR::IDLType_ptr element_type_def, CORBA::Environment &ACE_TRY_ENV = @@ -101,6 +138,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void element_type_def_i ( + IR::IDLType_ptr element_type_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + private: void destroy_element_type ( CORBA::Environment &ACE_TRY_ENV = diff --git a/TAO/orbsvcs/IFR_Service/AttributeDef_i.cpp b/TAO/orbsvcs/IFR_Service/AttributeDef_i.cpp index b60fd3ace93..3c6320b39e7 100644 --- a/TAO/orbsvcs/IFR_Service/AttributeDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/AttributeDef_i.cpp @@ -34,6 +34,15 @@ IR::Contained::Description * TAO_AttributeDef_i::describe (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_AttributeDef_i::describe_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ IR::Contained::Description *desc_ptr = 0; ACE_NEW_THROW_EX (desc_ptr, IR::Contained::Description, @@ -55,6 +64,15 @@ CORBA::TypeCode_ptr TAO_AttributeDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_AttributeDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString type_path; this->repo_->config ()->get_string_value (this->section_key_, "type_path", @@ -73,13 +91,22 @@ TAO_AttributeDef_i::type (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_IDLType_i> safety (impl); - return impl->type (ACE_TRY_ENV); + return impl->type_i (ACE_TRY_ENV); } IR::IDLType_ptr TAO_AttributeDef_i::type_def (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (IR::IDLType::_nil ()); + + return this->type_def_i (ACE_TRY_ENV); +} + +IR::IDLType_ptr +TAO_AttributeDef_i::type_def_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString type_path; this->repo_->config ()->get_string_value (this->section_key_, "type_path", @@ -117,6 +144,17 @@ TAO_AttributeDef_i::type_def (IR::IDLType_ptr type_def, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->type_def_i (type_def, + ACE_TRY_ENV); +} + +void +TAO_AttributeDef_i::type_def_i (IR::IDLType_ptr type_def, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (type_def, ACE_TRY_ENV); @@ -131,7 +169,16 @@ TAO_AttributeDef_i::type_def (IR::IDLType_ptr type_def, } IR::AttributeMode -TAO_AttributeDef_i::mode (CORBA::Environment &) +TAO_AttributeDef_i::mode (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->mode_i (ACE_TRY_ENV); +} + +IR::AttributeMode +TAO_AttributeDef_i::mode_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int mode = 0; @@ -144,7 +191,18 @@ TAO_AttributeDef_i::mode (CORBA::Environment &) void TAO_AttributeDef_i::mode (IR::AttributeMode mode, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->mode_i (mode, + ACE_TRY_ENV); +} + +void +TAO_AttributeDef_i::mode_i (IR::AttributeMode mode, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->set_integer_value (this->section_key_, @@ -158,10 +216,10 @@ TAO_AttributeDef_i::make_description (CORBA::Environment &ACE_TRY_ENV) { IR::AttributeDescription ad; - ad.name = this->name (ACE_TRY_ENV); + ad.name = this->name_i (ACE_TRY_ENV); ACE_CHECK_RETURN (ad); - ad.id = this->id (ACE_TRY_ENV); + ad.id = this->id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (ad); ACE_TString container_id; @@ -172,13 +230,13 @@ TAO_AttributeDef_i::make_description (CORBA::Environment &ACE_TRY_ENV) ad.defined_in = container_id.c_str (); - ad.version = this->version (ACE_TRY_ENV); + ad.version = this->version_i (ACE_TRY_ENV); ACE_CHECK_RETURN (ad); - ad.type = this->type (ACE_TRY_ENV); + ad.type = this->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (ad); - ad.mode = this->mode (ACE_TRY_ENV); + ad.mode = this->mode_i (ACE_TRY_ENV); ACE_CHECK_RETURN (ad); ACE_Unbounded_Queue<ACE_Configuration_Section_Key> key_queue; @@ -263,7 +321,7 @@ TAO_AttributeDef_i::make_description (CORBA::Environment &ACE_TRY_ENV) TAO_ExceptionDef_i impl (this->repo_, key); - get_ed.type = impl.type (ACE_TRY_ENV); + get_ed.type = impl.type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (ad); get_ed_seq[i] = get_ed; @@ -347,7 +405,7 @@ TAO_AttributeDef_i::make_description (CORBA::Environment &ACE_TRY_ENV) TAO_ExceptionDef_i impl (this->repo_, key); - put_ed.type = impl.type (ACE_TRY_ENV); + put_ed.type = impl.type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (ad); put_ed_seq[i] = put_ed; @@ -377,33 +435,46 @@ TAO_AttributeDef_i::get_exceptions (CORBA::Environment &ACE_TRY_ENV) // This section may not have been created. if (status == 0) { + ACE_TString get_except_path; + ACE_Configuration_Section_Key dummy; + while (this->repo_->config ()->enumerate_values (get_excepts_key, - index, + index++, field_name, type) == 0) { - ACE_TString get_except_path; this->repo_->config ()->get_string_value (get_excepts_key, field_name.c_str (), get_except_path); - path_queue.enqueue_tail (get_except_path); - ++index; + // This exception may have been destroyed + status = + this->repo_->config ()->expand_path (this->repo_->root_key (), + get_except_path, + dummy, + 0); + + if (status == 0) + { + path_queue.enqueue_tail (get_except_path); + } } } + size_t size = path_queue.size (); + IR::ExceptionDefSeq *get_ed_seq = 0; ACE_NEW_THROW_EX (get_ed_seq, - IR::ExceptionDefSeq (index), + IR::ExceptionDefSeq (size), CORBA::NO_MEMORY ()); ACE_CHECK_RETURN (0); - get_ed_seq->length (index); + get_ed_seq->length (size); IR::ExceptionDefSeq_var retval = get_ed_seq; - for (CORBA::ULong i = 0; i < (CORBA::ULong) index; ++i) + for (CORBA::ULong i = 0; i < size; ++i) { ACE_TString path; path_queue.dequeue_head (path); @@ -441,33 +512,46 @@ TAO_AttributeDef_i::put_exceptions (CORBA::Environment &ACE_TRY_ENV) // This section may not have been created. if (status == 0) { + ACE_TString put_except_path; + ACE_Configuration_Section_Key dummy; + while (this->repo_->config ()->enumerate_values (put_excepts_key, - index, + index++, field_name, type) == 0) { - ACE_TString put_except_path; this->repo_->config ()->get_string_value (put_excepts_key, field_name.c_str (), put_except_path); - path_queue.enqueue_tail (put_except_path); - ++index; + // This exception may have been destroyed + status = + this->repo_->config ()->expand_path (this->repo_->root_key (), + put_except_path, + dummy, + 0); + + if (status == 0) + { + path_queue.enqueue_tail (put_except_path); + } } } + size_t size = path_queue.size (); + IR::ExceptionDefSeq *put_ed_seq = 0; ACE_NEW_THROW_EX (put_ed_seq, - IR::ExceptionDefSeq (index), + IR::ExceptionDefSeq (size), CORBA::NO_MEMORY ()); ACE_CHECK_RETURN (0); - put_ed_seq->length (index); + put_ed_seq->length (size); IR::ExceptionDefSeq_var retval = put_ed_seq; - for (CORBA::ULong i = 0; i < (CORBA::ULong) index; ++i) + for (CORBA::ULong i = 0; i < size; ++i) { ACE_TString path; path_queue.dequeue_head (path); diff --git a/TAO/orbsvcs/IFR_Service/AttributeDef_i.h b/TAO/orbsvcs/IFR_Service/AttributeDef_i.h index 9510c4cdd5d..d7ee45ba094 100644 --- a/TAO/orbsvcs/IFR_Service/AttributeDef_i.h +++ b/TAO/orbsvcs/IFR_Service/AttributeDef_i.h @@ -64,18 +64,37 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::IDLType_ptr type_def ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::IDLType_ptr type_def_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void type_def ( IR::IDLType_ptr type_def, CORBA::Environment &ACE_TRY_ENV = @@ -83,12 +102,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void type_def_i ( + IR::IDLType_ptr type_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::AttributeMode mode ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::AttributeMode mode_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void mode ( IR::AttributeMode mode, CORBA::Environment &ACE_TRY_ENV = @@ -96,6 +128,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void mode_i ( + IR::AttributeMode mode, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + IR::AttributeDescription make_description ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () diff --git a/TAO/orbsvcs/IFR_Service/ComponentDef_i.cpp b/TAO/orbsvcs/IFR_Service/ComponentDef_i.cpp index 5a654e0833b..5483739e520 100644 --- a/TAO/orbsvcs/IFR_Service/ComponentDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ComponentDef_i.cpp @@ -30,14 +30,32 @@ TAO_ComponentDef_i::def_kind (CORBA::Environment &) } void -TAO_ComponentDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_ComponentDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_ComponentDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_ComponentDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -45,7 +63,16 @@ TAO_ComponentDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) } CORBA::TypeCode_ptr -TAO_ComponentDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::type (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_ComponentDef_i::type_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -53,7 +80,16 @@ TAO_ComponentDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) } IR::InterfaceDefSeq * -TAO_ComponentDef_i::supported_interfaces (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::supported_interfaces (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->supported_interfaces_i (ACE_TRY_ENV); +} + +IR::InterfaceDefSeq * +TAO_ComponentDef_i::supported_interfaces_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -62,6 +98,19 @@ TAO_ComponentDef_i::supported_interfaces (CORBA::Environment & /* ACE_TRY_ENV */ void TAO_ComponentDef_i::supported_interfaces ( + const IR::InterfaceDefSeq &supported_interfaces, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->supported_interfaces_i (supported_interfaces, + ACE_TRY_ENV); +} + +void +TAO_ComponentDef_i::supported_interfaces_i ( const IR::InterfaceDefSeq & /* supported_interfaces */, CORBA::Environment & /* ACE_TRY_ENV */ ) @@ -71,7 +120,16 @@ TAO_ComponentDef_i::supported_interfaces ( } IR::ComponentDef_ptr -TAO_ComponentDef_i::base_component (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::base_component (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::ComponentDef::_nil ()); + + return this->base_component_i (ACE_TRY_ENV); +} + +IR::ComponentDef_ptr +TAO_ComponentDef_i::base_component_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -79,7 +137,16 @@ TAO_ComponentDef_i::base_component (CORBA::Environment & /* ACE_TRY_ENV */) } IR::ProvidesDefSeq * -TAO_ComponentDef_i::provides_interfaces (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::provides_interfaces (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->provides_interfaces_i (ACE_TRY_ENV); +} + +IR::ProvidesDefSeq * +TAO_ComponentDef_i::provides_interfaces_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -87,7 +154,16 @@ TAO_ComponentDef_i::provides_interfaces (CORBA::Environment & /* ACE_TRY_ENV */) } IR::UsesDefSeq * -TAO_ComponentDef_i::uses_interfaces (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::uses_interfaces (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->uses_interfaces_i (ACE_TRY_ENV); +} + +IR::UsesDefSeq * +TAO_ComponentDef_i::uses_interfaces_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -95,7 +171,16 @@ TAO_ComponentDef_i::uses_interfaces (CORBA::Environment & /* ACE_TRY_ENV */) } IR::EmitsDefSeq * -TAO_ComponentDef_i::emits_events (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::emits_events (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->emits_events_i (ACE_TRY_ENV); +} + +IR::EmitsDefSeq * +TAO_ComponentDef_i::emits_events_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -103,7 +188,16 @@ TAO_ComponentDef_i::emits_events (CORBA::Environment & /* ACE_TRY_ENV */) } IR::PublishesDefSeq * -TAO_ComponentDef_i::publishes_events (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::publishes_events (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->publishes_events_i (ACE_TRY_ENV); +} + +IR::PublishesDefSeq * +TAO_ComponentDef_i::publishes_events_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -111,7 +205,16 @@ TAO_ComponentDef_i::publishes_events (CORBA::Environment & /* ACE_TRY_ENV */) } IR::ConsumesDefSeq * -TAO_ComponentDef_i::consumes_events (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::consumes_events (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->consumes_events_i (ACE_TRY_ENV); +} + +IR::ConsumesDefSeq * +TAO_ComponentDef_i::consumes_events_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -128,6 +231,25 @@ TAO_ComponentDef_i::is_basic (CORBA::Environment & /* ACE_TRY_ENV */) IR::ProvidesDef_ptr TAO_ComponentDef_i::create_provides ( + const char *id, + const char *name, + const char *version, + IR::InterfaceDef_ptr interface_type, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::ProvidesDef::_nil ()); + + return this->create_provides_i (id, + name, + version, + interface_type, + ACE_TRY_ENV); +} + +IR::ProvidesDef_ptr +TAO_ComponentDef_i::create_provides_i ( const char * /* id */, const char * /* name */, const char * /* version */, @@ -141,12 +263,31 @@ TAO_ComponentDef_i::create_provides ( } IR::UsesDef_ptr -TAO_ComponentDef_i::create_uses (const char * /* id */, - const char * /* name */, - const char * /* version */, - IR::InterfaceDef_ptr /* interface_type */, - CORBA::Boolean /* is_multiple */, - CORBA::Environment & /* ACE_TRY_ENV */ ) +TAO_ComponentDef_i::create_uses (const char *id, + const char *name, + const char *version, + IR::InterfaceDef_ptr interface_type, + CORBA::Boolean is_multiple, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::UsesDef::_nil ()); + + return this->create_uses_i (id, + name, + version, + interface_type, + is_multiple, + ACE_TRY_ENV); +} + +IR::UsesDef_ptr +TAO_ComponentDef_i::create_uses_i (const char * /* id */, + const char * /* name */, + const char * /* version */, + IR::InterfaceDef_ptr /* interface_type */, + CORBA::Boolean /* is_multiple */, + CORBA::Environment & /* ACE_TRY_ENV */ ) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -154,11 +295,28 @@ TAO_ComponentDef_i::create_uses (const char * /* id */, } IR::EmitsDef_ptr -TAO_ComponentDef_i::create_emits (const char * /* id */, - const char * /* name */, - const char * /* version */, - IR::ValueDef_ptr /* value */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::create_emits (const char *id, + const char *name, + const char *version, + IR::ValueDef_ptr value, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::EmitsDef::_nil ()); + + return this->create_emits_i (id, + name, + version, + value, + ACE_TRY_ENV); +} + +IR::EmitsDef_ptr +TAO_ComponentDef_i::create_emits_i (const char * /* id */, + const char * /* name */, + const char * /* version */, + IR::ValueDef_ptr /* value */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -166,11 +324,28 @@ TAO_ComponentDef_i::create_emits (const char * /* id */, } IR::PublishesDef_ptr -TAO_ComponentDef_i::create_publishes (const char * /* id */, - const char * /* name */, - const char * /* version */, - IR::ValueDef_ptr /* value */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::create_publishes (const char *id, + const char *name, + const char *version, + IR::ValueDef_ptr value, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::PublishesDef::_nil ()); + + return this->create_publishes_i (id, + name, + version, + value, + ACE_TRY_ENV); +} + +IR::PublishesDef_ptr +TAO_ComponentDef_i::create_publishes_i (const char * /* id */, + const char * /* name */, + const char * /* version */, + IR::ValueDef_ptr /* value */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -178,11 +353,28 @@ TAO_ComponentDef_i::create_publishes (const char * /* id */, } IR::ConsumesDef_ptr -TAO_ComponentDef_i::create_consumes (const char * /* id */, - const char * /* name */, - const char * /* version */, - IR::ValueDef_ptr /* value */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ComponentDef_i::create_consumes (const char *id, + const char *name, + const char *version, + IR::ValueDef_ptr value, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::ConsumesDef::_nil ()); + + return this->create_consumes_i (id, + name, + version, + value, + ACE_TRY_ENV); +} + +IR::ConsumesDef_ptr +TAO_ComponentDef_i::create_consumes_i (const char * /* id */, + const char * /* name */, + const char * /* version */, + IR::ValueDef_ptr /* value */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/ComponentDef_i.h b/TAO/orbsvcs/IFR_Service/ComponentDef_i.h index 4496043393f..7f92a03cf92 100644 --- a/TAO/orbsvcs/IFR_Service/ComponentDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ComponentDef_i.h @@ -63,6 +63,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // Remove the repository entry. + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -70,6 +77,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -77,12 +91,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual IR::InterfaceDefSeq *supported_interfaces ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::InterfaceDefSeq *supported_interfaces_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void supported_interfaces ( const IR::InterfaceDefSeq &supported_interfaces, CORBA::Environment &ACE_TRY_ENV = @@ -90,48 +117,97 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void supported_interfaces_i ( + const IR::InterfaceDefSeq &supported_interfaces, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ComponentDef_ptr base_component ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ComponentDef_ptr base_component_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ProvidesDefSeq *provides_interfaces ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ProvidesDefSeq *provides_interfaces_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::UsesDefSeq *uses_interfaces ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::UsesDefSeq *uses_interfaces_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::EmitsDefSeq *emits_events ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::EmitsDefSeq *emits_events_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::PublishesDefSeq *publishes_events ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::PublishesDefSeq *publishes_events_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ConsumesDefSeq *consumes_events ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ConsumesDefSeq *consumes_events_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_basic ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_basic_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ProvidesDef_ptr create_provides ( const char *id, const char *name, @@ -142,6 +218,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ProvidesDef_ptr create_provides_i ( + const char *id, + const char *name, + const char *version, + IR::InterfaceDef_ptr interface_type, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::UsesDef_ptr create_uses ( const char *id, const char *name, @@ -153,6 +239,17 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::UsesDef_ptr create_uses_i ( + const char *id, + const char *name, + const char *version, + IR::InterfaceDef_ptr interface_type, + CORBA::Boolean is_multiple, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::EmitsDef_ptr create_emits ( const char *id, const char *name, @@ -163,6 +260,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::EmitsDef_ptr create_emits_i ( + const char *id, + const char *name, + const char *version, + IR::ValueDef_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::PublishesDef_ptr create_publishes ( const char *id, const char *name, @@ -173,6 +280,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::PublishesDef_ptr create_publishes_i ( + const char *id, + const char *name, + const char *version, + IR::ValueDef_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ConsumesDef_ptr create_consumes ( const char *id, const char *name, @@ -182,6 +299,16 @@ public: TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + IR::ConsumesDef_ptr create_consumes_i ( + const char *id, + const char *name, + const char *version, + IR::ValueDef_ptr value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/ComponentRepository_i.cpp b/TAO/orbsvcs/IFR_Service/ComponentRepository_i.cpp index 23aa190d0be..fc830fbaa10 100644 --- a/TAO/orbsvcs/IFR_Service/ComponentRepository_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ComponentRepository_i.cpp @@ -22,6 +22,27 @@ TAO_ComponentRepository_i::~TAO_ComponentRepository_i (void) IR::ComponentDef_ptr TAO_ComponentRepository_i::create_component ( + const char *id, + const char *name, + const char *version, + IR::ComponentDef_ptr base_component, + const IR::InterfaceDefSeq & supports_interfaces, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::ComponentDef::_nil ()); + + return this->create_component_i (id, + name, + version, + base_component, + supports_interfaces, + ACE_TRY_ENV); +} + +IR::ComponentDef_ptr +TAO_ComponentRepository_i::create_component_i ( const char * /* id */, const char * /* name */, const char * /* version */, @@ -37,6 +58,29 @@ TAO_ComponentRepository_i::create_component ( IR::HomeDef_ptr TAO_ComponentRepository_i::create_home ( + const char *id, + const char *name, + const char *version, + IR::HomeDef_ptr base_component, + IR::ComponentDef_ptr managed_component, + IR::ValueDef_ptr primary_key, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::HomeDef::_nil ()); + + return this->create_home_i (id, + name, + version, + base_component, + managed_component, + primary_key, + ACE_TRY_ENV); +} + +IR::HomeDef_ptr +TAO_ComponentRepository_i::create_home_i ( const char * /* id */, const char * /* name */, const char * /* version */, diff --git a/TAO/orbsvcs/IFR_Service/ComponentRepository_i.h b/TAO/orbsvcs/IFR_Service/ComponentRepository_i.h index c84ca69b67c..9c05def6e7d 100644 --- a/TAO/orbsvcs/IFR_Service/ComponentRepository_i.h +++ b/TAO/orbsvcs/IFR_Service/ComponentRepository_i.h @@ -63,6 +63,17 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ComponentDef_ptr create_component_i ( + const char *id, + const char *name, + const char *version, + IR::ComponentDef_ptr base_component, + const IR::InterfaceDefSeq & supports_interfaces, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::HomeDef_ptr create_home ( const char *id, const char *name, @@ -74,6 +85,18 @@ public: TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + IR::HomeDef_ptr create_home_i ( + const char *id, + const char *name, + const char *version, + IR::HomeDef_ptr base_home, + IR::ComponentDef_ptr managed_component, + IR::ValueDef_ptr primary_key, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/ConstantDef_i.cpp b/TAO/orbsvcs/IFR_Service/ConstantDef_i.cpp index e3b6add748a..458070c4d79 100644 --- a/TAO/orbsvcs/IFR_Service/ConstantDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ConstantDef_i.cpp @@ -33,6 +33,15 @@ IR::Contained::Description * TAO_ConstantDef_i::describe (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_ConstantDef_i::describe_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ IR::Contained::Description *desc_ptr = 0; ACE_NEW_THROW_EX (desc_ptr, IR::Contained::Description, @@ -46,10 +55,10 @@ TAO_ConstantDef_i::describe (CORBA::Environment &ACE_TRY_ENV) IR::ConstantDescription cd; - cd.name = this->name (ACE_TRY_ENV); + cd.name = this->name_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); - cd.id = this->id (ACE_TRY_ENV); + cd.id = this->id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); ACE_TString container_id; @@ -60,13 +69,13 @@ TAO_ConstantDef_i::describe (CORBA::Environment &ACE_TRY_ENV) cd.defined_in = container_id.c_str (); - cd.version = this->version (ACE_TRY_ENV); + cd.version = this->version_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); cd.type = this->type (ACE_TRY_ENV); ACE_CHECK_RETURN (0); - CORBA::Any_var val = this->value (ACE_TRY_ENV); + CORBA::Any_var val = this->value_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); cd.value = val.in (); @@ -80,6 +89,15 @@ CORBA::TypeCode_ptr TAO_ConstantDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_ConstantDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString type_path; this->repo_->config ()->get_string_value (this->section_key_, "type_path", @@ -98,13 +116,22 @@ TAO_ConstantDef_i::type (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_IDLType_i> safety (impl); - return impl->type (ACE_TRY_ENV); + return impl->type_i (ACE_TRY_ENV); } IR::IDLType_ptr TAO_ConstantDef_i::type_def (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (IR::IDLType::_nil ()); + + return this->type_def_i (ACE_TRY_ENV); +} + +IR::IDLType_ptr +TAO_ConstantDef_i::type_def_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString type_path; this->repo_->config ()->get_string_value (this->section_key_, @@ -142,6 +169,17 @@ TAO_ConstantDef_i::type_def (IR::IDLType_ptr type_def, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->type_def_i (type_def, + ACE_TRY_ENV); +} + +void +TAO_ConstantDef_i::type_def_i (IR::IDLType_ptr type_def, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (type_def, ACE_TRY_ENV); @@ -159,7 +197,16 @@ CORBA::Any * TAO_ConstantDef_i::value (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - CORBA::TypeCode_var tc = this->type (ACE_TRY_ENV); + TAO_IFR_READ_GUARD_RETURN (0); + + return this->value_i (ACE_TRY_ENV); +} + +CORBA::Any * +TAO_ConstantDef_i::value_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + CORBA::TypeCode_var tc = this->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); void *ref = 0; @@ -198,7 +245,18 @@ TAO_ConstantDef_i::value (const CORBA::Any &value, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - CORBA::TypeCode_var my_tc = this->type (ACE_TRY_ENV); + TAO_IFR_WRITE_GUARD; + + this->value_i (value, + ACE_TRY_ENV); +} + +void +TAO_ConstantDef_i::value_i (const CORBA::Any &value, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + CORBA::TypeCode_var my_tc = this->type_i (ACE_TRY_ENV); ACE_CHECK; CORBA::TypeCode_var val_tc = value.type (); diff --git a/TAO/orbsvcs/IFR_Service/ConstantDef_i.h b/TAO/orbsvcs/IFR_Service/ConstantDef_i.h index a7ae6f7e873..68476069f4e 100644 --- a/TAO/orbsvcs/IFR_Service/ConstantDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ConstantDef_i.h @@ -63,18 +63,37 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::IDLType_ptr type_def ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::IDLType_ptr type_def_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void type_def ( IR::IDLType_ptr type_def, CORBA::Environment &ACE_TRY_ENV = @@ -82,18 +101,38 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void type_def_i ( + IR::IDLType_ptr type_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Any *value ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Any *value_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void value ( const CORBA::Any &value, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void value_i ( + const CORBA::Any &value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/ConsumesDef_i.cpp b/TAO/orbsvcs/IFR_Service/ConsumesDef_i.cpp index f670c572a7a..4bd7898c1e9 100644 --- a/TAO/orbsvcs/IFR_Service/ConsumesDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ConsumesDef_i.cpp @@ -28,14 +28,32 @@ TAO_ConsumesDef_i::def_kind (CORBA::Environment &) } void -TAO_ConsumesDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ConsumesDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_ConsumesDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_ConsumesDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ConsumesDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_ConsumesDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/ConsumesDef_i.h b/TAO/orbsvcs/IFR_Service/ConsumesDef_i.h index 9b81cc485f1..03ed5e6dafd 100644 --- a/TAO/orbsvcs/IFR_Service/ConsumesDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ConsumesDef_i.h @@ -64,12 +64,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/Contained_i.cpp b/TAO/orbsvcs/IFR_Service/Contained_i.cpp index cbe6dbd37d2..a335de56412 100644 --- a/TAO/orbsvcs/IFR_Service/Contained_i.cpp +++ b/TAO/orbsvcs/IFR_Service/Contained_i.cpp @@ -6,7 +6,7 @@ #include "Servant_Factory.h" #include "ace/Auto_Ptr.h" -ACE_RCSID(IFR_Service, Container_i, "$Id$") +ACE_RCSID(IFR_Service, Contained_i, "$Id$") TAO_Contained_i::TAO_Contained_i ( TAO_Repository_i *repo, @@ -26,7 +26,7 @@ TAO_Contained_i::destroy (CORBA::Environment &ACE_TRY_ENV) { TAO_IFR_WRITE_GUARD; - this->destroy_i (); + this->destroy_i (ACE_TRY_ENV); } void @@ -91,7 +91,7 @@ TAO_Contained_i::id (CORBA::Environment &ACE_TRY_ENV) { TAO_IFR_READ_GUARD_RETURN (0); - return this->id_i (); + return this->id_i (ACE_TRY_ENV); } char * @@ -168,7 +168,7 @@ TAO_Contained_i::name (CORBA::Environment &ACE_TRY_ENV) { TAO_IFR_READ_GUARD_RETURN (0); - return this->name_i (); + return this->name_i (ACE_TRY_ENV); } char * @@ -189,7 +189,7 @@ TAO_Contained_i::version (CORBA::Environment &ACE_TRY_ENV) { TAO_IFR_READ_GUARD_RETURN (0); - return this->version_i (); + return this->version_i (ACE_TRY_ENV); } char * @@ -277,6 +277,15 @@ IR::Container_ptr TAO_Contained_i::defined_in (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (IR::Container::_nil ()); + + return this->defined_in_i (ACE_TRY_ENV); +} + +IR::Container_ptr +TAO_Contained_i::defined_in_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString container_id; this->repo_->config ()->get_string_value (this->section_key_, "container_id", @@ -318,7 +327,16 @@ TAO_Contained_i::defined_in (CORBA::Environment &ACE_TRY_ENV) } char * -TAO_Contained_i::absolute_name (CORBA::Environment &) +TAO_Contained_i::absolute_name (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->absolute_name_i (ACE_TRY_ENV); +} + +char * +TAO_Contained_i::absolute_name_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_TString absolute_name; @@ -330,7 +348,16 @@ TAO_Contained_i::absolute_name (CORBA::Environment &) } IR::Repository_ptr -TAO_Contained_i::containing_repository (CORBA::Environment &) +TAO_Contained_i::containing_repository (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::Repository::_nil ()); + + return this->containing_repository_i (ACE_TRY_ENV); +} + +IR::Repository_ptr +TAO_Contained_i::containing_repository_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->repo_->repo_objref (); @@ -350,7 +377,6 @@ TAO_Contained_i::move (IR::Container_ptr new_container, new_version, 1, ACE_TRY_ENV); - ACE_CHECK; } CORBA::Boolean @@ -464,42 +490,70 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, ACE_THROW_SPEC ((CORBA::SystemException)) { IR::Repository_var my_repo = - this->containing_repository (ACE_TRY_ENV); + this->containing_repository_i (ACE_TRY_ENV); ACE_CHECK; IR::DefinitionKind container_dk = new_container->def_kind (ACE_TRY_ENV); ACE_CHECK; - // Can't move to a different repository. + ACE_Configuration_Section_Key container_key; + TAO_Container_i *container_impl = 0; + + // Check that we're not trying to move to a different repository, + // and set the container impl, used in each switch case below. if (container_dk == IR::dk_Repository) { if (my_repo.in () != new_container) { ACE_THROW (CORBA::BAD_PARAM (4, CORBA::COMPLETED_NO)); } + + container_key = this->repo_->root_key (); + + container_impl = this->repo_; } else { - IR::Contained_var contained = - IR::Contained::_narrow (new_container, - ACE_TRY_ENV); + PortableServer::ObjectId_var oid = + this->repo_->ir_poa ()->reference_to_id (new_container, + ACE_TRY_ENV); + ACE_CHECK; + + CORBA::String_var container_path = + PortableServer::ObjectId_to_string (oid.in ()); + + this->repo_->config ()->expand_path (this->repo_->root_key (), + container_path.in (), + container_key, + 0); + + TAO_Contained_i *impl = + this->repo_->servant_factory ()->create_contained (container_key, + ACE_TRY_ENV); ACE_CHECK; + auto_ptr<TAO_Contained_i> safety (impl); + IR::Repository_var your_repo = - contained->containing_repository (ACE_TRY_ENV); + impl->containing_repository_i (ACE_TRY_ENV); ACE_CHECK; if (my_repo.in () != your_repo.in ()) { ACE_THROW (CORBA::BAD_PARAM (4, CORBA::COMPLETED_NO)); } + + container_impl = + this->repo_->servant_factory ()->create_container (container_key, + ACE_TRY_ENV); + ACE_CHECK; } IR::DefinitionKind my_dk = this->def_kind (ACE_TRY_ENV); ACE_CHECK; - CORBA::String_var id = this->id (ACE_TRY_ENV); + CORBA::String_var id = this->id_i (ACE_TRY_ENV); ACE_CHECK; // If an exception is thrown, this must be restored. @@ -508,7 +562,7 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, id.in (), my_path); - // Remove the repo id, because the create function will add it + // Remove the repo id, because the create_* function call will add it // again with a different path value. this->repo_->config ()->remove_value (this->repo_->repo_ids_key (), id.in ()); @@ -523,8 +577,8 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, TAO_EnumDef_i impl (this->repo_, this->section_key_); - IR::EnumMemberSeq_var members = impl.members (ACE_TRY_ENV); - ACE_CHECK; + IR::EnumMemberSeq_var members = impl.members_i (ACE_TRY_ENV); + ACE_TRY_CHECK; if (container_dk == IR::dk_Struct || container_dk == IR::dk_Union @@ -534,16 +588,16 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, my_path.c_str (), new_name, ACE_TRY_ENV); - ACE_CHECK; + ACE_TRY_CHECK; } IR::EnumDef_var new_defn = - new_container->create_enum (id.in (), - new_name, - new_version, - members.in (), - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_enum_i (id.in (), + new_name, + new_version, + members.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; break; } case IR::dk_Alias: @@ -551,24 +605,24 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, TAO_AliasDef_i impl (this->repo_, this->section_key_); - IR::IDLType_var otype = impl.original_type_def (ACE_TRY_ENV); - ACE_CHECK; + IR::IDLType_var otype = impl.original_type_def_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - new_container->create_alias (id.in (), - new_name, - new_version, - otype.in (), - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_alias_i (id.in (), + new_name, + new_version, + otype.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; break; } case IR::dk_Native: { - new_container->create_native (id.in (), - new_name, - new_version, - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_native (id.in (), + new_name, + new_version, + ACE_TRY_ENV); + ACE_TRY_CHECK; break; } case IR::dk_ValueBox: @@ -576,15 +630,15 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, TAO_ValueBoxDef_i impl (this->repo_, this->section_key_); - IR::IDLType_var otype = impl.original_type_def (ACE_TRY_ENV); - ACE_CHECK; + IR::IDLType_var otype = impl.original_type_def_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - new_container->create_value_box (id.in (), - new_name, - new_version, - otype.in (), - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_value_box_i (id.in (), + new_name, + new_version, + otype.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; break; } case IR::dk_Struct: @@ -592,8 +646,8 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, TAO_StructDef_i impl (this->repo_, this->section_key_); - IR::StructMemberSeq_var members = impl.members (ACE_TRY_ENV); - ACE_CHECK; + IR::StructMemberSeq_var members = impl.members_i (ACE_TRY_ENV); + ACE_TRY_CHECK; if (container_dk == IR::dk_Struct || container_dk == IR::dk_Union @@ -603,16 +657,16 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, my_path.c_str (), new_name, ACE_TRY_ENV); - ACE_CHECK; + ACE_TRY_CHECK; } IR::StructDef_var new_defn = - new_container->create_struct (id.in (), - new_name, - new_version, - members.in (), - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_struct_i (id.in (), + new_name, + new_version, + members.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; this->move_contents (new_defn.in (), ACE_TRY_ENV); @@ -626,10 +680,10 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, IR::IDLType_var disc_type = impl.discriminator_type_def (ACE_TRY_ENV); - ACE_CHECK; + ACE_TRY_CHECK; - IR::UnionMemberSeq_var members = impl.members (ACE_TRY_ENV); - ACE_CHECK; + IR::UnionMemberSeq_var members = impl.members_i (ACE_TRY_ENV); + ACE_TRY_CHECK; if (container_dk == IR::dk_Struct || container_dk == IR::dk_Union @@ -639,17 +693,17 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, my_path.c_str (), new_name, ACE_TRY_ENV); - ACE_CHECK; + ACE_TRY_CHECK; } IR::UnionDef_var new_defn = - new_container->create_union (id.in (), - new_name, - new_version, - disc_type.in (), - members.in (), - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_union_i (id.in (), + new_name, + new_version, + disc_type.in (), + members.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; this->move_contents (new_defn.in (), ACE_TRY_ENV); @@ -659,11 +713,11 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, case IR::dk_Module: { IR::ModuleDef_var new_defn = - new_container->create_module (id.in (), - new_name, - new_version, - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_module_i (id.in (), + new_name, + new_version, + ACE_TRY_ENV); + ACE_TRY_CHECK; this->move_contents (new_defn.in (), ACE_TRY_ENV); @@ -675,16 +729,16 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, TAO_ExceptionDef_i impl (this->repo_, this->section_key_); - IR::StructMemberSeq_var members = impl.members (ACE_TRY_ENV); - ACE_CHECK; + IR::StructMemberSeq_var members = impl.members_i (ACE_TRY_ENV); + ACE_TRY_CHECK; IR::ExceptionDef_var new_defn = - new_container->create_exception (id.in (), - new_name, - new_version, - members.in (), - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_exception_i (id.in (), + new_name, + new_version, + members.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; this->move_contents (new_defn.in (), ACE_TRY_ENV); @@ -696,24 +750,25 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, TAO_InterfaceDef_i impl (this->repo_, this->section_key_); - IR::InterfaceDefSeq_var bases = impl.base_interfaces (ACE_TRY_ENV); - ACE_CHECK; + IR::InterfaceDefSeq_var bases = + impl.base_interfaces_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - CORBA::Boolean is_abstract = impl.is_abstract (ACE_TRY_ENV); - ACE_CHECK; + CORBA::Boolean is_abstract = impl.is_abstract_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - CORBA::Boolean is_local = impl.is_local (ACE_TRY_ENV); - ACE_CHECK; + CORBA::Boolean is_local = impl.is_local_i (ACE_TRY_ENV); + ACE_TRY_CHECK; IR::InterfaceDef_var new_defn = - new_container->create_interface (id.in (), - new_name, - new_version, - bases.in (), - is_abstract, - is_local, - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_interface_i (id.in (), + new_name, + new_version, + bases.in (), + is_abstract, + is_local, + ACE_TRY_ENV); + ACE_TRY_CHECK; this->move_contents (new_defn.in (), ACE_TRY_ENV); @@ -725,19 +780,19 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, TAO_ConstantDef_i impl (this->repo_, this->section_key_); - IR::IDLType_var type_def = impl.type_def (ACE_TRY_ENV); - ACE_CHECK; + IR::IDLType_var type_def = impl.type_def_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - CORBA::Any_var value = impl.value (ACE_TRY_ENV); - ACE_CHECK; + CORBA::Any_var value = impl.value_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - new_container->create_constant (id.in (), - new_name, - new_version, - type_def.in (), - value.in (), - ACE_TRY_ENV); - ACE_CHECK; + container_impl->create_constant_i (id.in (), + new_name, + new_version, + type_def.in (), + value.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; break; } case IR::dk_Attribute: @@ -745,54 +800,50 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, TAO_AttributeDef_i impl (this->repo_, this->section_key_); - IR::IDLType_var type_def = impl.type_def (ACE_TRY_ENV); - ACE_CHECK; + IR::IDLType_var type_def = impl.type_def_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - IR::AttributeMode mode = impl.mode (ACE_TRY_ENV); - ACE_CHECK; + IR::AttributeMode mode = impl.mode_i (ACE_TRY_ENV); + ACE_TRY_CHECK; IR::ExceptionDefSeq_var get_excepts = impl.get_exceptions (ACE_TRY_ENV); - ACE_CHECK; + ACE_TRY_CHECK; IR::ExceptionDefSeq_var put_excepts = impl.put_exceptions (ACE_TRY_ENV); - ACE_CHECK; + ACE_TRY_CHECK; if (container_dk == IR::dk_Interface) { - IR::InterfaceDef_var idef = - IR::InterfaceDef::_narrow (new_container, - ACE_TRY_ENV); - ACE_CHECK; + TAO_InterfaceDef_i idef (this->repo_, + container_key); - idef->create_attribute (id.in (), - new_name, - new_version, - type_def.in (), - mode, - get_excepts.in (), - put_excepts.in (), - ACE_TRY_ENV); - ACE_CHECK; + idef.create_attribute_i (id.in (), + new_name, + new_version, + type_def.in (), + mode, + get_excepts.in (), + put_excepts.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; break; } else if (container_dk == IR::dk_Value) { - IR::ValueDef_var vdef = - IR::ValueDef::_narrow (new_container, - ACE_TRY_ENV); - ACE_CHECK; + TAO_ValueDef_i vdef (this->repo_, + container_key); - vdef->create_attribute (id.in (), - new_name, - new_version, - type_def.in (), - mode, - get_excepts.in (), - put_excepts.in (), - ACE_TRY_ENV); - ACE_CHECK; + vdef.create_attribute_i (id.in (), + new_name, + new_version, + type_def.in (), + mode, + get_excepts.in (), + put_excepts.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; break; } else @@ -805,57 +856,54 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, TAO_OperationDef_i impl (this->repo_, this->section_key_); - IR::IDLType_var result = impl.result_def (ACE_TRY_ENV); - ACE_CHECK; + IR::IDLType_var result = impl.result_def_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - IR::OperationMode mode = impl.mode (ACE_TRY_ENV); - ACE_CHECK; + IR::OperationMode mode = impl.mode_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - IR::ParDescriptionSeq_var params = impl.params (ACE_TRY_ENV); - ACE_CHECK; + IR::ParDescriptionSeq_var params = impl.params_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - IR::ExceptionDefSeq_var exceptions = impl.exceptions (ACE_TRY_ENV); - ACE_CHECK; + IR::ExceptionDefSeq_var exceptions = + impl.exceptions_i (ACE_TRY_ENV); + ACE_TRY_CHECK; - IR::ContextIdSeq_var contexts = impl.contexts (ACE_TRY_ENV); - ACE_CHECK; + IR::ContextIdSeq_var contexts = impl.contexts_i (ACE_TRY_ENV); + ACE_TRY_CHECK; if (container_dk == IR::dk_Interface) { - IR::InterfaceDef_var idef = - IR::InterfaceDef::_narrow (new_container, - ACE_TRY_ENV); - ACE_CHECK; + TAO_InterfaceDef_i idef (this->repo_, + container_key); - idef->create_operation (id.in (), - new_name, - new_version, - result.in (), - mode, - params.in (), - exceptions.in (), - contexts.in (), - ACE_TRY_ENV); - ACE_CHECK; + idef.create_operation_i (id.in (), + new_name, + new_version, + result.in (), + mode, + params.in (), + exceptions.in (), + contexts.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; break; } else if (container_dk == IR::dk_Value) { - IR::ValueDef_var vdef = - IR::ValueDef::_narrow (new_container, - ACE_TRY_ENV); - ACE_CHECK; + TAO_ValueDef_i vdef (this->repo_, + container_key); - vdef->create_operation (id.in (), - new_name, - new_version, - result.in (), - mode, - params.in (), - exceptions.in (), - contexts.in (), - ACE_TRY_ENV); - ACE_CHECK; + vdef.create_operation_i (id.in (), + new_name, + new_version, + result.in (), + mode, + params.in (), + exceptions.in (), + contexts.in (), + ACE_TRY_ENV); + ACE_TRY_CHECK; break; } else @@ -931,6 +979,9 @@ TAO_Contained_i::move_i (IR::Container_ptr new_container, last_seg.c_str (), 1); } + + if (container_dk != IR::dk_Repository) + delete container_impl; } void @@ -1059,11 +1110,13 @@ TAO_Contained_i::move_contents (IR::Container_ptr new_container, IR::DefinitionKind kind = this->def_kind (ACE_TRY_ENV); ACE_CHECK; + // Specific to InterfaceDef_i and ValueDef_i if (kind == IR::dk_Interface || kind == IR::dk_Value) { int index = 0; ACE_TString section_name; + // Attributes ACE_Configuration_Section_Key attrs_key; int status = this->repo_->config ()->open_section (this->section_key_, @@ -1106,6 +1159,7 @@ TAO_Contained_i::move_contents (IR::Container_ptr new_container, index = 0; + // Operations ACE_Configuration_Section_Key ops_key; status = this->repo_->config ()->open_section (this->section_key_, diff --git a/TAO/orbsvcs/IFR_Service/Contained_i.h b/TAO/orbsvcs/IFR_Service/Contained_i.h index cc7cb57b99b..1541aec3302 100644 --- a/TAO/orbsvcs/IFR_Service/Contained_i.h +++ b/TAO/orbsvcs/IFR_Service/Contained_i.h @@ -57,7 +57,7 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. - void destroy_i ( + virtual void destroy_i ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) @@ -184,6 +184,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)) = 0; // Pure virtual. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)) = 0; + // Pure virtual. + virtual void move ( IR::Container_ptr new_container, const char *new_name, diff --git a/TAO/orbsvcs/IFR_Service/Container_i.cpp b/TAO/orbsvcs/IFR_Service/Container_i.cpp index f99f8f80b3a..48eb0f0ae00 100644 --- a/TAO/orbsvcs/IFR_Service/Container_i.cpp +++ b/TAO/orbsvcs/IFR_Service/Container_i.cpp @@ -25,18 +25,27 @@ void TAO_Container_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_Container_i::destroy_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ int index = 0; int status; ACE_TString section_name; // Destroy and/or remove references. - ACE_Configuration_Section_Key refs_key; - status = - this->repo_->config ()->open_section (this->section_key_, - "refs", - 0, - refs_key); + ACE_Configuration_Section_Key refs_key; + status = + this->repo_->config ()->open_section (this->section_key_, + "refs", + 0, + refs_key); // This section may not have been created. if (status == 0) @@ -87,7 +96,7 @@ TAO_Container_i::destroy (CORBA::Environment &ACE_TRY_ENV) case IR::dk_Fixed: case IR::dk_Array: case IR::dk_Sequence: - impl->destroy (ACE_TRY_ENV); + impl->destroy_i (ACE_TRY_ENV); ACE_CHECK; break; default: @@ -143,7 +152,7 @@ TAO_Container_i::destroy (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_Contained_i> safety (impl); - impl->destroy (ACE_TRY_ENV); + impl->destroy_i (ACE_TRY_ENV); ACE_CHECK; } @@ -383,6 +392,19 @@ TAO_Container_i::contents (IR::DefinitionKind limit_type, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->contents_i (limit_type, + exclude_inherited, + ACE_TRY_ENV); +} + +IR::ContainedSeq * +TAO_Container_i::contents_i (IR::DefinitionKind limit_type, + CORBA::Boolean exclude_inherited, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ if (limit_type == IR::dk_none) return 0; @@ -514,6 +536,23 @@ TAO_Container_i::lookup_name (const char *search_name, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->lookup_name_i (search_name, + levels_to_search, + limit_type, + exclude_inherited, + ACE_TRY_ENV); +} + +IR::ContainedSeq * +TAO_Container_i::lookup_name_i (const char *search_name, + CORBA::Long levels_to_search, + IR::DefinitionKind limit_type, + CORBA::Boolean exclude_inherited, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_Unbounded_Queue<IR::DefinitionKind> kind_queue; ACE_Unbounded_Queue<ACE_TString> path_queue; @@ -568,9 +607,24 @@ TAO_Container_i::describe_contents (IR::DefinitionKind limit_type, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - IR::ContainedSeq_var contents = this->contents (limit_type, - exclude_inherited, - ACE_TRY_ENV); + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_contents_i (limit_type, + exclude_inherited, + max_returned_objs, + ACE_TRY_ENV); +} + +IR::Container::DescriptionSeq * +TAO_Container_i::describe_contents_i (IR::DefinitionKind limit_type, + CORBA::Boolean exclude_inherited, + CORBA::Long max_returned_objs, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + IR::ContainedSeq_var contents = this->contents_i (limit_type, + exclude_inherited, + ACE_TRY_ENV); ACE_CHECK_RETURN (0); CORBA::ULong length = contents->length (); @@ -595,9 +649,33 @@ TAO_Container_i::describe_contents (IR::DefinitionKind limit_type, IR::Contained::Description_var desc; + ACE_Configuration_Section_Key contained_key; + PortableServer::ObjectId_var oid; + CORBA::String_var contained_path; + TAO_Contained_i *impl = 0; + for (CORBA::ULong i = 0; i < ret_len; i++) { - desc = contents[i]->describe (ACE_TRY_ENV); + oid = this->repo_->ir_poa ()->reference_to_id (contents[i], + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + contained_path = + PortableServer::ObjectId_to_string (oid.in ()); + + this->repo_->config ()->expand_path (this->repo_->root_key (), + contained_path.in (), + contained_key, + 0); + + impl = + this->repo_->servant_factory ()->create_contained (contained_key, + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + auto_ptr<TAO_Contained_i> safety (impl); + + desc = impl->describe_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); retval[i].contained_object = @@ -618,6 +696,21 @@ TAO_Container_i::create_module (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::ModuleDef::_nil ()); + + return this->create_module_i (id, + name, + version, + ACE_TRY_ENV); +} + +IR::ModuleDef_ptr +TAO_Container_i::create_module_i (const char *id, + const char *name, + const char *version, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean legal_op = this->valid_container (IR::dk_Module, ACE_TRY_ENV); ACE_CHECK_RETURN (IR::ModuleDef::_nil ()); @@ -678,6 +771,25 @@ TAO_Container_i::create_constant (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::ConstantDef::_nil ()); + + return this->create_constant_i (id, + name, + version, + type, + value, + ACE_TRY_ENV); +} + +IR::ConstantDef_ptr +TAO_Container_i::create_constant_i (const char *id, + const char *name, + const char *version, + IR::IDLType_ptr type, + const CORBA::Any &value, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean legal_op = this->valid_container (IR::dk_Constant, ACE_TRY_ENV); ACE_CHECK_RETURN (IR::ConstantDef::_nil ()); @@ -775,6 +887,23 @@ TAO_Container_i::create_struct (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::StructDef::_nil ()); + + return this->create_struct_i (id, + name, + version, + members, + ACE_TRY_ENV); +} + +IR::StructDef_ptr +TAO_Container_i::create_struct_i (const char *id, + const char *name, + const char *version, + const IR::StructMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean legal_op = this->valid_container (IR::dk_Struct, ACE_TRY_ENV); ACE_CHECK_RETURN (IR::StructDef::_nil ()); @@ -831,10 +960,9 @@ TAO_Container_i::create_struct (const char *id, 1, member_key); - ACE_TString name (members[i].name); this->repo_->config ()->set_string_value (member_key, "name", - name); + members[i].name.in ()); PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (members[i].type_def, @@ -880,6 +1008,25 @@ TAO_Container_i::create_union (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::UnionDef::_nil ()); + + return this->create_union_i (id, + name, + version, + discriminator_type, + members, + ACE_TRY_ENV); +} + +IR::UnionDef_ptr +TAO_Container_i::create_union_i (const char *id, + const char *name, + const char *version, + IR::IDLType_ptr discriminator_type, + const IR::UnionMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean legal_op = this->valid_container (IR::dk_Union, ACE_TRY_ENV); ACE_CHECK_RETURN (IR::UnionDef::_nil ()); @@ -949,10 +1096,9 @@ TAO_Container_i::create_union (const char *id, 1, member_key); - ACE_TString name (members[i].name); this->repo_->config ()->set_string_value (member_key, "name", - name); + members[i].name.in ()); PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (members[i].type_def, @@ -1001,6 +1147,23 @@ TAO_Container_i::create_enum (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::EnumDef::_nil ()); + + return this->create_enum_i (id, + name, + version, + members, + ACE_TRY_ENV); +} + +IR::EnumDef_ptr +TAO_Container_i::create_enum_i (const char *id, + const char *name, + const char *version, + const IR::EnumMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean legal_op = this->valid_container (IR::dk_Enum, ACE_TRY_ENV); ACE_CHECK_RETURN (IR::EnumDef::_nil ()); @@ -1050,10 +1213,9 @@ TAO_Container_i::create_enum (const char *id, 1, member_key); - ACE_TString member_name (members[i]); this->repo_->config ()->set_string_value (member_key, "name", - member_name); + members[i].in ()); } IR::DefinitionKind def_kind = this->def_kind (ACE_TRY_ENV); @@ -1086,6 +1248,23 @@ TAO_Container_i::create_alias (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::AliasDef::_nil ()); + + return this->create_alias_i (id, + name, + version, + original_type, + ACE_TRY_ENV); +} + +IR::AliasDef_ptr +TAO_Container_i::create_alias_i (const char *id, + const char *name, + const char *version, + IR::IDLType_ptr original_type, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean legal_op = this->valid_container (IR::dk_Alias, ACE_TRY_ENV); ACE_CHECK_RETURN (IR::AliasDef::_nil ()); @@ -1152,6 +1331,27 @@ TAO_Container_i::create_interface (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::InterfaceDef::_nil ()); + + return this->create_interface_i (id, + name, + version, + base_interfaces, + is_abstract, + is_local, + ACE_TRY_ENV); +} + +IR::InterfaceDef_ptr +TAO_Container_i::create_interface_i (const char *id, + const char *name, + const char *version, + const IR::InterfaceDefSeq &base_interfaces, + CORBA::Boolean is_abstract, + CORBA::Boolean is_local, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean legal_op = this->valid_container (IR::dk_Interface, ACE_TRY_ENV); ACE_CHECK_RETURN (IR::InterfaceDef::_nil ()); @@ -1236,17 +1436,46 @@ TAO_Container_i::create_interface (const char *id, } IR::ValueDef_ptr -TAO_Container_i::create_value (const char * /* id */, - const char * /* name */, - const char * /* version */, - CORBA::Boolean /* is_custom */, - CORBA::Boolean /* is_abstract */, - IR::ValueDef_ptr /* base_value */, - CORBA::Boolean /* is_truncatable */, - const IR::ValueDefSeq & /* abstract_base_values */, - const IR::InterfaceDefSeq & /* supported_interfaces */, - const IR::InitializerSeq & /* initializers */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_Container_i::create_value (const char *id, + const char *name, + const char *version, + CORBA::Boolean is_custom, + CORBA::Boolean is_abstract, + IR::ValueDef_ptr base_value, + CORBA::Boolean is_truncatable, + const IR::ValueDefSeq &abstract_base_values, + const IR::InterfaceDefSeq &supported_interfaces, + const IR::InitializerSeq &initializers, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::ValueDef::_nil ()); + + return this->create_value_i (id, + name, + version, + is_custom, + is_abstract, + base_value, + is_truncatable, + abstract_base_values, + supported_interfaces, + initializers, + ACE_TRY_ENV); +} + +IR::ValueDef_ptr +TAO_Container_i::create_value_i (const char * /* id */, + const char * /* name */, + const char * /* version */, + CORBA::Boolean /* is_custom */, + CORBA::Boolean /* is_abstract */, + IR::ValueDef_ptr /* base_value */, + CORBA::Boolean /* is_truncatable */, + const IR::ValueDefSeq & /* abstract_base_values */, + const IR::InterfaceDefSeq & /* supported_interfaces */, + const IR::InitializerSeq & /* initializers */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -1258,7 +1487,24 @@ TAO_Container_i::create_value_box (const char *id, const char *name, const char *version, IR::IDLType_ptr original_type_def, - CORBA::Environment &ACE_TRY_ENV ) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::ValueBoxDef::_nil ()); + + return this->create_value_box_i (id, + name, + version, + original_type_def, + ACE_TRY_ENV); +} + +IR::ValueBoxDef_ptr +TAO_Container_i::create_value_box_i (const char *id, + const char *name, + const char *version, + IR::IDLType_ptr original_type_def, + CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::Boolean legal_op = this->valid_container (IR::dk_ValueBox, @@ -1325,6 +1571,23 @@ TAO_Container_i::create_exception (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::ExceptionDef::_nil ()); + + return this->create_exception_i (id, + name, + version, + members, + ACE_TRY_ENV); +} + +IR::ExceptionDef_ptr +TAO_Container_i::create_exception_i (const char *id, + const char *name, + const char *version, + const IR::StructMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean legal_op = this->valid_container (IR::dk_Exception, ACE_TRY_ENV); ACE_CHECK_RETURN (IR::ExceptionDef::_nil ()); @@ -1379,10 +1642,9 @@ TAO_Container_i::create_exception (const char *id, 1, member_key); - ACE_TString name (members[i].name); this->repo_->config ()->set_string_value (member_key, "name", - name); + members[i].name.in ()); PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (members[i].type_def, @@ -1415,6 +1677,21 @@ TAO_Container_i::create_native (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::NativeDef::_nil ()); + + return this->create_native_i (id, + name, + version, + ACE_TRY_ENV); +} + +IR::NativeDef_ptr +TAO_Container_i::create_native_i (const char *id, + const char *name, + const char *version, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean legal_op = this->valid_container (IR::dk_Native, ACE_TRY_ENV); ACE_CHECK_RETURN (IR::NativeDef::_nil ()); diff --git a/TAO/orbsvcs/IFR_Service/Container_i.h b/TAO/orbsvcs/IFR_Service/Container_i.h index 0930ebb3a6c..73714bba63b 100644 --- a/TAO/orbsvcs/IFR_Service/Container_i.h +++ b/TAO/orbsvcs/IFR_Service/Container_i.h @@ -60,6 +60,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove our contents. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained_ptr lookup ( const char *search_name, CORBA::Environment &ACE_TRY_ENV = @@ -82,6 +88,14 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ContainedSeq *contents_i ( + IR::DefinitionKind limit_type, + CORBA::Boolean exclude_inherited, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ContainedSeq *lookup_name ( const char *search_name, CORBA::Long levels_to_search, @@ -92,6 +106,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ContainedSeq *lookup_name_i ( + const char *search_name, + CORBA::Long levels_to_search, + IR::DefinitionKind limit_type, + CORBA::Boolean exclude_inherited, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Container::DescriptionSeq *describe_contents ( IR::DefinitionKind limit_type, CORBA::Boolean exclude_inherited, @@ -101,6 +125,15 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::Container::DescriptionSeq *describe_contents_i ( + IR::DefinitionKind limit_type, + CORBA::Boolean exclude_inherited, + CORBA::Long max_returned_objs, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ModuleDef_ptr create_module ( const char *id, const char *name, @@ -110,6 +143,15 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ModuleDef_ptr create_module_i ( + const char *id, + const char *name, + const char *version, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ConstantDef_ptr create_constant ( const char *id, const char *name, @@ -121,6 +163,17 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ConstantDef_ptr create_constant_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr type, + const CORBA::Any & value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::StructDef_ptr create_struct ( const char *id, const char *name, @@ -131,6 +184,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::StructDef_ptr create_struct_i ( + const char *id, + const char *name, + const char *version, + const IR::StructMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::UnionDef_ptr create_union ( const char *id, const char *name, @@ -142,6 +205,17 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::UnionDef_ptr create_union_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr discriminator_type, + const IR::UnionMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::EnumDef_ptr create_enum ( const char *id, const char *name, @@ -152,6 +226,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::EnumDef_ptr create_enum_i ( + const char *id, + const char *name, + const char *version, + const IR::EnumMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::AliasDef_ptr create_alias ( const char *id, const char *name, @@ -162,6 +246,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::AliasDef_ptr create_alias_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr original_type, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::InterfaceDef_ptr create_interface ( const char *id, const char *name, @@ -174,6 +268,18 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::InterfaceDef_ptr create_interface_i ( + const char *id, + const char *name, + const char *version, + const IR::InterfaceDefSeq &base_interfaces, + CORBA::Boolean is_abstract, + CORBA::Boolean is_local, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ValueDef_ptr create_value ( const char *id, const char *name, @@ -190,6 +296,22 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ValueDef_ptr create_value_i ( + const char *id, + const char *name, + const char *version, + CORBA::Boolean is_custom, + CORBA::Boolean is_abstract, + IR::ValueDef_ptr base_value, + CORBA::Boolean is_truncatable, + const IR::ValueDefSeq &abstract_base_values, + const IR::InterfaceDefSeq & supported_interfaces, + const IR::InitializerSeq &initializers, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ValueBoxDef_ptr create_value_box ( const char *id, const char *name, @@ -200,6 +322,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ValueBoxDef_ptr create_value_box_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr original_type_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ExceptionDef_ptr create_exception ( const char *id, const char *name, @@ -210,6 +342,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ExceptionDef_ptr create_exception_i ( + const char *id, + const char *name, + const char *version, + const IR::StructMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::NativeDef_ptr create_native ( const char *id, const char *name, @@ -219,6 +361,15 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::NativeDef_ptr create_native_i ( + const char *id, + const char *name, + const char *version, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean name_exists ( const char *name, CORBA::Environment &ACE_TRY_ENV = diff --git a/TAO/orbsvcs/IFR_Service/EmitsDef_i.cpp b/TAO/orbsvcs/IFR_Service/EmitsDef_i.cpp index 6281a330924..255908ae6d0 100644 --- a/TAO/orbsvcs/IFR_Service/EmitsDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/EmitsDef_i.cpp @@ -26,14 +26,32 @@ TAO_EmitsDef_i::def_kind (CORBA::Environment &) } void -TAO_EmitsDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_EmitsDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_EmitsDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_EmitsDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_EmitsDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_EmitsDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/EmitsDef_i.h b/TAO/orbsvcs/IFR_Service/EmitsDef_i.h index 9d1c4adf4c6..b1871867cbe 100644 --- a/TAO/orbsvcs/IFR_Service/EmitsDef_i.h +++ b/TAO/orbsvcs/IFR_Service/EmitsDef_i.h @@ -64,12 +64,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/EnumDef_i.cpp b/TAO/orbsvcs/IFR_Service/EnumDef_i.cpp index cfd5378c266..68dec4e43bf 100644 --- a/TAO/orbsvcs/IFR_Service/EnumDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/EnumDef_i.cpp @@ -31,6 +31,15 @@ CORBA::TypeCode_ptr TAO_EnumDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_EnumDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString id; this->repo_->config ()->get_string_value (this->section_key_, "id", @@ -41,7 +50,7 @@ TAO_EnumDef_i::type (CORBA::Environment &ACE_TRY_ENV) "name", name); - IR::EnumMemberSeq_var members = this->members (ACE_TRY_ENV); + IR::EnumMemberSeq_var members = this->members_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->repo_->tc_factory ()->create_enum_tc (id.c_str (), @@ -54,6 +63,15 @@ IR::EnumMemberSeq * TAO_EnumDef_i::members (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->members_i (ACE_TRY_ENV); +} + +IR::EnumMemberSeq * +TAO_EnumDef_i::members_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ u_int count = 0; this->repo_->config ()->get_integer_value (this->section_key_, "count", @@ -89,7 +107,18 @@ TAO_EnumDef_i::members (CORBA::Environment &ACE_TRY_ENV) void TAO_EnumDef_i::members (const IR::EnumMemberSeq &members, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->members_i (members, + ACE_TRY_ENV); +} + +void +TAO_EnumDef_i::members_i (const IR::EnumMemberSeq &members, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->remove_section (this->section_key_, diff --git a/TAO/orbsvcs/IFR_Service/EnumDef_i.h b/TAO/orbsvcs/IFR_Service/EnumDef_i.h index 6a03e0fa318..762beebc320 100644 --- a/TAO/orbsvcs/IFR_Service/EnumDef_i.h +++ b/TAO/orbsvcs/IFR_Service/EnumDef_i.h @@ -64,18 +64,38 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual IR::EnumMemberSeq *members ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::EnumMemberSeq *members_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void members ( const IR::EnumMemberSeq &members, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void members_i ( + const IR::EnumMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/EventDef_i.cpp b/TAO/orbsvcs/IFR_Service/EventDef_i.cpp index e575e303074..b8b3222e88c 100644 --- a/TAO/orbsvcs/IFR_Service/EventDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/EventDef_i.cpp @@ -18,14 +18,32 @@ TAO_EventDef_i::~TAO_EventDef_i (void) } void -TAO_EventDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_EventDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_EventDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_EventDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_EventDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_EventDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -33,8 +51,19 @@ TAO_EventDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) } CORBA::Boolean -TAO_EventDef_i::is_a (const char * /* event_id */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_EventDef_i::is_a (const char *event_id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_a_i (event_id, + ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_EventDef_i::is_a_i (const char * /* event_id */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -42,7 +71,16 @@ TAO_EventDef_i::is_a (const char * /* event_id */, } IR::ValueDef_ptr -TAO_EventDef_i::event (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_EventDef_i::event (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::ValueDef::_nil ()); + + return this->event_i (ACE_TRY_ENV); +} + +IR::ValueDef_ptr +TAO_EventDef_i::event_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/EventDef_i.h b/TAO/orbsvcs/IFR_Service/EventDef_i.h index 5c434bc9b45..429ca51568b 100644 --- a/TAO/orbsvcs/IFR_Service/EventDef_i.h +++ b/TAO/orbsvcs/IFR_Service/EventDef_i.h @@ -57,6 +57,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -64,6 +70,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::Boolean is_a ( const char *event_id, CORBA::Environment &ACE_TRY_ENV = @@ -71,11 +84,24 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_a_i ( + const char *event_id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ValueDef_ptr event ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + IR::ValueDef_ptr event_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/ExceptionDef_i.cpp b/TAO/orbsvcs/IFR_Service/ExceptionDef_i.cpp index bcc2dfb74a7..3dfb14e2b35 100644 --- a/TAO/orbsvcs/IFR_Service/ExceptionDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ExceptionDef_i.cpp @@ -3,7 +3,9 @@ #include "ExceptionDef_i.h" #include "Repository_i.h" +#include "IDLType_i.h" #include "Servant_Factory.h" +#include "ace/Auto_Ptr.h" ACE_RCSID(IFR_Service, ExceptionDef_i, "$Id$") @@ -32,12 +34,21 @@ void TAO_ExceptionDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_ExceptionDef_i::destroy_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Destroy our members. - TAO_Container_i::destroy (ACE_TRY_ENV); + TAO_Container_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; // Destroy ourself. - TAO_Contained_i::destroy (ACE_TRY_ENV); + TAO_Contained_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; } @@ -45,6 +56,15 @@ IR::Contained::Description * TAO_ExceptionDef_i::describe (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_ExceptionDef_i::describe_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ IR::Contained::Description *desc_ptr = 0; ACE_NEW_THROW_EX (desc_ptr, IR::Contained::Description, @@ -58,10 +78,10 @@ TAO_ExceptionDef_i::describe (CORBA::Environment &ACE_TRY_ENV) IR::ExceptionDescription ed; - ed.name = this->name (ACE_TRY_ENV); + ed.name = this->name_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); - ed.id = this->id (ACE_TRY_ENV); + ed.id = this->id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); ACE_TString container_id; @@ -72,10 +92,10 @@ TAO_ExceptionDef_i::describe (CORBA::Environment &ACE_TRY_ENV) ed.defined_in = container_id.c_str (); - ed.version = this->version (ACE_TRY_ENV); + ed.version = this->version_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); - ed.type = this->type (ACE_TRY_ENV); + ed.type = this->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); retval->value <<= ed; @@ -87,6 +107,15 @@ CORBA::TypeCode_ptr TAO_ExceptionDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_ExceptionDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString id; this->repo_->config ()->get_string_value (this->section_key_, "id", @@ -97,7 +126,7 @@ TAO_ExceptionDef_i::type (CORBA::Environment &ACE_TRY_ENV) "name", name); - IR::StructMemberSeq_var members = this->members (ACE_TRY_ENV); + IR::StructMemberSeq_var members = this->members_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->repo_->tc_factory ()->create_exception_tc (id.c_str (), @@ -110,6 +139,15 @@ IR::StructMemberSeq * TAO_ExceptionDef_i::members (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->members_i (ACE_TRY_ENV); +} + +IR::StructMemberSeq * +TAO_ExceptionDef_i::members_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_Unbounded_Queue<IR::DefinitionKind> kind_queue; ACE_Unbounded_Queue<ACE_TString> path_queue; ACE_Unbounded_Queue<ACE_TString> name_queue; @@ -182,20 +220,24 @@ TAO_ExceptionDef_i::members (CORBA::Environment &ACE_TRY_ENV) IR::StructMemberSeq_var retval = members; + ACE_TString name; + ACE_TString path; + IR::DefinitionKind kind = IR::dk_none; + CORBA::Object_var obj; + ACE_Configuration_Section_Key member_key; + TAO_IDLType_i *impl = 0; + for (size_t k = 0; k < size; k++) { - ACE_TString name; name_queue.dequeue_head (name); retval[k].name = name.c_str (); - IR::DefinitionKind kind; kind_queue.dequeue_head (kind); - ACE_TString path; path_queue.dequeue_head (path); - CORBA::Object_var obj = + obj = this->repo_->servant_factory ()->create_objref (kind, path.c_str (), ACE_TRY_ENV); @@ -204,8 +246,20 @@ TAO_ExceptionDef_i::members (CORBA::Environment &ACE_TRY_ENV) retval[k].type_def = IR::IDLType::_narrow (obj.in (), ACE_TRY_ENV); ACE_CHECK_RETURN (0); + + this->repo_->config ()->expand_path (this->repo_->root_key (), + path, + member_key, + 0); + + impl = + this->repo_->servant_factory ()->create_idltype (member_key, + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + auto_ptr<TAO_IDLType_i> safety (impl); - retval[k].type = retval[k].type_def->type (ACE_TRY_ENV); + retval[k].type = impl->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); } @@ -213,12 +267,23 @@ TAO_ExceptionDef_i::members (CORBA::Environment &ACE_TRY_ENV) } void -TAO_ExceptionDef_i::members (const IR::StructMemberSeq & members, +TAO_ExceptionDef_i::members (const IR::StructMemberSeq &members, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->members_i (members, + ACE_TRY_ENV); +} + +void +TAO_ExceptionDef_i::members_i (const IR::StructMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Destroy our old members, both refs and defns. - TAO_Container_i::destroy (ACE_TRY_ENV); + TAO_Container_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; CORBA::ULong count = members.length (); diff --git a/TAO/orbsvcs/IFR_Service/ExceptionDef_i.h b/TAO/orbsvcs/IFR_Service/ExceptionDef_i.h index e7a40809f8d..c6d59280a26 100644 --- a/TAO/orbsvcs/IFR_Service/ExceptionDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ExceptionDef_i.h @@ -64,6 +64,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // Remove the repository entry. + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -71,24 +78,50 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::StructMemberSeq *members ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::StructMemberSeq *members_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void members ( const IR::StructMemberSeq & members, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void members_i ( + const IR::StructMemberSeq & members, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/FactoryDef_i.cpp b/TAO/orbsvcs/IFR_Service/FactoryDef_i.cpp index 88f6f3ef87c..e0396c70f90 100644 --- a/TAO/orbsvcs/IFR_Service/FactoryDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/FactoryDef_i.cpp @@ -28,14 +28,32 @@ TAO_FactoryDef_i::def_kind (CORBA::Environment &) } void -TAO_FactoryDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_FactoryDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_FactoryDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_FactoryDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */ ) +TAO_FactoryDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_FactoryDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */ ) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/FactoryDef_i.h b/TAO/orbsvcs/IFR_Service/FactoryDef_i.h index b3dac8f914f..39b6191fc10 100644 --- a/TAO/orbsvcs/IFR_Service/FactoryDef_i.h +++ b/TAO/orbsvcs/IFR_Service/FactoryDef_i.h @@ -63,12 +63,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/FinderDef_i.cpp b/TAO/orbsvcs/IFR_Service/FinderDef_i.cpp index 23144581bed..06e9b01ac02 100644 --- a/TAO/orbsvcs/IFR_Service/FinderDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/FinderDef_i.cpp @@ -26,14 +26,32 @@ TAO_FinderDef_i::def_kind (CORBA::Environment &) } void -TAO_FinderDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_FinderDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_FinderDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_FinderDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */ ) +TAO_FinderDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_FinderDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */ ) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/FinderDef_i.h b/TAO/orbsvcs/IFR_Service/FinderDef_i.h index b52b224bcb1..b7489fdd035 100644 --- a/TAO/orbsvcs/IFR_Service/FinderDef_i.h +++ b/TAO/orbsvcs/IFR_Service/FinderDef_i.h @@ -63,12 +63,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/FixedDef_i.cpp b/TAO/orbsvcs/IFR_Service/FixedDef_i.cpp index f9c8a609fc8..1f25cae8026 100644 --- a/TAO/orbsvcs/IFR_Service/FixedDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/FixedDef_i.cpp @@ -25,14 +25,32 @@ TAO_FixedDef_i::def_kind (CORBA::Environment &) } void -TAO_FixedDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_FixedDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_FixedDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } CORBA::TypeCode_ptr -TAO_FixedDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_FixedDef_i::type (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_FixedDef_i::type_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -40,7 +58,16 @@ TAO_FixedDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) } CORBA::UShort -TAO_FixedDef_i::digits (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_FixedDef_i::digits (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->digits_i (ACE_TRY_ENV); +} + +CORBA::UShort +TAO_FixedDef_i::digits_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -48,15 +75,35 @@ TAO_FixedDef_i::digits (CORBA::Environment & /* ACE_TRY_ENV */) } void -TAO_FixedDef_i::digits (CORBA::UShort /* digits */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_FixedDef_i::digits (CORBA::UShort digits, + CORBA::Environment & ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->digits_i (digits, + ACE_TRY_ENV); +} + +void +TAO_FixedDef_i::digits_i (CORBA::UShort /* digits */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } CORBA::Short -TAO_FixedDef_i::scale (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_FixedDef_i::scale (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->scale_i (ACE_TRY_ENV); +} + +CORBA::Short +TAO_FixedDef_i::scale_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -64,7 +111,18 @@ TAO_FixedDef_i::scale (CORBA::Environment & /* ACE_TRY_ENV */) } void -TAO_FixedDef_i::scale (CORBA::Short /* scale */, +TAO_FixedDef_i::scale (CORBA::Short scale, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->scale_i (scale, + ACE_TRY_ENV); +} + +void +TAO_FixedDef_i::scale_i (CORBA::Short /* scale */, CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { diff --git a/TAO/orbsvcs/IFR_Service/FixedDef_i.h b/TAO/orbsvcs/IFR_Service/FixedDef_i.h index fed6420a1c1..2bad40a3ec1 100644 --- a/TAO/orbsvcs/IFR_Service/FixedDef_i.h +++ b/TAO/orbsvcs/IFR_Service/FixedDef_i.h @@ -63,6 +63,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -70,12 +76,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual CORBA::UShort digits ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::UShort digits_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void digits ( CORBA::UShort digits, CORBA::Environment &ACE_TRY_ENV = @@ -83,18 +102,38 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void digits_i ( + CORBA::UShort digits, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Short scale ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Short scale_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void scale ( CORBA::Short scale, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void scale_i ( + CORBA::Short scale, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/HomeDef_i.cpp b/TAO/orbsvcs/IFR_Service/HomeDef_i.cpp index 8d7f35853ed..24b45b0f54b 100644 --- a/TAO/orbsvcs/IFR_Service/HomeDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/HomeDef_i.cpp @@ -28,14 +28,32 @@ TAO_HomeDef_i::def_kind (CORBA::Environment &) } void -TAO_HomeDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_HomeDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_HomeDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_HomeDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -43,7 +61,16 @@ TAO_HomeDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) } CORBA::TypeCode_ptr -TAO_HomeDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::type (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_HomeDef_i::type_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -51,7 +78,16 @@ TAO_HomeDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) } IR::HomeDef_ptr -TAO_HomeDef_i::base_home (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::base_home (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::HomeDef::_nil ()); + + return this->base_home_i (ACE_TRY_ENV); +} + +IR::HomeDef_ptr +TAO_HomeDef_i::base_home_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -59,7 +95,16 @@ TAO_HomeDef_i::base_home (CORBA::Environment & /* ACE_TRY_ENV */) } IR::ComponentDef_ptr -TAO_HomeDef_i::managed_component (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::managed_component (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::Component::_nil ()); + + return this->managed_component_i (ACE_TRY_ENV); +} + +IR::ComponentDef_ptr +TAO_HomeDef_i::managed_component_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -67,7 +112,16 @@ TAO_HomeDef_i::managed_component (CORBA::Environment & /* ACE_TRY_ENV */) } IR::PrimaryKeyDef_ptr -TAO_HomeDef_i::primary_key (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::primary_key (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::PrimaryDef::_nil ()); + + return this->primary_key_i (ACE_TRY_ENV); +} + +IR::PrimaryKeyDef_ptr +TAO_HomeDef_i::primary_key_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -75,7 +129,16 @@ TAO_HomeDef_i::primary_key (CORBA::Environment & /* ACE_TRY_ENV */) } IR::FactoryDefSeq * -TAO_HomeDef_i::factories (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::factories (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->factories_i (ACE_TRY_ENV); +} + +IR::FactoryDefSeq * +TAO_HomeDef_i::factories_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -83,7 +146,16 @@ TAO_HomeDef_i::factories (CORBA::Environment & /* ACE_TRY_ENV */) } IR::FinderDefSeq * -TAO_HomeDef_i::finders (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::finders (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->finders_i (ACE_TRY_ENV); +} + +IR::FinderDefSeq * +TAO_HomeDef_i::finders_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -91,7 +163,16 @@ TAO_HomeDef_i::finders (CORBA::Environment & /* ACE_TRY_ENV */) } CORBA::Boolean -TAO_HomeDef_i::is_basic (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::is_basic (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_basic_i (ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_HomeDef_i::is_basic_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -99,11 +180,28 @@ TAO_HomeDef_i::is_basic (CORBA::Environment & /* ACE_TRY_ENV */) } IR::PrimaryKeyDef_ptr -TAO_HomeDef_i::create_primary_key (const char * /* id */, - const char * /* name */, - const char * /* version */, - IR::ValueDef_ptr /* primary_key */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::create_primary_key (const char *id, + const char *name, + const char *version, + IR::ValueDef_ptr primary_key, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::PrimaryDef::_nil ()); + + return this->create_primary_key_i (id, + name, + version, + primary_key, + ACE_TRY_ENV); +} + +IR::PrimaryKeyDef_ptr +TAO_HomeDef_i::create_primary_key_i (const char * /* id */, + const char * /* name */, + const char * /* version */, + IR::ValueDef_ptr /* primary_key */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -111,12 +209,31 @@ TAO_HomeDef_i::create_primary_key (const char * /* id */, } IR::FactoryDef_ptr -TAO_HomeDef_i::create_factory (const char * /* id */, - const char * /* name */, - const char * /* version */, - const IR::ParDescriptionSeq & /* params */, - const IR::ExceptionDefSeq & /* exceptions */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::create_factory (const char *id, + const char *name, + const char *version, + const IR::ParDescriptionSeq ¶ms, + const IR::ExceptionDefSeq &exceptions, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::FactoryDef::_nil ()); + + return this->create_factory_i (id, + name, + version, + params, + exceptions, + ACE_TRY_ENV); +} + +IR::FactoryDef_ptr +TAO_HomeDef_i::create_factory_i (const char * /* id */, + const char * /* name */, + const char * /* version */, + const IR::ParDescriptionSeq & /* params */, + const IR::ExceptionDefSeq & /* exceptions */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -124,12 +241,31 @@ TAO_HomeDef_i::create_factory (const char * /* id */, } IR::FinderDef_ptr -TAO_HomeDef_i::create_finder (const char * /* id */, - const char * /* name */, - const char * /* version */, - const IR::ParDescriptionSeq & /* params */, - const IR::ExceptionDefSeq & /* exceptions */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_HomeDef_i::create_finder (const char *id, + const char *name, + const char *version, + const IR::ParDescriptionSeq ¶ms, + const IR::ExceptionDefSeq &exceptions, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::FinderDef::_nil ()); + + return this->create_finder_i (id, + name, + version, + params, + exceptions, + ACE_TRY_ENV); +} + +IR::FinderDef_ptr +TAO_HomeDef_i::create_finder_i (const char * /* id */, + const char * /* name */, + const char * /* version */, + const IR::ParDescriptionSeq & /* params */, + const IR::ExceptionDefSeq & /* exceptions */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/HomeDef_i.h b/TAO/orbsvcs/IFR_Service/HomeDef_i.h index 7845fbb64dc..b32f4cdcd8a 100644 --- a/TAO/orbsvcs/IFR_Service/HomeDef_i.h +++ b/TAO/orbsvcs/IFR_Service/HomeDef_i.h @@ -63,6 +63,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -70,6 +76,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -77,42 +90,85 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual IR::HomeDef_ptr base_home ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::HomeDef_ptr base_home_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ComponentDef_ptr managed_component ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ComponentDef_ptr managed_component_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::PrimaryKeyDef_ptr primary_key ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::PrimaryKeyDef_ptr primary_key_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::FactoryDefSeq *factories ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::FactoryDefSeq *factories_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::FinderDefSeq *finders ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::FinderDefSeq *finders_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_basic ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_basic_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::PrimaryKeyDef_ptr create_primary_key ( const char *id, const char *name, @@ -123,6 +179,16 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::PrimaryKeyDef_ptr create_primary_key_i ( + const char *id, + const char *name, + const char *version, + IR::ValueDef_ptr primary_key, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::FactoryDef_ptr create_factory ( const char *id, const char *name, @@ -134,6 +200,17 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::FactoryDef_ptr create_factory_i ( + const char *id, + const char *name, + const char *version, + const IR::ParDescriptionSeq ¶ms, + const IR::ExceptionDefSeq &exceptions, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::FinderDef_ptr create_finder ( const char *id, const char *name, @@ -144,6 +221,17 @@ public: TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + IR::FinderDef_ptr create_finder_i ( + const char *id, + const char *name, + const char *version, + const IR::ParDescriptionSeq ¶ms, + const IR::ExceptionDefSeq &exceptions, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/IDLType_i.h b/TAO/orbsvcs/IFR_Service/IDLType_i.h index 5e79ba57aee..1e898117185 100644 --- a/TAO/orbsvcs/IFR_Service/IDLType_i.h +++ b/TAO/orbsvcs/IFR_Service/IDLType_i.h @@ -59,6 +59,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)) = 0; // Defined in concrete classes. + + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)) = 0; + // Defined in concrete classes. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/IFR_macro.h b/TAO/orbsvcs/IFR_Service/IFR_macro.h index 48b751c48a4..65ebef3fc7a 100644 --- a/TAO/orbsvcs/IFR_Service/IFR_macro.h +++ b/TAO/orbsvcs/IFR_Service/IFR_macro.h @@ -1,3 +1,4 @@ +/* -*- C++ -*- */ // $Id$ #ifndef TAO_IFR_MACROS_H @@ -12,7 +13,7 @@ ACE_WRITE_GUARD_THROW_EX (ACE_Lock, \ monitor, \ this->repo_->lock (), \ - CORBA::TRANSIENT ( \ + CORBA::INTERNAL ( \ CORBA_SystemException::_tao_minor_code ( \ TAO_GUARD_FAILURE, \ 0), \ @@ -23,29 +24,18 @@ ACE_WRITE_GUARD_THROW_EX (ACE_Lock, \ monitor, \ this->repo_->lock (), \ - CORBA::SystemException ( \ + CORBA::INTERNAL ( \ CORBA_SystemException::_tao_minor_code ( \ TAO_GUARD_FAILURE, \ 0), \ CORBA::COMPLETED_NO)); \ ACE_CHECK_RETURN (RETURN) -#define TAO_IFR_READ_GUARD \ - ACE_READ_GUARD_THROW_EX (ACE_Lock, \ - monitor, \ - this->repo_->lock (), \ - CORBA::SystemException ( \ - CORBA_SystemException::_tao_minor_code ( \ - TAO_GUARD_FAILURE, \ - 0), \ - CORBA::COMPLETED_NO)); \ - ACE_CHECK - #define TAO_IFR_READ_GUARD_RETURN(RETURN) \ ACE_READ_GUARD_THROW_EX (ACE_Lock, \ monitor, \ this->repo_->lock (), \ - CORBA::TRANSIENT ( \ + CORBA::INTERNAL ( \ CORBA_SystemException::_tao_minor_code ( \ TAO_GUARD_FAILURE, \ 0), \ diff --git a/TAO/orbsvcs/IFR_Service/IRObject_i.h b/TAO/orbsvcs/IFR_Service/IRObject_i.h index 07880df9374..2fcfb391aec 100644 --- a/TAO/orbsvcs/IFR_Service/IRObject_i.h +++ b/TAO/orbsvcs/IFR_Service/IRObject_i.h @@ -66,6 +66,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)) = 0; // Pure virtual. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)) = 0; + // Pure virtual- the unlocked version called by destroy() wrapper. + protected: char *int_to_string (CORBA::ULong number) const; // Convert an unsigned int to a string of its hex form. diff --git a/TAO/orbsvcs/IFR_Service/InterfaceDef_i.cpp b/TAO/orbsvcs/IFR_Service/InterfaceDef_i.cpp index bb13da886a3..9096540fa0d 100644 --- a/TAO/orbsvcs/IFR_Service/InterfaceDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/InterfaceDef_i.cpp @@ -35,8 +35,17 @@ void TAO_InterfaceDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_InterfaceDef_i::destroy_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Destroy our members. - TAO_Container_i::destroy (ACE_TRY_ENV); + TAO_Container_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; // This will get rid of the repo ids, which Contained_i::destroy()'s @@ -48,7 +57,7 @@ TAO_InterfaceDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_CHECK; // Destroy ourself. - TAO_Contained_i::destroy (ACE_TRY_ENV); + TAO_Contained_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; } @@ -56,6 +65,15 @@ IR::Contained::Description * TAO_InterfaceDef_i::describe (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_InterfaceDef_i::describe_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ IR::Contained::Description *desc_ptr = 0; ACE_NEW_THROW_EX (desc_ptr, IR::Contained::Description, @@ -69,10 +87,10 @@ TAO_InterfaceDef_i::describe (CORBA::Environment &ACE_TRY_ENV) IR::InterfaceDescription ifd; - ifd.name = this->name (ACE_TRY_ENV); + ifd.name = this->name_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); - ifd.id = this->id (ACE_TRY_ENV); + ifd.id = this->id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); ACE_TString container_id; @@ -83,7 +101,7 @@ TAO_InterfaceDef_i::describe (CORBA::Environment &ACE_TRY_ENV) ifd.defined_in = container_id.c_str (); - ifd.version = this->version (ACE_TRY_ENV); + ifd.version = this->version_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); CORBA::ULong i = 0; @@ -182,7 +200,7 @@ TAO_InterfaceDef_i::describe (CORBA::Environment &ACE_TRY_ENV) ACE_CHECK_RETURN (0); } - IR::InterfaceDefSeq_var bases = this->base_interfaces (ACE_TRY_ENV); + IR::InterfaceDefSeq_var bases = this->base_interfaces_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); CORBA::ULong length = bases->length (); @@ -191,21 +209,41 @@ TAO_InterfaceDef_i::describe (CORBA::Environment &ACE_TRY_ENV) repo_ids.length (length); + PortableServer::ObjectId_var oid; + CORBA::String_var base_path; + ACE_Configuration_Section_Key base_key; + for (i = 0; i < length; ++i) { - repo_ids[i] = bases[i]->id (ACE_TRY_ENV); + oid = + this->repo_->ir_poa ()->reference_to_id (bases[i], + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + base_path = + PortableServer::ObjectId_to_string (oid.in ()); + + this->repo_->config ()->expand_path (this->repo_->root_key (), + base_path.in (), + base_key, + 0); + + TAO_InterfaceDef_i impl (this->repo_, + base_key); + + repo_ids[i] = impl.id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); } ifd.base_interfaces = repo_ids; - ifd.type = this->type (ACE_TRY_ENV); + ifd.type = this->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); - ifd.is_abstract = this->is_abstract (ACE_TRY_ENV); + ifd.is_abstract = this->is_abstract_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); - ifd.is_local = this->is_local (ACE_TRY_ENV); + ifd.is_local = this->is_local_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); retval->value <<= ifd; @@ -217,6 +255,15 @@ CORBA::TypeCode_ptr TAO_InterfaceDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_InterfaceDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString id; this->repo_->config ()->get_string_value (this->section_key_, @@ -238,60 +285,73 @@ IR::InterfaceDefSeq * TAO_InterfaceDef_i::base_interfaces (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_Configuration_Section_Key inherited_key; + TAO_IFR_READ_GUARD_RETURN (0); + + return this->base_interfaces_i (ACE_TRY_ENV); +} +IR::InterfaceDefSeq * +TAO_InterfaceDef_i::base_interfaces_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_Configuration_Section_Key inherited_key; this->repo_->config ()->open_section (this->section_key_, "inherited", 0, inherited_key); int index = 0; + int status = 0; + u_int kind = 0; ACE_Configuration::VALUETYPE type; - ACE_TString section_name; + ACE_TString section_name, inherited_path; + IR::DefinitionKind def_kind = IR::dk_none; ACE_Unbounded_Queue<IR::DefinitionKind> kind_queue; ACE_Unbounded_Queue<ACE_TString> path_queue; + ACE_Configuration_Section_Key base_key; while (this->repo_->config ()->enumerate_values (inherited_key, - index, + index++, section_name, type) == 0) { - ACE_TString inherited_path; this->repo_->config ()->get_string_value (inherited_key, section_name.c_str (), inherited_path); - path_queue.enqueue_tail (inherited_path); + status = + this->repo_->config ()->expand_path (this->repo_->root_key (), + inherited_path, + base_key, + 0); - ACE_Configuration_Section_Key base_key; - this->repo_->config ()->expand_path (this->repo_->root_key (), - inherited_path, - base_key, - 0); + if (status == 0) + { + path_queue.enqueue_tail (inherited_path); - u_int kind = 0; - this->repo_->config ()->get_integer_value (base_key, - "def_kind", - kind); + this->repo_->config ()->get_integer_value (base_key, + "def_kind", + kind); - IR::DefinitionKind def_kind = - ACE_static_cast (IR::DefinitionKind, kind); + def_kind = ACE_static_cast (IR::DefinitionKind, kind); - kind_queue.enqueue_tail (def_kind); - ++index; + kind_queue.enqueue_tail (def_kind); + } } + size_t size = kind_queue.size (); + IR::InterfaceDefSeq *seq = 0; ACE_NEW_THROW_EX (seq, - IR::InterfaceDefSeq (index), + IR::InterfaceDefSeq (size), CORBA::NO_MEMORY ()); ACE_CHECK_RETURN (0); - seq->length (index); + seq->length (size); IR::InterfaceDefSeq_var retval = seq; - for (CORBA::ULong i = 0; i < (CORBA::ULong) index; ++i) + for (CORBA::ULong i = 0; i < size; ++i) { IR::DefinitionKind def_kind; kind_queue.dequeue_head (def_kind); @@ -320,6 +380,17 @@ TAO_InterfaceDef_i::base_interfaces (const IR::InterfaceDefSeq &base_interfaces, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->base_interfaces_i (base_interfaces, + ACE_TRY_ENV); +} + +void +TAO_InterfaceDef_i::base_interfaces_i (const IR::InterfaceDefSeq &base_interfaces, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Remove the old base interfaces. this->repo_->config ()->remove_section (this->section_key_, "inherited", @@ -334,24 +405,36 @@ TAO_InterfaceDef_i::base_interfaces (const IR::InterfaceDefSeq &base_interfaces, 1, inherited_key); + CORBA::String_var name, inherited_path, section_name; + PortableServer::ObjectId_var oid; + ACE_Configuration_Section_Key base_key; + for (CORBA::ULong i = 0; i < length; i++) { - CORBA::String_var name = base_interfaces[i]->name (ACE_TRY_ENV); - ACE_CHECK; - - // None of these names can clash with any we may already have. - if (TAO_Container_i::name_exists (name.in ())) - return; - - PortableServer::ObjectId_var oid = + oid = this->repo_->ir_poa ()->reference_to_id (base_interfaces[i], ACE_TRY_ENV); ACE_CHECK; - CORBA::String_var inherited_path = + inherited_path = PortableServer::ObjectId_to_string (oid.in ()); - CORBA::String_var section_name = this->int_to_string (i); + this->repo_->config ()->expand_path (this->repo_->root_key (), + inherited_path.in (), + base_key, + 0); + + TAO_InterfaceDef_i impl (this->repo_, + base_key); + + name = impl.name_i (ACE_TRY_ENV); + ACE_CHECK; + + // None of these names can clash with any we may already have. + if (TAO_Container_i::name_exists (name.in ())) + return; + + section_name = this->int_to_string (i); this->repo_->config ()->set_string_value (inherited_key, section_name.in (), @@ -360,7 +443,16 @@ TAO_InterfaceDef_i::base_interfaces (const IR::InterfaceDefSeq &base_interfaces, } CORBA::Boolean -TAO_InterfaceDef_i::is_abstract (CORBA::Environment &) +TAO_InterfaceDef_i::is_abstract (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_abstract_i (ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_InterfaceDef_i::is_abstract_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int is_abstract = 0; @@ -374,7 +466,18 @@ TAO_InterfaceDef_i::is_abstract (CORBA::Environment &) void TAO_InterfaceDef_i::is_abstract (CORBA::Boolean is_abstract, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->is_abstract_i (is_abstract, + ACE_TRY_ENV); +} + +void +TAO_InterfaceDef_i::is_abstract_i (CORBA::Boolean is_abstract, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->set_integer_value (this->section_key_, @@ -383,7 +486,16 @@ TAO_InterfaceDef_i::is_abstract (CORBA::Boolean is_abstract, } CORBA::Boolean -TAO_InterfaceDef_i::is_local (CORBA::Environment &) +TAO_InterfaceDef_i::is_local (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_local_i (ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_InterfaceDef_i::is_local_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int is_local = 0; @@ -397,7 +509,18 @@ TAO_InterfaceDef_i::is_local (CORBA::Environment &) void TAO_InterfaceDef_i::is_local (CORBA::Boolean is_local, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->is_local_i (is_local, + ACE_TRY_ENV); +} + +void +TAO_InterfaceDef_i::is_local_i (CORBA::Boolean is_local, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->set_integer_value (this->section_key_, @@ -410,7 +533,18 @@ TAO_InterfaceDef_i::is_a (const char *interface_id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - CORBA::String_var id = this->id (ACE_TRY_ENV); + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_a_i (interface_id, + ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_InterfaceDef_i::is_a_i (const char *interface_id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + CORBA::String_var id = this->id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); // Is it our type? @@ -423,10 +557,30 @@ TAO_InterfaceDef_i::is_a (const char *interface_id, CORBA::ULong length = bases->length (); + PortableServer::ObjectId_var oid; + CORBA::String_var base_path; + ACE_Configuration_Section_Key base_key; + for (CORBA::ULong i = 0; i < length; i++) { - CORBA::Boolean success = bases[i]->is_a (interface_id, - ACE_TRY_ENV); + oid = + this->repo_->ir_poa ()->reference_to_id (bases[i], + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + base_path = + PortableServer::ObjectId_to_string (oid.in ()); + + this->repo_->config ()->expand_path (this->repo_->root_key (), + base_path.in (), + base_key, + 0); + + TAO_InterfaceDef_i impl (this->repo_, + base_key); + + CORBA::Boolean success = impl.is_a_i (interface_id, + ACE_TRY_ENV); ACE_CHECK_RETURN (0); if (success == 1) @@ -449,6 +603,31 @@ TAO_InterfaceDef_i::create_attribute ( ) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::AttributeDef::_nil ()); + + return this->create_attribute_i (id, + name, + version, + type, + mode, + get_exceptions, + put_exceptions, + ACE_TRY_ENV); +} + +IR::AttributeDef_ptr +TAO_InterfaceDef_i::create_attribute_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr type, + IR::AttributeMode mode, + const IR::ExceptionDefSeq &get_exceptions, + const IR::ExceptionDefSeq &put_exceptions, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean bad_params = this->pre_exist (id, name, ACE_TRY_ENV); @@ -587,6 +766,31 @@ TAO_InterfaceDef_i::create_operation (const char *id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::OperationDef::_nil ()); + + return this->create_operation_i (id, + name, + version, + result, + mode, + params, + exceptions, + contexts, + ACE_TRY_ENV); +} + +IR::OperationDef_ptr +TAO_InterfaceDef_i::create_operation_i (const char *id, + const char *name, + const char *version, + IR::IDLType_ptr result, + IR::OperationMode mode, + const IR::ParDescriptionSeq ¶ms, + const IR::ExceptionDefSeq &exceptions, + const IR::ContextIdSeq &contexts, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::Boolean bad_params = this->pre_exist (id, name, ACE_TRY_ENV); @@ -660,11 +864,9 @@ TAO_InterfaceDef_i::create_operation (const char *id, 1, param_key); - const char *name = params[i].name; - this->repo_->config ()->set_string_value (param_key, "name", - name); + params[i].name.in ()); PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (params[i].type_def, ACE_TRY_ENV); @@ -729,13 +931,11 @@ TAO_InterfaceDef_i::create_operation (const char *id, for (i = 0; i < length; ++i) { - const char *context = contexts[i]; - CORBA::String_var section_name = this->int_to_string (i); this->repo_->config ()->set_string_value (contexts_key, section_name.in (), - context); + contexts[i].in ()); } } @@ -890,7 +1090,7 @@ TAO_InterfaceDef_i::destroy_special (const char *sub_section, TAO_AttributeDef_i attr (this->repo_, member_key); - attr.destroy (ACE_TRY_ENV); + attr.destroy_i (ACE_TRY_ENV); ACE_CHECK; } else @@ -898,7 +1098,7 @@ TAO_InterfaceDef_i::destroy_special (const char *sub_section, TAO_OperationDef_i op (this->repo_, member_key); - op.destroy (ACE_TRY_ENV); + op.destroy_i (ACE_TRY_ENV); ACE_CHECK; } } diff --git a/TAO/orbsvcs/IFR_Service/InterfaceDef_i.h b/TAO/orbsvcs/IFR_Service/InterfaceDef_i.h index 6635d5c338a..051830cbbf9 100644 --- a/TAO/orbsvcs/IFR_Service/InterfaceDef_i.h +++ b/TAO/orbsvcs/IFR_Service/InterfaceDef_i.h @@ -66,6 +66,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -73,6 +79,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -80,12 +93,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual IR::InterfaceDefSeq *base_interfaces ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::InterfaceDefSeq *base_interfaces_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void base_interfaces ( const IR::InterfaceDefSeq &base_interfaces, CORBA::Environment &ACE_TRY_ENV = @@ -93,12 +119,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void base_interfaces_i ( + const IR::InterfaceDefSeq &base_interfaces, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_abstract ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_abstract_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void is_abstract ( CORBA::Boolean is_abstract, CORBA::Environment &ACE_TRY_ENV = @@ -106,12 +145,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void is_abstract_i ( + CORBA::Boolean is_abstract, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_local ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_local_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void is_local ( CORBA::Boolean is_local, CORBA::Environment &ACE_TRY_ENV = @@ -119,6 +171,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void is_local_i ( + CORBA::Boolean is_local, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_a ( const char *interface_id, CORBA::Environment &ACE_TRY_ENV = @@ -126,6 +185,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_a_i ( + const char *interface_id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::AttributeDef_ptr create_attribute ( const char *id, const char *name, @@ -139,6 +205,19 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::AttributeDef_ptr create_attribute_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr type, + IR::AttributeMode mode, + const IR::ExceptionDefSeq &get_exceptions, + const IR::ExceptionDefSeq &put_exceptions, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::OperationDef_ptr create_operation ( const char *id, const char *name, @@ -153,6 +232,20 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::OperationDef_ptr create_operation_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr result, + IR::OperationMode mode, + const IR::ParDescriptionSeq ¶ms, + const IR::ExceptionDefSeq &exceptions, + const IR::ContextIdSeq &contexts, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + void inherited_contents ( ACE_Unbounded_Queue<IR::DefinitionKind> &kind_queue, ACE_Unbounded_Queue<ACE_TString> &path_queue, diff --git a/TAO/orbsvcs/IFR_Service/ModuleDef_i.cpp b/TAO/orbsvcs/IFR_Service/ModuleDef_i.cpp index 2cd01c8e947..ebc14b49518 100644 --- a/TAO/orbsvcs/IFR_Service/ModuleDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ModuleDef_i.cpp @@ -29,12 +29,21 @@ void TAO_ModuleDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_ModuleDef_i::destroy_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Destroy our members. - TAO_Container_i::destroy (ACE_TRY_ENV); + TAO_Container_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; // Destroy ourself. - TAO_Contained_i::destroy (ACE_TRY_ENV); + TAO_Contained_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; } @@ -42,6 +51,15 @@ IR::Contained::Description * TAO_ModuleDef_i::describe (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_ModuleDef_i::describe_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ IR::Contained::Description *desc_ptr = 0; ACE_NEW_THROW_EX (desc_ptr, IR::Contained::Description, @@ -55,7 +73,7 @@ TAO_ModuleDef_i::describe (CORBA::Environment &ACE_TRY_ENV) IR::ModuleDescription md; - md.name = this->name (ACE_TRY_ENV); + md.name = this->name_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); md.id = this->id (ACE_TRY_ENV); @@ -69,7 +87,7 @@ TAO_ModuleDef_i::describe (CORBA::Environment &ACE_TRY_ENV) md.defined_in = container_id.c_str (); - md.version = this->id (ACE_TRY_ENV); + md.version = this->id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); retval->value <<= md; diff --git a/TAO/orbsvcs/IFR_Service/ModuleDef_i.h b/TAO/orbsvcs/IFR_Service/ModuleDef_i.h index 8cfd48bd9e2..77ed94f0c29 100644 --- a/TAO/orbsvcs/IFR_Service/ModuleDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ModuleDef_i.h @@ -64,12 +64,26 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // Remove the repository entry. + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/NativeDef_i.cpp b/TAO/orbsvcs/IFR_Service/NativeDef_i.cpp index 43a48fd1806..57953d3ee1a 100644 --- a/TAO/orbsvcs/IFR_Service/NativeDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/NativeDef_i.cpp @@ -30,6 +30,15 @@ CORBA::TypeCode_ptr TAO_NativeDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_NativeDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString id; this->repo_->config ()->get_string_value (this->section_key_, "id", diff --git a/TAO/orbsvcs/IFR_Service/NativeDef_i.h b/TAO/orbsvcs/IFR_Service/NativeDef_i.h index 75f1eacc62e..c36f610f728 100644 --- a/TAO/orbsvcs/IFR_Service/NativeDef_i.h +++ b/TAO/orbsvcs/IFR_Service/NativeDef_i.h @@ -63,6 +63,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/OperationDef_i.cpp b/TAO/orbsvcs/IFR_Service/OperationDef_i.cpp index 7b4141e6236..7b359754753 100644 --- a/TAO/orbsvcs/IFR_Service/OperationDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/OperationDef_i.cpp @@ -34,6 +34,15 @@ IR::Contained::Description * TAO_OperationDef_i::describe (CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_OperationDef_i::describe_i (CORBA::Environment &ACE_TRY_ENV ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ IR::Contained::Description *desc_ptr = 0; ACE_NEW_THROW_EX (desc_ptr, IR::Contained::Description, @@ -55,6 +64,15 @@ CORBA::TypeCode_ptr TAO_OperationDef_i::result (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->result_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_OperationDef_i::result_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString result_path; this->repo_->config ()->get_string_value (this->section_key_, "result", @@ -73,13 +91,22 @@ TAO_OperationDef_i::result (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_IDLType_i> safety (impl); - return impl->type (ACE_TRY_ENV); + return impl->type_i (ACE_TRY_ENV); } IR::IDLType_ptr TAO_OperationDef_i::result_def (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (IR::IDLType::_nil ()); + + return this->result_def_i (ACE_TRY_ENV); +} + +IR::IDLType_ptr +TAO_OperationDef_i::result_def_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString result_path; this->repo_->config ()->get_string_value (this->section_key_, "result", @@ -114,6 +141,17 @@ TAO_OperationDef_i::result_def (IR::IDLType_ptr result_def, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->result_def_i (result_def, + ACE_TRY_ENV); +} + +void +TAO_OperationDef_i::result_def_i (IR::IDLType_ptr result_def, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (result_def, ACE_TRY_ENV); @@ -131,6 +169,15 @@ IR::ParDescriptionSeq * TAO_OperationDef_i::params (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->params_i (ACE_TRY_ENV); +} + +IR::ParDescriptionSeq * +TAO_OperationDef_i::params_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::ULong i = 0; ACE_Configuration_Section_Key params_key; int status = @@ -218,7 +265,7 @@ TAO_OperationDef_i::params (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_IDLType_i> safety (impl); - pd.type = impl->type (ACE_TRY_ENV); + pd.type = impl->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); u_int kind = 0; @@ -250,6 +297,17 @@ TAO_OperationDef_i::params (const IR::ParDescriptionSeq ¶ms, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->params_i (params, + ACE_TRY_ENV); +} + +void +TAO_OperationDef_i::params_i (const IR::ParDescriptionSeq ¶ms, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ this->repo_->config ()->remove_section (this->section_key_, "params", 1); @@ -279,10 +337,9 @@ TAO_OperationDef_i::params (const IR::ParDescriptionSeq ¶ms, 1, param_key); - const char *name = params[i].name; this->repo_->config ()->set_string_value (param_key, "name", - name); + params[i].name.in ()); PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (params[i].type_def, ACE_TRY_ENV); @@ -302,7 +359,16 @@ TAO_OperationDef_i::params (const IR::ParDescriptionSeq ¶ms, } IR::OperationMode -TAO_OperationDef_i::mode (CORBA::Environment &) +TAO_OperationDef_i::mode (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0) + + return this->mode_i (ACE_TRY_ENV); +} + +IR::OperationMode +TAO_OperationDef_i::mode_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int mode; @@ -315,7 +381,18 @@ TAO_OperationDef_i::mode (CORBA::Environment &) void TAO_OperationDef_i::mode (IR::OperationMode mode, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->mode_i (mode, + ACE_TRY_ENV); +} + +void +TAO_OperationDef_i::mode_i (IR::OperationMode mode, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->set_integer_value (this->section_key_, @@ -327,6 +404,15 @@ IR::ContextIdSeq * TAO_OperationDef_i::contexts (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->contexts_i (ACE_TRY_ENV); +} + +IR::ContextIdSeq * +TAO_OperationDef_i::contexts_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_Configuration_Section_Key contexts_key; int status = this->repo_->config ()->open_section (this->section_key_, @@ -380,7 +466,18 @@ TAO_OperationDef_i::contexts (CORBA::Environment &ACE_TRY_ENV) void TAO_OperationDef_i::contexts (const IR::ContextIdSeq &contexts, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->contexts_i (contexts, + ACE_TRY_ENV); +} + +void +TAO_OperationDef_i::contexts_i (const IR::ContextIdSeq &contexts, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->remove_section (this->section_key_, @@ -400,12 +497,11 @@ TAO_OperationDef_i::contexts (const IR::ContextIdSeq &contexts, for (CORBA::ULong i = 0; i < length; i++) { - const char *context = contexts[i]; CORBA::String_var section_name = this->int_to_string (i); this->repo_->config ()->set_string_value (contexts_key, section_name.in (), - context); + contexts[i].in ()); } } @@ -413,6 +509,15 @@ IR::ExceptionDefSeq * TAO_OperationDef_i::exceptions (CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->exceptions_i (ACE_TRY_ENV); +} + +IR::ExceptionDefSeq * +TAO_OperationDef_i::exceptions_i (CORBA::Environment &ACE_TRY_ENV ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_Configuration_Section_Key excepts_key; int status = this->repo_->config ()->open_section (this->section_key_, @@ -427,55 +532,60 @@ TAO_OperationDef_i::exceptions (CORBA::Environment &ACE_TRY_ENV ) // This section may not have been created. if (status == 0) { - ACE_TString field_name; + ACE_TString field_name, type_path; ACE_Configuration::VALUETYPE type; + u_int kind = 0; + IR::DefinitionKind def_kind = IR::dk_none; + ACE_Configuration_Section_Key except_key; while (this->repo_->config ()->enumerate_values (excepts_key, - index, + index++, field_name, type) == 0) { - ACE_TString type_path; this->repo_->config ()->get_string_value (excepts_key, field_name.c_str (), type_path); - path_queue.enqueue_tail (type_path); + status = + this->repo_->config ()->expand_path (this->repo_->root_key (), + type_path, + except_key, + 0); - ACE_Configuration_Section_Key except_key; - this->repo_->config ()->expand_path (this->repo_->root_key (), - type_path, - except_key, - 0); + if (status == 0) + { + path_queue.enqueue_tail (type_path); - u_int kind = 0; - this->repo_->config ()->get_integer_value (except_key, - "def_kind", - kind); + this->repo_->config ()->get_integer_value (except_key, + "def_kind", + kind); - IR::DefinitionKind def_kind = - ACE_static_cast (IR::DefinitionKind, kind); + def_kind = + ACE_static_cast (IR::DefinitionKind, kind); - kind_queue.enqueue_tail (def_kind); - ++index; + kind_queue.enqueue_tail (def_kind); + } } } + size_t size = kind_queue.size (); + IR::ExceptionDefSeq *ed_seq = 0; ACE_NEW_THROW_EX (ed_seq, - IR::ExceptionDefSeq (index), + IR::ExceptionDefSeq (size), CORBA::NO_MEMORY ()); ACE_CHECK_RETURN (0); - ed_seq->length (index); + ed_seq->length (size); if (index == 0) return ed_seq; IR::ExceptionDefSeq_var retval = ed_seq; - for (CORBA::ULong i = 0; i < (CORBA::ULong) index; ++i) + for (CORBA::ULong i = 0; i < size; ++i) { IR::DefinitionKind def_kind; kind_queue.dequeue_head (def_kind); @@ -502,6 +612,17 @@ TAO_OperationDef_i::exceptions (const IR::ExceptionDefSeq &exceptions, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->exceptions_i (exceptions, + ACE_TRY_ENV); +} + +void +TAO_OperationDef_i::exceptions_i (const IR::ExceptionDefSeq &exceptions, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ this->repo_->config ()->remove_section (this->section_key_, "excepts", 0); @@ -543,10 +664,10 @@ TAO_OperationDef_i::make_description ( { IR::OperationDescription od; - od.name = this->name (ACE_TRY_ENV); + od.name = this->name_i (ACE_TRY_ENV); ACE_CHECK_RETURN (od); - od.id = this->id (ACE_TRY_ENV); + od.id = this->id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (od); ACE_TString container_id; @@ -556,21 +677,21 @@ TAO_OperationDef_i::make_description ( od.defined_in = container_id.c_str (); - od.version = this->version (ACE_TRY_ENV); + od.version = this->version_i (ACE_TRY_ENV); ACE_CHECK_RETURN (od); - od.result = this->result (ACE_TRY_ENV); + od.result = this->result_i (ACE_TRY_ENV); ACE_CHECK_RETURN (od); - od.mode = this->mode (ACE_TRY_ENV); + od.mode = this->mode_i (ACE_TRY_ENV); ACE_CHECK_RETURN (od); - IR::ContextIdSeq_var cid_seq = this->contexts (ACE_TRY_ENV); + IR::ContextIdSeq_var cid_seq = this->contexts_i (ACE_TRY_ENV); ACE_CHECK_RETURN (od); od.contexts = cid_seq.in (); - IR::ParDescriptionSeq_var pd_seq = this->params (ACE_TRY_ENV); + IR::ParDescriptionSeq_var pd_seq = this->params_i (ACE_TRY_ENV); ACE_CHECK_RETURN (od); od.parameters = pd_seq.in (); @@ -586,28 +707,33 @@ TAO_OperationDef_i::make_description ( if (status == 0) { int index = 0; - ACE_TString field_name; + int status = 0; + ACE_TString field_name, type_path; ACE_Configuration::VALUETYPE type; ACE_Unbounded_Queue<ACE_TString> path_queue; while (this->repo_->config ()->enumerate_values (excepts_key, - index, + index++, field_name, type) == 0) { - ACE_TString type_path; - this->repo_->config ()->get_string_value (excepts_key, - field_name.c_str (), - type_path); + status = + this->repo_->config ()->get_string_value (excepts_key, + field_name.c_str (), + type_path); - path_queue.enqueue_tail (type_path); - ++index; + if (status == 0) + { + path_queue.enqueue_tail (type_path); + } } - od.exceptions.length (index); + size_t size = path_queue.size (); + + od.exceptions.length (size); - for (CORBA::ULong i = 0; i < (CORBA::ULong) index; ++i) + for (CORBA::ULong i = 0; i < size; ++i) { ACE_TString type_path; path_queue.dequeue_head (type_path); @@ -649,7 +775,7 @@ TAO_OperationDef_i::make_description ( TAO_ExceptionDef_i impl (this->repo_, type_key); - od.exceptions[i].type = impl.type (ACE_TRY_ENV); + od.exceptions[i].type = impl.type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (od); } } diff --git a/TAO/orbsvcs/IFR_Service/OperationDef_i.h b/TAO/orbsvcs/IFR_Service/OperationDef_i.h index e3323778a33..a14ba6baec8 100644 --- a/TAO/orbsvcs/IFR_Service/OperationDef_i.h +++ b/TAO/orbsvcs/IFR_Service/OperationDef_i.h @@ -64,18 +64,37 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::TypeCode_ptr result ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::TypeCode_ptr result_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::IDLType_ptr result_def ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::IDLType_ptr result_def_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void result_def ( IR::IDLType_ptr result_def, CORBA::Environment &ACE_TRY_ENV = @@ -83,12 +102,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void result_def_i ( + IR::IDLType_ptr result_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ParDescriptionSeq *params ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ParDescriptionSeq *params_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void params ( const IR::ParDescriptionSeq ¶ms, CORBA::Environment &ACE_TRY_ENV = @@ -96,12 +128,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void params_i ( + const IR::ParDescriptionSeq ¶ms, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::OperationMode mode ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::OperationMode mode_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void mode ( IR::OperationMode mode, CORBA::Environment &ACE_TRY_ENV = @@ -109,12 +154,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void mode_i ( + IR::OperationMode mode, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ContextIdSeq *contexts ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ContextIdSeq *contexts_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void contexts ( const IR::ContextIdSeq &contexts, CORBA::Environment &ACE_TRY_ENV = @@ -122,12 +180,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void contexts_i ( + const IR::ContextIdSeq &contexts, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ExceptionDefSeq *exceptions ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ExceptionDefSeq *exceptions_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void exceptions ( const IR::ExceptionDefSeq &exceptions, CORBA::Environment &ACE_TRY_ENV = @@ -135,6 +206,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void exceptions_i ( + const IR::ExceptionDefSeq &exceptions, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + IR::OperationDescription make_description ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () diff --git a/TAO/orbsvcs/IFR_Service/PrimaryKeyDef_i.cpp b/TAO/orbsvcs/IFR_Service/PrimaryKeyDef_i.cpp index 9c54b9afac7..c42bac53066 100644 --- a/TAO/orbsvcs/IFR_Service/PrimaryKeyDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/PrimaryKeyDef_i.cpp @@ -27,14 +27,32 @@ TAO_PrimaryKeyDef_i::def_kind (CORBA::Environment &) } void -TAO_PrimaryKeyDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_PrimaryKeyDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_PrimaryKeyDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_PrimaryKeyDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_PrimaryKeyDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_PrimaryKeyDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -42,8 +60,19 @@ TAO_PrimaryKeyDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) } CORBA::Boolean -TAO_PrimaryKeyDef_i::is_a (const char * /* primary_key_id */, - CORBA::Environment & /* ACE_TRY_ENV */ ) +TAO_PrimaryKeyDef_i::is_a (const char *primary_key_id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_a_i (primary_key_id, + ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_PrimaryKeyDef_i::is_a_i (const char * /* primary_key_id */, + CORBA::Environment & /* ACE_TRY_ENV */ ) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -51,7 +80,16 @@ TAO_PrimaryKeyDef_i::is_a (const char * /* primary_key_id */, } IR::ValueDef_ptr -TAO_PrimaryKeyDef_i::primary_key (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_PrimaryKeyDef_i::primary_key (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::ValueDef::_nil ()); + + return this->primary_key_i (ACE_TRY_ENV); +} + +IR::ValueDef_ptr +TAO_PrimaryKeyDef_i::primary_key_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/PrimaryKeyDef_i.h b/TAO/orbsvcs/IFR_Service/PrimaryKeyDef_i.h index a458f178d30..fcf02833070 100644 --- a/TAO/orbsvcs/IFR_Service/PrimaryKeyDef_i.h +++ b/TAO/orbsvcs/IFR_Service/PrimaryKeyDef_i.h @@ -65,6 +65,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -72,6 +78,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::Boolean is_a ( const char *primary_key_id, CORBA::Environment &ACE_TRY_ENV = @@ -79,11 +92,24 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_a_i ( + const char *primary_key_id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ValueDef_ptr primary_key ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + IR::ValueDef_ptr primary_key_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/PrimitiveDef_i.cpp b/TAO/orbsvcs/IFR_Service/PrimitiveDef_i.cpp index bee3a1ea0b1..a7a9cf81eee 100644 --- a/TAO/orbsvcs/IFR_Service/PrimitiveDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/PrimitiveDef_i.cpp @@ -30,11 +30,27 @@ void TAO_PrimitiveDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_PrimitiveDef_i::destroy_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_THROW (CORBA::BAD_INV_ORDER (2, CORBA::COMPLETED_NO)); } CORBA::TypeCode_ptr -TAO_PrimitiveDef_i::type (CORBA::Environment &) +TAO_PrimitiveDef_i::type (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_PrimitiveDef_i::type_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int pkind = 0; @@ -94,7 +110,16 @@ TAO_PrimitiveDef_i::type (CORBA::Environment &) } IR::PrimitiveKind -TAO_PrimitiveDef_i::kind (CORBA::Environment &) +TAO_PrimitiveDef_i::kind (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->kind_i (ACE_TRY_ENV); +} + +IR::PrimitiveKind +TAO_PrimitiveDef_i::kind_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int pkind = 0; diff --git a/TAO/orbsvcs/IFR_Service/PrimitiveDef_i.h b/TAO/orbsvcs/IFR_Service/PrimitiveDef_i.h index 06390305179..3b462c1f9a8 100644 --- a/TAO/orbsvcs/IFR_Service/PrimitiveDef_i.h +++ b/TAO/orbsvcs/IFR_Service/PrimitiveDef_i.h @@ -63,17 +63,38 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // May not be called on a primitive kind - raises BAD_INV_ORDER. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // Must implement this here because it's pure virtual in the + // base class. + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual IR::PrimitiveKind kind ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + IR::PrimitiveKind kind_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) #pragma warning(pop) diff --git a/TAO/orbsvcs/IFR_Service/ProvidesDef_i.cpp b/TAO/orbsvcs/IFR_Service/ProvidesDef_i.cpp index 7d4f62d6904..74bb336d1b6 100644 --- a/TAO/orbsvcs/IFR_Service/ProvidesDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ProvidesDef_i.cpp @@ -27,14 +27,32 @@ TAO_ProvidesDef_i::def_kind (CORBA::Environment &) } void -TAO_ProvidesDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ProvidesDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_ProvidesDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_ProvidesDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ProvidesDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_ProvidesDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -42,7 +60,16 @@ TAO_ProvidesDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) } IR::InterfaceDef_ptr -TAO_ProvidesDef_i::interface_type (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ProvidesDef_i::interface_type (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::InterfaceDef::_nil ()); + + return this->interface_type_i (ACE_TRY_ENV); +} + +IR::InterfaceDef_ptr +TAO_ProvidesDef_i::interface_type_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/ProvidesDef_i.h b/TAO/orbsvcs/IFR_Service/ProvidesDef_i.h index 9f659dbfb93..f41c3163d37 100644 --- a/TAO/orbsvcs/IFR_Service/ProvidesDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ProvidesDef_i.h @@ -63,6 +63,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -70,11 +76,24 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual IR::InterfaceDef_ptr interface_type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + IR::InterfaceDef_ptr interface_type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/PublishesDef_i.cpp b/TAO/orbsvcs/IFR_Service/PublishesDef_i.cpp index b4516a8df25..b62cfa3b135 100644 --- a/TAO/orbsvcs/IFR_Service/PublishesDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/PublishesDef_i.cpp @@ -28,14 +28,32 @@ TAO_PublishesDef_i::def_kind (CORBA::Environment &) } void -TAO_PublishesDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_PublishesDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_PublishesDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_PublishesDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_PublishesDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_PublishesDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/PublishesDef_i.h b/TAO/orbsvcs/IFR_Service/PublishesDef_i.h index a281ebced9b..1e53e16f636 100644 --- a/TAO/orbsvcs/IFR_Service/PublishesDef_i.h +++ b/TAO/orbsvcs/IFR_Service/PublishesDef_i.h @@ -64,12 +64,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/README b/TAO/orbsvcs/IFR_Service/README index 3d036c461f2..99e1d816233 100644 --- a/TAO/orbsvcs/IFR_Service/README +++ b/TAO/orbsvcs/IFR_Service/README @@ -30,6 +30,14 @@ Command line options are: persistent storage. The default filename is "ifr_default_backing_store". + -m Enables read/write locking of IFR calls. + If the IFR is started up with + multithreading enabled - for example if + a service config file is used that specifies + thread-per-connection - this option should be + used. Note that if ACE_HAS_THREADS is not + defined, this option will be ignored. + -r Uses win32 registry for the database. Not available with persistence. If -p is on the command line, this option is ignored. diff --git a/TAO/orbsvcs/IFR_Service/Repository_i.cpp b/TAO/orbsvcs/IFR_Service/Repository_i.cpp index 346d1d86dfb..1ac0ad09bdb 100644 --- a/TAO/orbsvcs/IFR_Service/Repository_i.cpp +++ b/TAO/orbsvcs/IFR_Service/Repository_i.cpp @@ -22,25 +22,30 @@ TAO_Repository_i::TAO_Repository_i (CORBA::ORB_ptr orb, extension_ (CORBA::string_dup ("TAO_IFR_name_extension")), lock_ (0) { - - if (OPTIONS::instance ()->enable_locking ()) - { - ACE_NEW (this->lock_, - ACE_Lock_Adapter<ACE_SYNCH_MUTEX> ()); - } - else - { - ACE_NEW (this->lock_, - ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX> ()); - } - ACE_TRY_NEW_ENV { + // Create the appropriate lock. + if (OPTIONS::instance ()->enable_locking ()) + { + ACE_NEW_THROW_EX (this->lock_, + ACE_Lock_Adapter<ACE_SYNCH_MUTEX> (), + CORBA::NO_MEMORY ()); + } + else + { + ACE_NEW_THROW_EX (this->lock_, + ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX> (), + CORBA::NO_MEMORY ()); + } + ACE_TRY_CHECK; + + // Create the servant factory. ACE_NEW_THROW_EX (this->servant_factory_, IFR_Servant_Factory (this), CORBA::NO_MEMORY ()); ACE_TRY_CHECK; + // Resolve and narrow the TypeCodeFactory. CORBA::Object_var object = this->orb_->resolve_initial_references ("TypeCodeFactory", ACE_TRY_ENV); @@ -83,11 +88,6 @@ TAO_Repository_i::TAO_Repository_i (CORBA::ORB_ptr orb, this->root_key_); this->config_->open_section (this->root_key_, - "defns", - 1, // Will create if IFR is not persistent. - this->named_objs_key_); - - this->config_->open_section (this->root_key_, "repo_ids", 1, // Will create if IFR is not persistent. this->repo_ids_key_); @@ -214,12 +214,6 @@ TAO_Repository_i::~TAO_Repository_i (void) delete this->lock_; } -ACE_Lock & -TAO_Repository_i::lock (void) -{ - return *this->lock_; -} - IR::DefinitionKind TAO_Repository_i::def_kind (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) @@ -239,6 +233,17 @@ TAO_Repository_i::lookup_id (const char *search_id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (IR::Contained::_nil ()); + + return this->lookup_id_i (search_id, + ACE_TRY_ENV); +} + +IR::Contained_ptr +TAO_Repository_i::lookup_id_i (const char *search_id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString path; if (this->config_->get_string_value (this->repo_ids_key_, search_id, @@ -275,6 +280,17 @@ TAO_Repository_i::get_canonical_typecode (CORBA::TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->get_canonical_typecode_i (tc, + ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_Repository_i::get_canonical_typecode_i (CORBA::TypeCode_ptr tc, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::TCKind kind = tc->kind (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); @@ -294,8 +310,8 @@ TAO_Repository_i::get_canonical_typecode (CORBA::TypeCode_ptr tc, ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); CORBA::TypeCode_var canon_ctype = - this->get_canonical_typecode (ctype.in (), - ACE_TRY_ENV); + this->get_canonical_typecode_i (ctype.in (), + ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->tc_factory ()->create_array_tc (length, @@ -311,8 +327,8 @@ TAO_Repository_i::get_canonical_typecode (CORBA::TypeCode_ptr tc, ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); CORBA::TypeCode_var canon_ctype = - this->get_canonical_typecode (ctype.in (), - ACE_TRY_ENV); + this->get_canonical_typecode_i (ctype.in (), + ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->tc_factory ()->create_sequence_tc (length, @@ -358,7 +374,7 @@ TAO_Repository_i::get_canonical_typecode (CORBA::TypeCode_ptr tc, TAO_ExceptionDef_i impl (this, key); - return impl.type (ACE_TRY_ENV); + return impl.type_i (ACE_TRY_ENV); } else { @@ -369,7 +385,7 @@ TAO_Repository_i::get_canonical_typecode (CORBA::TypeCode_ptr tc, auto_ptr<TAO_IDLType_i> safety (impl); - return impl->type (ACE_TRY_ENV); + return impl->type_i (ACE_TRY_ENV); } } } @@ -399,6 +415,17 @@ TAO_Repository_i::create_string (CORBA::ULong bound, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::StringDef::_nil ()); + + return this->create_string_i (bound, + ACE_TRY_ENV); +} + +IR::StringDef_ptr +TAO_Repository_i::create_string_i (CORBA::ULong bound, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ u_int count = 0; this->config_->get_integer_value (this->strings_key_, "count", @@ -447,6 +474,17 @@ TAO_Repository_i::create_wstring (CORBA::ULong bound, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::WstringDef::_nil ()); + + return this->create_wstring_i (bound, + ACE_TRY_ENV); +} + +IR::WstringDef_ptr +TAO_Repository_i::create_wstring_i (CORBA::ULong bound, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ u_int count = 0; this->config_->get_integer_value (this->wstrings_key_, "count", @@ -496,6 +534,19 @@ TAO_Repository_i::create_sequence (CORBA::ULong bound, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::SequenceDef::_nil ()); + + return this->create_sequence_i (bound, + element_type, + ACE_TRY_ENV); +} + +IR::SequenceDef_ptr +TAO_Repository_i::create_sequence_i (CORBA::ULong bound, + IR::IDLType_ptr element_type, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ PortableServer::ObjectId_var oid = this->ir_poa_->reference_to_id (element_type, ACE_TRY_ENV); @@ -561,6 +612,19 @@ TAO_Repository_i::create_array (CORBA::ULong length, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::ArrayDef::_nil ()); + + return this->create_array_i (length, + element_type, + ACE_TRY_ENV); +} + +IR::ArrayDef_ptr +TAO_Repository_i::create_array_i (CORBA::ULong length, + IR::IDLType_ptr element_type, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ PortableServer::ObjectId_var oid = this->ir_poa_->reference_to_id (element_type, ACE_TRY_ENV); @@ -621,11 +685,24 @@ TAO_Repository_i::create_array (CORBA::ULong length, } IR::FixedDef_ptr -TAO_Repository_i::create_fixed (CORBA::UShort /* digits */, - CORBA::Short /* scale */, +TAO_Repository_i::create_fixed (CORBA::UShort digits, + CORBA::Short scale, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD_RETURN (IR::FixedDef::_nil ()); + + return this->create_fixed_i (digits, + scale, + ACE_TRY_ENV); +} + +IR::FixedDef_ptr +TAO_Repository_i::create_fixed_i (CORBA::UShort /* digits */, + CORBA::Short /* scale */, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), IR::FixedDef::_nil ()); } @@ -672,12 +749,6 @@ TAO_Repository_i::root_key (void) const } ACE_Configuration_Section_Key -TAO_Repository_i::named_objs_key (void) const -{ - return this->named_objs_key_; -} - -ACE_Configuration_Section_Key TAO_Repository_i::repo_ids_key (void) const { return this->repo_ids_key_; @@ -720,11 +791,17 @@ TAO_Repository_i::sequences_key (void) const } const char * -TAO_Repository_i::extension (void) +TAO_Repository_i::extension (void) const { return this->extension_.in (); } +ACE_Lock & +TAO_Repository_i::lock (void) const +{ + return *this->lock_; +} + const char *TAO_Repository_i::TAO_IFR_primitive_kinds[] = { "pk_null", diff --git a/TAO/orbsvcs/IFR_Service/Repository_i.h b/TAO/orbsvcs/IFR_Service/Repository_i.h index ed33f158d29..e58193fc852 100644 --- a/TAO/orbsvcs/IFR_Service/Repository_i.h +++ b/TAO/orbsvcs/IFR_Service/Repository_i.h @@ -77,6 +77,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::Contained_ptr lookup_id_i ( + const char *search_id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr get_canonical_typecode ( CORBA::TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV = @@ -84,12 +91,21 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::TypeCode_ptr get_canonical_typecode_i ( + CORBA::TypeCode_ptr tc, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::PrimitiveDef_ptr get_primitive ( IR::PrimitiveKind kind, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException)); + // No locking necessary because the database is not + // accessed. virtual IR::StringDef_ptr create_string ( CORBA::ULong bound, @@ -98,6 +114,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::StringDef_ptr create_string_i ( + CORBA::ULong bound, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::WstringDef_ptr create_wstring ( CORBA::ULong bound, CORBA::Environment &ACE_TRY_ENV = @@ -105,6 +128,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::WstringDef_ptr create_wstring_i ( + CORBA::ULong bound, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::SequenceDef_ptr create_sequence ( CORBA::ULong bound, IR::IDLType_ptr element_type, @@ -113,6 +143,14 @@ public: ) ACE_THROW_SPEC (( CORBA::SystemException)); + IR::SequenceDef_ptr create_sequence_i ( + CORBA::ULong bound, + IR::IDLType_ptr element_type, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( CORBA::SystemException)); + virtual IR::ArrayDef_ptr create_array ( CORBA::ULong length, IR::IDLType_ptr element_type, @@ -121,6 +159,14 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ArrayDef_ptr create_array_i ( + CORBA::ULong length, + IR::IDLType_ptr element_type, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::FixedDef_ptr create_fixed ( CORBA::UShort digits, CORBA::Short scale, @@ -129,6 +175,14 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::FixedDef_ptr create_fixed_i ( + CORBA::UShort digits, + CORBA::Short scale, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + PortableServer::POA_ptr ir_poa (void) const; // Accessor for the POA that creates the servants. @@ -148,9 +202,6 @@ public: ACE_Configuration_Section_Key root_key (void) const; // Accessor for the root key for all IR objects. - ACE_Configuration_Section_Key named_objs_key (void) const; - // Accessor for the named IR objects root key. - ACE_Configuration_Section_Key repo_ids_key (void) const; // Accessor for the repository ids root key. @@ -172,18 +223,18 @@ public: ACE_Configuration_Section_Key sequences_key (void) const; // Accessor for the anonymous sequences section. - const char *extension (void); + const char *extension (void) const; // Accessor for the name extension string. + ACE_Lock &lock (void) const; + // Repo lock. + void shutdown (void); // Used ONLY with Purify, for memory leak checking. // A call to this can be temporariily appended to the // destroy() method of the last thing to be destroyed // by the test code. - ACE_Lock &lock (void); - // Repo lock. - protected: CORBA::ORB_ptr orb_; // Reference to our ORB. @@ -206,9 +257,6 @@ protected: ACE_Configuration_Section_Key root_key_; // Root of all IR objects. - ACE_Configuration_Section_Key named_objs_key_; - // Root of named IFR objects subtree. - ACE_Configuration_Section_Key repo_ids_key_; // Flat section of Interface Repository ids. @@ -231,7 +279,7 @@ protected: // Section holding the anonymous sequences. CORBA::String_var extension_; - // Added to names to temporarily avoid name clashes. + // Added to names temporarily to avoid name clashes. ACE_Lock *lock_; // Lock. diff --git a/TAO/orbsvcs/IFR_Service/SequenceDef_i.cpp b/TAO/orbsvcs/IFR_Service/SequenceDef_i.cpp index f79696997e0..b95cedaa9d8 100644 --- a/TAO/orbsvcs/IFR_Service/SequenceDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/SequenceDef_i.cpp @@ -32,6 +32,15 @@ void TAO_SequenceDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_SequenceDef_i::destroy_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Only if it is (w)string, fixed, array or sequence. this->destroy_element_type (ACE_TRY_ENV); ACE_CHECK; @@ -50,11 +59,20 @@ CORBA::TypeCode_ptr TAO_SequenceDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_SequenceDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ CORBA::TypeCode_var element_typecode = - this->element_type (ACE_TRY_ENV); + this->element_type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); - CORBA::ULong bound = this->bound (ACE_TRY_ENV); + CORBA::ULong bound = this->bound_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->repo_->tc_factory ()->create_sequence_tc ( @@ -65,7 +83,16 @@ TAO_SequenceDef_i::type (CORBA::Environment &ACE_TRY_ENV) } CORBA::ULong -TAO_SequenceDef_i::bound (CORBA::Environment &) +TAO_SequenceDef_i::bound (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->bound_i (ACE_TRY_ENV); +} + +CORBA::ULong +TAO_SequenceDef_i::bound_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int bound = 0; @@ -78,7 +105,18 @@ TAO_SequenceDef_i::bound (CORBA::Environment &) void TAO_SequenceDef_i::bound (CORBA::ULong bound, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->bound_i (bound, + ACE_TRY_ENV); +} + +void +TAO_SequenceDef_i::bound_i (CORBA::ULong bound, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->set_integer_value (this->section_key_, @@ -90,6 +128,15 @@ CORBA::TypeCode_ptr TAO_SequenceDef_i::element_type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->element_type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_SequenceDef_i::element_type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString element_path; this->repo_->config ()->get_string_value (this->section_key_, "element_path", @@ -108,28 +155,34 @@ TAO_SequenceDef_i::element_type (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_IDLType_i> safety (impl); - return impl->type (ACE_TRY_ENV); + return impl->type_i (ACE_TRY_ENV); } IR::IDLType_ptr TAO_SequenceDef_i::element_type_def (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_TString element_path; + TAO_IFR_READ_GUARD_RETURN (IR::IDLType::_nil ()); + return this->element_type_def_i (ACE_TRY_ENV); +} + +IR::IDLType_ptr +TAO_SequenceDef_i::element_type_def_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_TString element_path; this->repo_->config ()->get_string_value (this->section_key_, "element_path", element_path); ACE_Configuration_Section_Key element_key; - this->repo_->config ()->expand_path (this->repo_->root_key (), element_path, element_key, 0); u_int kind = 0; - this->repo_->config ()->get_integer_value (element_key, "def_kind", kind); @@ -152,6 +205,17 @@ TAO_SequenceDef_i::element_type_def (IR::IDLType_ptr element_type_def, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->element_type_def_i (element_type_def, + ACE_TRY_ENV); +} + +void +TAO_SequenceDef_i::element_type_def_i (IR::IDLType_ptr element_type_def, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ this->destroy_element_type (ACE_TRY_ENV); ACE_CHECK; @@ -210,7 +274,7 @@ TAO_SequenceDef_i::destroy_element_type ( auto_ptr<TAO_IDLType_i> safety (impl); - impl->destroy (ACE_TRY_ENV); + impl->destroy_i (ACE_TRY_ENV); ACE_CHECK; break; diff --git a/TAO/orbsvcs/IFR_Service/SequenceDef_i.h b/TAO/orbsvcs/IFR_Service/SequenceDef_i.h index d86b78f917e..6f97436f5ab 100644 --- a/TAO/orbsvcs/IFR_Service/SequenceDef_i.h +++ b/TAO/orbsvcs/IFR_Service/SequenceDef_i.h @@ -63,11 +63,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. virtual CORBA::ULong bound ( CORBA::Environment &ACE_TRY_ENV = @@ -75,6 +89,12 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::ULong bound_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void bound ( CORBA::ULong bound, CORBA::Environment &ACE_TRY_ENV = @@ -82,18 +102,37 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void bound_i ( + CORBA::ULong bound, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr element_type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::TypeCode_ptr element_type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::IDLType_ptr element_type_def ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::IDLType_ptr element_type_def_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void element_type_def ( IR::IDLType_ptr element_type_def, CORBA::Environment &ACE_TRY_ENV = @@ -101,6 +140,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void element_type_def_i ( + IR::IDLType_ptr element_type_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + private: void destroy_element_type ( CORBA::Environment &ACE_TRY_ENV = diff --git a/TAO/orbsvcs/IFR_Service/Servant_Locator.cpp b/TAO/orbsvcs/IFR_Service/Servant_Locator.cpp index 815da53e48b..37d3465205d 100644 --- a/TAO/orbsvcs/IFR_Service/Servant_Locator.cpp +++ b/TAO/orbsvcs/IFR_Service/Servant_Locator.cpp @@ -26,13 +26,10 @@ IFR_ServantLocator::preinvoke ( CORBA::String_var s = PortableServer::ObjectId_to_string (oid); - ACE_TString full_name (s.in ()); - ACE_Configuration_Section_Key servant_key; - int status = this->repo_->config ()->expand_path (this->repo_->root_key (), - full_name, + s.in (), servant_key, 0); diff --git a/TAO/orbsvcs/IFR_Service/StringDef_i.cpp b/TAO/orbsvcs/IFR_Service/StringDef_i.cpp index aff7e6c0190..5e0523d48e9 100644 --- a/TAO/orbsvcs/IFR_Service/StringDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/StringDef_i.cpp @@ -25,7 +25,16 @@ TAO_StringDef_i::def_kind (CORBA::Environment &) } void -TAO_StringDef_i::destroy (CORBA::Environment &) +TAO_StringDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_StringDef_i::destroy_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_TString name; @@ -42,7 +51,16 @@ CORBA::TypeCode_ptr TAO_StringDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - CORBA::ULong bound = this->bound (ACE_TRY_ENV); + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_StringDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + CORBA::ULong bound = this->bound_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->repo_->tc_factory ()->create_string_tc ( @@ -52,7 +70,16 @@ TAO_StringDef_i::type (CORBA::Environment &ACE_TRY_ENV) } CORBA::ULong -TAO_StringDef_i::bound (CORBA::Environment &) +TAO_StringDef_i::bound (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->bound_i (ACE_TRY_ENV); +} + +CORBA::ULong +TAO_StringDef_i::bound_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int retval = 0; @@ -65,7 +92,18 @@ TAO_StringDef_i::bound (CORBA::Environment &) void TAO_StringDef_i::bound (CORBA::ULong bound, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->bound_i (bound, + ACE_TRY_ENV); +} + +void +TAO_StringDef_i::bound_i (CORBA::ULong bound, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->set_integer_value (this->section_key_, diff --git a/TAO/orbsvcs/IFR_Service/StringDef_i.h b/TAO/orbsvcs/IFR_Service/StringDef_i.h index f8233d13169..697ce078398 100644 --- a/TAO/orbsvcs/IFR_Service/StringDef_i.h +++ b/TAO/orbsvcs/IFR_Service/StringDef_i.h @@ -64,11 +64,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. virtual CORBA::ULong bound ( CORBA::Environment &ACE_TRY_ENV = @@ -76,12 +90,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::ULong bound_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void bound ( CORBA::ULong bound, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void bound_i ( + CORBA::ULong bound, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/StructDef_i.cpp b/TAO/orbsvcs/IFR_Service/StructDef_i.cpp index 14dbd4123f8..f2f36c94aeb 100644 --- a/TAO/orbsvcs/IFR_Service/StructDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/StructDef_i.cpp @@ -33,12 +33,21 @@ void TAO_StructDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_StructDef_i::destroy_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Destroy our members. - TAO_Container_i::destroy (ACE_TRY_ENV); + TAO_Container_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; // Destroy ourself. - TAO_Contained_i::destroy (ACE_TRY_ENV); + TAO_Contained_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; } @@ -46,6 +55,15 @@ CORBA::TypeCode_ptr TAO_StructDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_StructDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString id; this->repo_->config ()->get_string_value (this->section_key_, "id", @@ -56,7 +74,7 @@ TAO_StructDef_i::type (CORBA::Environment &ACE_TRY_ENV) "name", name); - IR::StructMemberSeq_var members = this->members (ACE_TRY_ENV); + IR::StructMemberSeq_var members = this->members_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->repo_->tc_factory ()->create_struct_tc (id.c_str (), @@ -69,6 +87,15 @@ IR::StructMemberSeq * TAO_StructDef_i::members (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->members_i (ACE_TRY_ENV); +} + +IR::StructMemberSeq * +TAO_StructDef_i::members_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_Unbounded_Queue<IR::DefinitionKind> kind_queue; ACE_Unbounded_Queue<ACE_TString> path_queue; ACE_Unbounded_Queue<ACE_TString> name_queue; @@ -141,20 +168,23 @@ TAO_StructDef_i::members (CORBA::Environment &ACE_TRY_ENV) IR::StructMemberSeq_var retval = members; + ACE_TString name, path; + IR::DefinitionKind kind = IR::dk_none; + CORBA::Object_var obj; + ACE_Configuration_Section_Key member_key; + TAO_IDLType_i *impl = 0; + for (size_t k = 0; k < size; k++) { - ACE_TString name; name_queue.dequeue_head (name); retval[k].name = name.c_str (); - IR::DefinitionKind kind; kind_queue.dequeue_head (kind); - ACE_TString path; path_queue.dequeue_head (path); - CORBA::Object_var obj = + obj = this->repo_->servant_factory ()->create_objref (kind, path.c_str (), ACE_TRY_ENV); @@ -163,8 +193,20 @@ TAO_StructDef_i::members (CORBA::Environment &ACE_TRY_ENV) retval[k].type_def = IR::IDLType::_narrow (obj.in (), ACE_TRY_ENV); ACE_CHECK_RETURN (0); + + this->repo_->config ()->expand_path (this->repo_->root_key (), + path, + member_key, + 0); + + impl = + this->repo_->servant_factory ()->create_idltype (member_key, + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + auto_ptr<TAO_IDLType_i> safety (impl); - retval[k].type = retval[k].type_def->type (ACE_TRY_ENV); + retval[k].type = impl->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); } @@ -176,8 +218,19 @@ TAO_StructDef_i::members (const IR::StructMemberSeq &members, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->members_i (members, + ACE_TRY_ENV); +} + +void +TAO_StructDef_i::members_i (const IR::StructMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Destroy our old members, both refs and defns. - TAO_Container_i::destroy (ACE_TRY_ENV); + TAO_Container_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; CORBA::ULong count = members.length (); @@ -201,10 +254,9 @@ TAO_StructDef_i::members (const IR::StructMemberSeq &members, 1, member_key); - ACE_TString name (members[i].name); this->repo_->config ()->set_string_value (member_key, "name", - name); + members[i].name.in ()); PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (members[i].type_def, diff --git a/TAO/orbsvcs/IFR_Service/StructDef_i.h b/TAO/orbsvcs/IFR_Service/StructDef_i.h index 2505b5a4347..1b4b890c5b5 100644 --- a/TAO/orbsvcs/IFR_Service/StructDef_i.h +++ b/TAO/orbsvcs/IFR_Service/StructDef_i.h @@ -65,6 +65,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry and its contents. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -72,18 +78,38 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual IR::StructMemberSeq *members ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::StructMemberSeq *members_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void members ( const IR::StructMemberSeq &members, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void members_i ( + const IR::StructMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/TypedefDef_i.cpp b/TAO/orbsvcs/IFR_Service/TypedefDef_i.cpp index c113b26bb8b..3256bd8fd6b 100644 --- a/TAO/orbsvcs/IFR_Service/TypedefDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/TypedefDef_i.cpp @@ -24,6 +24,15 @@ IR::Contained::Description * TAO_TypedefDef_i::describe (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_TypedefDef_i::describe_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ IR::Contained::Description *desc_ptr = 0; ACE_NEW_THROW_EX (desc_ptr, IR::Contained::Description, @@ -38,9 +47,9 @@ TAO_TypedefDef_i::describe (CORBA::Environment &ACE_TRY_ENV) IR::TypeDescription td; ACE_CHECK_RETURN (0); - td.name = this->name (ACE_TRY_ENV); + td.name = this->name_i (ACE_TRY_ENV); - td.id = this->id (ACE_TRY_ENV); + td.id = this->id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); ACE_TString container_id; @@ -51,10 +60,10 @@ TAO_TypedefDef_i::describe (CORBA::Environment &ACE_TRY_ENV) td.defined_in = container_id.c_str (); - td.version = this->version (ACE_TRY_ENV); + td.version = this->version_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); - td.type = this->type (ACE_TRY_ENV); + td.type = this->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); retval->value <<= td; diff --git a/TAO/orbsvcs/IFR_Service/TypedefDef_i.h b/TAO/orbsvcs/IFR_Service/TypedefDef_i.h index c6a83914022..4380a6b1fbc 100644 --- a/TAO/orbsvcs/IFR_Service/TypedefDef_i.h +++ b/TAO/orbsvcs/IFR_Service/TypedefDef_i.h @@ -58,6 +58,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/UnionDef_i.cpp b/TAO/orbsvcs/IFR_Service/UnionDef_i.cpp index b23aee092ee..2af92163633 100644 --- a/TAO/orbsvcs/IFR_Service/UnionDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/UnionDef_i.cpp @@ -33,12 +33,21 @@ void TAO_UnionDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_UnionDef_i::destroy_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Destroy our members. - TAO_Container_i::destroy (ACE_TRY_ENV); + TAO_Container_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; // Destroy ourself. - TAO_Contained_i::destroy (ACE_TRY_ENV); + TAO_Contained_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; } @@ -46,6 +55,15 @@ CORBA::TypeCode_ptr TAO_UnionDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_UnionDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString id; this->repo_->config ()->get_string_value (this->section_key_, "id", @@ -56,10 +74,10 @@ TAO_UnionDef_i::type (CORBA::Environment &ACE_TRY_ENV) "name", name); - CORBA::TypeCode_var tc = this->discriminator_type (ACE_TRY_ENV); + CORBA::TypeCode_var tc = this->discriminator_type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); - IR::UnionMemberSeq_var members = this->members (ACE_TRY_ENV); + IR::UnionMemberSeq_var members = this->members_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->repo_->tc_factory ()->create_union_tc (id.c_str (), @@ -73,6 +91,15 @@ CORBA::TypeCode_ptr TAO_UnionDef_i::discriminator_type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->discriminator_type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_UnionDef_i::discriminator_type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString disc_path; this->repo_->config ()->get_string_value (this->section_key_, "disc_path", @@ -90,13 +117,22 @@ TAO_UnionDef_i::discriminator_type (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_IDLType_i> safety (impl); - return impl->type (ACE_TRY_ENV); + return impl->type_i (ACE_TRY_ENV); } IR::IDLType_ptr TAO_UnionDef_i::discriminator_type_def (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (IR::IDLType::_nil ()); + + return this->discriminator_type_def_i (ACE_TRY_ENV); +} + +IR::IDLType_ptr +TAO_UnionDef_i::discriminator_type_def_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString disc_path; this->repo_->config ()->get_string_value (this->section_key_, "disc_path", @@ -133,6 +169,19 @@ TAO_UnionDef_i::discriminator_type_def ( ) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->discriminator_type_def_i (discriminator_type_def, + ACE_TRY_ENV); +} + +void +TAO_UnionDef_i::discriminator_type_def_i ( + IR::IDLType_ptr discriminator_type_def, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (discriminator_type_def, ACE_TRY_ENV); @@ -150,6 +199,15 @@ IR::UnionMemberSeq * TAO_UnionDef_i::members (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (0); + + return this->members_i (ACE_TRY_ENV); +} + +IR::UnionMemberSeq * +TAO_UnionDef_i::members_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_Unbounded_Queue<ACE_Configuration_Section_Key> key_queue; ACE_Configuration_Section_Key refs_key; @@ -204,12 +262,17 @@ TAO_UnionDef_i::members (CORBA::Environment &ACE_TRY_ENV) IR::UnionMemberSeq_var retval = members; + ACE_TString name, path; + ACE_Configuration_Section_Key next_key, entry_key; + u_int kind = 0; + IR::DefinitionKind def_kind = IR::dk_none; + CORBA::Object_var obj; + TAO_IDLType_i *impl = 0; + for (size_t k = 0; k < size; k++) { - ACE_Configuration_Section_Key next_key; key_queue.dequeue_head (next_key); - ACE_TString name; this->repo_->config ()->get_string_value (next_key, "name", name); @@ -221,26 +284,23 @@ TAO_UnionDef_i::members (CORBA::Environment &ACE_TRY_ENV) ACE_TRY_ENV); ACE_CHECK_RETURN (0); - ACE_TString path; this->repo_->config ()->get_string_value (next_key, "path", path); - ACE_Configuration_Section_Key entry_key; this->repo_->config ()->expand_path (this->repo_->root_key (), path, entry_key, 0); - u_int kind; this->repo_->config ()->get_integer_value (entry_key, "def_kind", kind); - IR::DefinitionKind def_kind = + def_kind = ACE_static_cast (IR::DefinitionKind, kind); - CORBA::Object_var obj = + obj = this->repo_->servant_factory ()->create_objref (def_kind, path.c_str (), ACE_TRY_ENV); @@ -249,8 +309,15 @@ TAO_UnionDef_i::members (CORBA::Environment &ACE_TRY_ENV) retval[k].type_def = IR::IDLType::_narrow (obj.in (), ACE_TRY_ENV); ACE_CHECK_RETURN (0); + + impl = + this->repo_->servant_factory ()->create_idltype (entry_key, + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + auto_ptr<TAO_IDLType_i> safety (impl); - retval[k].type = retval[k].type_def->type (ACE_TRY_ENV); + retval[k].type = impl->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); } @@ -262,8 +329,19 @@ TAO_UnionDef_i::members (const IR::UnionMemberSeq &members, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->members_i (members, + ACE_TRY_ENV); +} + +void +TAO_UnionDef_i::members_i (const IR::UnionMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ // Destroy our old members, both refs and defns. - TAO_Container_i::destroy (ACE_TRY_ENV); + TAO_Container_i::destroy_i (ACE_TRY_ENV); ACE_CHECK; ACE_TString section_name; @@ -291,10 +369,9 @@ TAO_UnionDef_i::members (const IR::UnionMemberSeq &members, 1, member_key); - ACE_TString name (members[i].name); this->repo_->config ()->set_string_value (member_key, "name", - name); + members[i].name.in ()); PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (members[i].type_def, @@ -337,7 +414,7 @@ TAO_UnionDef_i::fetch_label (const ACE_Configuration_Section_Key member_key, "label", value); - CORBA::TypeCode_var tc = this->discriminator_type (ACE_TRY_ENV); + CORBA::TypeCode_var tc = this->discriminator_type_i (ACE_TRY_ENV); ACE_CHECK; CORBA::TCKind kind = tc->kind (ACE_TRY_ENV); diff --git a/TAO/orbsvcs/IFR_Service/UnionDef_i.h b/TAO/orbsvcs/IFR_Service/UnionDef_i.h index f28a2988f28..0e8758c7ac6 100644 --- a/TAO/orbsvcs/IFR_Service/UnionDef_i.h +++ b/TAO/orbsvcs/IFR_Service/UnionDef_i.h @@ -65,6 +65,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry and its contents. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -72,18 +78,37 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr discriminator_type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::TypeCode_ptr discriminator_type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::IDLType_ptr discriminator_type_def ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::IDLType_ptr discriminator_type_def_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void discriminator_type_def ( IR::IDLType_ptr discriminator_type_def, CORBA::Environment &ACE_TRY_ENV = @@ -91,12 +116,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void discriminator_type_def_i ( + IR::IDLType_ptr discriminator_type_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::UnionMemberSeq *members ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::UnionMemberSeq *members_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void members ( const IR::UnionMemberSeq &members, CORBA::Environment &ACE_TRY_ENV = @@ -104,6 +142,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void members_i ( + const IR::UnionMemberSeq &members, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + private: void fetch_label ( const ACE_Configuration_Section_Key member_key, diff --git a/TAO/orbsvcs/IFR_Service/UsesDef_i.cpp b/TAO/orbsvcs/IFR_Service/UsesDef_i.cpp index 0c2633490b4..9439d93d414 100644 --- a/TAO/orbsvcs/IFR_Service/UsesDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/UsesDef_i.cpp @@ -25,14 +25,32 @@ TAO_UsesDef_i::def_kind (CORBA::Environment &) } void -TAO_UsesDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_UsesDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_UsesDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_UsesDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_UsesDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_UsesDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -40,7 +58,16 @@ TAO_UsesDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) } IR::InterfaceDef_ptr -TAO_UsesDef_i::interface_type (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_UsesDef_i::interface_type (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::InterfaceDef::_nil ()); + + return this->interface_type_i (ACE_TRY_ENV); +} + +IR::InterfaceDef_ptr +TAO_UsesDef_i::interface_type_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -48,7 +75,16 @@ TAO_UsesDef_i::interface_type (CORBA::Environment & /* ACE_TRY_ENV */) } CORBA::Boolean -TAO_UsesDef_i::is_multiple (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_UsesDef_i::is_multiple (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_multiple_i (ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_UsesDef_i::is_multiple_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/UsesDef_i.h b/TAO/orbsvcs/IFR_Service/UsesDef_i.h index 2ac8f716260..fbbbea0581c 100644 --- a/TAO/orbsvcs/IFR_Service/UsesDef_i.h +++ b/TAO/orbsvcs/IFR_Service/UsesDef_i.h @@ -63,6 +63,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -70,17 +76,36 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual IR::InterfaceDef_ptr interface_type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::InterfaceDef_ptr interface_type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_multiple ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + CORBA::Boolean is_multiple_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/ValueBoxDef_i.cpp b/TAO/orbsvcs/IFR_Service/ValueBoxDef_i.cpp index 38b9bbda17e..e894f77b309 100644 --- a/TAO/orbsvcs/IFR_Service/ValueBoxDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ValueBoxDef_i.cpp @@ -34,6 +34,15 @@ CORBA::TypeCode_ptr TAO_ValueBoxDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_ValueBoxDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString id; this->repo_->config ()->get_string_value (this->section_key_, "id", @@ -62,7 +71,7 @@ TAO_ValueBoxDef_i::type (CORBA::Environment &ACE_TRY_ENV) auto_ptr<TAO_IDLType_i> safety (impl); - CORBA::TypeCode_var tc = impl->type (ACE_TRY_ENV); + CORBA::TypeCode_var tc = impl->type_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->repo_->tc_factory ()->create_value_box_tc (id.c_str (), @@ -75,6 +84,15 @@ IR::IDLType_ptr TAO_ValueBoxDef_i::original_type_def (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_READ_GUARD_RETURN (IR::IDLType::_nil ()); + + return this->original_type_def_i (ACE_TRY_ENV); +} + +IR::IDLType_ptr +TAO_ValueBoxDef_i::original_type_def_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ ACE_TString boxed_type; this->repo_->config ()->get_string_value (this->section_key_, "boxed_type", @@ -109,6 +127,17 @@ TAO_ValueBoxDef_i::original_type_def (IR::IDLType_ptr original_type_def, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + TAO_IFR_WRITE_GUARD; + + this->original_type_def_i (original_type_def, + ACE_TRY_ENV); +} + +void +TAO_ValueBoxDef_i::original_type_def_i (IR::IDLType_ptr original_type_def, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ PortableServer::ObjectId_var oid = this->repo_->ir_poa ()->reference_to_id (original_type_def, ACE_TRY_ENV); diff --git a/TAO/orbsvcs/IFR_Service/ValueBoxDef_i.h b/TAO/orbsvcs/IFR_Service/ValueBoxDef_i.h index 69992957653..b362299a288 100644 --- a/TAO/orbsvcs/IFR_Service/ValueBoxDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ValueBoxDef_i.h @@ -64,18 +64,38 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual IR::IDLType_ptr original_type_def ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::IDLType_ptr original_type_def_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void original_type_def ( IR::IDLType_ptr original_type_def, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void original_type_def_i ( + IR::IDLType_ptr original_type_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/ValueDef_i.cpp b/TAO/orbsvcs/IFR_Service/ValueDef_i.cpp index 7d7bce4e546..782b4c4fdcb 100644 --- a/TAO/orbsvcs/IFR_Service/ValueDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ValueDef_i.cpp @@ -27,14 +27,32 @@ TAO_ValueDef_i::def_kind (CORBA::Environment &) } void -TAO_ValueDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_ValueDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_ValueDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_ValueDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -42,7 +60,16 @@ TAO_ValueDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) } CORBA::TypeCode_ptr -TAO_ValueDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::type (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_ValueDef_i::type_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -50,7 +77,16 @@ TAO_ValueDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) } IR::InterfaceDefSeq * -TAO_ValueDef_i::supported_interfaces (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::supported_interfaces (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->supported_interfaces_i (ACE_TRY_ENV); +} + +IR::InterfaceDefSeq * +TAO_ValueDef_i::supported_interfaces_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -59,6 +95,19 @@ TAO_ValueDef_i::supported_interfaces (CORBA::Environment & /* ACE_TRY_ENV */) void TAO_ValueDef_i::supported_interfaces ( + const IR::InterfaceDefSeq &supported_interfaces, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->supported_interfaces_i (supported_interfaces, + ACE_TRY_ENV); +} + +void +TAO_ValueDef_i::supported_interfaces_i ( const IR::InterfaceDefSeq & /* supported_interfaces */, CORBA::Environment & /* ACE_TRY_ENV */ ) @@ -68,7 +117,16 @@ TAO_ValueDef_i::supported_interfaces ( } IR::InitializerSeq * -TAO_ValueDef_i::initializers (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::initializers (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->initializers_i (ACE_TRY_ENV); +} + +IR::InitializerSeq * +TAO_ValueDef_i::initializers_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -76,15 +134,35 @@ TAO_ValueDef_i::initializers (CORBA::Environment & /* ACE_TRY_ENV */) } void -TAO_ValueDef_i::initializers (const IR::InitializerSeq & /* initializers */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::initializers (const IR::InitializerSeq &initializers, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->initializers_i (initializers, + ACE_TRY_ENV); +} + +void +TAO_ValueDef_i::initializers_i (const IR::InitializerSeq & /* initializers */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::ValueDef_ptr -TAO_ValueDef_i::base_value (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::base_value (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::ValueDef::_nil ()); + + return this->base_value_i (ACE_TRY_ENV); +} + +IR::ValueDef_ptr +TAO_ValueDef_i::base_value_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -92,15 +170,35 @@ TAO_ValueDef_i::base_value (CORBA::Environment & /* ACE_TRY_ENV */) } void -TAO_ValueDef_i::base_value (IR::ValueDef_ptr /* base_value */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::base_value (IR::ValueDef_ptr base_value, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->base_value_i (base_value, + ACE_TRY_ENV); +} + +void +TAO_ValueDef_i::base_value_i (IR::ValueDef_ptr /* base_value */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::ValueDefSeq * -TAO_ValueDef_i::abstract_base_values (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::abstract_base_values (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->abstract_base_values_i (ACE_TRY_ENV); +} + +IR::ValueDefSeq * +TAO_ValueDef_i::abstract_base_values_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -109,6 +207,19 @@ TAO_ValueDef_i::abstract_base_values (CORBA::Environment & /* ACE_TRY_ENV */) void TAO_ValueDef_i::abstract_base_values ( + const IR::ValueDefSeq &abstract_base_values, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->abstract_base_values_i (abstract_base_values, + ACE_TRY_ENV); +} + +void +TAO_ValueDef_i::abstract_base_values_i ( const IR::ValueDefSeq & /* abstract_base_values */, CORBA::Environment & /* ACE_TRY_ENV */ ) @@ -118,7 +229,16 @@ TAO_ValueDef_i::abstract_base_values ( } CORBA::Boolean -TAO_ValueDef_i::is_abstract (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::is_abstract (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_abstract_i (ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_ValueDef_i::is_abstract_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -126,7 +246,18 @@ TAO_ValueDef_i::is_abstract (CORBA::Environment & /* ACE_TRY_ENV */) } void -TAO_ValueDef_i::is_abstract (CORBA::Boolean /* is_abstract */, +TAO_ValueDef_i::is_abstract (CORBA::Boolean is_abstract, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->is_abstract (is_abstract, + ACE_TRY_ENV); +} + +void +TAO_ValueDef_i::is_abstract_i (CORBA::Boolean /* is_abstract */, CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -134,7 +265,16 @@ TAO_ValueDef_i::is_abstract (CORBA::Boolean /* is_abstract */, } CORBA::Boolean -TAO_ValueDef_i::is_custom (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::is_custom (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_custom_i (ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_ValueDef_i::is_custom_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -142,15 +282,35 @@ TAO_ValueDef_i::is_custom (CORBA::Environment & /* ACE_TRY_ENV */) } void -TAO_ValueDef_i::is_custom (CORBA::Boolean /* is_custom */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::is_custom (CORBA::Boolean is_custom, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->is_custom_i (is_custom, + ACE_TRY_ENV); +} + +void +TAO_ValueDef_i::is_custom_i (CORBA::Boolean /* is_custom */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } CORBA::Boolean -TAO_ValueDef_i::is_truncatable (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::is_truncatable (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_truncatable_i (ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_ValueDef_i::is_truncatable_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -158,16 +318,38 @@ TAO_ValueDef_i::is_truncatable (CORBA::Environment & /* ACE_TRY_ENV */) } void -TAO_ValueDef_i::is_truncatable (CORBA::Boolean /* is_truncatable */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::is_truncatable (CORBA::Boolean is_truncatable, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->is_truncatable_i (is_truncatable, + ACE_TRY_ENV); +} + +void +TAO_ValueDef_i::is_truncatable_i (CORBA::Boolean /* is_truncatable */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } CORBA::Boolean -TAO_ValueDef_i::is_a (const char * /* id */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::is_a (const char *id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_a_i (id, + ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_ValueDef_i::is_a_i (const char * /* id */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -175,12 +357,31 @@ TAO_ValueDef_i::is_a (const char * /* id */, } IR::ValueMemberDef_ptr -TAO_ValueDef_i::create_value_member (const char * /* id */, - const char * /* name */, - const char * /* version */, - IR::IDLType_ptr /* type */, - CORBA::Visibility /* access */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueDef_i::create_value_member (const char *id, + const char *name, + const char *version, + IR::IDLType_ptr type, + CORBA::Visibility access, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::ValueMemberDef::_nil ()); + + return this->create_value_member_i (id, + name, + version, + type, + access, + ACE_TRY_ENV); +} + +IR::ValueMemberDef_ptr +TAO_ValueDef_i::create_value_member_i (const char * /* id */, + const char * /* name */, + const char * /* version */, + IR::IDLType_ptr /* type */, + CORBA::Visibility /* access */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -189,6 +390,31 @@ TAO_ValueDef_i::create_value_member (const char * /* id */, IR::AttributeDef_ptr TAO_ValueDef_i::create_attribute ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr type, + IR::AttributeMode mode, + const IR::ExceptionDefSeq &get_exceptions, + const IR::ExceptionDefSeq &put_exceptions, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::AttributeDef::_nil ()); + + return this->create_attribute_i (id, + name, + version, + type, + mode, + get_exceptions, + put_exceptions, + ACE_TRY_ENV); +} + +IR::AttributeDef_ptr +TAO_ValueDef_i::create_attribute_i ( const char * /* id */, const char * /* name */, const char * /* version */, @@ -206,6 +432,33 @@ TAO_ValueDef_i::create_attribute ( IR::OperationDef_ptr TAO_ValueDef_i::create_operation ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr result, + IR::OperationMode mode, + const IR::ParDescriptionSeq ¶ms, + const IR::ExceptionDefSeq &exceptions, + const IR::ContextIdSeq &contexts, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD_RETURN (IR::OperationDef::_nil ()); + + return this->create_operation_i (id, + name, + version, + result, + mode, + params, + exceptions, + contexts, + ACE_TRY_ENV); +} + +IR::OperationDef_ptr +TAO_ValueDef_i::create_operation_i ( const char * /* id */, const char * /* name */, const char * /* version */, diff --git a/TAO/orbsvcs/IFR_Service/ValueDef_i.h b/TAO/orbsvcs/IFR_Service/ValueDef_i.h index 690393e5fdf..6e1ab46f059 100644 --- a/TAO/orbsvcs/IFR_Service/ValueDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ValueDef_i.h @@ -66,6 +66,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -73,6 +79,13 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -80,12 +93,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From IDLType_i's pure virtual function. + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's pure virtual function. + virtual IR::InterfaceDefSeq *supported_interfaces ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::InterfaceDefSeq *supported_interfaces_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void supported_interfaces ( const IR::InterfaceDefSeq & supported_interfaces, CORBA::Environment &ACE_TRY_ENV = @@ -93,12 +119,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void supported_interfaces_i ( + const IR::InterfaceDefSeq & supported_interfaces, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::InitializerSeq *initializers ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::InitializerSeq *initializers_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void initializers ( const IR::InitializerSeq & initializers, CORBA::Environment &ACE_TRY_ENV = @@ -106,12 +145,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void initializers_i ( + const IR::InitializerSeq & initializers, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ValueDef_ptr base_value ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ValueDef_ptr base_value_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void base_value ( IR::ValueDef_ptr base_value, CORBA::Environment &ACE_TRY_ENV = @@ -119,12 +171,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void base_value_i ( + IR::ValueDef_ptr base_value, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ValueDefSeq *abstract_base_values ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ValueDefSeq *abstract_base_values_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void abstract_base_values ( const IR::ValueDefSeq & abstract_base_values, CORBA::Environment &ACE_TRY_ENV = @@ -132,12 +197,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void abstract_base_values_i ( + const IR::ValueDefSeq & abstract_base_values, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_abstract ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_abstract_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void is_abstract ( CORBA::Boolean is_abstract, CORBA::Environment &ACE_TRY_ENV = @@ -145,12 +223,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void is_abstract_i ( + CORBA::Boolean is_abstract, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_custom ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_custom_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void is_custom ( CORBA::Boolean is_custom, CORBA::Environment &ACE_TRY_ENV = @@ -158,12 +249,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void is_custom_i ( + CORBA::Boolean is_custom, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_truncatable ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_truncatable_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void is_truncatable ( CORBA::Boolean is_truncatable, CORBA::Environment &ACE_TRY_ENV = @@ -171,6 +275,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void is_truncatable_i ( + CORBA::Boolean is_truncatable, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Boolean is_a ( const char *id, CORBA::Environment &ACE_TRY_ENV = @@ -178,6 +289,13 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Boolean is_a_i ( + const char *id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::ValueMemberDef_ptr create_value_member ( const char *id, const char *name, @@ -189,6 +307,17 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::ValueMemberDef_ptr create_value_member_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr type, + CORBA::Visibility access, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::AttributeDef_ptr create_attribute ( const char *id, const char *name, @@ -202,6 +331,19 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::AttributeDef_ptr create_attribute_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr type, + IR::AttributeMode mode, + const IR::ExceptionDefSeq &get_exceptions, + const IR::ExceptionDefSeq &put_exceptions, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::OperationDef_ptr create_operation ( const char *id, const char *name, @@ -215,6 +357,20 @@ public: TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + IR::OperationDef_ptr create_operation_i ( + const char *id, + const char *name, + const char *version, + IR::IDLType_ptr result, + IR::OperationMode mode, + const IR::ParDescriptionSeq ¶ms, + const IR::ExceptionDefSeq &exceptions, + const IR::ContextIdSeq &contexts, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/ValueMemberDef_i.cpp b/TAO/orbsvcs/IFR_Service/ValueMemberDef_i.cpp index 73b0d31317b..e79bd7a8f3f 100644 --- a/TAO/orbsvcs/IFR_Service/ValueMemberDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ValueMemberDef_i.cpp @@ -27,14 +27,32 @@ TAO_ValueMemberDef_i::def_kind (CORBA::Environment &) } void -TAO_ValueMemberDef_i::destroy (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueMemberDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_ValueMemberDef_i::destroy_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } IR::Contained::Description * -TAO_ValueMemberDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueMemberDef_i::describe (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->describe_i (ACE_TRY_ENV); +} + +IR::Contained::Description * +TAO_ValueMemberDef_i::describe_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -42,7 +60,16 @@ TAO_ValueMemberDef_i::describe (CORBA::Environment & /* ACE_TRY_ENV */) } CORBA::TypeCode_ptr -TAO_ValueMemberDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueMemberDef_i::type (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_ValueMemberDef_i::type_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -50,7 +77,16 @@ TAO_ValueMemberDef_i::type (CORBA::Environment & /* ACE_TRY_ENV */) } IR::IDLType_ptr -TAO_ValueMemberDef_i::type_def (CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueMemberDef_i::type_def (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (IR::IDLType::_nil ()); + + return this->type_def_i (ACE_TRY_ENV); +} + +IR::IDLType_ptr +TAO_ValueMemberDef_i::type_def_i (CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -58,15 +94,35 @@ TAO_ValueMemberDef_i::type_def (CORBA::Environment & /* ACE_TRY_ENV */) } void -TAO_ValueMemberDef_i::type_def (IR::IDLType_ptr /* type_def */, - CORBA::Environment & /* ACE_TRY_ENV */) +TAO_ValueMemberDef_i::type_def (IR::IDLType_ptr type_def, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->type_def_i (type_def, + ACE_TRY_ENV); +} + +void +TAO_ValueMemberDef_i::type_def_i (IR::IDLType_ptr /* type_def */, + CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO } CORBA::Visibility -TAO_ValueMemberDef_i::access (CORBA::Environment & /* ACE_TRY_ENV */ ) +TAO_ValueMemberDef_i::access (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->access_i (ACE_TRY_ENV); +} + +CORBA::Visibility +TAO_ValueMemberDef_i::access_i (CORBA::Environment & /* ACE_TRY_ENV */ ) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO @@ -74,8 +130,19 @@ TAO_ValueMemberDef_i::access (CORBA::Environment & /* ACE_TRY_ENV */ ) } void -TAO_ValueMemberDef_i::access (CORBA::Visibility /* access */, - CORBA::Environment & /* ACE_TRY_ENV */ ) +TAO_ValueMemberDef_i::access (CORBA::Visibility access, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->access (access, + ACE_TRY_ENV); +} + +void +TAO_ValueMemberDef_i::access_i (CORBA::Visibility /* access */, + CORBA::Environment & /* ACE_TRY_ENV */ ) ACE_THROW_SPEC ((CORBA::SystemException)) { // TODO diff --git a/TAO/orbsvcs/IFR_Service/ValueMemberDef_i.h b/TAO/orbsvcs/IFR_Service/ValueMemberDef_i.h index d1c09dc51e8..71de6aba5f4 100644 --- a/TAO/orbsvcs/IFR_Service/ValueMemberDef_i.h +++ b/TAO/orbsvcs/IFR_Service/ValueMemberDef_i.h @@ -63,6 +63,12 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::Contained::Description *describe ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -70,18 +76,37 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // From Contained_i's pure virtual function. + virtual IR::Contained::Description *describe_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From Contained_i's pure virtual function. + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IR::IDLType_ptr type_def ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + IR::IDLType_ptr type_def_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void type_def ( IR::IDLType_ptr type_def, CORBA::Environment &ACE_TRY_ENV = @@ -89,18 +114,38 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + void type_def_i ( + IR::IDLType_ptr type_def, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Visibility access ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::Visibility access_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void access ( CORBA::Visibility access, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void access_i ( + CORBA::Visibility access, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/WstringDef_i.cpp b/TAO/orbsvcs/IFR_Service/WstringDef_i.cpp index 1ddcfe0ef3c..52894b72631 100644 --- a/TAO/orbsvcs/IFR_Service/WstringDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/WstringDef_i.cpp @@ -27,7 +27,16 @@ TAO_WstringDef_i::def_kind (CORBA::Environment &) } void -TAO_WstringDef_i::destroy (CORBA::Environment &) +TAO_WstringDef_i::destroy (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->destroy_i (ACE_TRY_ENV); +} + +void +TAO_WstringDef_i::destroy_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_TString name; @@ -44,15 +53,33 @@ CORBA::TypeCode_ptr TAO_WstringDef_i::type (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - CORBA::ULong bound = this->bound (ACE_TRY_ENV); + TAO_IFR_READ_GUARD_RETURN (CORBA::TypeCode::_nil ()); + + return this->type_i (ACE_TRY_ENV); +} + +CORBA::TypeCode_ptr +TAO_WstringDef_i::type_i (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + CORBA::ULong bound = this->bound_i (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); return this->repo_->tc_factory ()->create_wstring_tc (bound, ACE_TRY_ENV); } +CORBA::ULong +TAO_WstringDef_i::bound (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->bound_i (ACE_TRY_ENV); +} + CORBA::ULong -TAO_WstringDef_i::bound (CORBA::Environment &) +TAO_WstringDef_i::bound_i (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { u_int retval = 0; @@ -65,7 +92,18 @@ TAO_WstringDef_i::bound (CORBA::Environment &) void TAO_WstringDef_i::bound (CORBA::ULong bound, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_WRITE_GUARD; + + this->bound_i (bound, + ACE_TRY_ENV); +} + +void +TAO_WstringDef_i::bound_i (CORBA::ULong bound, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->repo_->config ()->set_integer_value (this->section_key_, diff --git a/TAO/orbsvcs/IFR_Service/WstringDef_i.h b/TAO/orbsvcs/IFR_Service/WstringDef_i.h index 6dd777ee0d7..0625253b405 100644 --- a/TAO/orbsvcs/IFR_Service/WstringDef_i.h +++ b/TAO/orbsvcs/IFR_Service/WstringDef_i.h @@ -64,11 +64,25 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // Remove the repository entry. + virtual void destroy_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's virtual function. + + virtual CORBA::TypeCode_ptr type_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + // From IDLType_i's virtual function. virtual CORBA::ULong bound ( CORBA::Environment &ACE_TRY_ENV = @@ -76,12 +90,25 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); + CORBA::ULong bound_i ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void bound ( CORBA::ULong bound, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); + + void bound_i ( + CORBA::ULong bound, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) |