Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_ORB_Core_Static_Resources Class Reference

The static (global) resoures of all ORB cores. More...

#include <ORB_Core.h>

Collaboration diagram for TAO_ORB_Core_Static_Resources:

Collaboration graph
[legend]
List of all members.

Static Public Methods

TAO_ORB_Core_Static_Resources * instance (void)
 Return the singleton instance. More...


Public Attributes

TAO_ORB_Core::Sync_Scope_Hook sync_scope_hook_
ACE_CString protocols_hooks_name_
TAO_ORB_Core::Timeout_Hook timeout_hook_
 The hook to be set for the RelativeRoundtripTimeoutPolicy. More...

TAO_ORB_Core::Timeout_Hook connection_timeout_hook_
 The hook to be set for the ConnectionTimeoutPolicy. More...

ACE_CString endpoint_selector_factory_name_
ACE_CString thread_lane_resources_manager_factory_name_
ACE_CString collocation_resolver_name_
ACE_CString stub_factory_name_
ACE_CString resource_factory_name_
ACE_CString dynamic_adapter_name_
ACE_CString ifr_client_adapter_name_
ACE_CString typecodefactory_adapter_name_
ACE_CString poa_factory_name_
ACE_CString poa_factory_directive_

Private Methods

 TAO_ORB_Core_Static_Resources (void)
 Constructor. More...


Static Private Attributes

TAO_ORB_Core_Static_Resources * instance_ = 0
 The singleton instance. More...

TAO_ORB_Core_Static_Resources * initialization_reference_
 Mostly unused variable whose sole purpose is to enforce the instantiation of a TAO_ORB_Core_Static_Resources instance at initialization time. More...


Detailed Description

The static (global) resoures of all ORB cores.

This class is used by the ORB_Core to store the resources global to all ORB_Cores. All instance variables that would have been declared "static" in TAO_ORB_Core, should be declared in this class to avoid the "static initialization order fiasco" as described in http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.11. Briefly, this is the problem that occurs if any static initializers in any other code call into set static members of TAO_ORB_Core. Since the order in which these initializers execute is unspecified, uninitialized members can be accessed.

Definition at line 1271 of file ORB_Core.h.


Constructor & Destructor Documentation

TAO_ORB_Core_Static_Resources::TAO_ORB_Core_Static_Resources void    [private]
 

Constructor.

Definition at line 105 of file ORB_Core.cpp.

00106   : sync_scope_hook_ (0),
00107     protocols_hooks_name_ ("Protocols_Hooks"),
00108     timeout_hook_ (0),
00109     connection_timeout_hook_ (0),
00110     endpoint_selector_factory_name_ ("Default_Endpoint_Selector_Factory"),
00111     thread_lane_resources_manager_factory_name_ ("Default_Thread_Lane_Resources_Manager_Factory"),
00112     collocation_resolver_name_ ("Default_Collocation_Resolver"),
00113     stub_factory_name_ ("Default_Stub_Factory"),
00114     resource_factory_name_ ("Resource_Factory"),
00115     dynamic_adapter_name_ ("Dynamic_Adapter"),
00116     ifr_client_adapter_name_ ("IFR_Client_Adapter"),
00117     typecodefactory_adapter_name_ ("TypeCodeFactory_Adapter"),
00118     poa_factory_name_ ("TAO_POA"),
00119     poa_factory_directive_ ("dynamic TAO_POA Service_Object * TAO_PortableServer:_make_TAO_Object_Adapter_Factory()")
00120 {
00121 }


Member Function Documentation

TAO_ORB_Core_Static_Resources * TAO_ORB_Core_Static_Resources::instance void    [static]
 

Return the singleton instance.

Definition at line 88 of file ORB_Core.cpp.

References ACE_NEW_RETURN, and instance_.

Referenced by TAO_ORB_Core::call_sync_scope_hook, TAO_ORB_Core::call_timeout_hook, TAO_ORB_Core::collocation_resolver, TAO_ORB_Core::connection_timeout, TAO_ORB_Core::connection_timeout_hook, TAO_ORB_Core::dynamic_adapter_name, TAO_ORB_Core::endpoint_selector_factory, TAO_ORB_Core::get_protocols_hooks, TAO_ORB_Core::ifr_client_adapter_name, TAO_ORB_Core::poa_factory_name, TAO_ORB_Core::resource_factory, TAO_ORB_Core::root_poa, TAO_ORB_Core::set_collocation_resolver, TAO_ORB_Core::set_endpoint_selector_factory, TAO_ORB_Core::set_poa_factory, TAO_ORB_Core::set_protocols_hooks, TAO_ORB_Core::set_resource_factory, TAO_ORB_Core::set_stub_factory, TAO_ORB_Core::set_sync_scope_hook, TAO_ORB_Core::set_thread_lane_resources_manager_factory, TAO_ORB_Core::set_timeout_hook, TAO_ORB_Core::stub_factory, TAO_ORB_Core::thread_lane_resources_manager, and TAO_ORB_Core::typecodefactory_adapter_name.

00089 {
00090   if (TAO_ORB_Core_Static_Resources::instance_ == 0)
00091     {
00092       // This new is never freed on purpose.  The data specified by
00093       // it needs to be around for the last shared library that references
00094       // this class.  This could occur in a destructor in a shared library
00095       // that is unloaded after this one.  One solution to avoid this
00096       // harmless memory leak would be to use reference counting.
00097       ACE_NEW_RETURN (TAO_ORB_Core_Static_Resources::instance_,
00098                       TAO_ORB_Core_Static_Resources (),
00099                       0);
00100     }
00101 
00102   return TAO_ORB_Core_Static_Resources::instance_;
00103 }


Member Data Documentation

ACE_CString TAO_ORB_Core_Static_Resources::collocation_resolver_name_
 

Definition at line 1312 of file ORB_Core.h.

Referenced by TAO_ORB_Core::collocation_resolver, and TAO_ORB_Core::set_collocation_resolver.

TAO_ORB_Core::Timeout_Hook TAO_ORB_Core_Static_Resources::connection_timeout_hook_
 

The hook to be set for the ConnectionTimeoutPolicy.

Definition at line 1292 of file ORB_Core.h.

Referenced by TAO_ORB_Core::connection_timeout, and TAO_ORB_Core::connection_timeout_hook.

ACE_CString TAO_ORB_Core_Static_Resources::dynamic_adapter_name_
 

Definition at line 1330 of file ORB_Core.h.

Referenced by TAO_ORB_Core::dynamic_adapter_name.

ACE_CString TAO_ORB_Core_Static_Resources::endpoint_selector_factory_name_
 

Definition at line 1298 of file ORB_Core.h.

Referenced by TAO_ORB_Core::endpoint_selector_factory, and TAO_ORB_Core::set_endpoint_selector_factory.

ACE_CString TAO_ORB_Core_Static_Resources::ifr_client_adapter_name_
 

Definition at line 1336 of file ORB_Core.h.

Referenced by TAO_ORB_Core::ifr_client_adapter_name.

TAO_ORB_Core_Static_Resources * TAO_ORB_Core_Static_Resources::initialization_reference_ [static, private]
 

Initial value:

Mostly unused variable whose sole purpose is to enforce the instantiation of a TAO_ORB_Core_Static_Resources instance at initialization time.

Definition at line 84 of file ORB_Core.cpp.

TAO_ORB_Core_Static_Resources * TAO_ORB_Core_Static_Resources::instance_ = 0 [static, private]
 

The singleton instance.

Definition at line 79 of file ORB_Core.cpp.

Referenced by instance.

ACE_CString TAO_ORB_Core_Static_Resources::poa_factory_directive_
 

Definition at line 1353 of file ORB_Core.h.

Referenced by TAO_ORB_Core::root_poa, and TAO_ORB_Core::set_poa_factory.

ACE_CString TAO_ORB_Core_Static_Resources::poa_factory_name_
 

Definition at line 1349 of file ORB_Core.h.

Referenced by TAO_ORB_Core::poa_factory_name, TAO_ORB_Core::root_poa, and TAO_ORB_Core::set_poa_factory.

ACE_CString TAO_ORB_Core_Static_Resources::protocols_hooks_name_
 

Definition at line 1286 of file ORB_Core.h.

Referenced by TAO_ORB_Core::get_protocols_hooks, and TAO_ORB_Core::set_protocols_hooks.

ACE_CString TAO_ORB_Core_Static_Resources::resource_factory_name_
 

Definition at line 1324 of file ORB_Core.h.

Referenced by TAO_ORB_Core::resource_factory, and TAO_ORB_Core::set_resource_factory.

ACE_CString TAO_ORB_Core_Static_Resources::stub_factory_name_
 

Definition at line 1318 of file ORB_Core.h.

Referenced by TAO_ORB_Core::set_stub_factory, and TAO_ORB_Core::stub_factory.

TAO_ORB_Core::Sync_Scope_Hook TAO_ORB_Core_Static_Resources::sync_scope_hook_
 

Definition at line 1280 of file ORB_Core.h.

Referenced by TAO_ORB_Core::call_sync_scope_hook.

ACE_CString TAO_ORB_Core_Static_Resources::thread_lane_resources_manager_factory_name_
 

Definition at line 1306 of file ORB_Core.h.

Referenced by TAO_ORB_Core::set_thread_lane_resources_manager_factory, and TAO_ORB_Core::thread_lane_resources_manager.

TAO_ORB_Core::Timeout_Hook TAO_ORB_Core_Static_Resources::timeout_hook_
 

The hook to be set for the RelativeRoundtripTimeoutPolicy.

Definition at line 1289 of file ORB_Core.h.

Referenced by TAO_ORB_Core::call_timeout_hook, and TAO_ORB_Core::set_timeout_hook.

ACE_CString TAO_ORB_Core_Static_Resources::typecodefactory_adapter_name_
 

Definition at line 1343 of file ORB_Core.h.

Referenced by TAO_ORB_Core::typecodefactory_adapter_name.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:31:07 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002