diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-18 21:14:10 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-18 21:14:10 +0000 |
commit | 07474df31d6bd323652b72c2bc116d1894444c47 (patch) | |
tree | 4a2d5a8687bfbdda6b22f63d9c6e213658ae6aec | |
parent | b1d5f9a3a19226e1fd5207201fda2bc3d5e80dc3 (diff) | |
download | ATCD-07474df31d6bd323652b72c2bc116d1894444c47.tar.gz |
ChangeLogTag:Tue Apr 18 16:06:11 2000 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 50 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_si.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/LocalObject.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/LocalObject.h | 2 | ||||
-rw-r--r-- | TAO/tao/Object.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/Object.h | 10 | ||||
-rw-r--r-- | TAO/tao/Object.i | 9 | ||||
-rw-r--r-- | TAO/tao/POA_CORBA.h | 34 |
12 files changed, 99 insertions, 42 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 28f3c25ae24..61f43d2bcd7 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,44 @@ + + TO-DO + + * Modify code generation for local interface. Abstract + interface will come later. + + * Need to add syntax/semantic check for local/abstract interfaces + as defined in CCM. (E.g., a local object can not be the + argument of a remote operation.) + + * Remove gen_locality_constraint stuff. + +Tue Apr 18 16:06:11 2000 Nanbor Wang <nanbor@cs.wustl.edu> + + * TAO_IDL/be/be_visitor_interface/interface_ch.cpp: + * TAO_IDL/be/be_visitor_interface/interface_cs.cpp: The idl + compiler must generate <_remote_interface_repository_id> for + remote client stubs now. + + * TAO_IDL/be/be_visitor_interface/interface_sh.cpp: + * TAO_IDL/be/be_visitor_interface/interface_si.cpp: + * TAO_IDL/be/be_visitor_interface/interface_ss.cpp: Do not + generate skeletons for local interfaces. + + * tao/Object.h: + * tao/Object.i: + * tao/Object.cpp: Changed the method <_interface_repository_id> as + inlined, non-virtual function and invoke either + <_remote_interface_repository_id> or + <_local_interface_repository_id> depending on whether the + interface is remote or local. Added the two aforementioned new + virtual functions. + + * tao/LocalObject.h: + * tao/LocalObject.cpp: Rename <_interface_repository_id> to + <_local_interface_repository_id>. + + * tao/POA_CORBA.h: Oops, revert my previous change on + <_interface_repository_id>. This file declares skeletons, which + still use <_interface_repository_id>. + Tue Apr 18 14:32:08 2000 Nanbor Wang <nanbor@cs.wustl.edu> * tao/CurrentC.cpp: @@ -19,6 +60,7 @@ Tue Apr 18 14:32:08 2000 Nanbor Wang <nanbor@cs.wustl.edu> * tao/POAC.cpp: * tao/POAC.h: * tao/POA_CORBA.h: + * tao/PolicyC.h: * tao/PolicyC.cpp: * tao/PollableC.cpp: * tao/PollableC.h: @@ -28,7 +70,6 @@ Tue Apr 18 14:32:08 2000 Nanbor Wang <nanbor@cs.wustl.edu> * tao/TAOC.h: Renamed method <_interface_repository_id> to <_remote_interface_repository_id>. - Tue Apr 18 03:17:37 2000 Nanbor Wang <nanbor@cs.wustl.edu> * tao/corba.h: Included "tao/LocalObject" in this file. @@ -97,13 +138,6 @@ Mon Apr 17 20:48:42 2000 Nanbor Wang <nanbor@cs.wustl.edu> regular interface depend on the type of interfaces we are generating. - TO-DO: Modify code generation for local interface. Abstract - interface will come later. - - Need to add syntax/semantic check for local/abstract interfaces - as defined in CCM. (E.g., a local object can not be the - argument of a remote operation.) - Mon Apr 17 13:18:29 2000 Nanbor Wang <nanbor@cs.wustl.edu> * TAO_IDL/fe/idl.ll: diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp index a648adc1685..6603211020a 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp @@ -203,7 +203,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node) << be_uidt << be_uidt_nl << ");" << be_uidt_nl << "virtual const char* " - << "_interface_repository_id (void) const;\n" << be_uidt_nl; + << "_remote_interface_repository_id (void) const;\n" << be_uidt_nl; // generate the "protected" constructor so that users cannot instantiate // us diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index 7fa091f29d8..b525f00f080 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -215,7 +215,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) os->indent (); *os << "const char* " << node->full_name () - << "::_interface_repository_id (void) const" + << "::_remote_interface_repository_id (void) const" << be_nl << "{" << be_idt_nl << "return \"" << node->repoID () << "\";" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp index 70d1a36739e..b9f8b987436 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp @@ -18,9 +18,9 @@ // // ============================================================================ -#include "idl.h" -#include "idl_extern.h" -#include "be.h" +#include "idl.h" +#include "idl_extern.h" +#include "be.h" #include "be_visitor_interface.h" @@ -47,7 +47,7 @@ be_visitor_interface_sh::visit_interface (be_interface *node) long i; // loop index static char namebuf [NAMEBUFSIZE]; // holds the class name - if (node->srv_hdr_gen () || node->imported ()) + if (node->srv_hdr_gen () || node->imported () || node->is_local_interface ()) return 0; ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE); @@ -242,7 +242,7 @@ be_visitor_interface_sh::visit_interface (be_interface *node) } // No need to generate TIE class for locality constraint interface. - if (!idl_global->gen_locality_constraint () + if (!idl_global->gen_locality_constraint () && idl_global->gen_tie_classes ()) { // generate the TIE class. diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_si.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_si.cpp index bc5e6ca4e3a..5239de4324a 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_si.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_si.cpp @@ -18,9 +18,9 @@ // // ============================================================================ -#include "idl.h" -#include "idl_extern.h" -#include "be.h" +#include "idl.h" +#include "idl_extern.h" +#include "be.h" #include "be_visitor_interface.h" @@ -45,7 +45,7 @@ be_visitor_interface_si::visit_interface (be_interface *node) { TAO_OutStream *os; // output stream - if (node->srv_inline_gen () || node->imported ()) + if (node->srv_inline_gen () || node->imported () || node->is_local_interface ()) return 0; os = this->ctx_->stream (); diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp index 2b0cefcb380..bfce196bc75 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -45,7 +45,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node) { TAO_OutStream *os; // output stream - if (node->srv_skel_gen () || node->imported ()) + if (node->srv_skel_gen () || node->imported () || node->is_local_interface ()) return 0; os = this->ctx_->stream (); diff --git a/TAO/tao/LocalObject.cpp b/TAO/tao/LocalObject.cpp index 7bff5692b06..7027f17039a 100644 --- a/TAO/tao/LocalObject.cpp +++ b/TAO/tao/LocalObject.cpp @@ -49,13 +49,13 @@ CORBA::LocalObject::_remove_ref (void) CORBA::Boolean CORBA::LocalObject::_is_a (const CORBA::Char *type_id, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) { ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); } const char* -CORBA::LocalObject::_interface_repository_id (void) const +CORBA::LocalObject::_local_interface_repository_id (void) const { return "IDL:omg.org/CORBA/LocalObject:1.0"; } diff --git a/TAO/tao/LocalObject.h b/TAO/tao/LocalObject.h index d8445f7d421..d3aec9e2a32 100644 --- a/TAO/tao/LocalObject.h +++ b/TAO/tao/LocalObject.h @@ -180,7 +180,7 @@ public: // = TAO extensions - virtual const char* _interface_repository_id (void) const; + virtual const char* _local_interface_repository_id (void) const; // The repository ID for the most derived class, this is an // implementation method and does no remote invocations! diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index e4762c8b01c..4dd4d82cf0b 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -180,11 +180,17 @@ CORBA_Object::_is_a (const CORBA::Char *type_id, } const char* -CORBA_Object::_interface_repository_id (void) const +CORBA_Object::_remote_interface_repository_id (void) const { return "IDL:omg.org/CORBA/Object:1.0"; } +const char* +CORBA_Object::_local_interface_repository_id (void) const +{ + return 0; +} + TAO_ServantBase * CORBA_Object::_servant (void) const { diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h index 7127afe473e..57be2c044a9 100644 --- a/TAO/tao/Object.h +++ b/TAO/tao/Object.h @@ -69,7 +69,15 @@ public: TAO_default_environment ()); // determine if we are of the type specified by the "logical_type_id" - virtual const char* _interface_repository_id (void) const; + const char* _interface_repository_id (void) const; + // The repository ID for the most derived class, this is an + // implementation method and does no remote invocations! + + virtual const char* _remote_interface_repository_id (void) const; + // The repository ID for the most derived class, this is an + // implementation method and does no remote invocations! + + virtual const char* _local_interface_repository_id (void) const; // The repository ID for the most derived class, this is an // implementation method and does no remote invocations! diff --git a/TAO/tao/Object.i b/TAO/tao/Object.i index 892002837cf..4f2add0ee60 100644 --- a/TAO/tao/Object.i +++ b/TAO/tao/Object.i @@ -82,6 +82,15 @@ CORBA_Object::_stubobj (void) const return this->protocol_proxy_; } +ACE_INLINE const char* +CORBA_Object::_interface_repository_id (void) const +{ + return (this->is_local_ ? + this->_local_interface_repository_id () : + this->_remote_interface_repository_id ()); +} + + // ************************************************************ // These are in CORBA namespace diff --git a/TAO/tao/POA_CORBA.h b/TAO/tao/POA_CORBA.h index 8893e1c3e1c..deab567d0b3 100644 --- a/TAO/tao/POA_CORBA.h +++ b/TAO/tao/POA_CORBA.h @@ -76,7 +76,7 @@ public: ); ACE_CORBA_1(Current) *_this (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 typedef Current_ptr _ptr_type; @@ -190,7 +190,7 @@ public: CORBA_Policy_ptr _this ( CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 typedef Policy_ptr _ptr_type; @@ -259,7 +259,7 @@ public: CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; }; class TAO_Export _tao_collocated_PolicyManager : public virtual CORBA::PolicyManager @@ -319,7 +319,7 @@ public: CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; }; class TAO_Export _tao_collocated_PolicyCurrent : public virtual CORBA::PolicyCurrent, @@ -394,7 +394,7 @@ public: TAO_default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; virtual CORBA::Policy_ptr get_domain_policy ( CORBA::PolicyType policy_type, CORBA::Environment &ACE_TRY_ENV = @@ -501,7 +501,7 @@ public: CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; }; class TAO_Export _tao_collocated_Pollable : public virtual CORBA::Pollable @@ -595,7 +595,7 @@ public: CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; }; class TAO_Export _tao_collocated_DIIPollable : public virtual CORBA::DIIPollable, @@ -726,7 +726,7 @@ public: CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; }; class TAO_Export _tao_collocated_PollableSet : public virtual CORBA::PollableSet @@ -1026,7 +1026,7 @@ public: CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 typedef DynAny_ptr _ptr_type; @@ -1284,7 +1284,7 @@ public: CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 typedef DynEnum_ptr _ptr_type; @@ -1373,7 +1373,7 @@ public: CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 typedef DynStruct_ptr _ptr_type; @@ -1482,7 +1482,7 @@ public: CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 typedef DynUnion_ptr _ptr_type; @@ -1596,7 +1596,7 @@ public: CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 typedef DynSequence_ptr _ptr_type; @@ -1675,7 +1675,7 @@ public: CORBA::Environment::default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 typedef DynArray_ptr _ptr_type; @@ -1764,7 +1764,7 @@ public: TAO_default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; virtual void make_domain_manager ( CORBA::InterfaceDef_ptr object_type, CORBA::Boolean constr_policy, @@ -1861,7 +1861,7 @@ public: TAO_default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; virtual IR::DefinitionKind def_kind ( CORBA::Environment &ACE_TRY_ENV = @@ -1978,7 +1978,7 @@ public: TAO_default_environment () ); - virtual const char* _remote_interface_repository_id (void) const; + virtual const char* _interface_repository_id (void) const; virtual CORBA::TypeCode_ptr create_struct_tc ( const char * id, |