diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-14 15:35:43 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-14 15:35:43 +0000 |
commit | 55b8b6ea019f11ddf15cdeb6b29e4a25f569b631 (patch) | |
tree | b0936805202423eb15b5010f4c2d5c233201e772 | |
parent | 95181926d17da3b3c71f09e3fdd5fc11a0a5a960 (diff) | |
download | ATCD-55b8b6ea019f11ddf15cdeb6b29e4a25f569b631.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog-98c | 12 | ||||
-rw-r--r-- | TAO/Makefile | 2 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.h | 77 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.i | 29 |
5 files changed, 74 insertions, 58 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index dca1e87132b..9df496485f2 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,10 +1,10 @@ -Tue Apr 14 10:12:54 1998 Douglas C. Schmidt <schmidt@cs.wustl.edu> +Tue Apr 14 10:23:32 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> - * TAO version 0.1.14 released. - -Tue Apr 14 09:58:29 1998 Douglas C. Schmidt <schmidt@cs.wustl.edu> - - * TAO version 0.1.14 released. + * tao/ORB_Core.h (TAO_ORB_Core): Moved a bunch of "set" methods + into the public part of the class so that we can set them if + necessary. Also changed the "set" methods so they return the + original pointer, which enables "chaining". Thanks to Brian + Mendel for point this out. Tue Apr 14 07:16:21 1998 David L. Levine <levine@cs.wustl.edu> diff --git a/TAO/Makefile b/TAO/Makefile index b47ce4e2973..983d6b24fcf 100644 --- a/TAO/Makefile +++ b/TAO/Makefile @@ -72,7 +72,7 @@ RELEASE_FILES = $(addprefix TAO/,$(CONTROLLED_FILES)) \ TAO/INSTALL INSTALL: TAO-INSTALL.html - lynx -dump $^ > $@ + lynx -dump $^ > $@; chmod a+r $@ #### If creating the "official" TAO release: #### 1) Check that the workspace is up-to-date, and bail out if not. diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index a966171125c..62a489649b8 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -691,22 +691,26 @@ TAO_ORB_Core::server_factory (void) return this->server_factory_; } -void +CORBA::ORB_ptr TAO_ORB_Core::orb (CORBA::ORB_ptr op) { - // Shouldn't need to check for ptr validity at this point b/c - // we already did in ::init() + // Shouldn't need to check for ptr validity at this point b/c we + // already did in ::init() this->resource_factory ()->set_orb (op); + CORBA::ORB_ptr old_orb = this->orb_; this->orb_ = op; + return old_orb; } -void +TAO_POA * TAO_ORB_Core::root_poa (TAO_POA *np) { // Shouldn't need to check for ptr validity at this point b/c // we already did in ::init() this->resource_factory ()->set_root_poa (np); + TAO_POA *old_poa = this->root_poa_; this->root_poa_ = np; + return old_poa; } void diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h index cf95029423a..76aaec7fb69 100644 --- a/TAO/tao/ORB_Core.h +++ b/TAO/tao/ORB_Core.h @@ -62,34 +62,12 @@ public: ~TAO_ORB_Core (void); // Destructor - // = Accessors - CORBA_ORB_ptr orb (void); - // Should this be IIOP_ORB? - - ACE_Reactor *reactor (void); - // Accessors for the <ACE_Reactor>. - - ACE_Thread_Manager *thr_mgr (void); - // Accessor for the <ACE_Thread_Manager>. - - TAO_POA *root_poa (void); - // Acceptor for the POA. - TAO_OA_Parameters *oa_params (void); // Accessor for the Object Adapter parameters. TAO_ORB_Parameters *orb_params (void); // Accessor for the ORB parameters. - ACE_INET_Addr &addr (void); - // Accessors for the local address on which we're listening. - - TAO_CONNECTOR *connector (void); - // Accessor which returns the connector. - - TAO_ACCEPTOR *acceptor (void); - // Accessor which returns the acceptor. - TAO_POA_Current *poa_current (void); // Accessor which returns a pointer to a structure containing // context on the current POA upcall. @@ -98,6 +76,34 @@ public: // Sets the thread-specific pointer to the new POA Current state, // returning a pointer to the existing POA Current state. + // = Set/get the connector. + TAO_CONNECTOR *connector (TAO_CONNECTOR *c); + TAO_CONNECTOR *connector (void); + + // = Set/get the acceptor. + TAO_ACCEPTOR *acceptor (TAO_ACCEPTOR *a); + TAO_ACCEPTOR *acceptor (void); + // Accessor which returns the acceptor. + + // = Set/get pointer to the ORB. + CORBA::ORB_ptr orb (CORBA::ORB_ptr); + CORBA_ORB_ptr orb (void); + + // = Set/get the <ACE_Reactor>. + ACE_Reactor *reactor (ACE_Reactor *r); + ACE_Reactor *reactor (void); + + // = Set/get the <ACE_Thread_Manager>. + ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *tm); + ACE_Thread_Manager *thr_mgr (void); + + // = Set/get <Acceptor> for the POA. + TAO_POA *root_poa (TAO_POA *np); + TAO_POA *root_poa (void); + + ACE_INET_Addr &addr (void); + // Accessors for the local address on which we're listening. + // = Access to Factories. // // These factories are not thread-specific, and are presented here @@ -107,8 +113,10 @@ public: TAO_Resource_Factory *resource_factory (void); // Returns pointer to the resource factory. + TAO_Client_Strategy_Factory *client_factory (void); // Returns pointer to the client factory. + TAO_Server_Strategy_Factory *server_factory (void); // Returns pointer to the server factory. @@ -125,28 +133,26 @@ private: // Returns -1 in case of error, or the number of connections // actually established. - void orb (CORBA::ORB_ptr); - // Set pointer to the ORB. - CORBA::ORB_ptr orb_; - - void reactor (ACE_Reactor *r); - ACE_Reactor* reactor_; + // = Data members. + ACE_Reactor *reactor_; // Used for responding to I/O reactively - void thr_mgr (ACE_Thread_Manager *tm); - ACE_Thread_Manager* thr_mgr_; + ACE_Thread_Manager *thr_mgr_; // Used to manage threads within the ORB - void connector (TAO_CONNECTOR *c); + void create_and_set_root_poa (void); + // Initialize the root POA. + TAO_CONNECTOR *connector_; // The connector actively initiating connection requests. - void root_poa (TAO_POA *np); - void create_and_set_root_poa (void); + CORBA::ORB_ptr orb_; + // Pointer to the ORB. + TAO_POA *root_poa_; // Pointer to the root POA. It will eventually be the pointer - // returned by calls to CORBA::ORB::resolve_initial_references - // ("RootPOA"). + // returned by calls to <CORBA::ORB::resolve_initial_references + // ("RootPOA")>. TAO_OA_Parameters *oa_params_; // Parameters which should be used by OAs attached to this ORB. @@ -158,7 +164,6 @@ private: // The address of the endpoint on which we're listening for // connections and requests. - void acceptor (TAO_ACCEPTOR *a); TAO_ACCEPTOR *acceptor_; // The acceptor passively listening for connection requests. diff --git a/TAO/tao/ORB_Core.i b/TAO/tao/ORB_Core.i index dfc06115dcc..5252e5a002b 100644 --- a/TAO/tao/ORB_Core.i +++ b/TAO/tao/ORB_Core.i @@ -4,12 +4,14 @@ #define TAO_TRF (this->resource_factory ()) #define TAO_OC_RETRIEVE(member) \ - ( (this->##member##_ == 0) ? (this->##member##_ = this->resource_factory ()->get_##member ()) : (this->##member##_) ) + ((this->##member##_ == 0) ? (this->##member##_ = this->resource_factory ()->get_##member ()) : (this->##member##_) ) -ACE_INLINE void +ACE_INLINE ACE_Reactor * TAO_ORB_Core::reactor (ACE_Reactor *r) { + ACE_Reactor *old_reactor = this->reactor_; this->reactor_ = r; + return old_reactor; } ACE_INLINE ACE_Reactor* @@ -18,10 +20,12 @@ TAO_ORB_Core::reactor (void) return TAO_OC_RETRIEVE (reactor); } -ACE_INLINE void +ACE_INLINE ACE_Thread_Manager * TAO_ORB_Core::thr_mgr (ACE_Thread_Manager *tm) { + ACE_Thread_Manager *old_thr_mgr = this->thr_mgr_; this->thr_mgr_ = tm; + return old_thr_mgr; } ACE_INLINE ACE_Thread_Manager* @@ -58,10 +62,12 @@ TAO_ORB_Core::orb_params(void) return TAO_OC_RETRIEVE (orb_params); } -ACE_INLINE void +ACE_INLINE TAO_CONNECTOR * TAO_ORB_Core::connector (TAO_CONNECTOR *c) { + TAO_CONNECTOR *old_connector = this->connector_; this->connector_ = c; + return old_connector; } ACE_INLINE TAO_CONNECTOR * @@ -70,10 +76,12 @@ TAO_ORB_Core::connector (void) return TAO_OC_RETRIEVE (connector); } -ACE_INLINE void +ACE_INLINE TAO_ACCEPTOR * TAO_ORB_Core::acceptor (TAO_ACCEPTOR *a) { + TAO_ACCEPTOR *old_acceptor = this->acceptor_; this->acceptor_ = a; + return old_acceptor; } ACE_INLINE TAO_ACCEPTOR * @@ -88,7 +96,6 @@ TAO_ORB_Core::addr (void) return *TAO_OC_RETRIEVE (addr); } - #undef TAO_OC_RETRIEVE #undef TAO_TRF @@ -111,10 +118,10 @@ TAO_ORB_Core::poa_current (TAO_POA_Current *new_current) #if defined (ACE_HAS_TEMPLATE_SPECIALIZATION) # if defined (__ACE_INLINE__) || (!defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) && !defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)) - ACE_INLINE size_t - ACE_Hash_Addr<ACE_INET_Addr>::hash_i (const ACE_INET_Addr &addr) const - { - return addr.get_ip_address () + addr.get_port_number (); - } +ACE_INLINE size_t +ACE_Hash_Addr<ACE_INET_Addr>::hash_i (const ACE_INET_Addr &addr) const +{ + return addr.get_ip_address () + addr.get_port_number (); +} # endif /* __ACE_INLINE__ */ #endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */ |