From 0fca04560d10192ee88e8e4464cc5dab4bd595bf Mon Sep 17 00:00:00 2001 From: nanbor Date: Mon, 24 Apr 2000 19:46:23 +0000 Subject: ChangLogTag:Mon Apr 24 14:41:38 2000 Nanbor Wang --- TAO/ChangeLogs/ChangeLog-02a | 19 +++++++++++++++++++ TAO/tao/LocalObject.cpp | 2 +- TAO/tao/LocalObject.h | 2 +- TAO/tao/Makefile | 4 ++-- TAO/tao/Makefile.am | 24 +++++++++++------------- TAO/tao/Makefile.bor | 1 - TAO/tao/Object.h | 1 + TAO/tao/Object.i | 28 ++++++++++++++-------------- TAO/tests/Interceptors/client.cpp | 2 +- TAO/tests/Interceptors/interceptors.cpp | 20 ++++++++++++++------ TAO/tests/Interceptors/interceptors.h | 25 +++++++++++++++++-------- TAO/tests/Interceptors/server.cpp | 7 ++++--- 12 files changed, 85 insertions(+), 50 deletions(-) diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 2df991c5e87..54b7e25ffa3 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -6,6 +6,25 @@ * Rename TAO/TAO_IDL/util/utl_error.cpp to utl_err.cpp. +Mon Apr 24 14:41:38 2000 Nanbor Wang + + * TAO/tao/LocalObject.cpp: + * TAO/tao/LocalObject.h: Fixed _is_equivalent's signature. + + * TAO/tao/Makefile: + * TAO/tao/Makefile.am: + * TAO/tao/Makefile.bor: Added LocalObject. + + * TAO/tao/Object.h: + * TAO/tao/Object.i: Fixed some inlining problems on old gcc. + + * TAO/tests/Interceptors/client.cpp: + * TAO/tests/Interceptors/server.cpp: + * TAO/tests/Interceptors/interceptors.cpp: + * TAO/tests/Interceptors/interceptors.h: Fixed gcc specific + problems (like not able to use a var in place of ptr.) + + Mon Apr 24 03:40:36 2000 Nanbor Wang Unfinished changelog entry. diff --git a/TAO/tao/LocalObject.cpp b/TAO/tao/LocalObject.cpp index c5f585280e0..351e2ac11cb 100644 --- a/TAO/tao/LocalObject.cpp +++ b/TAO/tao/LocalObject.cpp @@ -72,7 +72,7 @@ CORBA::LocalObject::_hash (CORBA::ULong maximum, // such as strcmp(), to allow more comparison algorithms. CORBA::Boolean -CORBA::LocalObject::_is_equivalent (CORBA::LocalObject_ptr other_obj, +CORBA::LocalObject::_is_equivalent (CORBA::Object_ptr other_obj, CORBA::Environment &) ACE_THROW_SPEC (()) { diff --git a/TAO/tao/LocalObject.h b/TAO/tao/LocalObject.h index ed56de481af..58e6eb29455 100644 --- a/TAO/tao/LocalObject.h +++ b/TAO/tao/LocalObject.h @@ -162,7 +162,7 @@ public: // different ORB protocols are in use) there is no default // implementation. - virtual CORBA::Boolean _is_equivalent (CORBA::LocalObject_ptr other_obj, + virtual CORBA::Boolean _is_equivalent (CORBA::Object_ptr other_obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC (()); diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile index d12e5fb98d8..882edee7260 100644 --- a/TAO/tao/Makefile +++ b/TAO/tao/Makefile @@ -93,7 +93,7 @@ PLUGGABLE_PROTOCOLS_FILES = \ SHMIOP_Connect \ IORC \ IORS \ - IORManipulation + IORManipulation PLUGGABLE_MESSAGING_FILES = \ Pluggable_Messaging \ @@ -135,6 +135,7 @@ ORB_CORE_FILES = \ WrongTransactionC \ Environment \ Object \ + LocalObject \ ObjectIDList \ ORB \ corbafwd \ @@ -160,7 +161,6 @@ ORB_CORE_FILES = \ Invocation \ operation_details \ Interceptor \ - InterceptorS \ InterceptorC \ Asynch_Invocation \ ORB_Core \ diff --git a/TAO/tao/Makefile.am b/TAO/tao/Makefile.am index 4070f138646..5ad6549b831 100644 --- a/TAO/tao/Makefile.am +++ b/TAO/tao/Makefile.am @@ -102,7 +102,6 @@ ORB_CORE_FILES = \ GIOP_Server_Request.cpp \ Invocation.cpp \ Interceptor.cpp \ - InterceptorS.cpp \ InterceptorC.cpp \ Asynch_Invocation.cpp \ ORB_Core.cpp \ @@ -175,32 +174,32 @@ libTAO_la_SOURCES = \ ## ## This flag accepts an argument of the form `current[:revision[:age]]'. So, ## passing `-version-info 3:12:1' sets current to 3, revision to 12, and age -## to 1. +## to 1. ## If either revision or age are omitted, they default to 0. Also note that -## age must be less than or equal to the current interface number. +## age must be less than or equal to the current interface number. ## ## Here are a set of rules to help you update your library version -## information: +## information: ## -## 1.Start with version information of `0:0:0' for each libtool library. +## 1.Start with version information of `0:0:0' for each libtool library. ## 2.Update the version information only immediately before a public ## release of your software. More frequent updates are unnecessary, and -## only guarantee that the current interface number gets larger faster. +## only guarantee that the current interface number gets larger faster. ## 3.If the library source code has changed at all since the last update, -## then increment revision (`c:r:a' becomes `c:r+1:a'). +## then increment revision (`c:r:a' becomes `c:r+1:a'). ## 4.If any interfaces have been added, removed, or changed since the last -## update, increment current, and set revision to 0. +## update, increment current, and set revision to 0. ## 5.If any interfaces have been added since the last public release, then -## increment age. +## increment age. ## 6.If any interfaces have been removed since the last public release, -## then set age to 0. +## then set age to 0. ## ## Never try to set the interface numbers so that they correspond to the ## release number of your package. This is an abuse that only fosters ## misunderstanding of the purpose of library versions. Instead, use the ## `-release' flag (see section 6.4 Managing release information), but be ## warned that every release of your package will not be binary compatibility -## with any other release. +## with any other release. ## The below "-version-info" isn't being used the way libtool intends ## it to be used but we do it that way to make the version numbers @@ -225,7 +224,7 @@ TEMPLATE_FILES = \ TimeBaseS_T.cpp \ varout.cpp else -TEMPLATE_FILES = +TEMPLATE_FILES = endif IDL_HEADERS = \ @@ -503,4 +502,3 @@ EXTRA_DIST = \ clean-local: -rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core -rm -rf ptrepository Templates.DB gcctemp.c gcctemp so_locations - diff --git a/TAO/tao/Makefile.bor b/TAO/tao/Makefile.bor index 3789e0f6904..0cdf8466ebd 100644 --- a/TAO/tao/Makefile.bor +++ b/TAO/tao/Makefile.bor @@ -57,7 +57,6 @@ OBJFILES = \ $(OBJDIR)\InconsistentTypeCodeC.obj \ $(OBJDIR)\Interceptor.obj \ $(OBJDIR)\InterceptorC.obj \ - $(OBJDIR)\InterceptorS.obj \ $(OBJDIR)\InterfaceC.obj \ $(OBJDIR)\InterfaceS.obj \ $(OBJDIR)\Invocation.obj \ diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h index 7127afe473e..e93a8aff3ac 100644 --- a/TAO/tao/Object.h +++ b/TAO/tao/Object.h @@ -47,6 +47,7 @@ public: static CORBA_Object_ptr _nil (void); // return a NUL object + ACE_INLINE_FOR_GNUC static CORBA_Object_ptr _narrow (CORBA_Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); diff --git a/TAO/tao/Object.i b/TAO/tao/Object.i index 5d306195da3..dd1f0351da5 100644 --- a/TAO/tao/Object.i +++ b/TAO/tao/Object.i @@ -3,7 +3,7 @@ // **************************************************************** ACE_INLINE -CORBA::Object::Object (int) +CORBA_Object::CORBA_Object (int) : servant_ (0), is_collocated_ (0), is_local_ (1), @@ -42,6 +42,12 @@ CORBA_Object::_duplicate (CORBA_Object_ptr obj) return obj; } +ACE_INLINE CORBA::Boolean +CORBA::is_nil (CORBA::Object_ptr obj) +{ + return obj == 0; +} + // Null pointers represent nil objects. ACE_INLINE CORBA_Object_ptr @@ -50,12 +56,6 @@ CORBA_Object::_nil (void) return 0; } -ACE_INLINE CORBA_Object_ptr -CORBA_Object::_narrow (CORBA_Object_ptr obj, CORBA::Environment&ACE_TRY_ENV) -{ - return CORBA::Object::_unchecked_narrow (obj, ACE_TRY_ENV); -} - ACE_INLINE CORBA_Object_ptr CORBA_Object::_unchecked_narrow (CORBA_Object_ptr obj, CORBA::Environment&) { @@ -69,7 +69,13 @@ CORBA_Object::_unchecked_narrow (CORBA_Object_ptr obj, CORBA::Environment&) (ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow))); else - return CORBA_Object::_duplicate (obj); + return CORBA::Object::_duplicate (obj); +} + +ACE_INLINE CORBA_Object_ptr +CORBA_Object::_narrow (CORBA_Object_ptr obj, CORBA::Environment&ACE_TRY_ENV) +{ + return CORBA_Object::_unchecked_narrow (obj, ACE_TRY_ENV); } ACE_INLINE TAO_Stub * @@ -82,12 +88,6 @@ CORBA_Object::_stubobj (void) const // ************************************************************ // These are in CORBA namespace -ACE_INLINE CORBA::Boolean -CORBA::is_nil (CORBA::Object_ptr obj) -{ - return obj == 0; -} - ACE_INLINE void CORBA::release (CORBA_Object_ptr obj) { diff --git a/TAO/tests/Interceptors/client.cpp b/TAO/tests/Interceptors/client.cpp index b518172e587..104a819c1b9 100644 --- a/TAO/tests/Interceptors/client.cpp +++ b/TAO/tests/Interceptors/client.cpp @@ -80,7 +80,7 @@ main (int argc, char *argv[]) // Installing the Echo interceptor ACE_NEW_RETURN (interceptor, - Echo_Client_Request_Interceptor (orb), + Echo_Client_Request_Interceptor (orb.in ()), -1); orb->_register_client_interceptor (interceptor); diff --git a/TAO/tests/Interceptors/interceptors.cpp b/TAO/tests/Interceptors/interceptors.cpp index c2c525c418b..5409d28346f 100644 --- a/TAO/tests/Interceptors/interceptors.cpp +++ b/TAO/tests/Interceptors/interceptors.cpp @@ -35,6 +35,7 @@ Echo_Client_Request_Interceptor::_remove_ref (void) char * Echo_Client_Request_Interceptor::name (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { return CORBA::string_dup (this->myname_); } @@ -48,6 +49,7 @@ Echo_Client_Request_Interceptor::preinvoke (CORBA::ULong rid, CORBA::NVList_ptr &, PortableInterceptor::Cookies &, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::String_var ior = this->orb_->object_to_string (objref, ACE_TRY_ENV); @@ -57,7 +59,7 @@ Echo_Client_Request_Interceptor::preinvoke (CORBA::ULong rid, "Echo_Client_Request_Interceptor::preinvoke from \"%s\" request_id: %d on object: %s\n", op, rid, - ior)); + ior.in ())); CORBA::ULong length = sc.length (); sc.length (length + 1); @@ -82,6 +84,7 @@ Echo_Client_Request_Interceptor::postinvoke (CORBA::ULong rid, CORBA::NVList_ptr &, PortableInterceptor::Cookies &, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::String_var ior = this->orb_->object_to_string (objref, ACE_TRY_ENV); @@ -91,7 +94,7 @@ Echo_Client_Request_Interceptor::postinvoke (CORBA::ULong rid, "Echo_Client_Request_Interceptor::postinvoke from \"%s\" request_id: %d on object: %s\n", op, rid, - ior)); + ior.in ())); for (CORBA::ULong size = 0; size < sc.length (); ++size) if (sc[size].context_id == reply_ctx_id) @@ -110,6 +113,7 @@ Echo_Client_Request_Interceptor::exception_occurred (CORBA::ULong rid, const char * op, PortableInterceptor::Cookies &, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::String_var ior = this->orb_->object_to_string (objref, ACE_TRY_ENV); @@ -119,7 +123,7 @@ Echo_Client_Request_Interceptor::exception_occurred (CORBA::ULong rid, "Echo_Client_Request_Interceptor::exception_occurred from \"%s\" request_id: %d on object: %s\n", op, rid, - ior)); + ior.in ())); } Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (CORBA::ORB_ptr orb) @@ -148,6 +152,7 @@ Echo_Server_Request_Interceptor::_remove_ref (void) char * Echo_Server_Request_Interceptor::name (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { return CORBA::string_dup (this->myname_); } @@ -161,6 +166,7 @@ Echo_Server_Request_Interceptor::preinvoke (CORBA::ULong rid, CORBA::NVList_ptr &, PortableInterceptor::Cookies &, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::String_var ior = this->orb_->object_to_string (objref, ACE_TRY_ENV); @@ -170,7 +176,7 @@ Echo_Server_Request_Interceptor::preinvoke (CORBA::ULong rid, "Echo_Server_Request_Interceptor::preinvoke from \"%s\" request_id: %d on object: %s\n", op, rid, - ior)); + ior.in ())); for (CORBA::ULong size = 0; size < sc.length (); ++size) if (sc[size].context_id == request_ctx_id) @@ -191,6 +197,7 @@ Echo_Server_Request_Interceptor::postinvoke (CORBA::ULong rid, CORBA::NVList_ptr &, PortableInterceptor::Cookies &, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::String_var ior = this->orb_->object_to_string (objref, ACE_TRY_ENV); @@ -200,7 +207,7 @@ Echo_Server_Request_Interceptor::postinvoke (CORBA::ULong rid, "Echo_Server_Request_Interceptor::postinvoke from \"%s\" request_id: %d on object: %s\n", op, rid, - ior)); + ior.in ())); CORBA::ULong length = sc.length (); sc.length (length + 1); @@ -223,6 +230,7 @@ Echo_Server_Request_Interceptor::exception_occurred (CORBA::ULong rid, const char * op, PortableInterceptor::Cookies &, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::String_var ior = this->orb_->object_to_string (objref, ACE_TRY_ENV); @@ -232,5 +240,5 @@ Echo_Server_Request_Interceptor::exception_occurred (CORBA::ULong rid, "Echo_Server_Request_Interceptor::exception_occurred from \"%s\" request_id: %d on object: %s\n", op, rid, - ior)); + ior.in ())); } diff --git a/TAO/tests/Interceptors/interceptors.h b/TAO/tests/Interceptors/interceptors.h index c7f0b4f7700..daefbdea18c 100644 --- a/TAO/tests/Interceptors/interceptors.h +++ b/TAO/tests/Interceptors/interceptors.h @@ -26,7 +26,9 @@ public: virtual void _remove_ref (void); // Decrement the reference count. - virtual char * name (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + virtual char * name (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); + // Canonical name of the interceptor. virtual void preinvoke (CORBA::ULong request_id, @@ -36,7 +38,8 @@ public: IOP::ServiceContextList & sc, CORBA::NVList_ptr &args, PortableInterceptor::Cookies & ck, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual void postinvoke (CORBA::ULong request_id, CORBA::Boolean response_expected, @@ -45,14 +48,16 @@ public: IOP::ServiceContextList & sc, CORBA::NVList_ptr &args, PortableInterceptor::Cookies & ck, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual void exception_occurred (CORBA::ULong request_id, CORBA::Boolean response_expected, CORBA::Object_ptr objref, const char * operation_name, PortableInterceptor::Cookies & ck, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); private: const char *myname_; @@ -77,7 +82,8 @@ public: virtual void _remove_ref (void); // Decrement the reference count. - virtual char * name (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + virtual char * name (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); // Canonical name of the interceptor. virtual void preinvoke (CORBA::ULong request_id, @@ -87,7 +93,8 @@ public: IOP::ServiceContextList & sc, CORBA::NVList_ptr &args, PortableInterceptor::Cookies & ck, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual void postinvoke (CORBA::ULong request_id, CORBA::Boolean response_expected, @@ -96,14 +103,16 @@ public: IOP::ServiceContextList & sc, CORBA::NVList_ptr &args, PortableInterceptor::Cookies & ck, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual void exception_occurred (CORBA::ULong request_id, CORBA::Boolean response_expected, CORBA::Object_ptr objref, const char * operation_name, PortableInterceptor::Cookies & ck, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); private: const char *myname_; diff --git a/TAO/tests/Interceptors/server.cpp b/TAO/tests/Interceptors/server.cpp index 2aa7967453e..cd68c29f0de 100644 --- a/TAO/tests/Interceptors/server.cpp +++ b/TAO/tests/Interceptors/server.cpp @@ -46,7 +46,7 @@ main (int argc, char *argv[]) // Installing the Echo interceptor ACE_NEW_RETURN (interceptor, - Echo_Server_Request_Interceptor (orb), + Echo_Server_Request_Interceptor (orb.in ()), -1); orb->_register_server_interceptor (interceptor); @@ -77,11 +77,12 @@ main (int argc, char *argv[]) CORBA::Object_var test_obj = root_poa->id_to_reference (id.in (), - ACE_TRY_ENV); + ACE_TRY_ENV); ACE_CHECK_RETURN (0); Test_Interceptors::Visual_var server = - Test_Interceptors::Visual::_narrow (test_obj, ACE_TRY_ENV); + Test_Interceptors::Visual::_narrow (test_obj.in (), + ACE_TRY_ENV); ACE_TRY_CHECK; CORBA::String_var ior = -- cgit v1.2.1