From 31d30fc174851a3cb1616aed2a5eb0315e745289 Mon Sep 17 00:00:00 2001 From: nobody Date: Wed, 30 Aug 2000 02:39:02 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'pluggable_poa_ini'. --- STL/ACE_Changes | 53 - STL/readme2.stl | 272 -- TAO/orbsvcs/orbsvcs/AVStreams_Full.idl | 252 -- TAO/tao/Active_Object_Map.cpp | 1145 ------ TAO/tao/Active_Object_Map.h | 616 --- TAO/tao/Active_Object_Map.i | 221 - TAO/tao/DomainS.cpp | 526 --- TAO/tao/DomainS_T.cpp | 21 - TAO/tao/DomainS_T.h | 42 - TAO/tao/DomainS_T.i | 200 - TAO/tao/FT_CORBAS.cpp | 1197 ------ TAO/tao/FT_CORBAS.h | 660 --- TAO/tao/FT_CORBAS.i | 170 - TAO/tao/Forwarding_Servant.cpp | 41 - TAO/tao/Forwarding_Servant.h | 67 - TAO/tao/ImplRepo.pidl | 184 - TAO/tao/ImplRepoC.cpp | 3305 --------------- TAO/tao/ImplRepoC.h | 1698 -------- TAO/tao/ImplRepoC.i | 2257 ----------- TAO/tao/ImplRepoS.cpp | 1793 --------- TAO/tao/ImplRepoS.h | 917 ----- TAO/tao/ImplRepoS.i | 9 - TAO/tao/ImplRepoS_T.cpp | 20 - TAO/tao/ImplRepoS_T.h | 41 - TAO/tao/ImplRepoS_T.i | 462 --- TAO/tao/Key_Adapters.cpp | 142 - TAO/tao/Key_Adapters.h | 119 - TAO/tao/Key_Adapters.i | 1 - TAO/tao/MessagingS.cpp | 404 -- TAO/tao/MessagingS.h | 215 - TAO/tao/MessagingS.i | 9 - TAO/tao/MessagingS_T.cpp | 20 - TAO/tao/MessagingS_T.h | 41 - TAO/tao/MessagingS_T.i | 91 - TAO/tao/Object_Adapter.cpp | 1441 ------- TAO/tao/Object_Adapter.h | 747 ---- TAO/tao/Object_Adapter.i | 277 -- TAO/tao/Operation_Table.cpp | 383 -- TAO/tao/Operation_Table.h | 341 -- TAO/tao/POA.cpp | 4240 -------------------- TAO/tao/POA.h | 1065 ----- TAO/tao/POA.i | 871 ---- TAO/tao/POAManager.cpp | 263 -- TAO/tao/POAManager.h | 139 - TAO/tao/POAManager.i | 80 - TAO/tao/POA_CORBA.h | 1109 ----- TAO/tao/PolicyS.cpp | 502 --- TAO/tao/PortableServer.pidl | 278 -- TAO/tao/PortableServerC.cpp | 2977 -------------- TAO/tao/PortableServerC.h | 3185 --------------- TAO/tao/PortableServerC.i | 3211 --------------- TAO/tao/Servant_Base.cpp | 499 --- TAO/tao/Servant_Base.h | 310 -- TAO/tao/Servant_Base.i | 35 - TAO/tao/TAO.cpp | 388 -- TAO/tao/TAO.h | 170 - TAO/tao/factories.h | 146 - TAO/tao/poa_macros.h | 38 - ace/Timer_Queue.i | 22 - apps/Gateway/Gateway/Concurrency_Strategies.h | 74 - apps/Gateway/Gateway/Peer_Message.h | 89 - examples/Reactor/Misc/signal_tester.cpp | 221 - examples/Reactor/Misc/test_signals.cpp | 226 -- .../SV_Semaphores/Semaphore_Client.cpp | 31 - .../SV_Semaphores/Semaphore_Server.cpp | 42 - .../System_V_IPC/SV_Semaphores/Semaphore_Test.h | 11 - examples/System_V_IPC/SV_Semaphores/Semaphores.cpp | 94 - examples/Threads/test_auto_event.cpp | 113 - examples/Threads/test_barrier1.cpp | 84 - examples/Threads/test_barrier2.cpp | 269 -- examples/Threads/test_cancel.cpp | 72 - examples/Threads/test_future1.cpp | 420 -- examples/Threads/test_future2.cpp | 524 --- examples/Threads/test_manual_event.cpp | 108 - examples/Threads/test_process_mutex.cpp | 68 - examples/Threads/test_process_semaphore.cpp | 56 - examples/Threads/test_reader_writer.cpp | 187 - examples/Threads/test_recursive_mutex.cpp | 108 - examples/Threads/test_task.cpp | 104 - examples/Threads/test_task_four.cpp | 248 -- examples/Threads/test_task_one.cpp | 104 - examples/Threads/test_task_three.cpp | 230 -- examples/Threads/test_task_two.cpp | 156 - examples/Threads/test_thread_manager.cpp | 104 - examples/Threads/test_thread_pool.cpp | 214 - examples/Threads/test_thread_specific.cpp | 219 - examples/Threads/test_token.cpp | 76 - examples/Threads/test_tss.cpp | 235 -- examples/Threads/test_tss1.cpp | 164 - examples/Threads/test_tss2.cpp | 252 -- netsvcs/clients/Naming/Dump_Restore/nametest.cpp | 112 - netsvcs/clients/Naming/Dump_Restore/nametest.h | 15 - netsvcs/lib/Client_Logging_Handler.i | 4 - netsvcs/lib/Server_Logging_Handler.i | 4 - netsvcs/servers/cli.conf | 11 - netsvcs/servers/ntsvc.conf | 12 - protocols/ace/RMCast/README | 57 - protocols/ace/RMCast/RMCast_Export.h | 40 - tests/CPP_Test.cpp | 261 -- tests/Shared_Memory_SV_Test.cpp | 83 - tests/run_tests.ksh | 6 - 101 files changed, 45436 deletions(-) delete mode 100644 STL/ACE_Changes delete mode 100644 STL/readme2.stl delete mode 100644 TAO/orbsvcs/orbsvcs/AVStreams_Full.idl delete mode 100644 TAO/tao/Active_Object_Map.cpp delete mode 100644 TAO/tao/Active_Object_Map.h delete mode 100644 TAO/tao/Active_Object_Map.i delete mode 100644 TAO/tao/DomainS.cpp delete mode 100644 TAO/tao/DomainS_T.cpp delete mode 100644 TAO/tao/DomainS_T.h delete mode 100644 TAO/tao/DomainS_T.i delete mode 100644 TAO/tao/FT_CORBAS.cpp delete mode 100644 TAO/tao/FT_CORBAS.h delete mode 100644 TAO/tao/FT_CORBAS.i delete mode 100644 TAO/tao/Forwarding_Servant.cpp delete mode 100644 TAO/tao/Forwarding_Servant.h delete mode 100644 TAO/tao/ImplRepo.pidl delete mode 100644 TAO/tao/ImplRepoC.cpp delete mode 100644 TAO/tao/ImplRepoC.h delete mode 100644 TAO/tao/ImplRepoC.i delete mode 100644 TAO/tao/ImplRepoS.cpp delete mode 100644 TAO/tao/ImplRepoS.h delete mode 100644 TAO/tao/ImplRepoS.i delete mode 100644 TAO/tao/ImplRepoS_T.cpp delete mode 100644 TAO/tao/ImplRepoS_T.h delete mode 100644 TAO/tao/ImplRepoS_T.i delete mode 100644 TAO/tao/Key_Adapters.cpp delete mode 100644 TAO/tao/Key_Adapters.h delete mode 100644 TAO/tao/Key_Adapters.i delete mode 100644 TAO/tao/MessagingS.cpp delete mode 100644 TAO/tao/MessagingS.h delete mode 100644 TAO/tao/MessagingS.i delete mode 100644 TAO/tao/MessagingS_T.cpp delete mode 100644 TAO/tao/MessagingS_T.h delete mode 100644 TAO/tao/MessagingS_T.i delete mode 100644 TAO/tao/Object_Adapter.cpp delete mode 100644 TAO/tao/Object_Adapter.h delete mode 100644 TAO/tao/Object_Adapter.i delete mode 100644 TAO/tao/Operation_Table.cpp delete mode 100644 TAO/tao/Operation_Table.h delete mode 100644 TAO/tao/POA.cpp delete mode 100644 TAO/tao/POA.h delete mode 100644 TAO/tao/POA.i delete mode 100644 TAO/tao/POAManager.cpp delete mode 100644 TAO/tao/POAManager.h delete mode 100644 TAO/tao/POAManager.i delete mode 100644 TAO/tao/POA_CORBA.h delete mode 100644 TAO/tao/PolicyS.cpp delete mode 100644 TAO/tao/PortableServer.pidl delete mode 100644 TAO/tao/PortableServerC.cpp delete mode 100644 TAO/tao/PortableServerC.h delete mode 100644 TAO/tao/PortableServerC.i delete mode 100644 TAO/tao/Servant_Base.cpp delete mode 100644 TAO/tao/Servant_Base.h delete mode 100644 TAO/tao/Servant_Base.i delete mode 100644 TAO/tao/TAO.cpp delete mode 100644 TAO/tao/TAO.h delete mode 100644 TAO/tao/factories.h delete mode 100644 TAO/tao/poa_macros.h delete mode 100644 ace/Timer_Queue.i delete mode 100644 apps/Gateway/Gateway/Concurrency_Strategies.h delete mode 100644 apps/Gateway/Gateway/Peer_Message.h delete mode 100644 examples/Reactor/Misc/signal_tester.cpp delete mode 100644 examples/Reactor/Misc/test_signals.cpp delete mode 100644 examples/System_V_IPC/SV_Semaphores/Semaphore_Client.cpp delete mode 100644 examples/System_V_IPC/SV_Semaphores/Semaphore_Server.cpp delete mode 100644 examples/System_V_IPC/SV_Semaphores/Semaphore_Test.h delete mode 100644 examples/System_V_IPC/SV_Semaphores/Semaphores.cpp delete mode 100644 examples/Threads/test_auto_event.cpp delete mode 100644 examples/Threads/test_barrier1.cpp delete mode 100644 examples/Threads/test_barrier2.cpp delete mode 100644 examples/Threads/test_cancel.cpp delete mode 100644 examples/Threads/test_future1.cpp delete mode 100644 examples/Threads/test_future2.cpp delete mode 100644 examples/Threads/test_manual_event.cpp delete mode 100644 examples/Threads/test_process_mutex.cpp delete mode 100644 examples/Threads/test_process_semaphore.cpp delete mode 100644 examples/Threads/test_reader_writer.cpp delete mode 100644 examples/Threads/test_recursive_mutex.cpp delete mode 100644 examples/Threads/test_task.cpp delete mode 100644 examples/Threads/test_task_four.cpp delete mode 100644 examples/Threads/test_task_one.cpp delete mode 100644 examples/Threads/test_task_three.cpp delete mode 100644 examples/Threads/test_task_two.cpp delete mode 100644 examples/Threads/test_thread_manager.cpp delete mode 100644 examples/Threads/test_thread_pool.cpp delete mode 100644 examples/Threads/test_thread_specific.cpp delete mode 100644 examples/Threads/test_token.cpp delete mode 100644 examples/Threads/test_tss.cpp delete mode 100644 examples/Threads/test_tss1.cpp delete mode 100644 examples/Threads/test_tss2.cpp delete mode 100644 netsvcs/clients/Naming/Dump_Restore/nametest.cpp delete mode 100644 netsvcs/clients/Naming/Dump_Restore/nametest.h delete mode 100644 netsvcs/lib/Client_Logging_Handler.i delete mode 100644 netsvcs/lib/Server_Logging_Handler.i delete mode 100644 netsvcs/servers/cli.conf delete mode 100644 netsvcs/servers/ntsvc.conf delete mode 100644 protocols/ace/RMCast/README delete mode 100644 protocols/ace/RMCast/RMCast_Export.h delete mode 100644 tests/CPP_Test.cpp delete mode 100644 tests/Shared_Memory_SV_Test.cpp delete mode 100755 tests/run_tests.ksh diff --git a/STL/ACE_Changes b/STL/ACE_Changes deleted file mode 100644 index 902fb94c94c..00000000000 --- a/STL/ACE_Changes +++ /dev/null @@ -1,53 +0,0 @@ -This version of STL was obtained from -http://www.rahul.net/terris/. This is a modified version of the -implementation that comes with VC++4.0. Please see readme2.stl for -details. - -The following modification have been made for compilation with VC++4.x - -________________________________________ - -vector.h (line 85) -________________________________________ - - - /* - * This is cause the VC++ compiler sucks - * and does not recognize nested classes properly - * - */ -#if !defined (VC_PLUS_PLUS_NESTED_CLASS_PROBLEM) - vector(size_type n, const T& value = T()) { - start = static_allocator.allocate(n); - uninitialized_fill_n(start, n, value); - finish = start + n; - end_of_storage = finish; - } -#endif /* VC_PLUS_PLUS_NESTED_CLASS_PROBLEM */ - - -________________________________________ - -bstring.h (line 1102) -________________________________________ - - - /* - * This should be correctly scoped - * - * if (cap == ::reserve) - */ - - if (cap == std::reserve) - { - len = 0; - res = size; - ptr = new charT [res]; - } - /* - * This should be correctly scoped - * - * else if ((cap == ::default_size) && (size != NPOS)) - */ - - else if ((cap == std::default_size) && (size != NPOS)) diff --git a/STL/readme2.stl b/STL/readme2.stl deleted file mode 100644 index 5132bc1189b..00000000000 --- a/STL/readme2.stl +++ /dev/null @@ -1,272 +0,0 @@ -STL2.ZIP - -Standard Template Library for Visual C++ 4.0 -and Related Classes - -Revised 10/15/96 - Bug fixes and change to bit_vector. - -This version supports DLLs and threading. You must use critical -sections around code that uses the same container in different -threads. These features come at a price -- since memory -usage is not optimal, this code may use more memory and -may be slower. - -+ General strategy: Remove all statics except the - static allocator objects. -+ Vectors were not affected. -+ Major changes made to tree.h -+ Stability: Very stable. - -This code should be considered for experimental use only. There -are still statics lurking in some functions; these functions -are not thread-safe. - -------------------------- -Fix for bit_vector -------------------------- -This version also has a fix for bit_vector, which doesn't really -work with VC++ 4.x. Please include bvector.cpp in your -project if you use bit_vector. This fixes the linker errors -that occur if you use bector.h in multiple .cpp files. - -------------------------- -Disclaimer -------------------------- -Code is provided without warranty, liability, or technical support. - -STL.H and PTR.H are freely distributable and can be -modified in any way. - --------------------------------- -STRING.H does not compile. --------------------------------- - -"D. Pirzadeh" Explains how to fix: - -First, I got compile errors in "bstring.h" -and changed it as follows to correct: - line 1104 "::reserve" -> "std::reserve" - line 1110 "::default_size" -> "std::default_size" - -Also, I got an INTERNAL COMPILER ERROR with Visual C++ v4.0 when I did the fol- -lowing: - class xyz : public std::string { } - -I fixed it with: - typedef std::string XyzString; - class xyz : public XyzString { } - --------------------------------- -Changes made to STL distribution --------------------------------- - -These files were modified from the STL distribution shipped with -Microsoft Visual C++ 4.0. The files here are a complete, -working version of the STL. These files have been tested with -MFC applications. - -Changes were made to practically all header files. Look for -comments like: - -*Added by... -*Changed by... - ------------------- -Usage Instructions ------------------- - -Set the preprocessor variable NOMINMAX. - -As Microsoft recommends, the STL is compiled in the std namespace. - -When including these files, do **not** do this: - - namespace std - { - #include - } - -Instead, do this: - - #include - -Recommended usage: - - First, include: - - #include - #include - #include - - Then include the STL header files. - -------------------- -Support for CString -------------------- -The stl.h file contains code written by me. The file contains -operators that will allow you to use CString objects with STL -containers and functions. - -!!!! CString will not work with STL unless you include !!!! - -------------------------------------------- -Helper functions for pointers-in-containers -------------------------------------------- -There is a file called stl.h which contains two functions: - SequenceDelete - MapDelete -These functions send "delete" to all of the objects in a container. - -If you don't like this approach, you can use a supplied "pointer -wrapper" class. - -There is a file called ptr.h which contains a class called Ptr -that can be used exactly like a pointer. The object has a pointer -inside it that points to an object of any class. When a Ptr object -is deleted, "delete" is sent to its underlying pointer. Ptr can be -used with any STL container, as it has a copy constructor and -assignment operator, which transfers "ownership" of the pointer from -the source object to the destination object. Ptr is from the book -Design Patterns by Gamma et al -- see the Proxy pattern. - -The Ptr class makes memory leaks impossible, because it deletes -objects automatically when the container is deleted, or when -functions like "delete" are used. - -Example: - - This is a vector of CStrings: - - std::vector< Ptr > StringVector; - - StringVector.push_back( Ptr( new CString( "hello" ) ) ); - StringVector.push_back( Ptr( new CString( "This is another string" ) ) ); - ------------------------- -Common Problems with STL ------------------------- - -1) Compiler error: != is ambiguous - - Solution: put the following line at the beginning of the method - that caused the error: - - using namespace std; - -2) When using maps, the debugger crashes. - - This is because symbols for maps (actually, for the "pair") - get truncated to 255 characters. Solution: Turn off the - variables window in the debugger. Don't try to look at - a symbol that has been truncated. This is not an STL-specific - bug -- It's a bug in the debugger. - -3) All sorts of compile errors in STL header files - - Make sure the preprocessor variable NOMINMAX is defined - - -4) Compiler errors about "operator < is not available", etc. - The class involved has global comparison operators. - - Solution: - Write "routers" in the std namespace to the global namespace. - Example (see also stl.h - this is how CString is able - to work with STL): - - namespace std - { - BOOL operator < ( const MyClass & rLhs, - const AnotherClass & rRhs ) - { - return ::operator < ( rLhs, rRhs ); - } - } - - See also 5. - -5) When you use find() or another algorithm, the compiler - complains that it cannot find the == or < operators. - -If your code compiles without any error messages, then disregard -this section. However, if you get errors like "cannot convert -first argument from const class X" then read on. - -I am assuming that your code is calling an STL algorithm like -std::sort() or std::find(). If you're not, I can't help -you. - -There is apparently a bug in the Microsoft compiler regarding -namespaces. Namespaces cannot locate global -functions that reside in the global namespace. For example, -the binary == operator. - -Maybe this is a bug, maybe it isn't. This is not clear -to me. However, I do know what works and have tried many other -approaches that do not work. If you have a better solution I -would appreciate it if you could let me know about it. - -So, if you declare your own class and want to use algorithms -like find() on an STL container, you have two choices: - -(1) Declare == as a member function. -(2) Declare global operators == and !=. - -(1) simply works. There will come a time, however, when (1) -won't satisfy your needs. If A == B, then B == A. You can't -do this using member functions if A and B are from different -classes. - -If you choose (2), you must add the != operator to the std -namespace. There are two ways to do this. First, you can do -this: - namespace std - { - inline operator != ( const MyClass &rLhs, const MyClass &rRhs ) - { - return ::operator != ( rLhs, rRhs ); - } - } -This "routes" != from the std namespace to the global namespace. - -Note that ( lhs != rhs ) can be derived from the == operator -as !( lhs == rhs ). There is a macro in STL.H, -STL_DECLARE_GLOBAL_NE, that does this derivation. -This derivation will not work when for whatever reason, !(lhs == rhs) -is not the same as ( lhs != rhs ). - -The following example shows what you have to do for find(). Other -algorithms require you to declare <, <=, and >= too. See the -macros STL_DECLARE_GLOBAL_GE, STL_DECLARE_GLOBAL_LT, and -STL_GLOBAL_LE. These macros derive new comparison operators -from "operator <( const T&, const T& )". - -class MyClass -{ - public: - - int units; - CString description; -}; - -// We want to be able to test two MyClass objects against each other -// in STL. Need to create a global operator for this purpose. -// Since we use find(), we need to declare not-equal too. -bool operator == ( const MyClass &, const MyClass & ); -STL_DECLARE_GLOBAL_NE( MyClass, MyClass ) - -// These operators test for a matching description. -// We do A == B and B == A to be consistent. -bool operator == ( const MyClass&, const CString & ); -bool operator == ( const CString&, const MyClass & ); -STL_DECLARE_GLOBAL_NE( MyClass, CString ) -STL_DECLARE_GLOBAL_NE( CString, MyClass ) - -6. Errors when creating vectors that have vectors and deques - that have deques. - - Solution: Provide atruments to the constructor. - - std::vector< std::vector > - TwoDimensional( 0, std::vector() ); - diff --git a/TAO/orbsvcs/orbsvcs/AVStreams_Full.idl b/TAO/orbsvcs/orbsvcs/AVStreams_Full.idl deleted file mode 100644 index 2f04c91261e..00000000000 --- a/TAO/orbsvcs/orbsvcs/AVStreams_Full.idl +++ /dev/null @@ -1,252 +0,0 @@ -// $Id$ - -// IDL for Control and Management of Audio/Video Streams -// Revised Submission - -// Additional IDL for full profile -#include "AVStreams.idl" - -#pragma prefix "omg.org" - -module AVStreams_Full -{ - exception protocolNotSupported{}; - exception formatNotSupported{}; - exception formatMismatch{}; - exception FEPMismatch{}; - exception alreadyConnected{}; - exception invalidSettings{string settings;}; - exception notConnected{}; - exception deviceQosMismatch{}; - exception failedToConnect{string reason;}; - exception failedToListen{string reason;}; - - - interface FlowProducer; - interface FlowConsumer; - interface FlowEndPoint; - interface FDev; - - interface FlowConnection : PropertyService::PropertySet - { - void stop(); - void start(); - void destroy(); - - boolean modify_QoS( - - inout AVStreams::QoS new_qos) - raises (AVStreams::QoSRequestFailed); - - boolean use_flow_protocol( - in string fp_name, - in any fp_settings) - raises (AVStreams::FPError, AVStreams::notSupported); - - oneway void push_event(in AVStreams::streamEvent the_event); - - boolean connect_devs(in FDev a_party, in FDev b_party, - inout AVStreams::QoS the_qos) - raises (AVStreams::streamOpFailed, - AVStreams::streamOpDenied, - AVStreams::QoSRequestFailed); - - boolean connect( - in FlowProducer flow_producer, - in FlowConsumer flow_consumer, - inout AVStreams::QoS the_qos) - raises (formatMismatch, FEPMismatch, alreadyConnected); - - boolean disconnect(); - - // The notSupported exception is raised where - // flow cannot have multiple producers - boolean add_producer(in FlowProducer flow_producer, - inout AVStreams::QoS the_qos) - raises (alreadyConnected, AVStreams::notSupported); - - boolean add_consumer(in FlowConsumer flow_consumer, - inout AVStreams::QoS the_qos) - raises (alreadyConnected); - - boolean drop(in FlowEndPoint target) - raises (notConnected); - }; - - interface FlowEndPoint : PropertyService::PropertySet - { - boolean lock(); - void unlock(); - - void stop(); - void start(); - void destroy(); - - // Default is a nil object reference - attribute AVStreams::StreamEndPoint related_sep; - attribute FlowConnection related_flow_connection; - - FlowEndPoint get_connected_fep() - raises (notConnected, - AVStreams::notSupported); - - // syntax of fp_name is - boolean use_flow_protocol(in string fp_name, - in any fp_settings) - raises (AVStreams::FPError, AVStreams::notSupported); - - // set_format() initializes 'format' - // as current media format e.g. MPEG. - void set_format(in string format) - raises (AVStreams::notSupported); - - void set_dev_params( - in PropertyService::Properties new_settings) - raises (PropertyService::PropertyException, - AVStreams::streamOpFailed); - - void set_protocol_restriction(in AVStreams::protocolSpec - the_spec) - raises (AVStreams::notSupported); - - boolean is_fep_compatible(in FlowEndPoint fep) - raises (formatMismatch, deviceQosMismatch); - - boolean set_peer( - in FlowConnection the_fc, - - in FlowEndPoint the_peer_fep, - inout AVStreams::QoS the_qos) - raises (AVStreams::QoSRequestFailed, - AVStreams::streamOpFailed); - - boolean set_Mcast_peer( - in FlowConnection the_fc, - in AVStreams::MCastConfigIf a_mcastconfigif, - inout AVStreams::QoS the_qos) - raises (AVStreams::QoSRequestFailed); - - }; - - interface FlowProducer : FlowEndPoint - { - boolean connect_to_peer(inout AVStreams::QoS the_qos, - in string address, - - in string use_flow_protocol) // syntax - raises(failedToConnect, - AVStreams::FPError, AVStreams::QoSRequestFailed); - - string connect_mcast(inout AVStreams::QoS the_qos, - out boolean is_met, - in string address, - in string use_flow_protocol) - raises (failedToConnect, - AVStreams::notSupported, - AVStreams::FPError, - AVStreams::QoSRequestFailed); - - string get_rev_channel(in string pcol_name); - - void set_key(in AVStreams::key the_key); - void set_source_id(in long source_id); - }; - - interface FlowConsumer : FlowEndPoint - { - - - // Needs to know its peer to choose its protocol correctly - // Also to ask for a reverse channel for credit-based flow - // control, if one is required - string go_to_listen( - inout AVStreams::QoS the_qos, - in boolean is_mcast, - in FlowProducer peer, - inout string flowProtocol)// syntax - raises(failedToListen, AVStreams::FPError, - AVStreams::QoSRequestFailed); - }; - - interface FDev : PropertyService::PropertySet { - FlowProducer create_producer( - in FlowConnection the_requester, - inout AVStreams::QoS the_qos, - out boolean met_qos, - inout string named_fdev) - raises(AVStreams::streamOpFailed, - AVStreams::streamOpDenied, - AVStreams::notSupported, - AVStreams::QoSRequestFailed); - - FlowConsumer create_consumer( - in FlowConnection the_requester, - inout AVStreams::QoS the_qos, - out boolean met_qos, - inout string named_fdev) - raises(AVStreams::streamOpFailed, - AVStreams::streamOpDenied, - AVStreams::notSupported, - AVStreams::QoSRequestFailed); - - FlowConnection bind(in FDev peer_device, - inout AVStreams::QoS the_qos, - out boolean is_met) - raises (AVStreams::streamOpFailed, - AVStreams::QoSRequestFailed); - - FlowConnection bind_mcast(in FDev first_peer, - inout AVStreams::QoS the_qos, - out boolean is_met) - raises (AVStreams::streamOpFailed, - AVStreams::QoSRequestFailed); - - void destroy(in FlowEndPoint the_ep, in string fdev_name) - // ie FDev not found - raises (AVStreams::notSupported); - }; - - enum PositionOrigin { - AbsolutePosition, RelativePosition, ModuloPosition - }; - - enum PositionKey { - ByteCount, SampleCount, MediaTime - }; - - struct Position { - PositionOrigin origin; - PositionKey key; - long value; - }; - - exception PostionKeyNotSupported { PositionKey key;}; - exception InvalidPosition { PositionKey key;}; - - // MediaControl interface is similar to - // ControlledStream interface in MSS. - // It can be inherited by flow endpoints or - // FlowConnection interfaces. - interface MediaControl{ - - exception PostionKeyNotSupported { PositionKey key;}; - - Position get_media_position( - in PositionOrigin an_origin, - in PositionKey a_key) - raises (PostionKeyNotSupported); - - void set_media_position(in Position a_position) - raises (PostionKeyNotSupported, InvalidPosition); - - void start(in Position a_position) - raises(InvalidPosition); - void pause(in Position a_position) - raises(InvalidPosition); - void resume(in Position a_position) - raises(InvalidPosition); - void stop(in Position a_position) - raises(InvalidPosition); - }; -}; - diff --git a/TAO/tao/Active_Object_Map.cpp b/TAO/tao/Active_Object_Map.cpp deleted file mode 100644 index 97c91795476..00000000000 --- a/TAO/tao/Active_Object_Map.cpp +++ /dev/null @@ -1,1145 +0,0 @@ -// $Id$ -#include "tao/Active_Object_Map.h" - -#if !defined (__ACE_INLINE__) -# include "tao/Active_Object_Map.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/Auto_Ptr.h" - -ACE_RCSID(tao, Active_Object_Map, "$Id$") - - -TAO_Active_Object_Map::Map_Entry::Map_Entry (void) - : user_id_ (), - system_id_ (), - servant_ (0), - reference_count_ (1), - deactivated_ (0), - priority_ (-1) -{ -} - -/* static */ -size_t TAO_Active_Object_Map::system_id_size_ = 0; - -void -TAO_Active_Object_Map::set_system_id_size - (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters) -{ - if (TAO_Active_Object_Map::system_id_size_ == 0) - { - if (creation_parameters.allow_reactivation_of_system_ids_) - { - switch (creation_parameters.object_lookup_strategy_for_system_id_policy_) - { -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - case TAO_LINEAR: - TAO_Active_Object_Map::system_id_size_ = - sizeof (CORBA::ULong); - break; -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - - case TAO_DYNAMIC_HASH: - default: - TAO_Active_Object_Map::system_id_size_ = sizeof (CORBA::ULong); - break; - } - - size_t hint_size = 0; - - if (creation_parameters.use_active_hint_in_ids_) - hint_size = ACE_Active_Map_Manager_Key::size (); - - TAO_Active_Object_Map::system_id_size_ += hint_size; - } - else - { - switch (creation_parameters.object_lookup_strategy_for_system_id_policy_) - { -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - case TAO_LINEAR: - TAO_Active_Object_Map::system_id_size_ = - sizeof (CORBA::ULong); - break; - - case TAO_DYNAMIC_HASH: - TAO_Active_Object_Map::system_id_size_ = - sizeof (CORBA::ULong); - break; -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - - case TAO_ACTIVE_DEMUX: - default: - TAO_Active_Object_Map::system_id_size_ = - ACE_Active_Map_Manager_Key::size (); - break; - } - } - } -} - -TAO_Active_Object_Map::TAO_Active_Object_Map (int user_id_policy, - int unique_id_policy, - int persistent_id_policy, - const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters, - CORBA_Environment &ACE_TRY_ENV) - : user_id_map_ (0), - servant_map_ (0), - id_uniqueness_strategy_ (0), - lifespan_strategy_ (0), - id_assignment_strategy_ (0), - id_hint_strategy_ (0) -{ - TAO_Active_Object_Map::set_system_id_size (creation_parameters); - - TAO_Id_Uniqueness_Strategy *id_uniqueness_strategy = 0; - - if (unique_id_policy) - { - ACE_NEW_THROW_EX (id_uniqueness_strategy, - TAO_Unique_Id_Strategy, - CORBA::NO_MEMORY ()); - ACE_CHECK; - } - else - { - ACE_NEW_THROW_EX (id_uniqueness_strategy, - TAO_Multiple_Id_Strategy, - CORBA::NO_MEMORY ()); - ACE_CHECK; - } - - // Give ownership to the auto pointer. - auto_ptr new_id_uniqueness_strategy (id_uniqueness_strategy); - - TAO_Lifespan_Strategy *lifespan_strategy = 0; - - if (persistent_id_policy) - { - ACE_NEW_THROW_EX (lifespan_strategy, - TAO_Persistent_Strategy, - CORBA::NO_MEMORY ()); - ACE_CHECK; - } - else - { - ACE_NEW_THROW_EX (lifespan_strategy, - TAO_Transient_Strategy, - CORBA::NO_MEMORY ()); - ACE_CHECK; - } - - // Give ownership to the auto pointer. - auto_ptr new_lifespan_strategy (lifespan_strategy); - - TAO_Id_Assignment_Strategy *id_assignment_strategy = 0; - - if (user_id_policy) - { - ACE_NEW_THROW_EX (id_assignment_strategy, - TAO_User_Id_Strategy, - CORBA::NO_MEMORY ()); - ACE_CHECK; - } - else if (unique_id_policy) - { - ACE_NEW_THROW_EX (id_assignment_strategy, - TAO_System_Id_With_Unique_Id_Strategy, - CORBA::NO_MEMORY ()); - ACE_CHECK; - } - else - { - ACE_NEW_THROW_EX (id_assignment_strategy, - TAO_System_Id_With_Multiple_Id_Strategy, - CORBA::NO_MEMORY ()); - ACE_CHECK; - } - - // Give ownership to the auto pointer. - auto_ptr new_id_assignment_strategy (id_assignment_strategy); - - TAO_Id_Hint_Strategy *id_hint_strategy = 0; - if ((user_id_policy - || creation_parameters.allow_reactivation_of_system_ids_) - && creation_parameters.use_active_hint_in_ids_) - { - ACE_NEW_THROW_EX (id_hint_strategy, - TAO_Active_Hint_Strategy (creation_parameters.active_object_map_size_), - CORBA::NO_MEMORY ()); - ACE_CHECK; - } - else - { - ACE_NEW_THROW_EX (id_hint_strategy, - TAO_No_Hint_Strategy, - CORBA::NO_MEMORY ()); - ACE_CHECK; - } - - // Give ownership to the auto pointer. - auto_ptr new_id_hint_strategy (id_hint_strategy); - - servant_map *sm = 0; - if (unique_id_policy) - { - switch (creation_parameters.reverse_object_lookup_strategy_for_unique_id_policy_) - { - case TAO_LINEAR: -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - ACE_NEW_THROW_EX (sm, - servant_linear_map (creation_parameters.active_object_map_size_), - CORBA::NO_MEMORY ()); - ACE_CHECK; - break; -#else - ACE_ERROR ((LM_ERROR, - "linear option for -ORBUniqueidPolicyReverseDemuxStrategy " - "not supported with minimum POA maps. " - "Ingoring option to use default... \n")); - /* FALL THROUGH */ -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - - case TAO_DYNAMIC_HASH: - default: - ACE_NEW_THROW_EX (sm, - servant_hash_map (creation_parameters.active_object_map_size_), - CORBA::NO_MEMORY ()); - ACE_CHECK; - break; - } - } - - // Give ownership to the auto pointer. - auto_ptr new_servant_map (sm); - - user_id_map *uim = 0; - if (user_id_policy - || creation_parameters.allow_reactivation_of_system_ids_) - { - switch (creation_parameters.object_lookup_strategy_for_user_id_policy_) - { - case TAO_LINEAR: -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - ACE_NEW_THROW_EX (uim, - user_id_linear_map (creation_parameters.active_object_map_size_), - CORBA::NO_MEMORY ()); - ACE_CHECK; - break; -#else - ACE_ERROR ((LM_ERROR, - "linear option for -ORBUseridPolicyDemuxStrategy " - "not supported with minimum POA maps. " - "Ingoring option to use default... \n")); - /* FALL THROUGH */ -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - - case TAO_DYNAMIC_HASH: - default: - ACE_NEW_THROW_EX (uim, - user_id_hash_map (creation_parameters.active_object_map_size_), - CORBA::NO_MEMORY ()); - ACE_CHECK; - break; - } - } - else - { - switch (creation_parameters.object_lookup_strategy_for_system_id_policy_) - { -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - case TAO_LINEAR: - ACE_NEW_THROW_EX (uim, - user_id_linear_map (creation_parameters.active_object_map_size_), - CORBA::NO_MEMORY ()); - ACE_CHECK; - break; - - case TAO_DYNAMIC_HASH: - ACE_NEW_THROW_EX (uim, - user_id_hash_map (creation_parameters.active_object_map_size_), - CORBA::NO_MEMORY ()); - ACE_CHECK; - break; -#else - case TAO_LINEAR: - case TAO_DYNAMIC_HASH: - ACE_ERROR ((LM_ERROR, - "linear and dynamic options for -ORBSystemidPolicyDemuxStrategy " - "are not supported with minimum POA maps. " - "Ingoring option to use default... \n")); - /* FALL THROUGH */ -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - - case TAO_ACTIVE_DEMUX: - default: - ACE_NEW_THROW_EX (uim, - user_id_active_map (creation_parameters.active_object_map_size_), - CORBA::NO_MEMORY ()); - ACE_CHECK; - break; - } - } - - // Give ownership to the auto pointer. - auto_ptr new_user_id_map (uim); - - id_uniqueness_strategy->set_active_object_map (this); - lifespan_strategy->set_active_object_map (this); - id_assignment_strategy->set_active_object_map (this); - - // Finally everything is fine. Make sure to take ownership away - // from the auto pointer. - this->id_uniqueness_strategy_ = new_id_uniqueness_strategy.release (); - this->lifespan_strategy_ = new_lifespan_strategy.release (); - this->id_assignment_strategy_ = new_id_assignment_strategy.release (); - this->id_hint_strategy_ = new_id_hint_strategy.release (); - this->servant_map_ = new_servant_map.release (); - this->user_id_map_ = new_user_id_map.release (); -} - -TAO_Active_Object_Map::~TAO_Active_Object_Map (void) -{ - user_id_map::iterator iterator = this->user_id_map_->begin (); - user_id_map::iterator end = this->user_id_map_->end (); - - for (; - iterator != end; - ++iterator) - { - user_id_map::value_type map_entry = *iterator; - delete map_entry.second (); - } - - delete this->id_uniqueness_strategy_; - delete this->lifespan_strategy_; - delete this->id_assignment_strategy_; - delete this->id_hint_strategy_; - delete this->servant_map_; - delete this->user_id_map_; -} - -int -TAO_Active_Object_Map::is_user_id_in_map (const PortableServer::ObjectId &user_id, - CORBA::Short priority, - int &priorities_match, - int &deactivated) -{ - Map_Entry *entry = 0; - int result = this->user_id_map_->find (user_id, - entry); - if (result == 0) - { - if (entry->servant_ == 0) - { - result = 0; - - if (entry->priority_ != priority) - priorities_match = 0; - } - else - { - result = 1; - if (entry->deactivated_) - { - deactivated = 1; - } - } - } - else - { - result = 0; - } - - return result; -} - -//////////////////////////////////////////////////////////////////////////////// - -TAO_Id_Uniqueness_Strategy::~TAO_Id_Uniqueness_Strategy (void) -{ -} - -void -TAO_Id_Uniqueness_Strategy::set_active_object_map (TAO_Active_Object_Map *active_object_map) -{ - this->active_object_map_ = active_object_map; -} - -int -TAO_Unique_Id_Strategy::is_servant_in_map (PortableServer::Servant servant, - int &deactivated) -{ - TAO_Active_Object_Map::Map_Entry *entry = 0; - int result = this->active_object_map_->servant_map_->find (servant, - entry); - if (result == 0) - { - result = 1; - if (entry->deactivated_) - { - deactivated = 1; - } - } - else - { - result = 0; - } - - return result; -} - -int -TAO_Unique_Id_Strategy::bind_using_user_id (PortableServer::Servant servant, - const PortableServer::ObjectId &user_id, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - int result = this->active_object_map_->user_id_map_->find (user_id, - entry); - if (result == 0) - { - if (servant != 0) - { - entry->servant_ = servant; - - result = this->active_object_map_->servant_map_->bind (entry->servant_, - entry); - } - } - else - { - ACE_NEW_RETURN (entry, - TAO_Active_Object_Map::Map_Entry, - -1); - entry->user_id_ = user_id; - entry->servant_ = servant; - entry->priority_ = priority; - - result = this->active_object_map_->id_hint_strategy_->bind (*entry); - - if (result == 0) - { - result = this->active_object_map_->user_id_map_->bind (entry->user_id_, - entry); - if (result == 0) - { - if (servant != 0) - result = this->active_object_map_->servant_map_->bind (entry->servant_, - entry); - if (result != 0) - { - this->active_object_map_->user_id_map_->unbind (entry->user_id_); - this->active_object_map_->id_hint_strategy_->unbind (*entry); - delete entry; - } - } - else - { - this->active_object_map_->id_hint_strategy_->unbind (*entry); - delete entry; - } - } - else - delete entry; - } - - return result; -} - -int -TAO_Unique_Id_Strategy::unbind_using_user_id (const PortableServer::ObjectId &user_id) -{ - TAO_Active_Object_Map::Map_Entry *entry = 0; - int result = this->active_object_map_->user_id_map_->unbind (user_id, - entry); - if (result == 0) - { - if (entry->servant_ != 0) - result = this->active_object_map_->servant_map_->unbind (entry->servant_); - - if (result == 0) - result = - this->active_object_map_->id_hint_strategy_->unbind (*entry); - - if (result == 0) - delete entry; - } - return result; -} - -int -TAO_Unique_Id_Strategy::find_user_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out user_id) -{ - TAO_Active_Object_Map::Map_Entry *entry = 0; - int result = this->active_object_map_->servant_map_->find (servant, - entry); - if (result == 0) - { - if (entry->deactivated_) - result = -1; - else - ACE_NEW_RETURN (user_id, - PortableServer::ObjectId (entry->user_id_), - -1); - } - - return result; -} - -int -TAO_Unique_Id_Strategy::find_system_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out system_id, - CORBA::Short &priority) -{ - TAO_Active_Object_Map::Map_Entry *entry = 0; - int result = this->active_object_map_->servant_map_->find (servant, - entry); - if (result == 0) - { - if (entry->deactivated_) - result = -1; - else - { - result = this->active_object_map_->id_hint_strategy_->system_id (system_id, - *entry); - if (result == 0) - priority = entry->priority_; - } - } - - return result; -} - -CORBA::Boolean -TAO_Unique_Id_Strategy::remaining_activations (PortableServer::Servant servant) -{ - ACE_UNUSED_ARG (servant); - - // Since servant are always unique here, return false. - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// - -int -TAO_Multiple_Id_Strategy::is_servant_in_map (PortableServer::Servant, - int &) -{ - return -1; -} - -int -TAO_Multiple_Id_Strategy::bind_using_user_id (PortableServer::Servant servant, - const PortableServer::ObjectId &user_id, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - int result = this->active_object_map_->user_id_map_->find (user_id, - entry); - if (result == 0) - { - if (servant != 0) - entry->servant_ = servant; - } - else - { - ACE_NEW_RETURN (entry, - TAO_Active_Object_Map::Map_Entry, - -1); - entry->user_id_ = user_id; - entry->servant_ = servant; - entry->priority_ = priority; - - result = - this->active_object_map_->id_hint_strategy_->bind (*entry); - - if (result == 0) - { - result = this->active_object_map_->user_id_map_->bind (entry->user_id_, - entry); - if (result != 0) - { - this->active_object_map_->id_hint_strategy_->unbind (*entry); - delete entry; - } - } - else - delete entry; - } - - return result; -} - -int -TAO_Multiple_Id_Strategy::unbind_using_user_id (const PortableServer::ObjectId &user_id) -{ - TAO_Active_Object_Map::Map_Entry *entry = 0; - int result = this->active_object_map_->user_id_map_->unbind (user_id, - entry); - if (result == 0) - { - result = this->active_object_map_->id_hint_strategy_->unbind (*entry); - - if (result == 0) - delete entry; - } - - return result; -} - -int -TAO_Multiple_Id_Strategy::find_user_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out user_id) -{ - ACE_UNUSED_ARG (servant); - ACE_UNUSED_ARG (user_id); - - return -1; -} - -int -TAO_Multiple_Id_Strategy::find_system_id_using_servant (PortableServer::Servant, - PortableServer::ObjectId_out, - CORBA::Short &) -{ - return -1; -} - -CORBA::Boolean -TAO_Multiple_Id_Strategy::remaining_activations (PortableServer::Servant servant) -{ - TAO_Active_Object_Map::user_id_map::iterator end - = this->active_object_map_->user_id_map_->end (); - - for (TAO_Active_Object_Map::user_id_map::iterator iter - = this->active_object_map_->user_id_map_->begin (); - iter != end; - ++iter) - { - TAO_Active_Object_Map::user_id_map::value_type map_pair = *iter; - TAO_Active_Object_Map::Map_Entry *entry = map_pair.second (); - - if (entry->servant_ == servant) - return 1; - } - - return 0; -} - -TAO_Lifespan_Strategy::~TAO_Lifespan_Strategy (void) -{ -} - -void -TAO_Lifespan_Strategy::set_active_object_map (TAO_Active_Object_Map *active_object_map) -{ - this->active_object_map_ = active_object_map; -} - -int -TAO_Transient_Strategy::find_servant_using_system_id_and_user_id (const PortableServer::ObjectId &system_id, - const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - int result = this->active_object_map_->id_hint_strategy_->find (system_id, - entry); - if (result == 0) - { - if (entry->deactivated_) - result = -1; - else if (entry->servant_ == 0) - result = -1; - else - servant = entry->servant_; - } - else - { - result = this->active_object_map_->user_id_map_->find (user_id, - entry); - if (result == 0) - { - if (entry->deactivated_) - result = -1; - else if (entry->servant_ == 0) - result = -1; - else - servant = entry->servant_; - } - } - - if (result == -1) - entry = 0; - - return result; -} - -//////////////////////////////////////////////////////////////////////////////// - -int -TAO_Persistent_Strategy::find_servant_using_system_id_and_user_id (const PortableServer::ObjectId &system_id, - const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - int result = this->active_object_map_->id_hint_strategy_->find (system_id, - entry); - if (result == 0 && - user_id == entry->user_id_) - { - if (entry->deactivated_) - result = -1; - else if (entry->servant_ == 0) - result = -1; - else - servant = entry->servant_; - } - else - { - result = this->active_object_map_->user_id_map_->find (user_id, - entry); - if (result == 0) - { - if (entry->deactivated_) - result = -1; - else if (entry->servant_ == 0) - result = -1; - else - servant = entry->servant_; - } - } - - if (result == -1) - entry = 0; - - return result; -} - -TAO_Id_Assignment_Strategy::~TAO_Id_Assignment_Strategy (void) -{ -} - -void -TAO_Id_Assignment_Strategy::set_active_object_map (TAO_Active_Object_Map *active_object_map) -{ - this->active_object_map_ = active_object_map; -} - -int -TAO_User_Id_Strategy::bind_using_system_id (PortableServer::Servant, - CORBA::Short, - TAO_Active_Object_Map::Map_Entry *&) -{ - return -1; -} - -int -TAO_System_Id_With_Unique_Id_Strategy::bind_using_system_id (PortableServer::Servant servant, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - ACE_NEW_RETURN (entry, - TAO_Active_Object_Map::Map_Entry, - -1); - - int result = this->active_object_map_->user_id_map_->bind_create_key (entry, - entry->user_id_); - if (result == 0) - { - entry->servant_ = servant; - entry->priority_ = priority; - - result = this->active_object_map_->id_hint_strategy_->bind (*entry); - - if (result == 0) - { - if (servant != 0) - result = this->active_object_map_->servant_map_->bind (entry->servant_, - entry); - - if (result != 0) - { - this->active_object_map_->user_id_map_->unbind (entry->user_id_); - this->active_object_map_->id_hint_strategy_->unbind (*entry); - delete entry; - } - } - else - { - this->active_object_map_->user_id_map_->unbind (entry->user_id_); - delete entry; - } - } - else - delete entry; - - return result; -} - -int -TAO_System_Id_With_Multiple_Id_Strategy::bind_using_system_id (PortableServer::Servant servant, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - ACE_NEW_RETURN (entry, - TAO_Active_Object_Map::Map_Entry, - -1); - int result = this->active_object_map_->user_id_map_->bind_create_key (entry, - entry->user_id_); - if (result == 0) - { - entry->servant_ = servant; - entry->priority_ = priority; - - result = this->active_object_map_->id_hint_strategy_->bind (*entry); - - if (result != 0) - { - this->active_object_map_->user_id_map_->unbind (entry->user_id_); - delete entry; - } - } - else - delete entry; - - return result; -} - -//////////////////////////////////////////////////////////////////////////////// - -TAO_Id_Hint_Strategy::~TAO_Id_Hint_Strategy (void) -{ -} - -//////////////////////////////////////////////////////////////////////////////// - -TAO_Active_Hint_Strategy::TAO_Active_Hint_Strategy (CORBA::ULong map_size) - : system_id_map_ (map_size) -{ -} - -TAO_Active_Hint_Strategy::~TAO_Active_Hint_Strategy (void) -{ -} - -int -TAO_Active_Hint_Strategy::recover_key (const PortableServer::ObjectId &system_id, - PortableServer::ObjectId &user_id) -{ - return this->system_id_map_.recover_key (system_id, - user_id); -} - -int -TAO_Active_Hint_Strategy::bind (TAO_Active_Object_Map::Map_Entry &entry) -{ - entry.system_id_ = entry.user_id_; - - return this->system_id_map_.bind_modify_key (&entry, - entry.system_id_); -} - -int -TAO_Active_Hint_Strategy::unbind (TAO_Active_Object_Map::Map_Entry &entry) -{ - return this->system_id_map_.unbind (entry.system_id_); -} - -int -TAO_Active_Hint_Strategy::find (const PortableServer::ObjectId &system_id, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - return this->system_id_map_.find (system_id, - entry); -} - -size_t -TAO_Active_Hint_Strategy::hint_size (void) -{ - return ACE_Active_Map_Manager_Key::size (); -} - -int -TAO_Active_Hint_Strategy::system_id (PortableServer::ObjectId_out system_id, - TAO_Active_Object_Map::Map_Entry &entry) -{ - ACE_NEW_RETURN (system_id, - PortableServer::ObjectId (entry.system_id_), - -1); - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// - -TAO_No_Hint_Strategy::~TAO_No_Hint_Strategy (void) -{ -} - -int -TAO_No_Hint_Strategy::recover_key (const PortableServer::ObjectId &system_id, - PortableServer::ObjectId &user_id) -{ - // Smartly copy all the data; . - user_id.replace (system_id.maximum (), - system_id.length (), - ACE_const_cast (CORBA::Octet *, - system_id.get_buffer ()), - 0); - - return 0; -} - -int -TAO_No_Hint_Strategy::bind (TAO_Active_Object_Map::Map_Entry &entry) -{ - ACE_UNUSED_ARG (entry); - - return 0; -} - -int -TAO_No_Hint_Strategy::unbind (TAO_Active_Object_Map::Map_Entry &entry) -{ - ACE_UNUSED_ARG (entry); - - return 0; -} - -int -TAO_No_Hint_Strategy::find (const PortableServer::ObjectId &system_id, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - ACE_UNUSED_ARG (system_id); - ACE_UNUSED_ARG (entry); - - return -1; -} - -size_t -TAO_No_Hint_Strategy::hint_size (void) -{ - return 0; -} - -int -TAO_No_Hint_Strategy::system_id (PortableServer::ObjectId_out system_id, - TAO_Active_Object_Map::Map_Entry &entry) -{ - ACE_NEW_RETURN (system_id, - PortableServer::ObjectId (entry.user_id_), - -1); - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class auto_ptr; -template class auto_ptr; -template class auto_ptr; -template class auto_ptr; -template class auto_ptr; -template class auto_ptr; - -template class ACE_Auto_Basic_Ptr; -template class ACE_Auto_Basic_Ptr; -template class ACE_Auto_Basic_Ptr; -template class ACE_Auto_Basic_Ptr; -template class ACE_Auto_Basic_Ptr; -template class ACE_Auto_Basic_Ptr; - -// Common typedefs. -typedef PortableServer::ObjectId id; -typedef PortableServer::Servant servant; -typedef TAO_Active_Object_Map::Map_Entry *value; - -typedef ACE_Pair id_expanded_value; -typedef ACE_Reference_Pair id_value_type; -typedef ACE_Reference_Pair servant_value_type; -typedef ACE_Equal_To id_compare_keys; -typedef ACE_Equal_To servant_compare_keys; -typedef TAO_ObjectId_Hash id_hash; -typedef TAO_Servant_Hash servant_hash; -typedef ACE_Noop_Key_Generator noop_servant_key_generator; - -template class ACE_Noop_Key_Generator; - -// Common -template class ACE_Reference_Pair; -template class ACE_Reference_Pair; - -// Map and iterator classes. -template class ACE_Map; -template class ACE_Map; -template class ACE_Iterator; -template class ACE_Iterator; -template class ACE_Reverse_Iterator; -template class ACE_Reverse_Iterator; - -// Iterator base classes. -template class ACE_Iterator_Impl; -template class ACE_Iterator_Impl; -template class ACE_Reverse_Iterator_Impl; -template class ACE_Reverse_Iterator_Impl; - -// Active Map Manager related. -template class ACE_Pair; -template class ACE_Active_Map_Manager_Adapter; -template class ACE_Active_Map_Manager_Adapter; -template class ACE_Active_Map_Manager_Iterator_Adapter; -template class ACE_Active_Map_Manager_Reverse_Iterator_Adapter; -template class ACE_Active_Map_Manager; -template class ACE_Map_Manager; -template class ACE_Map_Iterator_Base; -template class ACE_Map_Iterator; -template class ACE_Map_Reverse_Iterator; -template class ACE_Map_Entry; - -// Hash Map Manager related. -template class ACE_Hash_Map_Manager_Ex_Adapter; -template class ACE_Hash_Map_Manager_Ex_Adapter; -template class ACE_Hash_Map_Manager_Ex_Iterator_Adapter; -template class ACE_Hash_Map_Manager_Ex_Iterator_Adapter; -template class ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter; -template class ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter; -template class ACE_Hash_Map_Manager_Ex; -template class ACE_Hash_Map_Manager_Ex; -template class ACE_Hash_Map_Iterator_Base_Ex; -template class ACE_Hash_Map_Iterator_Base_Ex; -template class ACE_Hash_Map_Iterator_Ex; -template class ACE_Hash_Map_Iterator_Ex; -template class ACE_Hash_Map_Reverse_Iterator_Ex; -template class ACE_Hash_Map_Reverse_Iterator_Ex; -template class ACE_Hash_Map_Entry; -template class ACE_Hash_Map_Entry; -template class ACE_Equal_To; -template class ACE_Equal_To; - -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) -// Map Manager related. -template class ACE_Map_Manager_Iterator_Adapter; -template class ACE_Map_Manager_Iterator_Adapter; -template class ACE_Map_Manager_Reverse_Iterator_Adapter; -template class ACE_Map_Manager_Reverse_Iterator_Adapter; -template class ACE_Map_Manager_Adapter; -template class ACE_Map_Manager_Adapter; -template class ACE_Map_Manager; -template class ACE_Map_Manager; -template class ACE_Map_Iterator_Base; -template class ACE_Map_Iterator_Base; -template class ACE_Map_Iterator; -template class ACE_Map_Iterator; -template class ACE_Map_Reverse_Iterator; -template class ACE_Map_Reverse_Iterator; -template class ACE_Map_Entry; -template class ACE_Map_Entry; -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate auto_ptr -#pragma instantiate auto_ptr -#pragma instantiate auto_ptr -#pragma instantiate auto_ptr -#pragma instantiate auto_ptr -#pragma instantiate auto_ptr - -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Auto_Basic_Ptr - -// Common typedefs. -typedef PortableServer::ObjectId id; -typedef PortableServer::Servant servant; -typedef TAO_Active_Object_Map::Map_Entry * value; - -typedef ACE_Pair id_expanded_value; -typedef ACE_Reference_Pair id_value_type; -typedef ACE_Reference_Pair servant_value_type; -typedef ACE_Equal_To id_compare_keys; -typedef ACE_Equal_To servant_compare_keys; -typedef TAO_ObjectId_Hash id_hash; -typedef TAO_Servant_Hash servant_hash; -typedef ACE_Noop_Key_Generator noop_servant_key_generator; - -#pragma instantiate ACE_Noop_Key_Generator - -// Common -#pragma instantiate ACE_Reference_Pair -#pragma instantiate ACE_Reference_Pair - -// Map and iterator classes. -#pragma instantiate ACE_Map -#pragma instantiate ACE_Map -#pragma instantiate ACE_Iterator -#pragma instantiate ACE_Iterator -#pragma instantiate ACE_Reverse_Iterator -#pragma instantiate ACE_Reverse_Iterator - -// Iterator base classes. -#pragma instantiate ACE_Iterator_Impl -#pragma instantiate ACE_Iterator_Impl -#pragma instantiate ACE_Reverse_Iterator_Impl -#pragma instantiate ACE_Reverse_Iterator_Impl - -// Active Map Manager related. -#pragma instantiate ACE_Pair -#pragma instantiate ACE_Active_Map_Manager_Adapter -#pragma instantiate ACE_Active_Map_Manager_Adapter -#pragma instantiate ACE_Active_Map_Manager_Iterator_Adapter -#pragma instantiate ACE_Active_Map_Manager_Reverse_Iterator_Adapter -#pragma instantiate ACE_Active_Map_Manager -#pragma instantiate ACE_Map_Manager -#pragma instantiate ACE_Map_Iterator_Base -#pragma instantiate ACE_Map_Iterator -#pragma instantiate ACE_Map_Reverse_Iterator -#pragma instantiate ACE_Map_Entry - -// Hash Map Manager related. -#pragma instantiate ACE_Hash_Map_Manager_Ex_Adapter -#pragma instantiate ACE_Hash_Map_Manager_Ex_Adapter -#pragma instantiate ACE_Hash_Map_Manager_Ex_Iterator_Adapter -#pragma instantiate ACE_Hash_Map_Manager_Ex_Iterator_Adapter -#pragma instantiate ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter -#pragma instantiate ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter -#pragma instantiate ACE_Hash_Map_Manager_Ex -#pragma instantiate ACE_Hash_Map_Manager_Ex -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex -#pragma instantiate ACE_Hash_Map_Iterator_Ex -#pragma instantiate ACE_Hash_Map_Iterator_Ex -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex -#pragma instantiate ACE_Hash_Map_Entry -#pragma instantiate ACE_Hash_Map_Entry -#pragma instantiate ACE_Equal_To -#pragma instantiate ACE_Equal_To - -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) -// Map Manager related. -#pragma instantiate ACE_Map_Manager_Iterator_Adapter -#pragma instantiate ACE_Map_Manager_Iterator_Adapter -#pragma instantiate ACE_Map_Manager_Reverse_Iterator_Adapter -#pragma instantiate ACE_Map_Manager_Reverse_Iterator_Adapter -#pragma instantiate ACE_Map_Manager_Adapter -#pragma instantiate ACE_Map_Manager_Adapter -#pragma instantiate ACE_Map_Manager -#pragma instantiate ACE_Map_Manager -#pragma instantiate ACE_Map_Iterator_Base -#pragma instantiate ACE_Map_Iterator_Base -#pragma instantiate ACE_Map_Iterator -#pragma instantiate ACE_Map_Iterator -#pragma instantiate ACE_Map_Reverse_Iterator -#pragma instantiate ACE_Map_Reverse_Iterator -#pragma instantiate ACE_Map_Entry -#pragma instantiate ACE_Map_Entry -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/Active_Object_Map.h b/TAO/tao/Active_Object_Map.h deleted file mode 100644 index 2ca0bc87dfe..00000000000 --- a/TAO/tao/Active_Object_Map.h +++ /dev/null @@ -1,616 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// Active_Object_Map.h -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#ifndef TAO_ACTIVE_OBJECT_MAP_H -#define TAO_ACTIVE_OBJECT_MAP_H -#include "ace/pre.h" - -#include "tao/Key_Adapters.h" -#include "tao/Server_Strategy_Factory.h" -#include "tao/Servant_Base.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Forward declarations. -class TAO_Id_Uniqueness_Strategy; -class TAO_Lifespan_Strategy; -class TAO_Id_Assignment_Strategy; -class TAO_Id_Hint_Strategy; - -class TAO_Export TAO_Active_Object_Map -{ - // = TITLE - // Map of object ids to servants. - // - // = DESCRIPTION - // Implementation to be used by the POA. -public: - - struct Map_Entry - { - // = TITLE - // Value field of the active object map. - // - // = DESCRIPTION - // We need a mapping from and to all of the following fields: - // , , and . Therefore, we keep - // all the fields together in the map. - - Map_Entry (void); - // Default constructor. - - PortableServer::ObjectId user_id_; - // User id. - - PortableServer::ObjectId system_id_; - // System id. - - PortableServer::Servant servant_; - // Servant. - - CORBA::UShort reference_count_; - // Reference count on outstanding requests on this servant. - - CORBA::Boolean deactivated_; - // Has this servant been deactivated already? - - CORBA::Short priority_; - // Priority of this servant. - }; - - TAO_Active_Object_Map (int user_id_policy, - int unique_id_policy, - int persistent_id_policy, - const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters, - CORBA_Environment &ACE_TRY_ENV); - // Constructor. - - ~TAO_Active_Object_Map (void); - // Destructor. - - int is_servant_in_map (PortableServer::Servant servant, - int &deactivated); - // Must be used with UNIQUE_ID policy. - - int is_user_id_in_map (const PortableServer::ObjectId &user_id, - CORBA::Short priority, - int &priorities_match, - int &deactivated); - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - int bind_using_system_id_returning_system_id (PortableServer::Servant servant, - CORBA::Short priority, - PortableServer::ObjectId_out system_id); - // Must be used with SYSTEM_ID policy. - - int bind_using_system_id_returning_user_id (PortableServer::Servant servant, - CORBA::Short priority, - PortableServer::ObjectId_out user_id); - // Must be used with SYSTEM_ID policy. - - int bind_using_user_id (PortableServer::Servant servant, - const PortableServer::ObjectId &user_id, - CORBA::Short priority); - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - int find_system_id_using_user_id (const PortableServer::ObjectId &user_id, - CORBA::Short priority, - PortableServer::ObjectId_out system_id); - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - int rebind_using_user_id_and_system_id (PortableServer::Servant servant, - const PortableServer::ObjectId &user_id, - const PortableServer::ObjectId &system_id, - TAO_Active_Object_Map::Map_Entry *&entry); - // Can be used with any policy. - - int unbind_using_user_id (const PortableServer::ObjectId &user_id); - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - int find_user_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out user_id); - // Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, - // is actually . - - int find_system_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out system_id, - CORBA::Short &priority); - // Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, - // is actually . - - int find_servant_using_user_id (const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant); - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - int find_servant_using_system_id_and_user_id (const PortableServer::ObjectId &system_id, - const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant, - TAO_Active_Object_Map::Map_Entry *&entry); - // Can be used with any policy. - - int find_servant_and_system_id_using_user_id (const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant, - PortableServer::ObjectId_out system_id, - CORBA::Short &priority); - // Can be used with any policy. With the SYSTEM_ID policy, - // is identical to . - - int find_servant_and_system_id_using_user_id (const PortableServer::ObjectId &user_id, - TAO_Active_Object_Map::Map_Entry *&entry); - // Can be used with any policy. With the SYSTEM_ID policy, - // is identical to . - - int find_user_id_using_system_id (const PortableServer::ObjectId &system_id, - PortableServer::ObjectId_out user_id); - // Can be used with any policy. When the SYSTEM_ID policy is used, - // the is identical to . - - int find_user_id_using_system_id (const PortableServer::ObjectId &system_id, - PortableServer::ObjectId &user_id); - // Can be used with any policy. When the SYSTEM_ID policy is used, - // the is identical to . - - CORBA::Boolean remaining_activations (PortableServer::Servant servant); - // Are there any remaining activations of in the active - // object map? Can be used with any policy. - - size_t current_size (void); - // Size of the map. - - static size_t system_id_size (void); - // Can be used with any policy. - - static void set_system_id_size (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters); - // Set the system id size. - - typedef ACE_Map< - PortableServer::ObjectId, - Map_Entry *> user_id_map; - // Base class of the id map. - - typedef ACE_Hash_Map_Manager_Ex_Adapter< - PortableServer::ObjectId, - Map_Entry *, - TAO_ObjectId_Hash, - ACE_Equal_To, - TAO_Incremental_Key_Generator> user_id_hash_map; - // Id hash map. - -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - typedef ACE_Map_Manager_Adapter< - PortableServer::ObjectId, - Map_Entry *, - TAO_Incremental_Key_Generator> user_id_linear_map; - // Id linear map. -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - - typedef ACE_Active_Map_Manager_Adapter< - PortableServer::ObjectId, - Map_Entry *, - TAO_Ignore_Original_Key_Adapter> user_id_active_map; - // Id active map. - - typedef ACE_Map< - PortableServer::Servant, - Map_Entry *> servant_map; - // Base class of the servant map. - - typedef ACE_Hash_Map_Manager_Ex_Adapter< - PortableServer::Servant, - Map_Entry *, - TAO_Servant_Hash, - ACE_Equal_To, - ACE_Noop_Key_Generator > servant_hash_map; - // Servant hash map. - -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - typedef ACE_Map_Manager_Adapter< - PortableServer::Servant, - Map_Entry *, - ACE_Noop_Key_Generator > servant_linear_map; - // Servant linear map. -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - - user_id_map *user_id_map_; - // Id map. - - servant_map *servant_map_; - // Servant map. - - TAO_Id_Uniqueness_Strategy *id_uniqueness_strategy_; - // Id uniqueness strategy. - - TAO_Lifespan_Strategy *lifespan_strategy_; - // Lifespan strategy. - - TAO_Id_Assignment_Strategy *id_assignment_strategy_; - // Id assignment strategy. - - TAO_Id_Hint_Strategy *id_hint_strategy_; - // Id hint strategy. - - static size_t system_id_size_; - // Size of the system id produced by the map. -}; - -class TAO_Id_Uniqueness_Strategy -{ - // = TITLE - // Id uniqueness strategy. - // - // = DESCRIPTION - // Strategy for implementing points of variation between the - // UNIQUE_ID and the MULTIPLE_ID policies. -public: - virtual ~TAO_Id_Uniqueness_Strategy (void); - // Virtual destructor. - - virtual int is_servant_in_map (PortableServer::Servant servant, - int &deactivated) = 0; - // Must be used with UNIQUE_ID policy. - - virtual int unbind_using_user_id (const PortableServer::ObjectId &user_id) = 0; - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - virtual int find_user_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out user_id) = 0; - // Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, - // is actually . - - virtual int find_system_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out system_id, - CORBA::Short &priority) = 0; - // Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, - // is actually . - - virtual int bind_using_user_id (PortableServer::Servant servant, - const PortableServer::ObjectId &user_id, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry) = 0; - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - virtual CORBA::Boolean remaining_activations (PortableServer::Servant servant) = 0; - // Are there any remaining activations of in the active - // object map? Can be used with any policy. - - void set_active_object_map (TAO_Active_Object_Map *active_object_map); - // Set the active map. - -protected: - - TAO_Active_Object_Map *active_object_map_; - // Pointer to the active map. -}; - -class TAO_Unique_Id_Strategy : public TAO_Id_Uniqueness_Strategy -{ - // = TITLE - // Unique id strategy. - // - // = DESCRIPTION - // Strategy for the UNIQUE_ID policy. -public: - - virtual int is_servant_in_map (PortableServer::Servant servant, - int &deactivated); - // Must be used with UNIQUE_ID policy. - - virtual int unbind_using_user_id (const PortableServer::ObjectId &user_id); - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - virtual int find_user_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out user_id); - // Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, - // is actually . - - virtual int find_system_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out system_id, - CORBA::Short &priority); - // Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, - // is actually . - - virtual int bind_using_user_id (PortableServer::Servant servant, - const PortableServer::ObjectId &user_id, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry); - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - virtual CORBA::Boolean remaining_activations (PortableServer::Servant servant); - // Are there any remaining activations of in the active - // object map? Can be used with any policy. -}; - -class TAO_Multiple_Id_Strategy : public TAO_Id_Uniqueness_Strategy -{ - // = TITLE - // Multiple id strategy. - // - // = DESCRIPTION - // Strategy for the MULTIPLE_ID policy. -public: - - virtual int is_servant_in_map (PortableServer::Servant servant, - int &deactivated); - // Must be used with UNIQUE_ID policy. - - virtual int unbind_using_user_id (const PortableServer::ObjectId &user_id); - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - virtual int find_user_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out user_id); - // Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, - // is actually . - - virtual int find_system_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out system_id, - CORBA::Short &priority); - // Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, - // is actually . - - virtual int bind_using_user_id (PortableServer::Servant servant, - const PortableServer::ObjectId &user_id, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry); - // Can be used with any policy. With the SYSTEM_ID policy, - // is actually . - - virtual CORBA::Boolean remaining_activations (PortableServer::Servant servant); - // Are there any remaining activations of in the active - // object map? Can be used with any policy. -}; - -class TAO_Lifespan_Strategy -{ - // = TITLE - // Lifespan strategy. - // - // = DESCRIPTION - // Strategy for implementing points of variation between the - // TRANSIENT and the PERSISTENT policies. -public: - - virtual ~TAO_Lifespan_Strategy (void); - // Virtual destructor. - - virtual int find_servant_using_system_id_and_user_id (const PortableServer::ObjectId &system_id, - const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant, - TAO_Active_Object_Map::Map_Entry *&entry) = 0; - // Can be used with any policy. - - void set_active_object_map (TAO_Active_Object_Map *active_object_map); - // Set the active map. - -protected: - - TAO_Active_Object_Map *active_object_map_; - // Pointer to the active map. -}; - -class TAO_Transient_Strategy : public TAO_Lifespan_Strategy -{ - // = TITLE - // Transient strategy. - // - // = DESCRIPTION - // Strategy for the TRANSIENT policy. -public: - virtual int find_servant_using_system_id_and_user_id (const PortableServer::ObjectId &system_id, - const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant, - TAO_Active_Object_Map::Map_Entry *&entry); - // Can be used with any policy. -}; - -class TAO_Persistent_Strategy : public TAO_Lifespan_Strategy -{ - // = TITLE - // Persistent strategy. - // - // = DESCRIPTION - // Strategy for the PERSISTENT policy. -public: - virtual int find_servant_using_system_id_and_user_id (const PortableServer::ObjectId &system_id, - const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant, - TAO_Active_Object_Map::Map_Entry *&entry); - // Can be used with any policy. - -}; - -class TAO_Id_Assignment_Strategy -{ - // = TITLE - // Id uniqueness strategy. - // - // = DESCRIPTION - // Strategy for implementing points of variation between the - // USER_ID and the SYSTEM_ID policies. -public: - virtual ~TAO_Id_Assignment_Strategy (void); - // Virtual destructor. - - virtual int bind_using_system_id (PortableServer::Servant servant, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry) = 0; - // Must be used with SYSTEM_ID policy. - - void set_active_object_map (TAO_Active_Object_Map *active_object_map); - // Set the active map. - -protected: - - TAO_Active_Object_Map *active_object_map_; - // Pointer to the active map. -}; - -class TAO_User_Id_Strategy : public TAO_Id_Assignment_Strategy -{ - // = TITLE - // User id strategy. - // - // = DESCRIPTION - // Strategy for the USER_ID policy. -public: - virtual int bind_using_system_id (PortableServer::Servant servant, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry); - // Must be used with SYSTEM_ID policy. -}; - -class TAO_System_Id_With_Unique_Id_Strategy : public TAO_Id_Assignment_Strategy -{ - // = TITLE - // System id strategy. - // - // = DESCRIPTION - // Strategy for the SYSTEM_ID policy (with UNIQUE_ID policy). -public: - virtual int bind_using_system_id (PortableServer::Servant servant, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry); - // Must be used with SYSTEM_ID policy. -}; - -class TAO_System_Id_With_Multiple_Id_Strategy : public TAO_Id_Assignment_Strategy -{ - // = TITLE - // System id strategy. - // - // = DESCRIPTION - // Strategy for the SYSTEM_ID policy (with MULTIPLE_ID policy). -public: - virtual int bind_using_system_id (PortableServer::Servant servant, - CORBA::Short priority, - TAO_Active_Object_Map::Map_Entry *&entry); - // Must be used with SYSTEM_ID policy. -}; - -class TAO_Id_Hint_Strategy -{ - // = TITLE - // Id uniqueness strategy. - // - // = DESCRIPTION - // Strategy for implementing points of variation between the - // active hint and the no hint policies. -public: - virtual ~TAO_Id_Hint_Strategy (void); - // Virtual destructor. - - virtual int recover_key (const PortableServer::ObjectId &system_id, - PortableServer::ObjectId &user_id) = 0; - // Find the user id from the system id. - - virtual int bind (TAO_Active_Object_Map::Map_Entry &entry) = 0; - // Add to map. - - virtual int unbind (TAO_Active_Object_Map::Map_Entry &entry) = 0; - // Remove from map. - - virtual int find (const PortableServer::ObjectId &system_id, - TAO_Active_Object_Map::Map_Entry *&entry) = 0; - // Find system id. - - virtual size_t hint_size (void) = 0; - // How big is the hint generated by this strategy? - - virtual int system_id (PortableServer::ObjectId_out system_id, - TAO_Active_Object_Map::Map_Entry &entry) = 0; - // Get the system id associated with this entry. -}; - -class TAO_Active_Hint_Strategy : public TAO_Id_Hint_Strategy -{ - // = TITLE - // Active hint strategy. - // - // = DESCRIPTION - // Strategy for adding active hints to ids. -public: - TAO_Active_Hint_Strategy (CORBA::ULong map_size); - - virtual ~TAO_Active_Hint_Strategy (void); - // Virtual destructor. - - virtual int recover_key (const PortableServer::ObjectId &system_id, - PortableServer::ObjectId &user_id); - - virtual int bind (TAO_Active_Object_Map::Map_Entry &entry); - - virtual int unbind (TAO_Active_Object_Map::Map_Entry &entry); - - virtual int find (const PortableServer::ObjectId &system_id, - TAO_Active_Object_Map::Map_Entry *&entry); - - virtual size_t hint_size (void); - - virtual int system_id (PortableServer::ObjectId_out system_id, - TAO_Active_Object_Map::Map_Entry &entry); - - typedef ACE_Active_Map_Manager_Adapter< - PortableServer::ObjectId, - TAO_Active_Object_Map::Map_Entry *, - TAO_Preserve_Original_Key_Adapter> system_id_map; - - system_id_map system_id_map_; -}; - -class TAO_No_Hint_Strategy : public TAO_Id_Hint_Strategy -{ - // = TITLE - // No hint strategy. - // - // = DESCRIPTION - // Strategy for not adding active hints to ids. -public: - virtual ~TAO_No_Hint_Strategy (void); - // Virtual destructor. - - virtual int recover_key (const PortableServer::ObjectId &system_id, - PortableServer::ObjectId &user_id); - - virtual int bind (TAO_Active_Object_Map::Map_Entry &entry); - - virtual int unbind (TAO_Active_Object_Map::Map_Entry &entry); - - virtual int find (const PortableServer::ObjectId &system_id, - TAO_Active_Object_Map::Map_Entry *&entry); - - virtual size_t hint_size (void); - - virtual int system_id (PortableServer::ObjectId_out system_id, - TAO_Active_Object_Map::Map_Entry &entry); -}; - -#if defined (__ACE_INLINE__) -# include "tao/Active_Object_Map.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_ACTIVE_OBJECT_MAP_H */ diff --git a/TAO/tao/Active_Object_Map.i b/TAO/tao/Active_Object_Map.i deleted file mode 100644 index b0275d474ee..00000000000 --- a/TAO/tao/Active_Object_Map.i +++ /dev/null @@ -1,221 +0,0 @@ -// $Id$ - -ACE_INLINE int -TAO_Active_Object_Map::is_servant_in_map (PortableServer::Servant servant, - int &deactivated) -{ - return this->id_uniqueness_strategy_->is_servant_in_map (servant, - deactivated); -} - -ACE_INLINE int -TAO_Active_Object_Map::bind_using_system_id_returning_system_id (PortableServer::Servant servant, - CORBA::Short priority, - PortableServer::ObjectId_out system_id) -{ - Map_Entry *entry = 0; - - int result = this->id_assignment_strategy_->bind_using_system_id (servant, - priority, - entry); - - if (result == 0) - result = this->id_hint_strategy_->system_id (system_id, - *entry); - return result; -} - -ACE_INLINE int -TAO_Active_Object_Map::bind_using_system_id_returning_user_id (PortableServer::Servant servant, - CORBA::Short priority, - PortableServer::ObjectId_out user_id) -{ - Map_Entry *entry = 0; - - int result = this->id_assignment_strategy_->bind_using_system_id (servant, - priority, - entry); - if (result == 0) - ACE_NEW_RETURN (user_id, - PortableServer::ObjectId (entry->user_id_), - -1); - return result; -} - -ACE_INLINE int -TAO_Active_Object_Map::bind_using_user_id (PortableServer::Servant servant, - const PortableServer::ObjectId &user_id, - CORBA::Short priority) -{ - Map_Entry *entry = 0; - return this->id_uniqueness_strategy_->bind_using_user_id (servant, - user_id, - priority, - entry); -} - -ACE_INLINE int -TAO_Active_Object_Map::find_system_id_using_user_id (const PortableServer::ObjectId &user_id, - CORBA::Short priority, - PortableServer::ObjectId_out system_id) -{ - Map_Entry *entry = 0; - int result = this->id_uniqueness_strategy_->bind_using_user_id (0, - user_id, - priority, - entry); - if (result == 0) - result = this->id_hint_strategy_->system_id (system_id, - *entry); - return result; -} - -ACE_INLINE int -TAO_Active_Object_Map::rebind_using_user_id_and_system_id (PortableServer::Servant servant, - const PortableServer::ObjectId &user_id, - const PortableServer::ObjectId &system_id, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - ACE_UNUSED_ARG (system_id); - - return this->id_uniqueness_strategy_->bind_using_user_id (servant, - user_id, - -1, - entry); -} - -ACE_INLINE int -TAO_Active_Object_Map::unbind_using_user_id (const PortableServer::ObjectId &user_id) -{ - return this->id_uniqueness_strategy_->unbind_using_user_id (user_id); -} - -ACE_INLINE int -TAO_Active_Object_Map::find_user_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out user_id) -{ - return this->id_uniqueness_strategy_->find_user_id_using_servant (servant, - user_id); -} - -ACE_INLINE int -TAO_Active_Object_Map::find_system_id_using_servant (PortableServer::Servant servant, - PortableServer::ObjectId_out system_id, - CORBA::Short &priority) -{ - return this->id_uniqueness_strategy_->find_system_id_using_servant (servant, - system_id, - priority); -} - -ACE_INLINE int -TAO_Active_Object_Map::find_servant_using_user_id (const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant) -{ - Map_Entry *entry = 0; - int result = this->user_id_map_->find (user_id, - entry); - if (result == 0) - { - if (entry->deactivated_) - result = -1; - else if (entry->servant_ == 0) - result = -1; - else - servant = entry->servant_; - } - - return result; -} - -ACE_INLINE int -TAO_Active_Object_Map::find_servant_using_system_id_and_user_id (const PortableServer::ObjectId &system_id, - const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - return this->lifespan_strategy_->find_servant_using_system_id_and_user_id (system_id, - user_id, - servant, - entry); -} - -ACE_INLINE int -TAO_Active_Object_Map::find_servant_and_system_id_using_user_id (const PortableServer::ObjectId &user_id, - PortableServer::Servant &servant, - PortableServer::ObjectId_out system_id, - CORBA::Short &priority) -{ - Map_Entry *entry = 0; - int result = this->user_id_map_->find (user_id, - entry); - - if (result == 0) - { - if (entry->deactivated_) - result = -1; - else if (entry->servant_ == 0) - result = -1; - else - { - result = this->id_hint_strategy_->system_id (system_id, - *entry); - if (result == 0) - { - servant = entry->servant_; - priority = entry->priority_; - } - } - } - - return result; -} - -ACE_INLINE int -TAO_Active_Object_Map::find_servant_and_system_id_using_user_id (const PortableServer::ObjectId &user_id, - TAO_Active_Object_Map::Map_Entry *&entry) -{ - return this->user_id_map_->find (user_id, - entry); -} - -ACE_INLINE int -TAO_Active_Object_Map::find_user_id_using_system_id (const PortableServer::ObjectId &system_id, - PortableServer::ObjectId_out user_id) -{ - PortableServer::ObjectId id; - int result = this->id_hint_strategy_->recover_key (system_id, - id); - if (result == 0) - ACE_NEW_RETURN (user_id, - PortableServer::ObjectId (id), - -1); - return 0; -} - -ACE_INLINE int -TAO_Active_Object_Map::find_user_id_using_system_id (const PortableServer::ObjectId &system_id, - PortableServer::ObjectId &user_id) -{ - return this->id_hint_strategy_->recover_key (system_id, - user_id); -} - -ACE_INLINE CORBA::Boolean -TAO_Active_Object_Map::remaining_activations (PortableServer::Servant servant) -{ - return this->id_uniqueness_strategy_->remaining_activations (servant); -} - -ACE_INLINE size_t -TAO_Active_Object_Map::current_size (void) -{ - return this->user_id_map_->current_size (); -} - -/* static */ -ACE_INLINE size_t -TAO_Active_Object_Map::system_id_size (void) -{ - return TAO_Active_Object_Map::system_id_size_; -} diff --git a/TAO/tao/DomainS.cpp b/TAO/tao/DomainS.cpp deleted file mode 100644 index b8699c63f0b..00000000000 --- a/TAO/tao/DomainS.cpp +++ /dev/null @@ -1,526 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#include "DomainC.h" -#include "tao/Operation_Table.h" -#include "tao/Server_Request.h" -#include "tao/POA_CORBA.h" -#include "tao/ORB.h" -#include "tao/Typecode.h" - -class TAO_CORBA_DomainManager_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 20:54:02 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: gperf -m -M -J -c -C -D -E -T -f 0 -a -o -t -p -K opname_ -L C++ -Z TAO_CORBA_DomainManager_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_CORBA_DomainManager_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 0, 18, 0, 18, 18, - 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, - 18, 0, 18, 18, 18, 18, 18, 18, - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_CORBA_DomainManager_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 3, - MIN_WORD_LENGTH = 5, - MAX_WORD_LENGTH = 17, - MIN_HASH_VALUE = 5, - MAX_HASH_VALUE = 17, - HASH_VALUE_RANGE = 13, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, - {"_is_a", &POA_CORBA::DomainManager::_is_a_skel}, - {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, - {"_non_existent", &POA_CORBA::DomainManager::_non_existent_skel}, - {"",0}, {"",0}, {"",0}, - {"get_domain_policy", &POA_CORBA::DomainManager::get_domain_policy_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 20:54:02 */ -static TAO_CORBA_DomainManager_Perfect_Hash_OpTable tao_CORBA_DomainManager_optable; - -// skeleton constructor -POA_CORBA::DomainManager::DomainManager (void) -{ - this->optable_ = &tao_CORBA_DomainManager_optable; -} - -// copy ctor -POA_CORBA::DomainManager::DomainManager (const DomainManager& rhs) - : TAO_ServantBase (rhs) -{} - -// skeleton destructor -POA_CORBA::DomainManager::~DomainManager (void) -{ -} - -void POA_CORBA::DomainManager::get_domain_policy_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_CORBA::DomainManager *_tao_impl = (POA_CORBA::DomainManager *)_tao_object_reference; - CORBA::Policy_var _tao_retval; - CORBA::PolicyType policy_type; - if (!( - (_tao_in >> policy_type) - )) - ACE_THROW (CORBA::MARSHAL () ); - - _tao_retval = _tao_impl->get_domain_policy ( - policy_type, - ACE_TRY_ENV - ); - ACE_CHECK; - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << _tao_retval.in ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void POA_CORBA::DomainManager::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_CORBA::DomainManager *_tao_impl = (POA_CORBA::DomainManager *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!((_tao_in >> value.out ()))) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void POA_CORBA::DomainManager::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::DomainManager *_tao_impl = (POA_CORBA::DomainManager *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean POA_CORBA::DomainManager::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/DomainManager:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* POA_CORBA::DomainManager::_downcast ( - const char* logical_type_id - ) -{ - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/DomainManager:1.0") == 0) - return ACE_static_cast (POA_CORBA::DomainManager_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void POA_CORBA::DomainManager::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* POA_CORBA::DomainManager::_interface_repository_id (void) const -{ - return "IDL:omg.org/CORBA/DomainManager:1.0"; -} - - -CORBA::DomainManager* -POA_CORBA::DomainManager::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::DomainManager *retval = CORBA_DomainManager::_nil (); - - ACE_NEW_RETURN (retval, - POA_CORBA::_tao_collocated_DomainManager (this, - stub), - CORBA_DomainManager::_nil ()); - - return retval; -} - -POA_CORBA::_tao_collocated_DomainManager::_tao_collocated_DomainManager ( - POA_CORBA::DomainManager_ptr servant, - TAO_Stub *stub - ) - : ACE_CORBA_1 (DomainManager) (), - CORBA_Object (stub, servant, 1), - servant_ (servant) -{ -} - -POA_CORBA::DomainManager_ptr POA_CORBA::_tao_collocated_DomainManager::_get_servant (void) const -{ - return this->servant_; -} - -CORBA::Policy_ptr POA_CORBA::_tao_collocated_DomainManager::get_domain_policy ( - CORBA::PolicyType policy_type, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->get_domain_policy ( - policy_type, - ACE_TRY_ENV - ); -} - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -class TAO_CORBA_ConstructionPolicy_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 20:54:02 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: gperf -m -M -J -c -C -D -E -T -f 0 -a -o -t -p -K opname_ -L C++ -Z TAO_CORBA_ConstructionPolicy_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_CORBA_ConstructionPolicy_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 0, 20, 0, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, - 20, 20, 20, 20, 0, 20, 0, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_CORBA_ConstructionPolicy_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 3, - MIN_WORD_LENGTH = 5, - MAX_WORD_LENGTH = 19, - MIN_HASH_VALUE = 5, - MAX_HASH_VALUE = 19, - HASH_VALUE_RANGE = 15, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, - {"_is_a", &POA_CORBA::ConstructionPolicy::_is_a_skel}, - {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, - {"_non_existent", &POA_CORBA::ConstructionPolicy::_non_existent_skel}, - {"",0}, {"",0}, {"",0}, {"",0}, {"",0}, - {"make_domain_manager", &POA_CORBA::ConstructionPolicy::make_domain_manager_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 20:54:02 */ -static TAO_CORBA_ConstructionPolicy_Perfect_Hash_OpTable tao_CORBA_ConstructionPolicy_optable; - -// skeleton constructor -POA_CORBA::ConstructionPolicy::ConstructionPolicy (void) -{ - this->optable_ = &tao_CORBA_ConstructionPolicy_optable; -} - -// copy ctor -POA_CORBA::ConstructionPolicy::ConstructionPolicy (const ConstructionPolicy& rhs) - : ACE_NESTED_CLASS (POA_CORBA,Policy) (rhs), - TAO_ServantBase (rhs) -{} - -// skeleton destructor -POA_CORBA::ConstructionPolicy::~ConstructionPolicy (void) -{ -} - -void POA_CORBA::ConstructionPolicy::make_domain_manager_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - // @@ TODO this method will require some modifications once the - // interface repository is implemented. The modifications are - // documented with @@ comments. Right now we raise a - // MARSHAL exception.... - - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_CORBA::ConstructionPolicy *_tao_impl = (POA_CORBA::ConstructionPolicy *)_tao_object_reference; - -#if (TAO_HAS_INTERFACE_REPOSITORY == 1) - IR::InterfaceDef_var object_type; - - CORBA::Boolean constr_policy; - if (!( - (_tao_in >> object_type.out ()) && - (_tao_in >> CORBA::Any::to_boolean (constr_policy)) - )) - ACE_THROW (CORBA::MARSHAL () ); - - _tao_impl->make_domain_manager ( - object_type.in (), - constr_policy, - ACE_TRY_ENV - ); - ACE_CHECK; - _tao_server_request.init_reply (ACE_TRY_ENV); -#else /* TAO_HAS_INTERFACE_REPOSITORY == 1 */ - ACE_UNUSED_ARG (_tao_in); - ACE_UNUSED_ARG (_tao_impl); - ACE_THROW (CORBA::MARSHAL ()); -#endif /* TAO_HAS_INTERFACE_REPOSITORY == 1 */ -} - -void POA_CORBA::ConstructionPolicy::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_CORBA::ConstructionPolicy *_tao_impl = (POA_CORBA::ConstructionPolicy *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!((_tao_in >> value.out ()))) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void POA_CORBA::ConstructionPolicy::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::ConstructionPolicy *_tao_impl = (POA_CORBA::ConstructionPolicy *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean POA_CORBA::ConstructionPolicy::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/ConstructionPolicy:1.0")) || - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Policy:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* POA_CORBA::ConstructionPolicy::_downcast ( - const char* logical_type_id - ) -{ - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/ConstructionPolicy:1.0") == 0) - return ACE_static_cast (POA_CORBA::ConstructionPolicy_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Policy:1.0") == 0) - return ACE_static_cast (POA_CORBA::Policy_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void POA_CORBA::ConstructionPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* POA_CORBA::ConstructionPolicy::_interface_repository_id (void) const -{ - return "IDL:omg.org/CORBA/ConstructionPolicy:1.0"; -} - - -CORBA::ConstructionPolicy* -POA_CORBA::ConstructionPolicy::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::ConstructionPolicy *retval = - CORBA_ConstructionPolicy::_nil (); - - ACE_NEW_RETURN (retval, - POA_CORBA::_tao_collocated_ConstructionPolicy (this, - stub), - CORBA_ConstructionPolicy::_nil ()); - - return retval; -} - -POA_CORBA::_tao_collocated_ConstructionPolicy::_tao_collocated_ConstructionPolicy ( - POA_CORBA::ConstructionPolicy_ptr servant, - TAO_Stub *stub - ) - : ACE_CORBA_1 (ConstructionPolicy) (), - ACE_NESTED_CLASS (POA_CORBA,_tao_thru_poa_collocated_CORBA_Policy) (stub), - CORBA_Object (stub, servant, 1), - servant_ (servant) -{ -} - -POA_CORBA::ConstructionPolicy_ptr POA_CORBA::_tao_collocated_ConstructionPolicy::_get_servant (void) const -{ - return this->servant_; -} - -void POA_CORBA::_tao_collocated_ConstructionPolicy::make_domain_manager ( - IR_InterfaceDef *object_type, - CORBA::Boolean constr_policy, - CORBA::Environment &ACE_TRY_ENV - ) -{ - this->servant_->make_domain_manager ( - object_type, - constr_policy, - ACE_TRY_ENV - ); -} - -CORBA::Boolean POA_CORBA::_tao_collocated_ConstructionPolicy::_is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->_is_a ( - logical_type_id, - ACE_TRY_ENV - ); -} - -#endif /* ! defined (TAO_HAS_MINIMUM_CORBA) */ diff --git a/TAO/tao/DomainS_T.cpp b/TAO/tao/DomainS_T.cpp deleted file mode 100644 index 7af8ccd4a7c..00000000000 --- a/TAO/tao/DomainS_T.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_DOMAINS_T_CPP_ -#define _TAO_IDL_DOMAINS_T_CPP_ - -#include "tao/DomainS_T.h" - -#if !defined (__ACE_INLINE__) -#include "tao/DomainS_T.i" -#endif /* !defined INLINE */ - - -#endif /* ifndef */ diff --git a/TAO/tao/DomainS_T.h b/TAO/tao/DomainS_T.h deleted file mode 100644 index 0e31e09140d..00000000000 --- a/TAO/tao/DomainS_T.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_DOMAINS_T_H_ -#define _TAO_IDL_DOMAINS_T_H_ -#include "ace/pre.h" - -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - - -#if defined (__ACE_INLINE__) -#include "tao/DomainS_T.i" -#endif /* defined INLINE */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "tao/DomainS_T.cpp" -#endif /* defined REQUIRED SOURCE */ - - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("DomainS_T.cpp") -#endif /* defined REQUIRED PRAGMA */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#include "ace/post.h" -#endif /* ifndef */ diff --git a/TAO/tao/DomainS_T.i b/TAO/tao/DomainS_T.i deleted file mode 100644 index cb0f9d3128a..00000000000 --- a/TAO/tao/DomainS_T.i +++ /dev/null @@ -1,200 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - - -#if defined (ACE_HAS_USING_KEYWORD) -template ACE_INLINE -POA_CORBA::DomainManager_tie::DomainManager_tie (T &t) - : ptr_ (&t), - poa_ (PortableServer::POA::_nil ()), - rel_ (0) -{} - -template ACE_INLINE -POA_CORBA::DomainManager_tie::DomainManager_tie (T &t, PortableServer::POA_ptr poa) - : ptr_ (&t), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (0) -{} - -template ACE_INLINE -POA_CORBA::DomainManager_tie::DomainManager_tie (T *tp, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_nil ()), - rel_ (release) -{} - -template ACE_INLINE -POA_CORBA::DomainManager_tie::DomainManager_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (release) -{} - -template ACE_INLINE -POA_CORBA::DomainManager_tie::~DomainManager_tie (void) -{ - if (this->rel_) delete this->ptr_; -} - -template ACE_INLINE T * -POA_CORBA::DomainManager_tie::_tied_object (void) -{ - return this->ptr_; -} - -template ACE_INLINE void -POA_CORBA::DomainManager_tie::_tied_object (T &obj) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = &obj; - this->rel_ = 0; -} - -template ACE_INLINE void -POA_CORBA::DomainManager_tie::_tied_object (T *obj, CORBA::Boolean release) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = obj; - this->rel_ = release; -} - -template ACE_INLINE CORBA::Boolean -POA_CORBA::DomainManager_tie::_is_owner (void) -{ - return this->rel_; -} - -template ACE_INLINE void -POA_CORBA::DomainManager_tie::_is_owner (CORBA::Boolean b) -{ - this->rel_ = b; -} - -template ACE_INLINE PortableServer::POA_ptr -POA_CORBA::DomainManager_tie::_default_POA (CORBA::Environment &ACE_TRY_ENV) -{ - if (!CORBA::is_nil (this->poa_.in ())) - return PortableServer::POA::_duplicate (this->poa_.in ()); - - return this->DomainManager::_default_POA (ACE_TRY_ENV); -} - -template ACE_INLINE -CORBA::Policy_ptr POA_CORBA::DomainManager_tie::get_domain_policy ( - CORBA::PolicyType policy_type, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->ptr_->get_domain_policy ( - policy_type, - ACE_TRY_ENV - ); -} - -#endif /* ACE_HAS_USING_KEYWORD */ - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -#if defined (ACE_HAS_USING_KEYWORD) -template ACE_INLINE -POA_CORBA::ConstructionPolicy_tie::ConstructionPolicy_tie (T &t) - : ptr_ (&t), - poa_ (PortableServer::POA::_nil ()), - rel_ (0) -{} - -template ACE_INLINE -POA_CORBA::ConstructionPolicy_tie::ConstructionPolicy_tie (T &t, PortableServer::POA_ptr poa) - : ptr_ (&t), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (0) -{} - -template ACE_INLINE -POA_CORBA::ConstructionPolicy_tie::ConstructionPolicy_tie (T *tp, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_nil ()), - rel_ (release) -{} - -template ACE_INLINE -POA_CORBA::ConstructionPolicy_tie::ConstructionPolicy_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (release) -{} - -template ACE_INLINE -POA_CORBA::ConstructionPolicy_tie::~ConstructionPolicy_tie (void) -{ - if (this->rel_) delete this->ptr_; -} - -template ACE_INLINE T * -POA_CORBA::ConstructionPolicy_tie::_tied_object (void) -{ - return this->ptr_; -} - -template ACE_INLINE void -POA_CORBA::ConstructionPolicy_tie::_tied_object (T &obj) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = &obj; - this->rel_ = 0; -} - -template ACE_INLINE void -POA_CORBA::ConstructionPolicy_tie::_tied_object (T *obj, CORBA::Boolean release) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = obj; - this->rel_ = release; -} - -template ACE_INLINE CORBA::Boolean -POA_CORBA::ConstructionPolicy_tie::_is_owner (void) -{ - return this->rel_; -} - -template ACE_INLINE void -POA_CORBA::ConstructionPolicy_tie::_is_owner (CORBA::Boolean b) -{ - this->rel_ = b; -} - -template ACE_INLINE PortableServer::POA_ptr -POA_CORBA::ConstructionPolicy_tie::_default_POA (CORBA::Environment &env) -{ - if (!CORBA::is_nil (this->poa_.in ())) - return PortableServer::POA::_duplicate (this->poa_.in ()); - - return this->Construction::_default_POA (env); -} - -template ACE_INLINE -void POA_CORBA::ConstructionPolicy_tie::make_domain_manager ( - CORBA::InterfaceDef_ptr object_type, - CORBA::Boolean constr_policy, - CORBA::Environment &ACE_TRY_ENV - ) -{ - this->ptr_->make_domain_manager ( - object_type, - constr_policy, - ACE_TRY_ENV - ); -} - -#endif /* ACE_HAS_USING_KEYWORD */ - -#endif /* ! defined (TAO_HAS_MINIMUM_CORBA) diff --git a/TAO/tao/FT_CORBAS.cpp b/TAO/tao/FT_CORBAS.cpp deleted file mode 100644 index 23bc8a5d04e..00000000000 --- a/TAO/tao/FT_CORBAS.cpp +++ /dev/null @@ -1,1197 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#include "tao/FT_CORBAS.h" - -#if (TAO_HAS_FT_CORBA == 1) - -#include "tao/Operation_Table.h" -#include "tao/Stub.h" -#include "tao/ORB_Core.h" -#include "tao/Server_Request.h" -#include "tao/NVList.h" -#include "tao/Object_Adapter.h" - -// The code needs to be cleaned up a bit here.. - Bala -#if !defined (__ACE_INLINE__) -#include "FT_CORBAS.i" -#endif /* !defined INLINE */ - -class TAO_FT_RequestDurationPolicy_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 15:23:34 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: /project/acetmp/bala/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_FT_RequestDurationPolicy_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_FT_RequestDurationPolicy_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { -#if defined (ACE_MVS) - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, - 28, 0, 0, 0, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 0, 28, 28, 28, 28, 0, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, -#else - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 0, 28, 0, 28, 0, - 0, 0, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 0, 28, 28, 28, - 28, 0, 28, 28, 28, 28, 28, 28, -#endif /* ACE_MVS */ - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_FT_RequestDurationPolicy_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 6, - MIN_WORD_LENGTH = 4, - MAX_WORD_LENGTH = 27, - MIN_HASH_VALUE = 4, - MAX_HASH_VALUE = 27, - HASH_VALUE_RANGE = 24, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0},{"",0},{"",0},{"",0}, - {"copy", &FT_POA_RequestDurationPolicy::copy_skel}, - {"_is_a", &FT_POA_RequestDurationPolicy::_is_a_skel}, - {"",0}, - {"destroy", &FT_POA_RequestDurationPolicy::destroy_skel}, - {"",0},{"",0},{"",0},{"",0},{"",0}, - {"_non_existent", FT_POA_RequestDurationPolicy::_non_existent_skel}, - {"",0},{"",0}, - {"_get_policy_type", &FT_POA_RequestDurationPolicy::_get_policy_type_skel}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, - {"",0}, - {"_get_request_duration_value",&FT_POA_RequestDurationPolicy::_get_request_duration_value_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 15:23:34 */ -static TAO_FT_RequestDurationPolicy_Perfect_Hash_OpTable tao_FT_RequestDurationPolicy_optable; - -FT::RequestDurationPolicy_ptr _TAO_collocation_POA_FT_RequestDurationPolicy_Stub_Factory ( - CORBA::Object_ptr obj - ) -{ - TAO_Stub *stub = obj->_stubobj (); - - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - FT::RequestDurationPolicy_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - FT_POA_tao_thru_poa_collocated_RequestDurationPolicy (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - break; - default: - break; - } - return 0; -} - -int _TAO_collocation_POA_FT_RequestDurationPolicy_Stub_Factory_Initializer (long dummy) -{ - ACE_UNUSED_ARG (dummy); - - _TAO_collocation_FT_RequestDurationPolicy_Stub_Factory_function_pointer = - _TAO_collocation_POA_FT_RequestDurationPolicy_Stub_Factory; - - return 0; -} - -static int _TAO_collocation_POA_FT_RequestDurationPolicy_Stub_Factory_Initializer_Scarecrow = - _TAO_collocation_POA_FT_RequestDurationPolicy_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_FT_RequestDurationPolicy_Stub_Factory_Initializer)); - -// skeleton constructor -FT_POA_RequestDurationPolicy::FT_POA_RequestDurationPolicy (void) -{ - this->optable_ = &tao_FT_RequestDurationPolicy_optable; -} - -// copy ctor -FT_POA_RequestDurationPolicy::FT_POA_RequestDurationPolicy (const FT_POA_RequestDurationPolicy& rhs) - : ACE_NESTED_CLASS (POA_CORBA,Policy) (rhs), - TAO_ServantBase (rhs) -{} - -// skeleton destructor -FT_POA_RequestDurationPolicy::~FT_POA_RequestDurationPolicy (void) -{ -} - -void FT_POA_RequestDurationPolicy::_get_request_duration_value_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - FT_POA_RequestDurationPolicy *_tao_impl = (FT_POA_RequestDurationPolicy *)_tao_object_reference; - - TimeBase::TimeT _tao_retval = 0; - - _tao_retval = _tao_impl->request_duration_value ( - ACE_TRY_ENV - ); - - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << _tao_retval) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void FT_POA_RequestDurationPolicy::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - FT_POA_RequestDurationPolicy *_tao_impl = (FT_POA_RequestDurationPolicy *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!(_tao_in >> value.out ())) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void FT_POA_RequestDurationPolicy::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - FT_POA_RequestDurationPolicy *_tao_impl = (FT_POA_RequestDurationPolicy *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean FT_POA_RequestDurationPolicy::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/FT/RequestDurationPolicy:1.0")) || - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Policy:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* FT_POA_RequestDurationPolicy::_downcast ( - const char* logical_type_id - ) -{ -if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/FT/RequestDurationPolicy:1.0") == 0) - return ACE_static_cast (FT_POA_RequestDurationPolicy_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Policy:1.0") == 0) - return ACE_static_cast (POA_CORBA::Policy_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void FT_POA_RequestDurationPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* FT_POA_RequestDurationPolicy::_interface_repository_id (void) const -{ - return "IDL:omg.org/FT/RequestDurationPolicy:1.0"; -} - -FT::RequestDurationPolicy* -FT_POA_RequestDurationPolicy::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ()) - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ::FT::RequestDurationPolicy_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - FT_POA_tao_thru_poa_collocated_RequestDurationPolicy (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - } - else - { - // stub->_incr_refcnt (); - CORBA::Object_ptr tmp = CORBA::Object::_nil (); - ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); - CORBA::Object_var obj = tmp; - return ::FT::RequestDurationPolicy::_unchecked_narrow (obj.in ()); - } -} - -FT_POA_tao_thru_poa_collocated_RequestDurationPolicy::FT_POA_tao_thru_poa_collocated_RequestDurationPolicy ( - TAO_Stub *stub -) - : ACE_NESTED_CLASS (POA_CORBA,_tao_thru_poa_collocated_CORBA_Policy) (stub), - CORBA_Object (stub, 0, 1) -{ -} - -CORBA::Boolean FT_POA_tao_thru_poa_collocated_RequestDurationPolicy::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_is_a", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - FT_POA_RequestDurationPolicy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/FT/RequestDurationPolicy:1.0" - ) - )->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -CORBA::Boolean FT_POA_tao_thru_poa_collocated_RequestDurationPolicy::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_non_existent", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - FT_POA_RequestDurationPolicy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/FT/RequestDurationPolicy:1.0" - ) - )->_non_existent (ACE_TRY_ENV); -} - - -TimeBase::TimeT -FT_POA_tao_thru_poa_collocated_RequestDurationPolicy::request_duration_value ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - TimeBase::TimeT _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "request_duration_value", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (_tao_retval); - return ACE_reinterpret_cast ( - FT_POA_RequestDurationPolicy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/FT/RequestDurationPolicy:1.0" - ) - )->request_duration_value ( - ACE_TRY_ENV - ); - -} - - - -class TAO_FT_HeartbeatPolicy_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 15:23:34 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: /project/acetmp/bala/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_FT_HeartbeatPolicy_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_FT_HeartbeatPolicy_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { -#if defined (ACE_MVS) - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, - 28, 0, 0, 0, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 0, 28, 28, 28, 28, 0, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, -#else - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 0, 28, 0, 28, 0, - 0, 0, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 0, 28, 28, 28, - 28, 0, 28, 28, 28, 28, 28, 28, -#endif /* ACE_MVS */ - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_FT_HeartbeatPolicy_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 6, - MIN_WORD_LENGTH = 4, - MAX_WORD_LENGTH = 27, - MIN_HASH_VALUE = 4, - MAX_HASH_VALUE = 27, - HASH_VALUE_RANGE = 24, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0},{"",0},{"",0},{"",0}, - {"copy", &FT_POA_HeartbeatPolicy::copy_skel}, - {"_is_a", &FT_POA_HeartbeatPolicy::_is_a_skel}, - {"",0}, - {"destroy", &FT_POA_HeartbeatPolicy::destroy_skel}, - {"",0},{"",0},{"",0},{"",0},{"",0}, - {"_non_existent", &FT_POA_HeartbeatPolicy::_non_existent_skel}, - {"",0},{"",0}, - {"_get_policy_type", &FT_POA_HeartbeatPolicy::_get_policy_type_skel}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, - {"",0}, - {"_get_heartbeat_policy_value", &FT_POA_HeartbeatPolicy::_get_heartbeat_policy_value_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 15:23:34 */ -static TAO_FT_HeartbeatPolicy_Perfect_Hash_OpTable tao_FT_HeartbeatPolicy_optable; - -FT::HeartbeatPolicy_ptr _TAO_collocation_POA_FT_HeartbeatPolicy_Stub_Factory ( - CORBA::Object_ptr obj - ) -{ - TAO_Stub *stub = obj->_stubobj (); - - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - FT::HeartbeatPolicy_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - FT_POA_tao_thru_poa_collocated_HeartbeatPolicy (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - break; - default: - break; - } - return 0; -} - -int _TAO_collocation_POA_FT_HeartbeatPolicy_Stub_Factory_Initializer (long dummy) -{ - ACE_UNUSED_ARG (dummy); - - _TAO_collocation_FT_HeartbeatPolicy_Stub_Factory_function_pointer = - _TAO_collocation_POA_FT_HeartbeatPolicy_Stub_Factory; - - return 0; -} - -static int _TAO_collocation_POA_FT_HeartbeatPolicy_Stub_Factory_Initializer_Scarecrow = - _TAO_collocation_POA_FT_HeartbeatPolicy_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_FT_HeartbeatPolicy_Stub_Factory_Initializer)); - -// skeleton constructor -FT_POA_HeartbeatPolicy::FT_POA_HeartbeatPolicy (void) -{ - this->optable_ = &tao_FT_HeartbeatPolicy_optable; -} - -// copy ctor -FT_POA_HeartbeatPolicy::FT_POA_HeartbeatPolicy (const FT_POA_HeartbeatPolicy& rhs) - : ACE_NESTED_CLASS (POA_CORBA,Policy) (rhs), - TAO_ServantBase (rhs) -{} - -// skeleton destructor -FT_POA_HeartbeatPolicy::~FT_POA_HeartbeatPolicy (void) -{ -} - -void FT_POA_HeartbeatPolicy::_get_heartbeat_policy_value_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - FT_POA_HeartbeatPolicy *_tao_impl = (FT_POA_HeartbeatPolicy *)_tao_object_reference; - - FT::HeartbeatPolicyValue _tao_retval; - - _tao_retval = _tao_impl->heartbeat_policy_value ( - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << _tao_retval) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void FT_POA_HeartbeatPolicy::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - FT_POA_HeartbeatPolicy *_tao_impl = (FT_POA_HeartbeatPolicy *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!(_tao_in >> value.out ())) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void FT_POA_HeartbeatPolicy::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - FT_POA_HeartbeatPolicy *_tao_impl = (FT_POA_HeartbeatPolicy *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean FT_POA_HeartbeatPolicy::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/FT/HeartbeatPolicy:1.0")) || - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Policy:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* FT_POA_HeartbeatPolicy::_downcast ( - const char* logical_type_id - ) -{ -if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/FT/HeartbeatPolicy:1.0") == 0) - return ACE_static_cast (FT_POA_HeartbeatPolicy_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Policy:1.0") == 0) - return ACE_static_cast (POA_CORBA::Policy_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void FT_POA_HeartbeatPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* FT_POA_HeartbeatPolicy::_interface_repository_id (void) const -{ - return "IDL:omg.org/FT/HeartbeatPolicy:1.0"; -} - -FT::HeartbeatPolicy* -FT_POA_HeartbeatPolicy::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ()) - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ::FT::HeartbeatPolicy_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - FT_POA_tao_thru_poa_collocated_HeartbeatPolicy (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - } - else - { - // stub->_incr_refcnt (); - CORBA::Object_ptr tmp = CORBA::Object::_nil (); - ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); - CORBA::Object_var obj = tmp; - return FT::HeartbeatPolicy::_unchecked_narrow (obj.in ()); - } -} - -FT_POA_tao_thru_poa_collocated_HeartbeatPolicy::FT_POA_tao_thru_poa_collocated_HeartbeatPolicy ( - TAO_Stub *stub -) - : ACE_NESTED_CLASS (POA_CORBA,_tao_thru_poa_collocated_CORBA_Policy) (stub), - CORBA_Object (stub, 0, 1) -{ -} - -CORBA::Boolean FT_POA_tao_thru_poa_collocated_HeartbeatPolicy::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_is_a", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - FT_POA_HeartbeatPolicy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/FT/HeartbeatPolicy:1.0" - ) - )->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -CORBA::Boolean FT_POA_tao_thru_poa_collocated_HeartbeatPolicy::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_non_existent", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - FT_POA_HeartbeatPolicy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/FT/HeartbeatPolicy:1.0" - ) - )->_non_existent (ACE_TRY_ENV); -} - - -FT::HeartbeatPolicyValue FT_POA_tao_thru_poa_collocated_HeartbeatPolicy::heartbeat_policy_value ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - FT::HeartbeatPolicyValue _tao_retval; - ACE_UNUSED_ARG (_tao_retval); - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "heartbeat_policy_value", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (_tao_retval); - return ACE_reinterpret_cast ( - FT_POA_HeartbeatPolicy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/FT/HeartbeatPolicy:1.0" - ) - )->heartbeat_policy_value ( - ACE_TRY_ENV - ); - -} - - - -class TAO_FT_HeartbeatEnabledPolicy_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 15:23:34 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: /project/acetmp/bala/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_FT_HeartbeatEnabledPolicy_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_FT_HeartbeatEnabledPolicy_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { -#if defined (ACE_MVS) - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 0, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 0, - 36, 0, 0, 0, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 0, 36, 36, 36, 36, 0, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, -#else - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 0, 36, 0, 36, 0, - 0, 0, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 0, 36, 36, 36, - 36, 0, 36, 36, 36, 36, 36, 36, -#endif /* ACE_MVS */ - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_FT_HeartbeatEnabledPolicy_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 6, - MIN_WORD_LENGTH = 4, - MAX_WORD_LENGTH = 35, - MIN_HASH_VALUE = 4, - MAX_HASH_VALUE = 35, - HASH_VALUE_RANGE = 32, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0},{"",0},{"",0},{"",0}, - {"copy", &FT_POA_HeartbeatEnabledPolicy::copy_skel}, - {"_is_a", &FT_POA_HeartbeatEnabledPolicy::_is_a_skel}, - {"",0}, - {"destroy", &FT_POA_HeartbeatEnabledPolicy::destroy_skel}, - {"",0},{"",0},{"",0},{"",0},{"",0}, - {"_non_existent", &FT_POA_HeartbeatEnabledPolicy::_non_existent_skel}, - {"",0},{"",0}, - {"_get_policy_type", &FT_POA_HeartbeatEnabledPolicy::_get_policy_type_skel}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, - - {"_get_heartbeat_enabled_policy_value", &FT_POA_HeartbeatEnabledPolicy::_get_heartbeat_enabled_policy_value_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 15:23:34 */ -static TAO_FT_HeartbeatEnabledPolicy_Perfect_Hash_OpTable tao_FT_HeartbeatEnabledPolicy_optable; - -FT::HeartbeatEnabledPolicy_ptr _TAO_collocation_POA_FT_HeartbeatEnabledPolicy_Stub_Factory ( - CORBA::Object_ptr obj - ) -{ - TAO_Stub *stub = obj->_stubobj (); - - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - FT::HeartbeatEnabledPolicy_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - FT_POA_tao_thru_poa_collocated_HeartbeatEnabledPolicy (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - break; - default: - break; - } - return 0; -} - -int _TAO_collocation_POA_FT_HeartbeatEnabledPolicy_Stub_Factory_Initializer (long dummy) -{ - ACE_UNUSED_ARG (dummy); - - _TAO_collocation_FT_HeartbeatEnabledPolicy_Stub_Factory_function_pointer = - _TAO_collocation_POA_FT_HeartbeatEnabledPolicy_Stub_Factory; - - return 0; -} - -static int _TAO_collocation_POA_FT_HeartbeatEnabledPolicy_Stub_Factory_Initializer_Scarecrow = - _TAO_collocation_POA_FT_HeartbeatEnabledPolicy_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_FT_HeartbeatEnabledPolicy_Stub_Factory_Initializer)); - -// skeleton constructor -FT_POA_HeartbeatEnabledPolicy::FT_POA_HeartbeatEnabledPolicy (void) -{ - this->optable_ = &tao_FT_HeartbeatEnabledPolicy_optable; -} - -// copy ctor -FT_POA_HeartbeatEnabledPolicy::FT_POA_HeartbeatEnabledPolicy (const FT_POA_HeartbeatEnabledPolicy& rhs) - : ACE_NESTED_CLASS (POA_CORBA,Policy) (rhs), - TAO_ServantBase (rhs) -{} - -// skeleton destructor -FT_POA_HeartbeatEnabledPolicy::~FT_POA_HeartbeatEnabledPolicy (void) -{ -} - -void FT_POA_HeartbeatEnabledPolicy::_get_heartbeat_enabled_policy_value_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - FT_POA_HeartbeatEnabledPolicy *_tao_impl = (FT_POA_HeartbeatEnabledPolicy *)_tao_object_reference; - - CORBA::Boolean _tao_retval = 0; - - _tao_retval = _tao_impl->heartbeat_enabled_policy_value ( - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << CORBA::Any::from_boolean (_tao_retval)) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void FT_POA_HeartbeatEnabledPolicy::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - FT_POA_HeartbeatEnabledPolicy *_tao_impl = (FT_POA_HeartbeatEnabledPolicy *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!(_tao_in >> value.out ())) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void FT_POA_HeartbeatEnabledPolicy::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - FT_POA_HeartbeatEnabledPolicy *_tao_impl = (FT_POA_HeartbeatEnabledPolicy *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean FT_POA_HeartbeatEnabledPolicy::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/FT/HeartbeatEnabledPolicy:1.0")) || - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Policy:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* FT_POA_HeartbeatEnabledPolicy::_downcast ( - const char* logical_type_id - ) -{ -if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/FT/HeartbeatEnabledPolicy:1.0") == 0) - return ACE_static_cast (FT_POA_HeartbeatEnabledPolicy_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Policy:1.0") == 0) - return ACE_static_cast (POA_CORBA::Policy_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void FT_POA_HeartbeatEnabledPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* FT_POA_HeartbeatEnabledPolicy::_interface_repository_id (void) const -{ - return "IDL:omg.org/FT/HeartbeatEnabledPolicy:1.0"; -} - -FT::HeartbeatEnabledPolicy* -FT_POA_HeartbeatEnabledPolicy::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ()) - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - FT::HeartbeatEnabledPolicy_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - FT_POA_tao_thru_poa_collocated_HeartbeatEnabledPolicy (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - } - else - { - // stub->_incr_refcnt (); - CORBA::Object_ptr tmp = CORBA::Object::_nil (); - ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); - CORBA::Object_var obj = tmp; - return ::FT::HeartbeatEnabledPolicy::_unchecked_narrow (obj.in ()); - } -} - -FT_POA_tao_thru_poa_collocated_HeartbeatEnabledPolicy::FT_POA_tao_thru_poa_collocated_HeartbeatEnabledPolicy ( - TAO_Stub *stub -) - : ACE_NESTED_CLASS (POA_CORBA,_tao_thru_poa_collocated_CORBA_Policy) (stub), - CORBA_Object (stub, 0, 1) -{ -} - -CORBA::Boolean FT_POA_tao_thru_poa_collocated_HeartbeatEnabledPolicy::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_is_a", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - FT_POA_HeartbeatEnabledPolicy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/FT/HeartbeatEnabledPolicy:1.0" - ) - )->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -CORBA::Boolean FT_POA_tao_thru_poa_collocated_HeartbeatEnabledPolicy::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_non_existent", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - FT_POA_HeartbeatEnabledPolicy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/FT/HeartbeatEnabledPolicy:1.0" - ) - )->_non_existent (ACE_TRY_ENV); -} - - -CORBA::Boolean FT_POA_tao_thru_poa_collocated_HeartbeatEnabledPolicy::heartbeat_enabled_policy_value ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - CORBA::Boolean _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "heartbeat_enabled_policy_value", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (_tao_retval); - return ACE_reinterpret_cast ( - FT_POA_HeartbeatEnabledPolicy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/FT/HeartbeatEnabledPolicy:1.0" - ) - )->heartbeat_enabled_policy_value ( - ACE_TRY_ENV - ); - -} - - - -#endif /*TAO_HAS_FT_CORBA == 1*/ diff --git a/TAO/tao/FT_CORBAS.h b/TAO/tao/FT_CORBAS.h deleted file mode 100644 index 272fde79856..00000000000 --- a/TAO/tao/FT_CORBAS.h +++ /dev/null @@ -1,660 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef TAO_FT_CORBAS_H_ -#define TAO_FT_CORBAS_H_ -#include "ace/pre.h" -#include "tao/ftpoafwd.h" -#include "tao/FT_CORBAC.h" -#include "tao/POA_CORBA.h" -#include "tao/PolicyC.h" - -#if (TAO_HAS_FT_CORBA == 1) - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - - -class TAO_Export FT_POA_RequestDurationPolicy : public virtual POA_CORBA::Policy -{ -protected: - FT_POA_RequestDurationPolicy (void); - -public: - FT_POA_RequestDurationPolicy (const FT_POA_RequestDurationPolicy& rhs); - virtual ~FT_POA_RequestDurationPolicy (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - ::FT::RequestDurationPolicy *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual TimeBase::TimeT request_duration_value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void _get_request_duration_value_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _get_policy_type_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void copy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void destroy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); -}; - - -class TAO_Export -FT_POA_tao_thru_poa_collocated_RequestDurationPolicy : - public virtual FT::RequestDurationPolicy, - public virtual POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy -{ -public: - FT_POA_tao_thru_poa_collocated_RequestDurationPolicy ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual TimeBase::TimeT request_duration_value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -}; - - -#if defined (ACE_HAS_USING_KEYWORD) -# if 0 -// This wouldn't work. We need to find a way around for these -// guys. If somebody wants to use it, we may have to do something -// about it. - -// TIE class: Refer to CORBA v2.2, Section 20.34.4 -template -class TAO_Export FT_POA_RequestDurationPolicy_tie : - public FT_POA_RequestDurationPolicy -{ -public: - FT_POA_RequestDurationPolicy_tie (T &t); - // the T& ctor - FT_POA_RequestDurationPolicy_tie (T &t, PortableServer::POA_ptr poa); - // ctor taking a POA - FT_POA_RequestDurationPolicy_tie (T *tp, CORBA::Boolean release=1); - // ctor taking pointer and an ownership flag - FT_POA_RequestDurationPolicy_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release=1); - // ctor with T*, ownership flag and a POA - ~FT_POA_RequestDurationPolicy_tie (void); - // dtor - - // TIE specific functions - T *_tied_object (void); - // return the underlying object - void _tied_object (T &obj); - // set the underlying object - void _tied_object (T *obj, CORBA::Boolean release=1); - // set the underlying object and the ownership flag - CORBA::Boolean _is_owner (void); - // do we own it - void _is_owner (CORBA::Boolean b); - // set the ownership - - // overridden ServantBase operations - PortableServer::POA_ptr _default_POA ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - TimeBase::TimeT request_duration_value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - CORBA::PolicyType policy_type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - CORBA::Policy_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -private: - T *ptr_; - PortableServer::POA_var poa_; - CORBA::Boolean rel_; - - // copy and assignment are not allowed - FT_POA_RequestDurationPolicy_tie (const FT_POA_RequestDurationPolicy_tie &); - void operator= (const FT_POA_RequestDurationPolicy_tie &); -}; - - -#endif /*if 0*/ - -#endif /* ACE_HAS_USING_KEYWORD */ - -class TAO_Export FT_POA_HeartbeatPolicy : public virtual POA_CORBA::Policy -{ -protected: - FT_POA_HeartbeatPolicy (void); - -public: - FT_POA_HeartbeatPolicy (const FT_POA_HeartbeatPolicy& rhs); - virtual ~FT_POA_HeartbeatPolicy (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - FT::HeartbeatPolicy *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual FT::HeartbeatPolicyValue heartbeat_policy_value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void _get_heartbeat_policy_value_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _get_policy_type_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void copy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void destroy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); -}; - - -class TAO_Export FT_POA_tao_thru_poa_collocated_HeartbeatPolicy: - public virtual FT::HeartbeatPolicy, - public virtual POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy -{ -public: - FT_POA_tao_thru_poa_collocated_HeartbeatPolicy ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual FT::HeartbeatPolicyValue heartbeat_policy_value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); -}; - - -#if defined (ACE_HAS_USING_KEYWORD) -# if 0 -// This wouldn't work. We need to find a way around for these -// guys. If somebody wants to use it, we may have to do something -// about it. -// TIE class: Refer to CORBA v2.2, Section 20.34.4 -template -class TAO_Export FT_POA_HeartbeatPolicy_tie : public FT_POA_HeartbeatPolicy -{ -public: - FT_POA_HeartbeatPolicy_tie (T &t); - // the T& ctor - FT_POA_HeartbeatPolicy_tie (T &t, PortableServer::POA_ptr poa); - // ctor taking a POA - FT_POA_HeartbeatPolicy_tie (T *tp, CORBA::Boolean release=1); - // ctor taking pointer and an ownership flag - FT_POA_HeartbeatPolicy_tie (T *tp, - PortableServer::POA_ptr poa, - CORBA::Boolean release=1); - - // ctor with T*, ownership flag and a POA - ~FT_POA_HeartbeatPolicy_tie (void); - // dtor - - // TIE specific functions - T *_tied_object (void); - // return the underlying object - void _tied_object (T &obj); - // set the underlying object - void _tied_object (T *obj, CORBA::Boolean release=1); - // set the underlying object and the ownership flag - CORBA::Boolean _is_owner (void); - // do we own it - void _is_owner (CORBA::Boolean b); - // set the ownership - - // overridden ServantBase operations - PortableServer::POA_ptr _default_POA ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - FT::HeartbeatPolicyValue heartbeat_policy_value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - CORBA::PolicyType policy_type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - CORBA::Policy_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - void destroy (CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -private: - T *ptr_; - PortableServer::POA_var poa_; - CORBA::Boolean rel_; - - // copy and assignment are not allowed - FT_POA_HeartbeatPolicy_tie (const FT_POA_HeartbeatPolicy_tie &); - void operator= (const FT_POA_HeartbeatPolicy_tie &); -}; - - -#endif /*if 0*/ -#endif /* ACE_HAS_USING_KEYWORD */ - - -class TAO_Export FT_POA_HeartbeatEnabledPolicy : public virtual POA_CORBA::Policy -{ -protected: - FT_POA_HeartbeatEnabledPolicy (void); - -public: - FT_POA_HeartbeatEnabledPolicy (const FT_POA_HeartbeatEnabledPolicy& rhs); - virtual ~FT_POA_HeartbeatEnabledPolicy (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - FT::HeartbeatEnabledPolicy *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual CORBA::Boolean heartbeat_enabled_policy_value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void _get_heartbeat_enabled_policy_value_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _get_policy_type_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void copy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void destroy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); -}; - - -class TAO_Export FT_POA_tao_thru_poa_collocated_HeartbeatEnabledPolicy - : public virtual FT::HeartbeatEnabledPolicy, - public virtual POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy -{ -public: - FT_POA_tao_thru_poa_collocated_HeartbeatEnabledPolicy ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean heartbeat_enabled_policy_value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -}; - - - -#if defined (ACE_HAS_USING_KEYWORD) - -# if 0 -// This wouldn't work. We need to find a way around for these -// guys. If somebody wants to use it, we may have to do something -// about it. -// TIE class: Refer to CORBA v2.2, Section 20.34.4 -template -class TAO_Export FT_POA_HeartbeatEnabledPolicy_tie : - public FT_POA_HeartbeatEnabledPolicy -{ -public: - FT_POA_HeartbeatEnabledPolicy_tie (T &t); - // the T& ctor - FT_POA_HeartbeatEnabledPolicy_tie (T &t, PortableServer::POA_ptr poa); - // ctor taking a POA - FT_POA_HeartbeatEnabledPolicy_tie (T *tp, CORBA::Boolean release=1); - // ctor taking pointer and an ownership flag - FT_POA_HeartbeatEnabledPolicy_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release=1); - // ctor with T*, ownership flag and a POA - ~FT_POA_HeartbeatEnabledPolicy_tie (void); - // dtor - - // TIE specific functions - T *_tied_object (void); - // return the underlying object - void _tied_object (T &obj); - // set the underlying object - void _tied_object (T *obj, CORBA::Boolean release=1); - // set the underlying object and the ownership flag - CORBA::Boolean _is_owner (void); - // do we own it - void _is_owner (CORBA::Boolean b); - // set the ownership - - // overridden ServantBase operations - PortableServer::POA_ptr _default_POA ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - CORBA::Boolean heartbeat_enabled_policy_value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - CORBA::PolicyType policy_type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - CORBA::Policy_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -private: - T *ptr_; - PortableServer::POA_var poa_; - CORBA::Boolean rel_; - - // copy and assignment are not allowed - FT_POA_HeartbeatEnabledPolicy_tie (const FT_POA_HeartbeatEnabledPolicy_tie &); - void operator= (const FT_POA_HeartbeatEnabledPolicy_tie &); -}; - -#endif /*if 0 */ -#endif /* ACE_HAS_USING_KEYWORD */ - - - -#if defined (__ACE_INLINE__) -#include "FT_CORBAS.i" -#endif /* defined INLINE */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#endif /*TAO_HAS_FT_CORBA == 1*/ -#endif /*TAO_FT_CORBAS_H */ diff --git a/TAO/tao/FT_CORBAS.i b/TAO/tao/FT_CORBAS.i deleted file mode 100644 index 6a7cb7036e9..00000000000 --- a/TAO/tao/FT_CORBAS.i +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -ACE_INLINE void -FT_POA_RequestDurationPolicy::_get_policy_type_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy_ptr impl = (FT_POA_RequestDurationPolicy_ptr) obj; - POA_CORBA::Policy::_get_policy_type_skel ( - req, - (POA_CORBA::Policy_ptr) impl, - context, - ACE_TRY_ENV - ); -} - - -ACE_INLINE void -FT_POA_RequestDurationPolicy::copy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy_ptr impl = (FT_POA_RequestDurationPolicy_ptr) obj; - POA_CORBA::Policy::copy_skel ( - req, - (POA_CORBA::Policy_ptr) impl, - context, - ACE_TRY_ENV - ); -} - - -ACE_INLINE void -FT_POA_RequestDurationPolicy::destroy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy_ptr impl = (FT_POA_RequestDurationPolicy_ptr) obj; - POA_CORBA::Policy::destroy_skel ( - req, - (POA_CORBA::Policy_ptr) impl, - context, - ACE_TRY_ENV - ); -} - - -ACE_INLINE void -FT_POA_HeartbeatPolicy::_get_policy_type_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy_ptr impl = (FT_POA_HeartbeatPolicy_ptr) obj; - POA_CORBA::Policy::_get_policy_type_skel ( - req, - (POA_CORBA::Policy_ptr) impl, - context, - ACE_TRY_ENV - ); -} - - -ACE_INLINE void -FT_POA_HeartbeatPolicy::copy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy_ptr impl = (FT_POA_HeartbeatPolicy_ptr) obj; - POA_CORBA::Policy::copy_skel ( - req, - (POA_CORBA::Policy_ptr) impl, - context, - ACE_TRY_ENV - ); -} - - - -ACE_INLINE void -FT_POA_HeartbeatPolicy::destroy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy_ptr impl = (FT_POA_HeartbeatPolicy_ptr) obj; - POA_CORBA::Policy::destroy_skel ( - req, - (POA_CORBA::Policy_ptr) impl, - context, - ACE_TRY_ENV - ); -} - - -ACE_INLINE void -FT_POA_HeartbeatEnabledPolicy::_get_policy_type_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy_ptr impl = (FT_POA_HeartbeatEnabledPolicy_ptr) obj; - POA_CORBA::Policy::_get_policy_type_skel ( - req, - (POA_CORBA::Policy_ptr) impl, - context, - ACE_TRY_ENV - ); -} - - -ACE_INLINE void -FT_POA_HeartbeatEnabledPolicy::copy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy_ptr impl = (FT_POA_HeartbeatEnabledPolicy_ptr) obj; - POA_CORBA::Policy::copy_skel ( - req, - (POA_CORBA::Policy_ptr) impl, - context, - ACE_TRY_ENV - ); -} - - -ACE_INLINE void -FT_POA_HeartbeatEnabledPolicy::destroy_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy_ptr impl = (FT_POA_HeartbeatEnabledPolicy_ptr) obj; - POA_CORBA::Policy::destroy_skel ( - req, - (POA_CORBA::Policy_ptr) impl, - context, - ACE_TRY_ENV - ); -} diff --git a/TAO/tao/Forwarding_Servant.cpp b/TAO/tao/Forwarding_Servant.cpp deleted file mode 100644 index 494b8878717..00000000000 --- a/TAO/tao/Forwarding_Servant.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// $Id$ - -#include "tao/Forwarding_Servant.h" - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -#include "tao/Object.h" -#include "tao/PortableServerC.h" -#include "tao/Any.h" -#include "tao/Server_Request.h" - -ACE_RCSID(tao, Forwarding_Servant, "$Id$") - -TAO_Forwarding_Servant::TAO_Forwarding_Servant (CORBA::Object_ptr forward_to, - const char *interface_repository_id) - : forward_to_ (CORBA::Object::_duplicate (forward_to)), - interface_repository_id_ (CORBA::string_dup (interface_repository_id)) -{ -} - -void -TAO_Forwarding_Servant::invoke (CORBA::ServerRequest_ptr request, - CORBA::Environment &ACE_TRY_ENV) -{ - PortableServer::ForwardRequest exception (this->forward_to_.in ()); - - CORBA::Any any; - any <<= exception; - - request->set_exception (any, ACE_TRY_ENV); -} - -CORBA::RepositoryId -TAO_Forwarding_Servant::_primary_interface (const PortableServer::ObjectId & /* oid */, - PortableServer::POA_ptr /* poa */, - CORBA::Environment & /* ACE_TRY_ENV */) -{ - return CORBA::string_dup (this->interface_repository_id_.in ()); -} - -#endif /* TAO_HAS_MINIMUM_CORBA */ diff --git a/TAO/tao/Forwarding_Servant.h b/TAO/tao/Forwarding_Servant.h deleted file mode 100644 index 956772ef7ce..00000000000 --- a/TAO/tao/Forwarding_Servant.h +++ /dev/null @@ -1,67 +0,0 @@ -// $Id$ -// -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// Forwarding_Servant.h -// -// = DESCRIPTION -// A DSI implementation of a forwarding servant. -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#ifndef TAO_FORWARDING_SERVANT_H -#define TAO_FORWARDING_SERVANT_H -#include "ace/pre.h" - -#include "tao/orbconf.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -#include "tao/Servant_Base.h" -#include "tao/ORB.h" - -class TAO_Forwarding_Servant : public TAO_DynamicImplementation -{ -public: - - TAO_Forwarding_Servant (CORBA::Object_ptr forward_to, - const char *interface_repository_id_); - // Constructor - - virtual void invoke (CORBA::ServerRequest_ptr request, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - // The method receives requests issued to any CORBA object - // incarnated by the DSI servant and performs the processing - // necessary to execute the request. - - virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &oid, - PortableServer::POA_ptr poa, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // The <_primary_interface> method receives an ObjectId value and a - // POA_ptr as input parameters and returns a valid RepositoryId - // representing the most-derived interface for that oid. - -protected: - CORBA::Object_var forward_to_; - // Forward all requests to this object - - CORBA::String_var interface_repository_id_; - // Here is the interface we support -}; - -#endif /* TAO_HAS_MINIMUM_CORBA */ - -#include "ace/post.h" -#endif /* TAO_FORWARDING_SERVANT_H */ diff --git a/TAO/tao/ImplRepo.pidl b/TAO/tao/ImplRepo.pidl deleted file mode 100644 index bfddb6e09b7..00000000000 --- a/TAO/tao/ImplRepo.pidl +++ /dev/null @@ -1,184 +0,0 @@ -// $Id$ - -module ImplementationRepository -{ - interface ServerObject - // = TITLE - // Server Side IR Object - // - // = DESCRIPTION - // This object, which exists on the servers that use the - // Implementation Repository (IR), is used to control or check the - // status of the server by the IR. - { - void ping (); - // Check the liveness of a server. - - void shutdown (); - // Try to shutdown the server gracefully. - }; - - struct EnvironmentVariable - // One environment variable/value pair. - { - string name; - string value; - }; - - typedef string Address; - // Specifies the location of the server. - - typedef sequence EnvironmentList; - // Complete Environment. - - enum ActivationMode {NORMAL, MANUAL, PER_CLIENT, AUTO_START}; - // The type of Activation - - struct StartupOptions - // Options used to start up the server. - { - string command_line; - // Startup command (program name and arguments). - - EnvironmentList environment; - // Environment Variables. - - string working_directory; - // Working directory. - - ActivationMode activation; - // Activation Mode - }; - - struct ServerInformation - // All the information about one server. - { - string logical_server; - // The logical server this server is part of. - - string server; - // Server name. - - StartupOptions startup; - // How to start up the server. - - Address location; - // Where the server is located currently. - }; - - typedef sequence ServerInformationList; - - interface ServerInformationIterator; - // Forward declaration. - - interface Administration - // = TITLE - // The Implementation Repository Administration Interface - // - // = DESCRIPTION - // This interface exports all the administration functionality of - // the Implementation Repository. - { - // = Exceptions - - exception AlreadyRegistered {}; - // Object already bound in the Implementation Repository - - exception CannotActivate - { - string reason; - }; - // The server could not be restarted. - - exception NotFound {}; - // Object not found in the Implementation Repository - - void activate_server (in string server) - raises (NotFound, - CannotActivate); - // Activate server that is named . - // - // The exception is raised when is not found - // in the Implementation Repository. The exception - // is raised when is found in the Repository but could not be - // activated. - - void register_server (in string server, - in StartupOptions options) - raises (AlreadyRegistered); - // Register the to specify how the should be - // restarted when a client asks for it. - // - // The exception is raised when has - // already been registered with the Implementation Repository. - - void reregister_server (in string server, - in StartupOptions options); - // Update the to specify how the should be - // restarted when a client asks for it. Will register the server - // if not already registered. - - void remove_server (in string server) - raises (NotFound); - // Remove from the Implementation Repository. - // - // The exception is raised when is not found - // in the Implementation Repository. - - void shutdown_server (in string server) - raises (NotFound); - // Tries to shutdown the server, first gracefully, then ungracefully. - // - // The exception is raised when is not found - // in the Implementation Repository. - - Address server_is_running (in string server, - in Address addr, - in ServerObject server_object) - raises (NotFound); - // Used to notify the Implementation Repository that is alive - // and well at . - // - // The exception is raised when is not found - // in the Implementation Repository. - - void server_is_shutting_down (in string server) - raises (NotFound); - // Used to tell the Implementation Repository that is shutting - // down. - // - // The exception is raised when is not found - // in the Implementation Repository. - - void find (in string server, - out ServerInformation info) - raises (NotFound); - // Returns the startup information for a given . - // - // The exception is raised when is not found - // in the Implementation Repository. - - void list (in unsigned long how_many, - out ServerInformationList server_list, - out ServerInformationIterator server_iterator); - // Returns at most servers in . If there - // are additional servers, they can be received through the - // . If there are no more servers, then - // is null. - }; - - interface ServerInformationIterator - { - // = TITLE - // Interface for iterating over servers returned with - // Administration::list (). - - boolean next_n (in unsigned long how_many, - out ServerInformationList server_list); - // This operation returns at most the requested number of - // servers. - - void destroy (); - // This operation destroys the iterator. - }; -}; diff --git a/TAO/tao/ImplRepoC.cpp b/TAO/tao/ImplRepoC.cpp deleted file mode 100644 index 08ed5444f36..00000000000 --- a/TAO/tao/ImplRepoC.cpp +++ /dev/null @@ -1,3305 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#include "ImplRepoC.h" -#include "tao/Stub.h" -#include "tao/NVList.h" -//#include "tao/PortableInterceptor.h" -#include "tao/ORB_Core.h" -#include "tao/Invocation.h" - -#if !defined (__ACE_INLINE__) -#include "ImplRepoC.i" -#endif /* !defined INLINE */ - -void ImplementationRepository::ServerObject::_tao_any_destructor (void *x) -{ - ImplementationRepository::ServerObject *tmp = ACE_static_cast (ImplementationRepository::ServerObject*,x); - CORBA::release (tmp); -} - -ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObject::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if (CORBA::is_nil (obj)) - return ServerObject::_nil (); - CORBA::Boolean is_a = obj->_is_a ("IDL:ImplementationRepository/ServerObject:1.0", ACE_TRY_ENV); - ACE_CHECK_RETURN (ServerObject::_nil ()); - if (is_a == 0) - return ServerObject::_nil (); - return ServerObject::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObject::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return ServerObject::_nil (); - TAO_Stub* stub = obj->_stubobj (); - stub->_incr_refcnt (); - ServerObject_ptr default_proxy = ServerObject::_nil (); - if (obj->_is_collocated () && _TAO_collocation_ImplementationRepository_ServerObject_Stub_Factory_function_pointer != 0) - { - default_proxy = _TAO_collocation_ImplementationRepository_ServerObject_Stub_Factory_function_pointer (obj); - } - if (CORBA::is_nil (default_proxy)) - ACE_NEW_RETURN (default_proxy, ServerObject (stub), ServerObject::_nil ()); - return TAO_ImplementationRepository_ServerObject_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy); -} - -ImplementationRepository::ServerObject_ptr -ImplementationRepository::ServerObject::_duplicate (ServerObject_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void ImplementationRepository::ServerObject::ping ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "ping", - 4, - istub->orb_core () - ); - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - int _invoke_status = - _tao_call.invoke (0, 0, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - break; - } - -} - -void ImplementationRepository::ServerObject::shutdown ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "shutdown", - 8, - istub->orb_core () - ); - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - int _invoke_status = - _tao_call.invoke (0, 0, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - ACE_CHECK; - break; - - } - -} - -CORBA::Boolean ImplementationRepository::ServerObject::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:ImplementationRepository/ServerObject:1.0")) || - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0"))) - return 1; // success using local knowledge - else - return this->CORBA_Object::_is_a (value, ACE_TRY_ENV); -} - -const char* ImplementationRepository::ServerObject::_interface_repository_id (void) const -{ - return "IDL:ImplementationRepository/ServerObject:1.0"; -} - -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory::TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory (int register_proxy_factory) -{ - if (register_proxy_factory) - { - TAO_ImplementationRepository_ServerObject_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this); - } -} - -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory::~TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory (void) -{ -} - -ImplementationRepository::ServerObject_ptr -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory::create_proxy ( - ::ImplementationRepository::ServerObject_ptr proxy, - CORBA::Environment & - ) -{ - return proxy; -} - -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter (void) - : proxy_factory_ (0), - delete_proxy_factory_ (0) -{ -} - -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter::~TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter (void) -{ - // Making sure the factory which the adapter has is destroyed with it. - if (this->proxy_factory_ != 0) - delete this->proxy_factory_; -} - -int -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter::register_proxy_factory ( - TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory *df, - CORBA::Environment &ACE_TRY_ENV - ) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - this->lock_, 0)); - // Remove any existing and replace with the new one. - this->unregister_proxy_factory (ACE_TRY_ENV); - this->proxy_factory_ = df; - this->delete_proxy_factory_ = 0; -return 0; -} - -int -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter::unregister_proxy_factory ( - CORBA::Environment & - ) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - this->lock_, 0)); - if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0) - { - // Its necessary to set to 1 to make sure that it - // doesnt get into an infinite loop in as it is - // invoked in the destructor of the class too. - this->delete_proxy_factory_ = 1; - delete this->proxy_factory_; - this->proxy_factory_ = 0; - } -return 0; -} - -ImplementationRepository::ServerObject_ptr -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter::create_proxy ( - ::ImplementationRepository::ServerObject_ptr proxy, - CORBA::Environment & - ) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - this->lock_, 0)); - // Verify that an is available else make one. - if (this->proxy_factory_ == 0) - ACE_NEW_RETURN (this->proxy_factory_, - TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory (1), - 0); - - - return this->proxy_factory_->create_proxy (proxy); -} - -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base::TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base (::ImplementationRepository::ServerObject_ptr proxy) -: base_proxy_ (proxy) -{ -} - -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base::~TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base (void) -{ -} - -void ImplementationRepository::TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base::ping ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->base_proxy_->ping ( - ACE_TRY_ENV - ); - -} - -void ImplementationRepository::TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base::shutdown ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->base_proxy_->shutdown ( - ACE_TRY_ENV - ); - -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) -template class TAO_Singleton; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate TAO_Singleton -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -static const CORBA::Long _oc_ImplementationRepository_ServerObject[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 46, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f536572), ACE_NTOHL (0x7665724f), ACE_NTOHL (0x626a6563), ACE_NTOHL (0x743a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:ImplementationRepository/ServerObject:1.0 - 13, ACE_NTOHL (0x53657276), ACE_NTOHL (0x65724f62), ACE_NTOHL (0x6a656374), ACE_NTOHL (0x0), // name = ServerObject -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_ServerObject (CORBA::tk_objref, sizeof (_oc_ImplementationRepository_ServerObject), (char *) &_oc_ImplementationRepository_ServerObject, 0, sizeof (ImplementationRepository::ServerObject)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ServerObject, &_tc_TAO_tc_ImplementationRepository_ServerObject) -TAO_NAMESPACE_END -static const CORBA::Long _oc_ImplementationRepository_EnvironmentVariable[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 53, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f456e76), ACE_NTOHL (0x69726f6e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x56617269), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/EnvironmentVariable:1.0 - 20, ACE_NTOHL (0x456e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e7456), ACE_NTOHL (0x61726961), ACE_NTOHL (0x626c6500), // name = EnvironmentVariable - 2, // member count - 5, ACE_NTOHL (0x6e616d65), ACE_NTOHL (0x0), // name = name - CORBA::tk_string, - 0U, // string length - 6, ACE_NTOHL (0x76616c75), ACE_NTOHL (0x65000000), // name = value - CORBA::tk_string, - 0U, // string length -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_EnvironmentVariable (CORBA::tk_struct, sizeof (_oc_ImplementationRepository_EnvironmentVariable), (char *) &_oc_ImplementationRepository_EnvironmentVariable, 0, sizeof (ImplementationRepository::EnvironmentVariable)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_EnvironmentVariable, &_tc_TAO_tc_ImplementationRepository_EnvironmentVariable) -TAO_NAMESPACE_END -void ImplementationRepository::EnvironmentVariable::_tao_any_destructor (void *x) -{ - ImplementationRepository::EnvironmentVariable *tmp = ACE_static_cast (ImplementationRepository::EnvironmentVariable*,x); - delete tmp; -} - -static const CORBA::Long _oc_ImplementationRepository_Address[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 41, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f416464), ACE_NTOHL (0x72657373), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/Address:1.0 - 8, ACE_NTOHL (0x41646472), ACE_NTOHL (0x65737300), // name = Address - CORBA::tk_string, - 0U, // string length -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_Address (CORBA::tk_alias, sizeof (_oc_ImplementationRepository_Address), (char *) &_oc_ImplementationRepository_Address, 0, sizeof (ImplementationRepository::Address)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Address, &_tc_TAO_tc_ImplementationRepository_Address) -TAO_NAMESPACE_END - -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - -#if !defined (__TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CS_) -#define __TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CS_ - - void - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_allocate_buffer (CORBA::ULong length) - { - ImplementationRepository::EnvironmentVariable* tmp = 0; - tmp = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (length); - - if (this->buffer_ != 0) - { - ImplementationRepository::EnvironmentVariable *old = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable *,this->buffer_); - - for (CORBA::ULong i = 0; i < this->length_; ++i) - tmp[i] = old[i]; - - if (this->release_) - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (old); - - } - this->buffer_ = tmp; - } - - void - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_deallocate_buffer (void) - { - if (this->buffer_ == 0 || this->release_ == 0) - return; - - ImplementationRepository::EnvironmentVariable *tmp = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable *,this->buffer_); - - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (tmp); - this->buffer_ = 0; - } - - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::~_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (void) // Dtor. - { - this->_deallocate_buffer (); - } - - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CS_) -#define _IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CS_ - -// ************************************************************* -// ImplementationRepository::EnvironmentList -// ************************************************************* - -ImplementationRepository::EnvironmentList::EnvironmentList (void) -{} -ImplementationRepository::EnvironmentList::EnvironmentList (CORBA::ULong max) // uses max size - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max) -{} -ImplementationRepository::EnvironmentList::EnvironmentList (CORBA::ULong max, CORBA::ULong length, ImplementationRepository::EnvironmentVariable *buffer, CORBA::Boolean release) - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max, length, buffer, release) -{} -ImplementationRepository::EnvironmentList::EnvironmentList (const EnvironmentList &seq) // copy ctor - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (seq) -{} -ImplementationRepository::EnvironmentList::~EnvironmentList (void) // dtor -{} -void ImplementationRepository::EnvironmentList::_tao_any_destructor (void *x) -{ - ImplementationRepository::EnvironmentList *tmp = ACE_static_cast (ImplementationRepository::EnvironmentList*,x); - delete tmp; -} - - -#endif /* end #if !defined */ - -static const CORBA::Long _oc_ImplementationRepository_EnvironmentList[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 49, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f456e76), ACE_NTOHL (0x69726f6e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x4c697374), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/EnvironmentList:1.0 - 16, ACE_NTOHL (0x456e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e744c), ACE_NTOHL (0x69737400), // name = EnvironmentList - CORBA::tk_sequence, // typecode kind - 148, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_struct, // typecode kind - 132, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 53, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f456e76), ACE_NTOHL (0x69726f6e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x56617269), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/EnvironmentVariable:1.0 - 20, ACE_NTOHL (0x456e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e7456), ACE_NTOHL (0x61726961), ACE_NTOHL (0x626c6500), // name = EnvironmentVariable - 2, // member count - 5, ACE_NTOHL (0x6e616d65), ACE_NTOHL (0x0), // name = name - CORBA::tk_string, - 0U, // string length - 6, ACE_NTOHL (0x76616c75), ACE_NTOHL (0x65000000), // name = value - CORBA::tk_string, - 0U, // string length - - 0U, - -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_EnvironmentList (CORBA::tk_alias, sizeof (_oc_ImplementationRepository_EnvironmentList), (char *) &_oc_ImplementationRepository_EnvironmentList, 0, sizeof (ImplementationRepository::EnvironmentList)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_EnvironmentList, &_tc_TAO_tc_ImplementationRepository_EnvironmentList) -TAO_NAMESPACE_END -static const CORBA::Long _oc_ImplementationRepository_ActivationMode[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 48, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f416374), ACE_NTOHL (0x69766174), ACE_NTOHL (0x696f6e4d), ACE_NTOHL (0x6f64653a), ACE_NTOHL (0x312e3000), // repository ID = IDL:ImplementationRepository/ActivationMode:1.0 - 15, ACE_NTOHL (0x41637469), ACE_NTOHL (0x76617469), ACE_NTOHL (0x6f6e4d6f), ACE_NTOHL (0x64650000), // name = ActivationMode - 4, // member count - 7, ACE_NTOHL (0x4e4f524d), ACE_NTOHL (0x414c0000), // name = NORMAL - 7, ACE_NTOHL (0x4d414e55), ACE_NTOHL (0x414c0000), // name = MANUAL - 11, ACE_NTOHL (0x5045525f), ACE_NTOHL (0x434c4945), ACE_NTOHL (0x4e540000), // name = PER_CLIENT - 11, ACE_NTOHL (0x4155544f), ACE_NTOHL (0x5f535441), ACE_NTOHL (0x52540000), // name = AUTO_START -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_ActivationMode (CORBA::tk_enum, sizeof (_oc_ImplementationRepository_ActivationMode), (char *) &_oc_ImplementationRepository_ActivationMode, 0, sizeof (ImplementationRepository::ActivationMode)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ActivationMode, &_tc_TAO_tc_ImplementationRepository_ActivationMode) -TAO_NAMESPACE_END -static const CORBA::Long _oc_ImplementationRepository_StartupOptions[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 48, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f537461), ACE_NTOHL (0x72747570), ACE_NTOHL (0x4f707469), ACE_NTOHL (0x6f6e733a), ACE_NTOHL (0x312e3000), // repository ID = IDL:ImplementationRepository/StartupOptions:1.0 - 15, ACE_NTOHL (0x53746172), ACE_NTOHL (0x7475704f), ACE_NTOHL (0x7074696f), ACE_NTOHL (0x6e730000), // name = StartupOptions - 4, // member count - 13, ACE_NTOHL (0x636f6d6d), ACE_NTOHL (0x616e645f), ACE_NTOHL (0x6c696e65), ACE_NTOHL (0x0), // name = command_line - CORBA::tk_string, - 0U, // string length - 12, ACE_NTOHL (0x656e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e7400), // name = environment - CORBA::tk_alias, // typecode kind for typedefs - 236, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 49, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f456e76), ACE_NTOHL (0x69726f6e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x4c697374), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/EnvironmentList:1.0 - 16, ACE_NTOHL (0x456e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e744c), ACE_NTOHL (0x69737400), // name = EnvironmentList - CORBA::tk_sequence, // typecode kind - 148, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_struct, // typecode kind - 132, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 53, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f456e76), ACE_NTOHL (0x69726f6e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x56617269), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/EnvironmentVariable:1.0 - 20, ACE_NTOHL (0x456e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e7456), ACE_NTOHL (0x61726961), ACE_NTOHL (0x626c6500), // name = EnvironmentVariable - 2, // member count - 5, ACE_NTOHL (0x6e616d65), ACE_NTOHL (0x0), // name = name - CORBA::tk_string, - 0U, // string length - 6, ACE_NTOHL (0x76616c75), ACE_NTOHL (0x65000000), // name = value - CORBA::tk_string, - 0U, // string length - - 0U, - - - 18, ACE_NTOHL (0x776f726b), ACE_NTOHL (0x696e675f), ACE_NTOHL (0x64697265), ACE_NTOHL (0x63746f72), ACE_NTOHL (0x79000000), // name = working_directory - CORBA::tk_string, - 0U, // string length - 11, ACE_NTOHL (0x61637469), ACE_NTOHL (0x76617469), ACE_NTOHL (0x6f6e0000), // name = activation - CORBA::tk_enum, // typecode kind - 136, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 48, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f416374), ACE_NTOHL (0x69766174), ACE_NTOHL (0x696f6e4d), ACE_NTOHL (0x6f64653a), ACE_NTOHL (0x312e3000), // repository ID = IDL:ImplementationRepository/ActivationMode:1.0 - 15, ACE_NTOHL (0x41637469), ACE_NTOHL (0x76617469), ACE_NTOHL (0x6f6e4d6f), ACE_NTOHL (0x64650000), // name = ActivationMode - 4, // member count - 7, ACE_NTOHL (0x4e4f524d), ACE_NTOHL (0x414c0000), // name = NORMAL - 7, ACE_NTOHL (0x4d414e55), ACE_NTOHL (0x414c0000), // name = MANUAL - 11, ACE_NTOHL (0x5045525f), ACE_NTOHL (0x434c4945), ACE_NTOHL (0x4e540000), // name = PER_CLIENT - 11, ACE_NTOHL (0x4155544f), ACE_NTOHL (0x5f535441), ACE_NTOHL (0x52540000), // name = AUTO_START - -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_StartupOptions (CORBA::tk_struct, sizeof (_oc_ImplementationRepository_StartupOptions), (char *) &_oc_ImplementationRepository_StartupOptions, 0, sizeof (ImplementationRepository::StartupOptions)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_StartupOptions, &_tc_TAO_tc_ImplementationRepository_StartupOptions) -TAO_NAMESPACE_END -void ImplementationRepository::StartupOptions::_tao_any_destructor (void *x) -{ - ImplementationRepository::StartupOptions *tmp = ACE_static_cast (ImplementationRepository::StartupOptions*,x); - delete tmp; -} - -static const CORBA::Long _oc_ImplementationRepository_ServerInformation[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 51, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f536572), ACE_NTOHL (0x76657249), ACE_NTOHL (0x6e666f72), ACE_NTOHL (0x6d617469), ACE_NTOHL (0x6f6e3a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:ImplementationRepository/ServerInformation:1.0 - 18, ACE_NTOHL (0x53657276), ACE_NTOHL (0x6572496e), ACE_NTOHL (0x666f726d), ACE_NTOHL (0x6174696f), ACE_NTOHL (0x6e000000), // name = ServerInformation - 4, // member count - 15, ACE_NTOHL (0x6c6f6769), ACE_NTOHL (0x63616c5f), ACE_NTOHL (0x73657276), ACE_NTOHL (0x65720000), // name = logical_server - CORBA::tk_string, - 0U, // string length - 7, ACE_NTOHL (0x73657276), ACE_NTOHL (0x65720000), // name = server - CORBA::tk_string, - 0U, // string length - 8, ACE_NTOHL (0x73746172), ACE_NTOHL (0x74757000), // name = startup - CORBA::tk_struct, // typecode kind - 560, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 48, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f537461), ACE_NTOHL (0x72747570), ACE_NTOHL (0x4f707469), ACE_NTOHL (0x6f6e733a), ACE_NTOHL (0x312e3000), // repository ID = IDL:ImplementationRepository/StartupOptions:1.0 - 15, ACE_NTOHL (0x53746172), ACE_NTOHL (0x7475704f), ACE_NTOHL (0x7074696f), ACE_NTOHL (0x6e730000), // name = StartupOptions - 4, // member count - 13, ACE_NTOHL (0x636f6d6d), ACE_NTOHL (0x616e645f), ACE_NTOHL (0x6c696e65), ACE_NTOHL (0x0), // name = command_line - CORBA::tk_string, - 0U, // string length - 12, ACE_NTOHL (0x656e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e7400), // name = environment - CORBA::tk_alias, // typecode kind for typedefs - 236, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 49, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f456e76), ACE_NTOHL (0x69726f6e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x4c697374), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/EnvironmentList:1.0 - 16, ACE_NTOHL (0x456e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e744c), ACE_NTOHL (0x69737400), // name = EnvironmentList - CORBA::tk_sequence, // typecode kind - 148, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_struct, // typecode kind - 132, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 53, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f456e76), ACE_NTOHL (0x69726f6e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x56617269), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/EnvironmentVariable:1.0 - 20, ACE_NTOHL (0x456e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e7456), ACE_NTOHL (0x61726961), ACE_NTOHL (0x626c6500), // name = EnvironmentVariable - 2, // member count - 5, ACE_NTOHL (0x6e616d65), ACE_NTOHL (0x0), // name = name - CORBA::tk_string, - 0U, // string length - 6, ACE_NTOHL (0x76616c75), ACE_NTOHL (0x65000000), // name = value - CORBA::tk_string, - 0U, // string length - - 0U, - - - 18, ACE_NTOHL (0x776f726b), ACE_NTOHL (0x696e675f), ACE_NTOHL (0x64697265), ACE_NTOHL (0x63746f72), ACE_NTOHL (0x79000000), // name = working_directory - CORBA::tk_string, - 0U, // string length - 11, ACE_NTOHL (0x61637469), ACE_NTOHL (0x76617469), ACE_NTOHL (0x6f6e0000), // name = activation - CORBA::tk_enum, // typecode kind - 136, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 48, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f416374), ACE_NTOHL (0x69766174), ACE_NTOHL (0x696f6e4d), ACE_NTOHL (0x6f64653a), ACE_NTOHL (0x312e3000), // repository ID = IDL:ImplementationRepository/ActivationMode:1.0 - 15, ACE_NTOHL (0x41637469), ACE_NTOHL (0x76617469), ACE_NTOHL (0x6f6e4d6f), ACE_NTOHL (0x64650000), // name = ActivationMode - 4, // member count - 7, ACE_NTOHL (0x4e4f524d), ACE_NTOHL (0x414c0000), // name = NORMAL - 7, ACE_NTOHL (0x4d414e55), ACE_NTOHL (0x414c0000), // name = MANUAL - 11, ACE_NTOHL (0x5045525f), ACE_NTOHL (0x434c4945), ACE_NTOHL (0x4e540000), // name = PER_CLIENT - 11, ACE_NTOHL (0x4155544f), ACE_NTOHL (0x5f535441), ACE_NTOHL (0x52540000), // name = AUTO_START - - - 9, ACE_NTOHL (0x6c6f6361), ACE_NTOHL (0x74696f6e), ACE_NTOHL (0x0), // name = location - CORBA::tk_alias, // typecode kind for typedefs - 72, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 41, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f416464), ACE_NTOHL (0x72657373), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/Address:1.0 - 8, ACE_NTOHL (0x41646472), ACE_NTOHL (0x65737300), // name = Address - CORBA::tk_string, - 0U, // string length - -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_ServerInformation (CORBA::tk_struct, sizeof (_oc_ImplementationRepository_ServerInformation), (char *) &_oc_ImplementationRepository_ServerInformation, 0, sizeof (ImplementationRepository::ServerInformation)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ServerInformation, &_tc_TAO_tc_ImplementationRepository_ServerInformation) -TAO_NAMESPACE_END -void ImplementationRepository::ServerInformation::_tao_any_destructor (void *x) -{ - ImplementationRepository::ServerInformation *tmp = ACE_static_cast (ImplementationRepository::ServerInformation*,x); - delete tmp; -} - - -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - -#if !defined (__TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CS_) -#define __TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CS_ - - void - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_allocate_buffer (CORBA::ULong length) - { - ImplementationRepository::ServerInformation* tmp = 0; - tmp = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (length); - - if (this->buffer_ != 0) - { - ImplementationRepository::ServerInformation *old = ACE_reinterpret_cast (ImplementationRepository::ServerInformation *,this->buffer_); - - for (CORBA::ULong i = 0; i < this->length_; ++i) - tmp[i] = old[i]; - - if (this->release_) - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (old); - - } - this->buffer_ = tmp; - } - - void - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_deallocate_buffer (void) - { - if (this->buffer_ == 0 || this->release_ == 0) - return; - - ImplementationRepository::ServerInformation *tmp = ACE_reinterpret_cast (ImplementationRepository::ServerInformation *,this->buffer_); - - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (tmp); - this->buffer_ = 0; - } - - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::~_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (void) // Dtor. - { - this->_deallocate_buffer (); - } - - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CS_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CS_ - -// ************************************************************* -// ImplementationRepository::ServerInformationList -// ************************************************************* - -ImplementationRepository::ServerInformationList::ServerInformationList (void) -{} -ImplementationRepository::ServerInformationList::ServerInformationList (CORBA::ULong max) // uses max size - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max) -{} -ImplementationRepository::ServerInformationList::ServerInformationList (CORBA::ULong max, CORBA::ULong length, ImplementationRepository::ServerInformation *buffer, CORBA::Boolean release) - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max, length, buffer, release) -{} -ImplementationRepository::ServerInformationList::ServerInformationList (const ServerInformationList &seq) // copy ctor - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (seq) -{} -ImplementationRepository::ServerInformationList::~ServerInformationList (void) // dtor -{} -void ImplementationRepository::ServerInformationList::_tao_any_destructor (void *x) -{ - ImplementationRepository::ServerInformationList *tmp = ACE_static_cast (ImplementationRepository::ServerInformationList*,x); - delete tmp; -} - - -#endif /* end #if !defined */ - -static const CORBA::Long _oc_ImplementationRepository_ServerInformationList[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 55, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f536572), ACE_NTOHL (0x76657249), ACE_NTOHL (0x6e666f72), ACE_NTOHL (0x6d617469), ACE_NTOHL (0x6f6e4c69), ACE_NTOHL (0x73743a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:ImplementationRepository/ServerInformationList:1.0 - 22, ACE_NTOHL (0x53657276), ACE_NTOHL (0x6572496e), ACE_NTOHL (0x666f726d), ACE_NTOHL (0x6174696f), ACE_NTOHL (0x6e4c6973), ACE_NTOHL (0x74000000), // name = ServerInformationList - CORBA::tk_sequence, // typecode kind - 828, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_struct, // typecode kind - 812, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 51, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f536572), ACE_NTOHL (0x76657249), ACE_NTOHL (0x6e666f72), ACE_NTOHL (0x6d617469), ACE_NTOHL (0x6f6e3a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:ImplementationRepository/ServerInformation:1.0 - 18, ACE_NTOHL (0x53657276), ACE_NTOHL (0x6572496e), ACE_NTOHL (0x666f726d), ACE_NTOHL (0x6174696f), ACE_NTOHL (0x6e000000), // name = ServerInformation - 4, // member count - 15, ACE_NTOHL (0x6c6f6769), ACE_NTOHL (0x63616c5f), ACE_NTOHL (0x73657276), ACE_NTOHL (0x65720000), // name = logical_server - CORBA::tk_string, - 0U, // string length - 7, ACE_NTOHL (0x73657276), ACE_NTOHL (0x65720000), // name = server - CORBA::tk_string, - 0U, // string length - 8, ACE_NTOHL (0x73746172), ACE_NTOHL (0x74757000), // name = startup - CORBA::tk_struct, // typecode kind - 560, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 48, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f537461), ACE_NTOHL (0x72747570), ACE_NTOHL (0x4f707469), ACE_NTOHL (0x6f6e733a), ACE_NTOHL (0x312e3000), // repository ID = IDL:ImplementationRepository/StartupOptions:1.0 - 15, ACE_NTOHL (0x53746172), ACE_NTOHL (0x7475704f), ACE_NTOHL (0x7074696f), ACE_NTOHL (0x6e730000), // name = StartupOptions - 4, // member count - 13, ACE_NTOHL (0x636f6d6d), ACE_NTOHL (0x616e645f), ACE_NTOHL (0x6c696e65), ACE_NTOHL (0x0), // name = command_line - CORBA::tk_string, - 0U, // string length - 12, ACE_NTOHL (0x656e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e7400), // name = environment - CORBA::tk_alias, // typecode kind for typedefs - 236, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 49, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f456e76), ACE_NTOHL (0x69726f6e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x4c697374), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/EnvironmentList:1.0 - 16, ACE_NTOHL (0x456e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e744c), ACE_NTOHL (0x69737400), // name = EnvironmentList - CORBA::tk_sequence, // typecode kind - 148, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_struct, // typecode kind - 132, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 53, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f456e76), ACE_NTOHL (0x69726f6e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x56617269), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/EnvironmentVariable:1.0 - 20, ACE_NTOHL (0x456e7669), ACE_NTOHL (0x726f6e6d), ACE_NTOHL (0x656e7456), ACE_NTOHL (0x61726961), ACE_NTOHL (0x626c6500), // name = EnvironmentVariable - 2, // member count - 5, ACE_NTOHL (0x6e616d65), ACE_NTOHL (0x0), // name = name - CORBA::tk_string, - 0U, // string length - 6, ACE_NTOHL (0x76616c75), ACE_NTOHL (0x65000000), // name = value - CORBA::tk_string, - 0U, // string length - - 0U, - - - 18, ACE_NTOHL (0x776f726b), ACE_NTOHL (0x696e675f), ACE_NTOHL (0x64697265), ACE_NTOHL (0x63746f72), ACE_NTOHL (0x79000000), // name = working_directory - CORBA::tk_string, - 0U, // string length - 11, ACE_NTOHL (0x61637469), ACE_NTOHL (0x76617469), ACE_NTOHL (0x6f6e0000), // name = activation - CORBA::tk_enum, // typecode kind - 136, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 48, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f416374), ACE_NTOHL (0x69766174), ACE_NTOHL (0x696f6e4d), ACE_NTOHL (0x6f64653a), ACE_NTOHL (0x312e3000), // repository ID = IDL:ImplementationRepository/ActivationMode:1.0 - 15, ACE_NTOHL (0x41637469), ACE_NTOHL (0x76617469), ACE_NTOHL (0x6f6e4d6f), ACE_NTOHL (0x64650000), // name = ActivationMode - 4, // member count - 7, ACE_NTOHL (0x4e4f524d), ACE_NTOHL (0x414c0000), // name = NORMAL - 7, ACE_NTOHL (0x4d414e55), ACE_NTOHL (0x414c0000), // name = MANUAL - 11, ACE_NTOHL (0x5045525f), ACE_NTOHL (0x434c4945), ACE_NTOHL (0x4e540000), // name = PER_CLIENT - 11, ACE_NTOHL (0x4155544f), ACE_NTOHL (0x5f535441), ACE_NTOHL (0x52540000), // name = AUTO_START - - - 9, ACE_NTOHL (0x6c6f6361), ACE_NTOHL (0x74696f6e), ACE_NTOHL (0x0), // name = location - CORBA::tk_alias, // typecode kind for typedefs - 72, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 41, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f416464), ACE_NTOHL (0x72657373), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/Address:1.0 - 8, ACE_NTOHL (0x41646472), ACE_NTOHL (0x65737300), // name = Address - CORBA::tk_string, - 0U, // string length - - - 0U, - -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_ServerInformationList (CORBA::tk_alias, sizeof (_oc_ImplementationRepository_ServerInformationList), (char *) &_oc_ImplementationRepository_ServerInformationList, 0, sizeof (ImplementationRepository::ServerInformationList)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ServerInformationList, &_tc_TAO_tc_ImplementationRepository_ServerInformationList) -TAO_NAMESPACE_END -void ImplementationRepository::Administration::_tao_any_destructor (void *x) -{ - ImplementationRepository::Administration *tmp = ACE_static_cast (ImplementationRepository::Administration*,x); - CORBA::release (tmp); -} - -ImplementationRepository::Administration_ptr ImplementationRepository::Administration::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if (CORBA::is_nil (obj)) - return Administration::_nil (); - CORBA::Boolean is_a = obj->_is_a ("IDL:ImplementationRepository/Administration:1.0", ACE_TRY_ENV); - ACE_CHECK_RETURN (Administration::_nil ()); - if (is_a == 0) - return Administration::_nil (); - return Administration::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -ImplementationRepository::Administration_ptr ImplementationRepository::Administration::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return Administration::_nil (); - TAO_Stub* stub = obj->_stubobj (); - stub->_incr_refcnt (); - Administration_ptr default_proxy = Administration::_nil (); - if (obj->_is_collocated () && _TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer != 0) - { - default_proxy = _TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer (obj); - } - if (CORBA::is_nil (default_proxy)) - ACE_NEW_RETURN (default_proxy, Administration (stub), Administration::_nil ()); - return TAO_ImplementationRepository_Administration_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy); -} - -ImplementationRepository::Administration_ptr -ImplementationRepository::Administration::_duplicate (Administration_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -// default constructor -ImplementationRepository::Administration::AlreadyRegistered::AlreadyRegistered (void) - : CORBA_UserException ("IDL:ImplementationRepository/Administration/AlreadyRegistered:1.0") -{ -} - -// destructor - all members are of self managing types -ImplementationRepository::Administration::AlreadyRegistered::~AlreadyRegistered (void) -{ -} - -void ImplementationRepository::Administration::AlreadyRegistered::_tao_any_destructor (void *x) -{ - ImplementationRepository::Administration::AlreadyRegistered *tmp = ACE_static_cast (ImplementationRepository::Administration::AlreadyRegistered*,x); - delete tmp; -} - -// copy constructor -ImplementationRepository::Administration::AlreadyRegistered::AlreadyRegistered (const ::ImplementationRepository::Administration::AlreadyRegistered &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ - } - -// assignment operator -ImplementationRepository::Administration::AlreadyRegistered& -ImplementationRepository::Administration::AlreadyRegistered::operator= (const ::ImplementationRepository::Administration::AlreadyRegistered &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -ImplementationRepository::Administration::AlreadyRegistered * -ImplementationRepository::Administration::AlreadyRegistered::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:ImplementationRepository/Administration/AlreadyRegistered:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (AlreadyRegistered *, exc); - else - return 0; -} - - -void ImplementationRepository::Administration::AlreadyRegistered::_raise () -{ - TAO_RAISE(*this); -} - - -void ImplementationRepository::Administration::AlreadyRegistered::_tao_encode ( - TAO_OutputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) const -{ - if (cdr << *this) - return; - ACE_THROW (CORBA::MARSHAL ()); -} - - -void ImplementationRepository::Administration::AlreadyRegistered::_tao_decode ( - TAO_InputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) -{ - if (cdr >> *this) - return; - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *ImplementationRepository::Administration::AlreadyRegistered::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::ImplementationRepository::Administration::AlreadyRegistered, 0); - return retval; -} - -static const CORBA::Long _oc_ImplementationRepository_Administration_AlreadyRegistered[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 66, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f41646d), ACE_NTOHL (0x696e6973), ACE_NTOHL (0x74726174), ACE_NTOHL (0x696f6e2f), ACE_NTOHL (0x416c7265), ACE_NTOHL (0x61647952), ACE_NTOHL (0x65676973), ACE_NTOHL (0x74657265), ACE_NTOHL (0x643a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:ImplementationRepository/Administration/AlreadyRegistered:1.0 - 18, ACE_NTOHL (0x416c7265), ACE_NTOHL (0x61647952), ACE_NTOHL (0x65676973), ACE_NTOHL (0x74657265), ACE_NTOHL (0x64000000), // name = AlreadyRegistered - 0, // member count -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_Administration_AlreadyRegistered (CORBA::tk_except, sizeof (_oc_ImplementationRepository_Administration_AlreadyRegistered), (char *) &_oc_ImplementationRepository_Administration_AlreadyRegistered, 0, sizeof (ImplementationRepository::Administration::AlreadyRegistered)); -CORBA::TypeCode_ptr ImplementationRepository::Administration::_tc_AlreadyRegistered = &_tc_TAO_tc_ImplementationRepository_Administration_AlreadyRegistered; - -CORBA::TypeCode_ptr -ImplementationRepository::Administration::AlreadyRegistered::_type (void) const -{ - return _tc_AlreadyRegistered; -} - -// default constructor -ImplementationRepository::Administration::CannotActivate::CannotActivate (void) - : CORBA_UserException ("IDL:ImplementationRepository/Administration/CannotActivate:1.0") -{ -} - -// destructor - all members are of self managing types -ImplementationRepository::Administration::CannotActivate::~CannotActivate (void) -{ -} - -void ImplementationRepository::Administration::CannotActivate::_tao_any_destructor (void *x) -{ - ImplementationRepository::Administration::CannotActivate *tmp = ACE_static_cast (ImplementationRepository::Administration::CannotActivate*,x); - delete tmp; -} - -// copy constructor -ImplementationRepository::Administration::CannotActivate::CannotActivate (const ::ImplementationRepository::Administration::CannotActivate &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ - this->reason = CORBA::string_dup (_tao_excp.reason.in ()); -} - -// assignment operator -ImplementationRepository::Administration::CannotActivate& -ImplementationRepository::Administration::CannotActivate::operator= (const ::ImplementationRepository::Administration::CannotActivate &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - this->reason = CORBA::string_dup (_tao_excp.reason.in ()); - return *this; -} - -// narrow -ImplementationRepository::Administration::CannotActivate * -ImplementationRepository::Administration::CannotActivate::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:ImplementationRepository/Administration/CannotActivate:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (CannotActivate *, exc); - else - return 0; -} - - -void ImplementationRepository::Administration::CannotActivate::_raise () -{ - TAO_RAISE(*this); -} - - -void ImplementationRepository::Administration::CannotActivate::_tao_encode ( - TAO_OutputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) const -{ - if (cdr << *this) - return; - ACE_THROW (CORBA::MARSHAL ()); -} - - -void ImplementationRepository::Administration::CannotActivate::_tao_decode ( - TAO_InputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) -{ - if (cdr >> *this) - return; - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *ImplementationRepository::Administration::CannotActivate::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::ImplementationRepository::Administration::CannotActivate, 0); - return retval; -} - -ImplementationRepository::Administration::CannotActivate::CannotActivate ( - const char * _tao_reason -) - : CORBA_UserException (CORBA::string_dup ("IDL:ImplementationRepository/Administration/CannotActivate:1.0")) -{ - this->reason = CORBA::string_dup (_tao_reason); -} - -static const CORBA::Long _oc_ImplementationRepository_Administration_CannotActivate[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 63, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f41646d), ACE_NTOHL (0x696e6973), ACE_NTOHL (0x74726174), ACE_NTOHL (0x696f6e2f), ACE_NTOHL (0x43616e6e), ACE_NTOHL (0x6f744163), ACE_NTOHL (0x74697661), ACE_NTOHL (0x74653a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:ImplementationRepository/Administration/CannotActivate:1.0 - 15, ACE_NTOHL (0x43616e6e), ACE_NTOHL (0x6f744163), ACE_NTOHL (0x74697661), ACE_NTOHL (0x74650000), // name = CannotActivate - 1, // member count - 7, ACE_NTOHL (0x72656173), ACE_NTOHL (0x6f6e0000), // name = reason - CORBA::tk_string, - 0U, // string length -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_Administration_CannotActivate (CORBA::tk_except, sizeof (_oc_ImplementationRepository_Administration_CannotActivate), (char *) &_oc_ImplementationRepository_Administration_CannotActivate, 0, sizeof (ImplementationRepository::Administration::CannotActivate)); -CORBA::TypeCode_ptr ImplementationRepository::Administration::_tc_CannotActivate = &_tc_TAO_tc_ImplementationRepository_Administration_CannotActivate; - -CORBA::TypeCode_ptr -ImplementationRepository::Administration::CannotActivate::_type (void) const -{ - return _tc_CannotActivate; -} - -// default constructor -ImplementationRepository::Administration::NotFound::NotFound (void) - : CORBA_UserException ("IDL:ImplementationRepository/Administration/NotFound:1.0") -{ -} - -// destructor - all members are of self managing types -ImplementationRepository::Administration::NotFound::~NotFound (void) -{ -} - -void ImplementationRepository::Administration::NotFound::_tao_any_destructor (void *x) -{ - ImplementationRepository::Administration::NotFound *tmp = ACE_static_cast (ImplementationRepository::Administration::NotFound*,x); - delete tmp; -} - -// copy constructor -ImplementationRepository::Administration::NotFound::NotFound (const ::ImplementationRepository::Administration::NotFound &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ - } - -// assignment operator -ImplementationRepository::Administration::NotFound& -ImplementationRepository::Administration::NotFound::operator= (const ::ImplementationRepository::Administration::NotFound &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -ImplementationRepository::Administration::NotFound * -ImplementationRepository::Administration::NotFound::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:ImplementationRepository/Administration/NotFound:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (NotFound *, exc); - else - return 0; -} - - -void ImplementationRepository::Administration::NotFound::_raise () -{ - TAO_RAISE(*this); -} - - -void ImplementationRepository::Administration::NotFound::_tao_encode ( - TAO_OutputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) const -{ - if (cdr << *this) - return; - ACE_THROW (CORBA::MARSHAL ()); -} - - -void ImplementationRepository::Administration::NotFound::_tao_decode ( - TAO_InputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) -{ - if (cdr >> *this) - return; - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *ImplementationRepository::Administration::NotFound::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::ImplementationRepository::Administration::NotFound, 0); - return retval; -} - -static const CORBA::Long _oc_ImplementationRepository_Administration_NotFound[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 57, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f41646d), ACE_NTOHL (0x696e6973), ACE_NTOHL (0x74726174), ACE_NTOHL (0x696f6e2f), ACE_NTOHL (0x4e6f7446), ACE_NTOHL (0x6f756e64), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:ImplementationRepository/Administration/NotFound:1.0 - 9, ACE_NTOHL (0x4e6f7446), ACE_NTOHL (0x6f756e64), ACE_NTOHL (0x0), // name = NotFound - 0, // member count -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_Administration_NotFound (CORBA::tk_except, sizeof (_oc_ImplementationRepository_Administration_NotFound), (char *) &_oc_ImplementationRepository_Administration_NotFound, 0, sizeof (ImplementationRepository::Administration::NotFound)); -CORBA::TypeCode_ptr ImplementationRepository::Administration::_tc_NotFound = &_tc_TAO_tc_ImplementationRepository_Administration_NotFound; - -CORBA::TypeCode_ptr -ImplementationRepository::Administration::NotFound::_type (void) const -{ - return _tc_NotFound; -} - -void ImplementationRepository::Administration::activate_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound, - ImplementationRepository::Administration::CannotActivate - )) -{ - - static TAO_Exception_Data _tao_ImplementationRepository_Administration_activate_server_exceptiondata [] = - { - {ImplementationRepository::Administration::_tc_NotFound, ImplementationRepository::Administration::NotFound::_alloc}, - {ImplementationRepository::Administration::_tc_CannotActivate, ImplementationRepository::Administration::CannotActivate::_alloc} - }; - - - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "activate_server", - 15, - istub->orb_core () - ); - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << server) - )) - ACE_THROW (CORBA::MARSHAL ()); - int _invoke_status = - _tao_call.invoke (_tao_ImplementationRepository_Administration_activate_server_exceptiondata, 2, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - break; - } - -} - -void ImplementationRepository::Administration::register_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::AlreadyRegistered - )) -{ - - static TAO_Exception_Data _tao_ImplementationRepository_Administration_register_server_exceptiondata [] = - { - {ImplementationRepository::Administration::_tc_AlreadyRegistered, ImplementationRepository::Administration::AlreadyRegistered::_alloc} - }; - - - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "register_server", - 15, - istub->orb_core () - ); - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << server) && - (_tao_out << options) - )) - ACE_THROW (CORBA::MARSHAL ()); - int _invoke_status = - _tao_call.invoke (_tao_ImplementationRepository_Administration_register_server_exceptiondata, 1, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - break; - } - -} - -void ImplementationRepository::Administration::reregister_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - - - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "reregister_server", - 17, - istub->orb_core () - ); - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << server) && - (_tao_out << options) - )) - ACE_THROW (CORBA::MARSHAL ()); - int _invoke_status = - _tao_call.invoke (0, 0, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - break; - } - -} - -void ImplementationRepository::Administration::remove_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - - static TAO_Exception_Data _tao_ImplementationRepository_Administration_remove_server_exceptiondata [] = - { - {ImplementationRepository::Administration::_tc_NotFound, ImplementationRepository::Administration::NotFound::_alloc} - }; - - - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "remove_server", - 13, - istub->orb_core () - ); - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << server) - )) - ACE_THROW (CORBA::MARSHAL ()); - int _invoke_status = - _tao_call.invoke (_tao_ImplementationRepository_Administration_remove_server_exceptiondata, 1, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - break; - } -} - -void ImplementationRepository::Administration::shutdown_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - - static TAO_Exception_Data _tao_ImplementationRepository_Administration_shutdown_server_exceptiondata [] = - { - {ImplementationRepository::Administration::_tc_NotFound, ImplementationRepository::Administration::NotFound::_alloc} - }; - - - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "shutdown_server", - 15, - istub->orb_core () - ); - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << server) - )) - ACE_THROW (CORBA::MARSHAL ()); - int _invoke_status = - _tao_call.invoke (_tao_ImplementationRepository_Administration_shutdown_server_exceptiondata, 1, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - - break; - - } -} - -char * ImplementationRepository::Administration::server_is_running ( - const char * server, - const char * addr, - ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - - static TAO_Exception_Data _tao_ImplementationRepository_Administration_server_is_running_exceptiondata [] = - { - {ImplementationRepository::Administration::_tc_NotFound, ImplementationRepository::Administration::NotFound::_alloc} - }; - - CORBA::String_var _tao_safe_retval; - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); - - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "server_is_running", - 17, - istub->orb_core () - ); - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << server) && - (_tao_out << addr) && - (_tao_out << server_object) - )) - ACE_THROW_RETURN (CORBA::MARSHAL (), 0); - - int _invoke_status = - _tao_call.invoke (_tao_ImplementationRepository_Administration_server_is_running_exceptiondata, 1, ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0); - - } - TAO_InputCDR &_tao_in = _tao_call.inp_stream (); - if (!( - (_tao_in >> _tao_safe_retval.inout ()) - )) - ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0); - - break; - - } - return _tao_safe_retval._retn (); -} - -void ImplementationRepository::Administration::server_is_shutting_down ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - - static TAO_Exception_Data _tao_ImplementationRepository_Administration_server_is_shutting_down_exceptiondata [] = - { - {ImplementationRepository::Administration::_tc_NotFound, ImplementationRepository::Administration::NotFound::_alloc} - }; - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "server_is_shutting_down", - 23, - istub->orb_core () - ); - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << server) - )) - ACE_THROW (CORBA::MARSHAL ()); - int _invoke_status = - _tao_call.invoke (_tao_ImplementationRepository_Administration_server_is_shutting_down_exceptiondata, 1, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - - break; - - } - -} - -void ImplementationRepository::Administration::find ( - const char * server, - ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - - static TAO_Exception_Data _tao_ImplementationRepository_Administration_find_exceptiondata [] = - { - {ImplementationRepository::Administration::_tc_NotFound, ImplementationRepository::Administration::NotFound::_alloc} - }; - - - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - - ACE_NEW (info.ptr (), ImplementationRepository::ServerInformation); - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "find", - 4, - istub->orb_core () - ); - - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << server) - )) - ACE_THROW (CORBA::MARSHAL ()); - int _invoke_status = - _tao_call.invoke (_tao_ImplementationRepository_Administration_find_exceptiondata, 1, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - TAO_InputCDR &_tao_in = _tao_call.inp_stream (); - if (!( - (_tao_in >> *info.ptr ()) - )) - ACE_THROW (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - break; - - } - -} - -void ImplementationRepository::Administration::list ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - - - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - - ACE_NEW (server_list.ptr (), ImplementationRepository::ServerInformationList); - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "list", - 4, - istub->orb_core () - ); - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << how_many) - )) - ACE_THROW (CORBA::MARSHAL ()); - int _invoke_status = - _tao_call.invoke (0, 0, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - TAO_InputCDR &_tao_in = _tao_call.inp_stream (); - if (!( - (_tao_in >> *server_list.ptr ()) && - (_tao_in >> server_iterator.ptr ()) - )) - ACE_THROW (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - break; - - } - -} - -CORBA::Boolean ImplementationRepository::Administration::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:ImplementationRepository/Administration:1.0")) || - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0"))) - return 1; // success using local knowledge - else - return this->CORBA_Object::_is_a (value, ACE_TRY_ENV); -} - -const char* ImplementationRepository::Administration::_interface_repository_id (void) const -{ - return "IDL:ImplementationRepository/Administration:1.0"; -} - -ImplementationRepository::TAO_ImplementationRepository_Administration_Default_Proxy_Factory::TAO_ImplementationRepository_Administration_Default_Proxy_Factory (int register_proxy_factory) -{ - if (register_proxy_factory) - { - TAO_ImplementationRepository_Administration_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this); - } -} - -ImplementationRepository::TAO_ImplementationRepository_Administration_Default_Proxy_Factory::~TAO_ImplementationRepository_Administration_Default_Proxy_Factory (void) -{ -} - -ImplementationRepository::Administration_ptr -ImplementationRepository::TAO_ImplementationRepository_Administration_Default_Proxy_Factory::create_proxy ( - ::ImplementationRepository::Administration_ptr proxy, - CORBA::Environment & - ) -{ - return proxy; -} - -ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter (void) - : proxy_factory_ (0), - delete_proxy_factory_ (0) -{ -} - -ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter::~TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter (void) -{ - // Making sure the factory which the adapter has is destroyed with it. - if (this->proxy_factory_ != 0) - delete this->proxy_factory_; -} - -int -ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter::register_proxy_factory ( - TAO_ImplementationRepository_Administration_Default_Proxy_Factory *df, - CORBA::Environment &ACE_TRY_ENV - ) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - this->lock_, 0)); - // Remove any existing and replace with the new one. - this->unregister_proxy_factory (ACE_TRY_ENV); - this->proxy_factory_ = df; - this->delete_proxy_factory_ = 0; -return 0; -} - -int -ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter::unregister_proxy_factory ( - CORBA::Environment & - ) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - this->lock_, 0)); - if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0) - { - // Its necessary to set to 1 to make sure that it - // doesnt get into an infinite loop in as it is - // invoked in the destructor of the class too. - this->delete_proxy_factory_ = 1; - delete this->proxy_factory_; - this->proxy_factory_ = 0; - } -return 0; -} - -ImplementationRepository::Administration_ptr -ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter::create_proxy ( - ::ImplementationRepository::Administration_ptr proxy, - CORBA::Environment & - ) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - this->lock_, 0)); - // Verify that an is available else make one. - if (this->proxy_factory_ == 0) - ACE_NEW_RETURN (this->proxy_factory_, - TAO_ImplementationRepository_Administration_Default_Proxy_Factory (1), - 0); - - - return this->proxy_factory_->create_proxy (proxy); -} - -ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::TAO_ImplementationRepository_Administration_Smart_Proxy_Base (::ImplementationRepository::Administration_ptr proxy) -: base_proxy_ (proxy) -{ -} - -ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::~TAO_ImplementationRepository_Administration_Smart_Proxy_Base (void) -{ -} - -void ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::activate_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound, - ImplementationRepository::Administration::CannotActivate - )) -{ - this->base_proxy_->activate_server ( - server, - ACE_TRY_ENV - ); - -} - -void ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::register_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::AlreadyRegistered - )) -{ - this->base_proxy_->register_server ( - server, - options, - ACE_TRY_ENV - ); - -} - -void ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::reregister_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->base_proxy_->reregister_server ( - server, - options, - ACE_TRY_ENV - ); - -} - -void ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::remove_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - this->base_proxy_->remove_server ( - server, - ACE_TRY_ENV - ); - -} - -void ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::shutdown_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - this->base_proxy_->shutdown_server ( - server, - ACE_TRY_ENV - ); - -} - -char * ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::server_is_running ( - const char * server, - const char * addr, - ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - return this->base_proxy_->server_is_running ( - server, - addr, - server_object, - ACE_TRY_ENV - ); - -} - -void ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::server_is_shutting_down ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - this->base_proxy_->server_is_shutting_down ( - server, - ACE_TRY_ENV - ); - -} - -void ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::find ( - const char * server, - ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - this->base_proxy_->find ( - server, - info, - ACE_TRY_ENV - ); - -} - -void ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::list ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->base_proxy_->list ( - how_many, - server_list, - server_iterator, - ACE_TRY_ENV - ); - -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) -template class TAO_Singleton; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate TAO_Singleton -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -static const CORBA::Long _oc_ImplementationRepository_Administration[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 48, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f41646d), ACE_NTOHL (0x696e6973), ACE_NTOHL (0x74726174), ACE_NTOHL (0x696f6e3a), ACE_NTOHL (0x312e3000), // repository ID = IDL:ImplementationRepository/Administration:1.0 - 15, ACE_NTOHL (0x41646d69), ACE_NTOHL (0x6e697374), ACE_NTOHL (0x72617469), ACE_NTOHL (0x6f6e0000), // name = Administration -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_Administration (CORBA::tk_objref, sizeof (_oc_ImplementationRepository_Administration), (char *) &_oc_ImplementationRepository_Administration, 0, sizeof (ImplementationRepository::Administration)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Administration, &_tc_TAO_tc_ImplementationRepository_Administration) -TAO_NAMESPACE_END -void ImplementationRepository::ServerInformationIterator::_tao_any_destructor (void *x) -{ - ImplementationRepository::ServerInformationIterator *tmp = ACE_static_cast (ImplementationRepository::ServerInformationIterator*,x); - CORBA::release (tmp); -} - -ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::ServerInformationIterator::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if (CORBA::is_nil (obj)) - return ServerInformationIterator::_nil (); - CORBA::Boolean is_a = obj->_is_a ("IDL:ImplementationRepository/ServerInformationIterator:1.0", ACE_TRY_ENV); - ACE_CHECK_RETURN (ServerInformationIterator::_nil ()); - if (is_a == 0) - return ServerInformationIterator::_nil (); - return ServerInformationIterator::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::ServerInformationIterator::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return ServerInformationIterator::_nil (); - TAO_Stub* stub = obj->_stubobj (); - stub->_incr_refcnt (); - ServerInformationIterator_ptr default_proxy = ServerInformationIterator::_nil (); - if (obj->_is_collocated () && _TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer != 0) - { - default_proxy = _TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer (obj); - } - if (CORBA::is_nil (default_proxy)) - ACE_NEW_RETURN (default_proxy, ServerInformationIterator (stub), ServerInformationIterator::_nil ()); - return TAO_ImplementationRepository_ServerInformationIterator_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy); -} - -ImplementationRepository::ServerInformationIterator_ptr -ImplementationRepository::ServerInformationIterator::_duplicate (ServerInformationIterator_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -CORBA::Boolean ImplementationRepository::ServerInformationIterator::next_n ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - - CORBA::Boolean _tao_retval = 0; - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW_RETURN (CORBA::INTERNAL (), _tao_retval); - - - ACE_NEW_RETURN (server_list.ptr (), ImplementationRepository::ServerInformationList, _tao_retval); - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "next_n", - 6, - istub->orb_core () - ); - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK_RETURN (_tao_retval); - - ACE_CHECK_RETURN (_tao_retval); - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK_RETURN (_tao_retval); - - TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - if (!( - (_tao_out << how_many) - )) - ACE_THROW_RETURN (CORBA::MARSHAL (), _tao_retval); - - int _invoke_status = - _tao_call.invoke (0, 0, ACE_TRY_ENV); - ACE_CHECK_RETURN (_tao_retval); - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), _tao_retval); - - } - TAO_InputCDR &_tao_in = _tao_call.inp_stream (); - if (!( - (_tao_in >> CORBA::Any::to_boolean (_tao_retval)) && - (_tao_in >> *server_list.ptr ()) - )) - ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), _tao_retval); - - break; - - } - return _tao_retval; -} - -void ImplementationRepository::ServerInformationIterator::destroy ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - - - - - TAO_Stub *istub = this->_stubobj (); - if (istub == 0) - ACE_THROW (CORBA::INTERNAL ()); - - - TAO_GIOP_Twoway_Invocation _tao_call ( - istub, - "destroy", - 7, - istub->orb_core () - ); - - for (;;) - { - _tao_call.start (ACE_TRY_ENV); - ACE_CHECK; - - CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; - // Tremporary hack until GIOP 1.2 is implemented. - - _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); - ACE_CHECK; - - int _invoke_status = - _tao_call.invoke (0, 0, ACE_TRY_ENV); - ACE_CHECK; - - if (_invoke_status == TAO_INVOKE_RESTART) - continue; - if (_invoke_status != TAO_INVOKE_OK) - { - ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); - } - - break; - - } - -} - -CORBA::Boolean ImplementationRepository::ServerInformationIterator::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:ImplementationRepository/ServerInformationIterator:1.0")) || - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0"))) - return 1; // success using local knowledge - else - return this->CORBA_Object::_is_a (value, ACE_TRY_ENV); -} - -const char* ImplementationRepository::ServerInformationIterator::_interface_repository_id (void) const -{ - return "IDL:ImplementationRepository/ServerInformationIterator:1.0"; -} - -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory::TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory (int register_proxy_factory) -{ - if (register_proxy_factory) - { - TAO_ImplementationRepository_ServerInformationIterator_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this); - } -} - -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory::~TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory (void) -{ -} - -ImplementationRepository::ServerInformationIterator_ptr -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory::create_proxy ( - ::ImplementationRepository::ServerInformationIterator_ptr proxy, - CORBA::Environment & - ) -{ - return proxy; -} - -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter (void) - : proxy_factory_ (0), - delete_proxy_factory_ (0) -{ -} - -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter::~TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter (void) -{ - // Making sure the factory which the adapter has is destroyed with it. - if (this->proxy_factory_ != 0) - delete this->proxy_factory_; -} - -int -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter::register_proxy_factory ( - TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory *df, - CORBA::Environment &ACE_TRY_ENV - ) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - this->lock_, 0)); - // Remove any existing and replace with the new one. - this->unregister_proxy_factory (ACE_TRY_ENV); - this->proxy_factory_ = df; - this->delete_proxy_factory_ = 0; -return 0; -} - -int -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter::unregister_proxy_factory ( - CORBA::Environment & - ) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - this->lock_, 0)); - if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0) - { - // Its necessary to set to 1 to make sure that it - // doesnt get into an infinite loop in as it is - // invoked in the destructor of the class too. - this->delete_proxy_factory_ = 1; - delete this->proxy_factory_; - this->proxy_factory_ = 0; - } -return 0; -} - -ImplementationRepository::ServerInformationIterator_ptr -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter::create_proxy ( - ::ImplementationRepository::ServerInformationIterator_ptr proxy, - CORBA::Environment & - ) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - this->lock_, 0)); - // Verify that an is available else make one. - if (this->proxy_factory_ == 0) - ACE_NEW_RETURN (this->proxy_factory_, - TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory (1), - 0); - - - return this->proxy_factory_->create_proxy (proxy); -} - -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base::TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base (::ImplementationRepository::ServerInformationIterator_ptr proxy) -: base_proxy_ (proxy) -{ -} - -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base::~TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base (void) -{ -} - -CORBA::Boolean ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base::next_n ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - return this->base_proxy_->next_n ( - how_many, - server_list, - ACE_TRY_ENV - ); - -} - -void ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base::destroy ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->base_proxy_->destroy ( - ACE_TRY_ENV - ); - -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) -template class TAO_Singleton; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate TAO_Singleton -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -static const CORBA::Long _oc_ImplementationRepository_ServerInformationIterator[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 59, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x496d706c), ACE_NTOHL (0x656d656e), ACE_NTOHL (0x74617469), ACE_NTOHL (0x6f6e5265), ACE_NTOHL (0x706f7369), ACE_NTOHL (0x746f7279), ACE_NTOHL (0x2f536572), ACE_NTOHL (0x76657249), ACE_NTOHL (0x6e666f72), ACE_NTOHL (0x6d617469), ACE_NTOHL (0x6f6e4974), ACE_NTOHL (0x65726174), ACE_NTOHL (0x6f723a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:ImplementationRepository/ServerInformationIterator:1.0 - 26, ACE_NTOHL (0x53657276), ACE_NTOHL (0x6572496e), ACE_NTOHL (0x666f726d), ACE_NTOHL (0x6174696f), ACE_NTOHL (0x6e497465), ACE_NTOHL (0x7261746f), ACE_NTOHL (0x72000000), // name = ServerInformationIterator -}; -static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_ServerInformationIterator (CORBA::tk_objref, sizeof (_oc_ImplementationRepository_ServerInformationIterator), (char *) &_oc_ImplementationRepository_ServerInformationIterator, 0, sizeof (ImplementationRepository::ServerInformationIterator)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (ImplementationRepository) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ServerInformationIterator, &_tc_TAO_tc_ImplementationRepository_ServerInformationIterator) -TAO_NAMESPACE_END -ImplementationRepository::ServerObject_ptr (*_TAO_collocation_ImplementationRepository_ServerObject_Stub_Factory_function_pointer) ( - CORBA::Object_ptr obj - ) = 0; -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerObject_ptr _tao_elem) -{ - TAO_OutputCDR stream; - if (stream << _tao_elem) - { - _tao_any._tao_replace ( - ImplementationRepository::_tc_ServerObject, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - ImplementationRepository::ServerObject::_duplicate (_tao_elem), - ImplementationRepository::ServerObject::_tao_any_destructor - ); - } -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ServerObject_ptr &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - _tao_elem = ImplementationRepository::ServerObject::_nil (); - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::_tc_ServerObject, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::_tc_ServerObject, - 1, - _tao_elem, - ImplementationRepository::ServerObject::_tao_any_destructor - ); - return 1; - } - } - ACE_CATCHANY - { - _tao_elem = ImplementationRepository::ServerObject::_nil (); - return 0; - } - ACE_ENDTRY; - _tao_elem = ImplementationRepository::ServerObject::_nil (); - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -# pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::EnvironmentVariable &_tao_elem) // copying -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::_tc_EnvironmentVariable, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::EnvironmentVariable *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::_tc_EnvironmentVariable, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ImplementationRepository::EnvironmentVariable::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::EnvironmentVariable *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast(ImplementationRepository::EnvironmentVariable*&,_tao_elem); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::EnvironmentVariable *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::_tc_EnvironmentVariable, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = ACE_static_cast( - const ImplementationRepository::EnvironmentVariable*, - _tao_any.value () - ); - return 1; - } - else - { - ImplementationRepository::EnvironmentVariable *tmp; - ACE_NEW_RETURN (tmp, ImplementationRepository::EnvironmentVariable, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::_tc_EnvironmentVariable, - 1, - ACE_static_cast (void *, tmp), - ImplementationRepository::EnvironmentVariable::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -void operator<<= ( - CORBA::Any &_tao_any, - const ImplementationRepository::EnvironmentList &_tao_elem - ) // copying -{ - TAO_OutputCDR stream; - if (stream << _tao_elem) - { - _tao_any._tao_replace ( - ImplementationRepository::_tc_EnvironmentList, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); - } -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::EnvironmentList *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::_tc_EnvironmentList, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ImplementationRepository::EnvironmentList::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::EnvironmentList *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast( - const ImplementationRepository::EnvironmentList*&, - _tao_elem - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::EnvironmentList *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::_tc_EnvironmentList, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = ACE_static_cast( - const ImplementationRepository::EnvironmentList*, - _tao_any.value () - ); - return 1; - } - else - { - ImplementationRepository::EnvironmentList *tmp; - ACE_NEW_RETURN (tmp, ImplementationRepository::EnvironmentList, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::_tc_EnvironmentList, - 1, - ACE_static_cast (void *, tmp), - ImplementationRepository::EnvironmentList::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ActivationMode _tao_elem) -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::_tc_ActivationMode, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ActivationMode &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::_tc_ActivationMode, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - return 1; - } - } - ACE_CATCHANY - { - return 0; - } - ACE_ENDTRY; - return 0; -} - -void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::StartupOptions &_tao_elem) // copying -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::_tc_StartupOptions, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::StartupOptions *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::_tc_StartupOptions, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ImplementationRepository::StartupOptions::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::StartupOptions *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast(ImplementationRepository::StartupOptions*&,_tao_elem); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::StartupOptions *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::_tc_StartupOptions, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = ACE_static_cast( - const ImplementationRepository::StartupOptions*, - _tao_any.value () - ); - return 1; - } - else - { - ImplementationRepository::StartupOptions *tmp; - ACE_NEW_RETURN (tmp, ImplementationRepository::StartupOptions, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::_tc_StartupOptions, - 1, - ACE_static_cast (void *, tmp), - ImplementationRepository::StartupOptions::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::ServerInformation &_tao_elem) // copying -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::_tc_ServerInformation, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformation *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::_tc_ServerInformation, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ImplementationRepository::ServerInformation::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ServerInformation *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast(ImplementationRepository::ServerInformation*&,_tao_elem); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::ServerInformation *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::_tc_ServerInformation, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = ACE_static_cast( - const ImplementationRepository::ServerInformation*, - _tao_any.value () - ); - return 1; - } - else - { - ImplementationRepository::ServerInformation *tmp; - ACE_NEW_RETURN (tmp, ImplementationRepository::ServerInformation, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::_tc_ServerInformation, - 1, - ACE_static_cast (void *, tmp), - ImplementationRepository::ServerInformation::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -void operator<<= ( - CORBA::Any &_tao_any, - const ImplementationRepository::ServerInformationList &_tao_elem - ) // copying -{ - TAO_OutputCDR stream; - if (stream << _tao_elem) - { - _tao_any._tao_replace ( - ImplementationRepository::_tc_ServerInformationList, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); - } -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformationList *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::_tc_ServerInformationList, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ImplementationRepository::ServerInformationList::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ServerInformationList *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast( - const ImplementationRepository::ServerInformationList*&, - _tao_elem - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::ServerInformationList *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::_tc_ServerInformationList, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = ACE_static_cast( - const ImplementationRepository::ServerInformationList*, - _tao_any.value () - ); - return 1; - } - else - { - ImplementationRepository::ServerInformationList *tmp; - ACE_NEW_RETURN (tmp, ImplementationRepository::ServerInformationList, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::_tc_ServerInformationList, - 1, - ACE_static_cast (void *, tmp), - ImplementationRepository::ServerInformationList::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -ImplementationRepository::Administration_ptr (*_TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer) ( - CORBA::Object_ptr obj - ) = 0; -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration_ptr _tao_elem) -{ - TAO_OutputCDR stream; - if (stream << _tao_elem) - { - _tao_any._tao_replace ( - ImplementationRepository::_tc_Administration, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - ImplementationRepository::Administration::_duplicate (_tao_elem), - ImplementationRepository::Administration::_tao_any_destructor - ); - } -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::Administration_ptr &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - _tao_elem = ImplementationRepository::Administration::_nil (); - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::_tc_Administration, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::_tc_Administration, - 1, - _tao_elem, - ImplementationRepository::Administration::_tao_any_destructor - ); - return 1; - } - } - ACE_CATCHANY - { - _tao_elem = ImplementationRepository::Administration::_nil (); - return 0; - } - ACE_ENDTRY; - _tao_elem = ImplementationRepository::Administration::_nil (); - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -# pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::Administration::AlreadyRegistered &_tao_elem) // copying -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::Administration::_tc_AlreadyRegistered, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration::AlreadyRegistered *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::Administration::_tc_AlreadyRegistered, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ImplementationRepository::Administration::AlreadyRegistered::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::Administration::AlreadyRegistered *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast( - const ImplementationRepository::Administration::AlreadyRegistered*&, - _tao_elem - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::Administration::AlreadyRegistered *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::Administration::_tc_AlreadyRegistered, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (ImplementationRepository::Administration::AlreadyRegistered *)_tao_any.value (); - return 1; - } - else - { - ImplementationRepository::Administration::AlreadyRegistered *tmp; - ACE_NEW_RETURN (tmp, ImplementationRepository::Administration::AlreadyRegistered, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::Administration::_tc_AlreadyRegistered, - 1, - tmp, - ImplementationRepository::Administration::AlreadyRegistered::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::Administration::CannotActivate &_tao_elem) // copying -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::Administration::_tc_CannotActivate, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration::CannotActivate *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::Administration::_tc_CannotActivate, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ImplementationRepository::Administration::CannotActivate::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::Administration::CannotActivate *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast( - const ImplementationRepository::Administration::CannotActivate*&, - _tao_elem - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::Administration::CannotActivate *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::Administration::_tc_CannotActivate, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (ImplementationRepository::Administration::CannotActivate *)_tao_any.value (); - return 1; - } - else - { - ImplementationRepository::Administration::CannotActivate *tmp; - ACE_NEW_RETURN (tmp, ImplementationRepository::Administration::CannotActivate, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::Administration::_tc_CannotActivate, - 1, - tmp, - ImplementationRepository::Administration::CannotActivate::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::Administration::NotFound &_tao_elem) // copying -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::Administration::_tc_NotFound, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration::NotFound *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - ImplementationRepository::Administration::_tc_NotFound, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ImplementationRepository::Administration::NotFound::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::Administration::NotFound *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast( - const ImplementationRepository::Administration::NotFound*&, - _tao_elem - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::Administration::NotFound *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::Administration::_tc_NotFound, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (ImplementationRepository::Administration::NotFound *)_tao_any.value (); - return 1; - } - else - { - ImplementationRepository::Administration::NotFound *tmp; - ACE_NEW_RETURN (tmp, ImplementationRepository::Administration::NotFound, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::Administration::_tc_NotFound, - 1, - tmp, - ImplementationRepository::Administration::NotFound::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -ImplementationRepository::ServerInformationIterator_ptr (*_TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer) ( - CORBA::Object_ptr obj - ) = 0; -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformationIterator_ptr _tao_elem) -{ - TAO_OutputCDR stream; - if (stream << _tao_elem) - { - _tao_any._tao_replace ( - ImplementationRepository::_tc_ServerInformationIterator, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - ImplementationRepository::ServerInformationIterator::_duplicate (_tao_elem), - ImplementationRepository::ServerInformationIterator::_tao_any_destructor - ); - } -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ServerInformationIterator_ptr &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - _tao_elem = ImplementationRepository::ServerInformationIterator::_nil (); - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (ImplementationRepository::_tc_ServerInformationIterator, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - ImplementationRepository::_tc_ServerInformationIterator, - 1, - _tao_elem, - ImplementationRepository::ServerInformationIterator::_tao_any_destructor - ); - return 1; - } - } - ACE_CATCHANY - { - _tao_elem = ImplementationRepository::ServerInformationIterator::_nil (); - return 0; - } - ACE_ENDTRY; - _tao_elem = ImplementationRepository::ServerInformationIterator::_nil (); - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -# pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -CORBA::Boolean operator<< ( - TAO_OutputCDR &strm, - const ImplementationRepository::EnvironmentList &_tao_sequence - ) -{ - if (strm << _tao_sequence.length ()) - { - // encode all elements - CORBA::Boolean _tao_marshal_flag = 1; - for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++) - { - _tao_marshal_flag = (strm << _tao_sequence[i]); - } - return _tao_marshal_flag; - } - return 0; // error -} - -CORBA::Boolean operator>> ( - TAO_InputCDR &strm, - ImplementationRepository::EnvironmentList &_tao_sequence - ) -{ - CORBA::ULong _tao_seq_len; - if (strm >> _tao_seq_len) - { - // set the length of the sequence - _tao_sequence.length (_tao_seq_len); - // If length is 0 we return true. - if (0 >= _tao_seq_len) - return 1; - // retrieve all the elements - CORBA::Boolean _tao_marshal_flag = 1; - for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++) - { - _tao_marshal_flag = (strm >> _tao_sequence[i]); - } - return _tao_marshal_flag; - } - return 0; // error -} - -CORBA::Boolean operator<< ( - TAO_OutputCDR &strm, - const ImplementationRepository::ServerInformationList &_tao_sequence - ) -{ - if (strm << _tao_sequence.length ()) - { - // encode all elements - CORBA::Boolean _tao_marshal_flag = 1; - for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++) - { - _tao_marshal_flag = (strm << _tao_sequence[i]); - } - return _tao_marshal_flag; - } - return 0; // error -} - -CORBA::Boolean operator>> ( - TAO_InputCDR &strm, - ImplementationRepository::ServerInformationList &_tao_sequence - ) -{ - CORBA::ULong _tao_seq_len; - if (strm >> _tao_seq_len) - { - // set the length of the sequence - _tao_sequence.length (_tao_seq_len); - // If length is 0 we return true. - if (0 >= _tao_seq_len) - return 1; - // retrieve all the elements - CORBA::Boolean _tao_marshal_flag = 1; - for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++) - { - _tao_marshal_flag = (strm >> _tao_sequence[i]); - } - return _tao_marshal_flag; - } - return 0; // error -} diff --git a/TAO/tao/ImplRepoC.h b/TAO/tao/ImplRepoC.h deleted file mode 100644 index 94d84122912..00000000000 --- a/TAO/tao/ImplRepoC.h +++ /dev/null @@ -1,1698 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_IMPLREPOC_H_ -#define _TAO_IDL_IMPLREPOC_H_ -#include "ace/pre.h" - -#include "tao/Object.h" -#include "tao/Managed_Types.h" -#include "tao/Sequence.h" -#include "tao/Exception.h" -#include "tao/Environment.h" -#include "tao/CDR.h" -#include "tao/Any.h" -#include "tao/Typecode.h" -#include "tao/TAO_Singleton.h" - -#if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) -#include "ace/streams.h" -#endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */ - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - - -#if defined (TAO_EXPORT_MACRO) -#undef TAO_EXPORT_MACRO -#endif -#define TAO_EXPORT_MACRO TAO_Export - -#if defined (TAO_EXPORT_NESTED_CLASSES) -# if defined (TAO_EXPORT_NESTED_MACRO) -# undef TAO_EXPORT_NESTED_MACRO -# endif /* defined (TAO_EXPORT_NESTED_MACRO) */ -# define TAO_EXPORT_NESTED_MACRO TAO_Export -#endif /* TAO_EXPORT_NESTED_CLASSES */ - -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -TAO_NAMESPACE ImplementationRepository -{ - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVEROBJECT___PTR_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVEROBJECT___PTR_CH_ - - class ServerObject; - typedef ServerObject *ServerObject_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVEROBJECT___VAR_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVEROBJECT___VAR_CH_ - - class TAO_Export ServerObject_var : public TAO_Base_var - { - public: - ServerObject_var (void); // default constructor - ServerObject_var (ServerObject_ptr); - ServerObject_var (const ServerObject_var &); // copy constructor - ~ServerObject_var (void); // destructor - - ServerObject_var &operator= (ServerObject_ptr); - ServerObject_var &operator= (const ServerObject_var &); - ServerObject_ptr operator-> (void) const; - - operator const ServerObject_ptr &() const; - operator ServerObject_ptr &(); - // in, inout, out, _retn - ServerObject_ptr in (void) const; - ServerObject_ptr &inout (void); - ServerObject_ptr &out (void); - ServerObject_ptr _retn (void); - ServerObject_ptr ptr (void) const; - - private: - ServerObject_ptr ptr_; - // Unimplemented - prevents widening assignment. - ServerObject_var (const TAO_Base_var &rhs); - ServerObject_var &operator= (const TAO_Base_var &rhs); - }; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVEROBJECT___OUT_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVEROBJECT___OUT_CH_ - - class TAO_Export ServerObject_out - { - public: - ServerObject_out (ServerObject_ptr &); - ServerObject_out (ServerObject_var &); - ServerObject_out (const ServerObject_out &); - ServerObject_out &operator= (const ServerObject_out &); - ServerObject_out &operator= (const ServerObject_var &); - ServerObject_out &operator= (ServerObject_ptr); - operator ServerObject_ptr &(); - ServerObject_ptr &ptr (void); - ServerObject_ptr operator-> (void); - - private: - ServerObject_ptr &ptr_; - }; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVEROBJECT_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVEROBJECT_CH_ - -class TAO_Export ServerObject : public virtual ACE_CORBA_1 (Object) - { - public: - #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ServerObject_ptr _ptr_type; - typedef ServerObject_var _var_type; - #endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static ServerObject_ptr _duplicate (ServerObject_ptr obj); - static ServerObject_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &env = - TAO_default_environment () - ); - static ServerObject_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &env = - TAO_default_environment () - ); - static ServerObject_ptr _nil (void) - { - return (ServerObject_ptr)0; - } - - static void _tao_any_destructor (void*); - - virtual void ping ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void shutdown ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean _is_a ( - const CORBA::Char *type_id, - CORBA::Environment &env = - TAO_default_environment () - ); - virtual const char* _interface_repository_id (void) const; - - protected: - ServerObject (void); - ServerObject (TAO_Stub *objref, - TAO_ServantBase *_tao_servant = 0, - CORBA::Boolean _tao_collocated = 0 - ); - virtual ~ServerObject (void); - private: - ServerObject (const ServerObject &); - void operator= (const ServerObject &); -}; - -class TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory -{ -public: - - TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory (int register_proxy_factory = 1); - - virtual ~TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory (void); - - virtual ServerObject_ptr create_proxy ( - ServerObject_ptr proxy, - CORBA::Environment &env = - TAO_default_environment () - ); -}; - -class TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter -{ -public: - - friend class TAO_Singleton; - - int register_proxy_factory ( - TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory *df, - CORBA::Environment &env = - TAO_default_environment () - ); - - int unregister_proxy_factory ( - CORBA::Environment &env = - TAO_default_environment () - ); - - ServerObject_ptr create_proxy ( - ServerObject_ptr proxy, - CORBA::Environment &env = - TAO_default_environment () - ); - -protected: - TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter (void); - ~TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter (void); - TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter &operator= ( - const TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter & - ); - TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory *proxy_factory_; - int delete_proxy_factory_; - ACE_SYNCH_RECURSIVE_MUTEX lock_; - }; - - typedef TAO_Singleton TAO_ImplementationRepository_ServerObject_PROXY_FACTORY_ADAPTER; - class TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base : public virtual ACE_NESTED_CLASS (ImplementationRepository, ServerObject) - { - public: - TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base (::ImplementationRepository::ServerObject_ptr proxy); - ~TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base (void); - virtual void ping ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void shutdown ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -private: - ::ImplementationRepository::ServerObject_var base_proxy_; -}; - - -#endif /* end #if !defined */ - -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ServerObject; - -struct EnvironmentVariable; -class EnvironmentVariable_var; - -struct TAO_Export EnvironmentVariable -{ - -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef EnvironmentVariable_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - static void _tao_any_destructor (void*); - - TAO_String_Manager name; - TAO_String_Manager value; -}; - -class TAO_Export EnvironmentVariable_var -{ -public: - EnvironmentVariable_var (void); // default constructor - EnvironmentVariable_var (EnvironmentVariable *); - EnvironmentVariable_var (const EnvironmentVariable_var &); // copy constructor - ~EnvironmentVariable_var (void); // destructor - - EnvironmentVariable_var &operator= (EnvironmentVariable *); - EnvironmentVariable_var &operator= (const EnvironmentVariable_var &); - EnvironmentVariable *operator-> (void); - const EnvironmentVariable *operator-> (void) const; - - operator const EnvironmentVariable &() const; - operator EnvironmentVariable &(); - operator EnvironmentVariable &() const; - operator EnvironmentVariable *&(); // variable-size types only - - // in, inout, out, _retn - const EnvironmentVariable &in (void) const; - EnvironmentVariable &inout (void); - EnvironmentVariable *&out (void); - EnvironmentVariable *_retn (void); - EnvironmentVariable *ptr (void) const; - -private: - EnvironmentVariable *ptr_; -}; - -class TAO_Export EnvironmentVariable_out -{ -public: - EnvironmentVariable_out (EnvironmentVariable *&); - EnvironmentVariable_out (EnvironmentVariable_var &); - EnvironmentVariable_out (const EnvironmentVariable_out &); - EnvironmentVariable_out &operator= (const EnvironmentVariable_out &); - EnvironmentVariable_out &operator= (EnvironmentVariable *); - operator EnvironmentVariable *&(); - EnvironmentVariable *&ptr (void); - EnvironmentVariable *operator-> (void); - -private: - EnvironmentVariable *&ptr_; - // assignment from T_var not allowed - void operator= (const EnvironmentVariable_var &); -}; - -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_EnvironmentVariable; - -typedef char * Address; -typedef CORBA::String_var Address_var; -typedef CORBA::String_out Address_out; -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_Address; - - -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - -#if !defined (__TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CH_) -#define __TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CH_ - - class TAO_EXPORT_NESTED_MACRO _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList : public TAO_Unbounded_Base_Sequence - { - public: - // = Initialization and termination methods. - - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (void); // Default constructor. - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (CORBA::ULong maximum); - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (CORBA::ULong maximum, - CORBA::ULong length, - EnvironmentVariable *data, - CORBA::Boolean release = 0); - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (const _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList &rhs); - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList &operator= (const _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList &rhs); - virtual ~_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (void); // Dtor. - // = Accessors. - EnvironmentVariable &operator[] (CORBA::ULong i); - const EnvironmentVariable &operator[] (CORBA::ULong i) const; - // = Static operations. - static EnvironmentVariable *allocbuf (CORBA::ULong size); - static void freebuf (EnvironmentVariable *buffer); - virtual void _allocate_buffer (CORBA::ULong length); - virtual void _deallocate_buffer (void); - // Implement the TAO_Base_Sequence methods (see Sequence.h) - - EnvironmentVariable *get_buffer (CORBA::Boolean orphan = 0); - const EnvironmentVariable *get_buffer (void) const; - void replace (CORBA::ULong max, - CORBA::ULong length, - EnvironmentVariable *data, - CORBA::Boolean release); - }; - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CH_) -#define _IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CH_ - -class EnvironmentList; -class EnvironmentList_var; - -// ************************************************************* -// EnvironmentList -// ************************************************************* - -class TAO_Export EnvironmentList : public -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ -{ -public: - EnvironmentList (void); // default ctor - EnvironmentList (CORBA::ULong max); // uses max size - EnvironmentList ( - CORBA::ULong max, - CORBA::ULong length, - EnvironmentVariable *buffer, - CORBA::Boolean release=0 - ); - EnvironmentList (const EnvironmentList &); // copy ctor - ~EnvironmentList (void); - static void _tao_any_destructor (void*); - -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef EnvironmentList_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - -}; - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST___VAR_CH_) -#define _IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST___VAR_CH_ - -// ************************************************************* -// class ImplementationRepository::EnvironmentList_var -// ************************************************************* - -class TAO_Export EnvironmentList_var -{ -public: - EnvironmentList_var (void); // default constructor - EnvironmentList_var (EnvironmentList *); - EnvironmentList_var (const EnvironmentList_var &); // copy constructor - ~EnvironmentList_var (void); // destructor - - EnvironmentList_var &operator= (EnvironmentList *); - EnvironmentList_var &operator= (const EnvironmentList_var &); - EnvironmentList *operator-> (void); - const EnvironmentList *operator-> (void) const; - - operator const EnvironmentList &() const; - operator EnvironmentList &(); - operator EnvironmentList &() const; - operator EnvironmentList *&(); // variable-size base types only - - EnvironmentVariable &operator[] (CORBA::ULong index); - // in, inout, out, _retn - const EnvironmentList &in (void) const; - EnvironmentList &inout (void); - EnvironmentList *&out (void); - EnvironmentList *_retn (void); - EnvironmentList *ptr (void) const; - -private: - EnvironmentList *ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST___OUT_CH_) -#define _IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST___OUT_CH_ - -class TAO_Export EnvironmentList_out -{ -public: - EnvironmentList_out (EnvironmentList *&); - EnvironmentList_out (EnvironmentList_var &); - EnvironmentList_out (const EnvironmentList_out &); - EnvironmentList_out &operator= (const EnvironmentList_out &); - EnvironmentList_out &operator= (EnvironmentList *); - operator EnvironmentList *&(); - EnvironmentList *&ptr (void); - EnvironmentList *operator-> (void); - EnvironmentVariable &operator[] (CORBA::ULong index); - -private: - EnvironmentList *&ptr_; - // assignment from T_var not allowed - void operator= (const EnvironmentList_var &); -}; - - -#endif /* end #if !defined */ - -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_EnvironmentList; - -enum ActivationMode -{ - NORMAL, - MANUAL, - PER_CLIENT, - AUTO_START -}; -typedef ActivationMode &ActivationMode_out; -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ActivationMode; - -struct StartupOptions; -class StartupOptions_var; - -struct TAO_Export StartupOptions -{ - -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef StartupOptions_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - static void _tao_any_destructor (void*); - - TAO_String_Manager command_line; - ACE_NESTED_CLASS (ImplementationRepository, EnvironmentList) environment; - TAO_String_Manager working_directory; - ACE_NESTED_CLASS (ImplementationRepository, ActivationMode) activation; -}; - -class TAO_Export StartupOptions_var -{ -public: - StartupOptions_var (void); // default constructor - StartupOptions_var (StartupOptions *); - StartupOptions_var (const StartupOptions_var &); // copy constructor - ~StartupOptions_var (void); // destructor - - StartupOptions_var &operator= (StartupOptions *); - StartupOptions_var &operator= (const StartupOptions_var &); - StartupOptions *operator-> (void); - const StartupOptions *operator-> (void) const; - - operator const StartupOptions &() const; - operator StartupOptions &(); - operator StartupOptions &() const; - operator StartupOptions *&(); // variable-size types only - - // in, inout, out, _retn - const StartupOptions &in (void) const; - StartupOptions &inout (void); - StartupOptions *&out (void); - StartupOptions *_retn (void); - StartupOptions *ptr (void) const; - -private: - StartupOptions *ptr_; -}; - -class TAO_Export StartupOptions_out -{ -public: - StartupOptions_out (StartupOptions *&); - StartupOptions_out (StartupOptions_var &); - StartupOptions_out (const StartupOptions_out &); - StartupOptions_out &operator= (const StartupOptions_out &); - StartupOptions_out &operator= (StartupOptions *); - operator StartupOptions *&(); - StartupOptions *&ptr (void); - StartupOptions *operator-> (void); - -private: - StartupOptions *&ptr_; - // assignment from T_var not allowed - void operator= (const StartupOptions_var &); -}; - -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_StartupOptions; - -struct ServerInformation; -class ServerInformation_var; - -struct TAO_Export ServerInformation -{ - -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ServerInformation_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - static void _tao_any_destructor (void*); - - TAO_String_Manager logical_server; - TAO_String_Manager server; - ACE_NESTED_CLASS (ImplementationRepository, StartupOptions) startup; - TAO_String_Manager location; -}; - -class TAO_Export ServerInformation_var -{ -public: - ServerInformation_var (void); // default constructor - ServerInformation_var (ServerInformation *); - ServerInformation_var (const ServerInformation_var &); // copy constructor - ~ServerInformation_var (void); // destructor - - ServerInformation_var &operator= (ServerInformation *); - ServerInformation_var &operator= (const ServerInformation_var &); - ServerInformation *operator-> (void); - const ServerInformation *operator-> (void) const; - - operator const ServerInformation &() const; - operator ServerInformation &(); - operator ServerInformation &() const; - operator ServerInformation *&(); // variable-size types only - - // in, inout, out, _retn - const ServerInformation &in (void) const; - ServerInformation &inout (void); - ServerInformation *&out (void); - ServerInformation *_retn (void); - ServerInformation *ptr (void) const; - -private: - ServerInformation *ptr_; -}; - -class TAO_Export ServerInformation_out -{ -public: - ServerInformation_out (ServerInformation *&); - ServerInformation_out (ServerInformation_var &); - ServerInformation_out (const ServerInformation_out &); - ServerInformation_out &operator= (const ServerInformation_out &); - ServerInformation_out &operator= (ServerInformation *); - operator ServerInformation *&(); - ServerInformation *&ptr (void); - ServerInformation *operator-> (void); - -private: - ServerInformation *&ptr_; - // assignment from T_var not allowed - void operator= (const ServerInformation_var &); -}; - -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ServerInformation; - - -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - -#if !defined (__TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CH_) -#define __TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CH_ - - class TAO_EXPORT_NESTED_MACRO _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList : public TAO_Unbounded_Base_Sequence - { - public: - // = Initialization and termination methods. - - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (void); // Default constructor. - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (CORBA::ULong maximum); - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (CORBA::ULong maximum, - CORBA::ULong length, - ServerInformation *data, - CORBA::Boolean release = 0); - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (const _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList &rhs); - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList &operator= (const _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList &rhs); - virtual ~_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (void); // Dtor. - // = Accessors. - ServerInformation &operator[] (CORBA::ULong i); - const ServerInformation &operator[] (CORBA::ULong i) const; - // = Static operations. - static ServerInformation *allocbuf (CORBA::ULong size); - static void freebuf (ServerInformation *buffer); - virtual void _allocate_buffer (CORBA::ULong length); - virtual void _deallocate_buffer (void); - // Implement the TAO_Base_Sequence methods (see Sequence.h) - - ServerInformation *get_buffer (CORBA::Boolean orphan = 0); - const ServerInformation *get_buffer (void) const; - void replace (CORBA::ULong max, - CORBA::ULong length, - ServerInformation *data, - CORBA::Boolean release); - }; - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CH_ - -class ServerInformationList; -class ServerInformationList_var; - -// ************************************************************* -// ServerInformationList -// ************************************************************* - -class TAO_Export ServerInformationList : public -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ -{ -public: - ServerInformationList (void); // default ctor - ServerInformationList (CORBA::ULong max); // uses max size - ServerInformationList ( - CORBA::ULong max, - CORBA::ULong length, - ServerInformation *buffer, - CORBA::Boolean release=0 - ); - ServerInformationList (const ServerInformationList &); // copy ctor - ~ServerInformationList (void); - static void _tao_any_destructor (void*); - -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ServerInformationList_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - -}; - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST___VAR_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST___VAR_CH_ - -// ************************************************************* -// class ImplementationRepository::ServerInformationList_var -// ************************************************************* - -class TAO_Export ServerInformationList_var -{ -public: - ServerInformationList_var (void); // default constructor - ServerInformationList_var (ServerInformationList *); - ServerInformationList_var (const ServerInformationList_var &); // copy constructor - ~ServerInformationList_var (void); // destructor - - ServerInformationList_var &operator= (ServerInformationList *); - ServerInformationList_var &operator= (const ServerInformationList_var &); - ServerInformationList *operator-> (void); - const ServerInformationList *operator-> (void) const; - - operator const ServerInformationList &() const; - operator ServerInformationList &(); - operator ServerInformationList &() const; - operator ServerInformationList *&(); // variable-size base types only - - ServerInformation &operator[] (CORBA::ULong index); - // in, inout, out, _retn - const ServerInformationList &in (void) const; - ServerInformationList &inout (void); - ServerInformationList *&out (void); - ServerInformationList *_retn (void); - ServerInformationList *ptr (void) const; - -private: - ServerInformationList *ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST___OUT_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST___OUT_CH_ - -class TAO_Export ServerInformationList_out -{ -public: - ServerInformationList_out (ServerInformationList *&); - ServerInformationList_out (ServerInformationList_var &); - ServerInformationList_out (const ServerInformationList_out &); - ServerInformationList_out &operator= (const ServerInformationList_out &); - ServerInformationList_out &operator= (ServerInformationList *); - operator ServerInformationList *&(); - ServerInformationList *&ptr (void); - ServerInformationList *operator-> (void); - ServerInformation &operator[] (CORBA::ULong index); - -private: - ServerInformationList *&ptr_; - // assignment from T_var not allowed - void operator= (const ServerInformationList_var &); -}; - - -#endif /* end #if !defined */ - -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ServerInformationList; - -class ServerInformationIterator; - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___PTR_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___PTR_CH_ - -typedef ServerInformationIterator *ServerInformationIterator_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___VAR_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___VAR_CH_ - -class TAO_Export ServerInformationIterator_var : public TAO_Base_var -{ -public: - ServerInformationIterator_var (void); // default constructor - ServerInformationIterator_var (ServerInformationIterator_ptr); - ServerInformationIterator_var (const ServerInformationIterator_var &); // copy constructor - ~ServerInformationIterator_var (void); // destructor - - ServerInformationIterator_var &operator= (ServerInformationIterator_ptr); - ServerInformationIterator_var &operator= (const ServerInformationIterator_var &); - ServerInformationIterator_ptr operator-> (void) const; - - operator const ServerInformationIterator_ptr &() const; - operator ServerInformationIterator_ptr &(); - // in, inout, out, _retn - ServerInformationIterator_ptr in (void) const; - ServerInformationIterator_ptr &inout (void); - ServerInformationIterator_ptr &out (void); - ServerInformationIterator_ptr _retn (void); - ServerInformationIterator_ptr ptr (void) const; - -private: - ServerInformationIterator_ptr ptr_; - // Unimplemented - prevents widening assignment. - ServerInformationIterator_var (const TAO_Base_var &rhs); - ServerInformationIterator_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___OUT_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___OUT_CH_ - -class TAO_Export ServerInformationIterator_out -{ -public: - ServerInformationIterator_out (ServerInformationIterator_ptr &); - ServerInformationIterator_out (ServerInformationIterator_var &); - ServerInformationIterator_out (const ServerInformationIterator_out &); - ServerInformationIterator_out &operator= (const ServerInformationIterator_out &); - ServerInformationIterator_out &operator= (const ServerInformationIterator_var &); - ServerInformationIterator_out &operator= (ServerInformationIterator_ptr); - operator ServerInformationIterator_ptr &(); - ServerInformationIterator_ptr &ptr (void); - ServerInformationIterator_ptr operator-> (void); - -private: - ServerInformationIterator_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION___PTR_CH_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION___PTR_CH_ - -class Administration; -typedef Administration *Administration_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION___VAR_CH_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION___VAR_CH_ - -class TAO_Export Administration_var : public TAO_Base_var -{ -public: - Administration_var (void); // default constructor - Administration_var (Administration_ptr); - Administration_var (const Administration_var &); // copy constructor - ~Administration_var (void); // destructor - - Administration_var &operator= (Administration_ptr); - Administration_var &operator= (const Administration_var &); - Administration_ptr operator-> (void) const; - - operator const Administration_ptr &() const; - operator Administration_ptr &(); - // in, inout, out, _retn - Administration_ptr in (void) const; - Administration_ptr &inout (void); - Administration_ptr &out (void); - Administration_ptr _retn (void); - Administration_ptr ptr (void) const; - -private: - Administration_ptr ptr_; - // Unimplemented - prevents widening assignment. - Administration_var (const TAO_Base_var &rhs); - Administration_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION___OUT_CH_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION___OUT_CH_ - -class TAO_Export Administration_out -{ -public: - Administration_out (Administration_ptr &); - Administration_out (Administration_var &); - Administration_out (const Administration_out &); - Administration_out &operator= (const Administration_out &); - Administration_out &operator= (const Administration_var &); - Administration_out &operator= (Administration_ptr); - operator Administration_ptr &(); - Administration_ptr &ptr (void); - Administration_ptr operator-> (void); - -private: - Administration_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION_CH_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION_CH_ - -class TAO_Export Administration : public virtual ACE_CORBA_1 (Object) -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef Administration_ptr _ptr_type; - typedef Administration_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static Administration_ptr _duplicate (Administration_ptr obj); - static Administration_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &env = - TAO_default_environment () - ); - static Administration_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &env = - TAO_default_environment () - ); - static Administration_ptr _nil (void) - { - return (Administration_ptr)0; - } - - static void _tao_any_destructor (void*); - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION_ALREADYREGISTERED_CH_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION_ALREADYREGISTERED_CH_ - - class TAO_Export AlreadyRegistered : public CORBA::UserException - { - public: - - AlreadyRegistered (void); // default ctor - AlreadyRegistered (const AlreadyRegistered &); // copy ctor - ~AlreadyRegistered (void); - static void _tao_any_destructor (void*); - AlreadyRegistered &operator= (const AlreadyRegistered &); - - - virtual void _raise (void); - - virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; - virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - - static AlreadyRegistered *_downcast (CORBA::Exception *); - - - // = TAO extension - static CORBA::Exception *_alloc (void); - virtual CORBA::TypeCode_ptr _type (void) const; - - }; // exception ImplementationRepository::Administration::AlreadyRegistered - - static CORBA::TypeCode_ptr _tc_AlreadyRegistered; - - -#endif /* end #if !defined */ - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION_CANNOTACTIVATE_CH_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION_CANNOTACTIVATE_CH_ - - class TAO_Export CannotActivate : public CORBA::UserException - { - public: - - TAO_String_Manager reason; - - CannotActivate (void); // default ctor - CannotActivate (const CannotActivate &); // copy ctor - ~CannotActivate (void); - static void _tao_any_destructor (void*); - CannotActivate &operator= (const CannotActivate &); - - - virtual void _raise (void); - - virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; - virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - - static CannotActivate *_downcast (CORBA::Exception *); - - CannotActivate ( - const char * _tao_reason - ); - - // = TAO extension - static CORBA::Exception *_alloc (void); - virtual CORBA::TypeCode_ptr _type (void) const; - - }; // exception ImplementationRepository::Administration::CannotActivate - - static CORBA::TypeCode_ptr _tc_CannotActivate; - - -#endif /* end #if !defined */ - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION_NOTFOUND_CH_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION_NOTFOUND_CH_ - - class TAO_Export NotFound : public CORBA::UserException - { - public: - - NotFound (void); // default ctor - NotFound (const NotFound &); // copy ctor - ~NotFound (void); - static void _tao_any_destructor (void*); - NotFound &operator= (const NotFound &); - - - virtual void _raise (void); - - virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; - virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - - static NotFound *_downcast (CORBA::Exception *); - - - // = TAO extension - static CORBA::Exception *_alloc (void); - virtual CORBA::TypeCode_ptr _type (void) const; - - }; // exception ImplementationRepository::Administration::NotFound - - static CORBA::TypeCode_ptr _tc_NotFound; - - -#endif /* end #if !defined */ - - virtual void activate_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound, - ImplementationRepository::Administration::CannotActivate - )); - - virtual void register_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::AlreadyRegistered - )); - - virtual void reregister_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void remove_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void shutdown_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual char * server_is_running ( - const char * server, - const char * addr, - ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void server_is_shutting_down ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void find ( - const char * server, - ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void list ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean _is_a ( - const CORBA::Char *type_id, - CORBA::Environment &env = - TAO_default_environment () - ); - virtual const char* _interface_repository_id (void) const; - -protected: - Administration (void); - Administration (TAO_Stub *objref, - TAO_ServantBase *_tao_servant = 0, - CORBA::Boolean _tao_collocated = 0 - ); - virtual ~Administration (void); -private: - Administration (const Administration &); - void operator= (const Administration &); -}; - -class TAO_ImplementationRepository_Administration_Default_Proxy_Factory -{ -public: - - TAO_ImplementationRepository_Administration_Default_Proxy_Factory (int register_proxy_factory = 1); - - virtual ~TAO_ImplementationRepository_Administration_Default_Proxy_Factory (void); - - virtual Administration_ptr create_proxy ( - Administration_ptr proxy, - CORBA::Environment &env = - TAO_default_environment () - ); -}; - -class TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter -{ -public: - - friend class TAO_Singleton; - - int register_proxy_factory ( - TAO_ImplementationRepository_Administration_Default_Proxy_Factory *df, - CORBA::Environment &env = - TAO_default_environment () - ); - - int unregister_proxy_factory ( - CORBA::Environment &env = - TAO_default_environment () - ); - - Administration_ptr create_proxy ( - Administration_ptr proxy, - CORBA::Environment &env = - TAO_default_environment () - ); - -protected: - TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter (void); - ~TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter (void); - TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter &operator= ( - const TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter & - ); - TAO_ImplementationRepository_Administration_Default_Proxy_Factory *proxy_factory_; - int delete_proxy_factory_; - ACE_SYNCH_RECURSIVE_MUTEX lock_; - }; - - typedef TAO_Singleton TAO_ImplementationRepository_Administration_PROXY_FACTORY_ADAPTER; - class TAO_ImplementationRepository_Administration_Smart_Proxy_Base : public virtual ACE_NESTED_CLASS (ImplementationRepository, Administration) - { - public: - TAO_ImplementationRepository_Administration_Smart_Proxy_Base (::ImplementationRepository::Administration_ptr proxy); - ~TAO_ImplementationRepository_Administration_Smart_Proxy_Base (void); - virtual void activate_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound, - ImplementationRepository::Administration::CannotActivate - )); - - virtual void register_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::AlreadyRegistered - )); - - virtual void reregister_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void remove_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void shutdown_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual char * server_is_running ( - const char * server, - const char * addr, - ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void server_is_shutting_down ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void find ( - const char * server, - ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void list ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -private: - ::ImplementationRepository::Administration_var base_proxy_; -}; - - -#endif /* end #if !defined */ - -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_Administration; - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___PTR_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___PTR_CH_ - -class ServerInformationIterator; -typedef ServerInformationIterator *ServerInformationIterator_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___VAR_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___VAR_CH_ - -class TAO_Export ServerInformationIterator_var : public TAO_Base_var -{ -public: - ServerInformationIterator_var (void); // default constructor - ServerInformationIterator_var (ServerInformationIterator_ptr); - ServerInformationIterator_var (const ServerInformationIterator_var &); // copy constructor - ~ServerInformationIterator_var (void); // destructor - - ServerInformationIterator_var &operator= (ServerInformationIterator_ptr); - ServerInformationIterator_var &operator= (const ServerInformationIterator_var &); - ServerInformationIterator_ptr operator-> (void) const; - - operator const ServerInformationIterator_ptr &() const; - operator ServerInformationIterator_ptr &(); - // in, inout, out, _retn - ServerInformationIterator_ptr in (void) const; - ServerInformationIterator_ptr &inout (void); - ServerInformationIterator_ptr &out (void); - ServerInformationIterator_ptr _retn (void); - ServerInformationIterator_ptr ptr (void) const; - -private: - ServerInformationIterator_ptr ptr_; - // Unimplemented - prevents widening assignment. - ServerInformationIterator_var (const TAO_Base_var &rhs); - ServerInformationIterator_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___OUT_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___OUT_CH_ - -class TAO_Export ServerInformationIterator_out -{ -public: - ServerInformationIterator_out (ServerInformationIterator_ptr &); - ServerInformationIterator_out (ServerInformationIterator_var &); - ServerInformationIterator_out (const ServerInformationIterator_out &); - ServerInformationIterator_out &operator= (const ServerInformationIterator_out &); - ServerInformationIterator_out &operator= (const ServerInformationIterator_var &); - ServerInformationIterator_out &operator= (ServerInformationIterator_ptr); - operator ServerInformationIterator_ptr &(); - ServerInformationIterator_ptr &ptr (void); - ServerInformationIterator_ptr operator-> (void); - -private: - ServerInformationIterator_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR_CH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR_CH_ - -class TAO_Export ServerInformationIterator : public virtual ACE_CORBA_1 (Object) -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ServerInformationIterator_ptr _ptr_type; - typedef ServerInformationIterator_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static ServerInformationIterator_ptr _duplicate (ServerInformationIterator_ptr obj); - static ServerInformationIterator_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &env = - TAO_default_environment () - ); - static ServerInformationIterator_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &env = - TAO_default_environment () - ); - static ServerInformationIterator_ptr _nil (void) - { - return (ServerInformationIterator_ptr)0; - } - - static void _tao_any_destructor (void*); - - virtual CORBA::Boolean next_n ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::Boolean _is_a ( - const CORBA::Char *type_id, - CORBA::Environment &env = - TAO_default_environment () - ); - virtual const char* _interface_repository_id (void) const; - -protected: - ServerInformationIterator (void); - ServerInformationIterator (TAO_Stub *objref, - TAO_ServantBase *_tao_servant = 0, - CORBA::Boolean _tao_collocated = 0 - ); - virtual ~ServerInformationIterator (void); -private: - ServerInformationIterator (const ServerInformationIterator &); - void operator= (const ServerInformationIterator &); -}; - -class TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory -{ -public: - - TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory (int register_proxy_factory = 1); - - virtual ~TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory (void); - - virtual ServerInformationIterator_ptr create_proxy ( - ServerInformationIterator_ptr proxy, - CORBA::Environment &env = - TAO_default_environment () - ); -}; - -class TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter -{ -public: - - friend class TAO_Singleton; - - int register_proxy_factory ( - TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory *df, - CORBA::Environment &env = - TAO_default_environment () - ); - - int unregister_proxy_factory ( - CORBA::Environment &env = - TAO_default_environment () - ); - - ServerInformationIterator_ptr create_proxy ( - ServerInformationIterator_ptr proxy, - CORBA::Environment &env = - TAO_default_environment () - ); - -protected: - TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter (void); - ~TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter (void); - TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter &operator= ( - const TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter & - ); - TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory *proxy_factory_; - int delete_proxy_factory_; - ACE_SYNCH_RECURSIVE_MUTEX lock_; - }; - - typedef TAO_Singleton TAO_ImplementationRepository_ServerInformationIterator_PROXY_FACTORY_ADAPTER; - class TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base : public virtual ACE_NESTED_CLASS (ImplementationRepository, ServerInformationIterator) - { - public: - TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base (::ImplementationRepository::ServerInformationIterator_ptr proxy); - ~TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base (void); - virtual CORBA::Boolean next_n ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -private: - ::ImplementationRepository::ServerInformationIterator_var base_proxy_; -}; - - -#endif /* end #if !defined */ - -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ServerInformationIterator; - - -} -TAO_NAMESPACE_CLOSE // module ImplementationRepository - -extern TAO_Export ImplementationRepository::ServerObject_ptr (*_TAO_collocation_ImplementationRepository_ServerObject_Stub_Factory_function_pointer) ( - CORBA::Object_ptr obj - ); -// Any operators for interface ImplementationRepository::ServerObject -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::ServerObject_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::ServerObject *&); -TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::EnvironmentVariable &); // copying version -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::EnvironmentVariable*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::EnvironmentVariable *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const ImplementationRepository::EnvironmentVariable *&); -TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::EnvironmentList &); // copying version -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::EnvironmentList*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::EnvironmentList *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const ImplementationRepository::EnvironmentList *&); -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::ActivationMode); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::ActivationMode &); -TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::StartupOptions &); // copying version -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::StartupOptions*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::StartupOptions *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const ImplementationRepository::StartupOptions *&); -TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::ServerInformation &); // copying version -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::ServerInformation*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::ServerInformation *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const ImplementationRepository::ServerInformation *&); -TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::ServerInformationList &); // copying version -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::ServerInformationList*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::ServerInformationList *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const ImplementationRepository::ServerInformationList *&); -extern TAO_Export ImplementationRepository::Administration_ptr (*_TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer) ( - CORBA::Object_ptr obj - ); -// Any operators for interface ImplementationRepository::Administration -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::Administration_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::Administration *&); -TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::Administration::AlreadyRegistered &); // copying version -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::Administration::AlreadyRegistered*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::Administration::AlreadyRegistered *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const ImplementationRepository::Administration::AlreadyRegistered *&); -TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::Administration::CannotActivate &); // copying version -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::Administration::CannotActivate*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::Administration::CannotActivate *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const ImplementationRepository::Administration::CannotActivate *&); -TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::Administration::NotFound &); // copying version -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::Administration::NotFound*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::Administration::NotFound *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const ImplementationRepository::Administration::NotFound *&); -extern TAO_Export ImplementationRepository::ServerInformationIterator_ptr (*_TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer) ( - CORBA::Object_ptr obj - ); -// Any operators for interface ImplementationRepository::ServerInformationIterator -TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::ServerInformationIterator_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::ServerInformationIterator *&); - -#ifndef __ACE_INLINE__ - -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::ServerObject_ptr ); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::ServerObject_ptr &); -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::EnvironmentVariable &); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::EnvironmentVariable &); - -#if !defined _TAO_CDR_OP_ImplementationRepository_EnvironmentList_H_ -#define _TAO_CDR_OP_ImplementationRepository_EnvironmentList_H_ - -TAO_Export CORBA::Boolean operator<< ( - TAO_OutputCDR &, - const ImplementationRepository::EnvironmentList & - ); -TAO_Export CORBA::Boolean operator>> ( - TAO_InputCDR &, - ImplementationRepository::EnvironmentList & - ); - -#endif /* _TAO_CDR_OP_ImplementationRepository_EnvironmentList_H_ */ - -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::ActivationMode &); // -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::ActivationMode &); -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::StartupOptions &); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::StartupOptions &); -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::ServerInformation &); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::ServerInformation &); - -#if !defined _TAO_CDR_OP_ImplementationRepository_ServerInformationList_H_ -#define _TAO_CDR_OP_ImplementationRepository_ServerInformationList_H_ - -TAO_Export CORBA::Boolean operator<< ( - TAO_OutputCDR &, - const ImplementationRepository::ServerInformationList & - ); -TAO_Export CORBA::Boolean operator>> ( - TAO_InputCDR &, - ImplementationRepository::ServerInformationList & - ); - -#endif /* _TAO_CDR_OP_ImplementationRepository_ServerInformationList_H_ */ - -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::Administration_ptr ); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::Administration_ptr &); -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::Administration::AlreadyRegistered &); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::Administration::AlreadyRegistered &); - -# if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -TAO_Export ostream& operator<< (ostream &, const ImplementationRepository::Administration::AlreadyRegistered &); - -# endif /* ACE_LACKS_IOSTREAM_TOTALLY */ -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::Administration::CannotActivate &); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::Administration::CannotActivate &); - -# if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -TAO_Export ostream& operator<< (ostream &, const ImplementationRepository::Administration::CannotActivate &); - -# endif /* ACE_LACKS_IOSTREAM_TOTALLY */ -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::Administration::NotFound &); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::Administration::NotFound &); - -# if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -TAO_Export ostream& operator<< (ostream &, const ImplementationRepository::Administration::NotFound &); - -# endif /* ACE_LACKS_IOSTREAM_TOTALLY */ -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::ServerInformationIterator_ptr ); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::ServerInformationIterator_ptr &); - -#endif /* __ACE_INLINE__ */ - - -#if defined (__ACE_INLINE__) -#include "ImplRepoC.i" -#endif /* defined INLINE */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#include "ace/post.h" -#endif /* ifndef */ diff --git a/TAO/tao/ImplRepoC.i b/TAO/tao/ImplRepoC.i deleted file mode 100644 index 1ec8f773ac3..00000000000 --- a/TAO/tao/ImplRepoC.i +++ /dev/null @@ -1,2257 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -ACE_INLINE -ImplementationRepository::ServerObject::ServerObject (void) // default constructor -{} - -ACE_INLINE -ImplementationRepository::ServerObject::ServerObject (TAO_Stub *objref, TAO_ServantBase *_tao_servant, CORBA::Boolean _tao_collocated) // constructor - : CORBA_Object (objref, _tao_servant, _tao_collocated) -{} - -ACE_INLINE -ImplementationRepository::ServerObject::~ServerObject (void) // destructor -{} - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVEROBJECT___VAR_CI_) -#define _IMPLEMENTATIONREPOSITORY_SERVEROBJECT___VAR_CI_ - -// ************************************************************* -// Inline operations for class ImplementationRepository::ServerObject_var -// ************************************************************* - -ACE_INLINE -ImplementationRepository::ServerObject_var::ServerObject_var (void) // default constructor - : ptr_ (ServerObject::_nil ()) -{} - -ACE_INLINE -ImplementationRepository::ServerObject_var::ServerObject_var (ServerObject_ptr p) - : ptr_ (p) -{} - -ACE_INLINE ::ImplementationRepository::ServerObject_ptr -ImplementationRepository::ServerObject_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerObject_var::ServerObject_var (const ::ImplementationRepository::ServerObject_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (ServerObject::_duplicate (p.ptr ())) -{} - -ACE_INLINE -ImplementationRepository::ServerObject_var::~ServerObject_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE ImplementationRepository::ServerObject_var & -ImplementationRepository::ServerObject_var::operator= (ServerObject_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE ImplementationRepository::ServerObject_var & -ImplementationRepository::ServerObject_var::operator= (const ::ImplementationRepository::ServerObject_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::ImplementationRepository::ServerObject::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -ImplementationRepository::ServerObject_var::operator const ::ImplementationRepository::ServerObject_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerObject_var::operator ::ImplementationRepository::ServerObject_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerObject_ptr -ImplementationRepository::ServerObject_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerObject_ptr -ImplementationRepository::ServerObject_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerObject_ptr & -ImplementationRepository::ServerObject_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerObject_ptr & -ImplementationRepository::ServerObject_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::ImplementationRepository::ServerObject::_nil (); - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerObject_ptr -ImplementationRepository::ServerObject_var::_retn (void) -{ - // yield ownership of managed obj reference - ::ImplementationRepository::ServerObject_ptr val = this->ptr_; - this->ptr_ = ::ImplementationRepository::ServerObject::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVEROBJECT___OUT_CI_) -#define _IMPLEMENTATIONREPOSITORY_SERVEROBJECT___OUT_CI_ - -// ************************************************************* -// Inline operations for class ImplementationRepository::ServerObject_out -// ************************************************************* - -ACE_INLINE -ImplementationRepository::ServerObject_out::ServerObject_out (ServerObject_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::ImplementationRepository::ServerObject::_nil (); -} - -ACE_INLINE -ImplementationRepository::ServerObject_out::ServerObject_out (ServerObject_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::ImplementationRepository::ServerObject::_nil (); -} - -ACE_INLINE -ImplementationRepository::ServerObject_out::ServerObject_out (const ::ImplementationRepository::ServerObject_out &p) // copy constructor - : ptr_ (ACE_const_cast (ServerObject_out &, p).ptr_) -{} - -ACE_INLINE ::ImplementationRepository::ServerObject_out & -ImplementationRepository::ServerObject_out::operator= (const ::ImplementationRepository::ServerObject_out &p) -{ - this->ptr_ = ACE_const_cast (ServerObject_out&, p).ptr_; - return *this; -} - -ACE_INLINE ImplementationRepository::ServerObject_out & -ImplementationRepository::ServerObject_out::operator= (const ::ImplementationRepository::ServerObject_var &p) -{ - this->ptr_ = ::ImplementationRepository::ServerObject::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE ImplementationRepository::ServerObject_out & -ImplementationRepository::ServerObject_out::operator= (ServerObject_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -ImplementationRepository::ServerObject_out::operator ::ImplementationRepository::ServerObject_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerObject_ptr & -ImplementationRepository::ServerObject_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerObject_ptr -ImplementationRepository::ServerObject_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -// ************************************************************* -// Inline operations for class ImplementationRepository::EnvironmentVariable_var -// ************************************************************* - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::EnvironmentVariable_var (void) // default constructor - : ptr_ (0) -{} - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::EnvironmentVariable_var (EnvironmentVariable *p) - : ptr_ (p) -{} - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::EnvironmentVariable_var (const ::ImplementationRepository::EnvironmentVariable_var &p) // copy constructor -{ - if (p.ptr_) - ACE_NEW (this->ptr_, ::ImplementationRepository::EnvironmentVariable (*p.ptr_)); - else - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::~EnvironmentVariable_var (void) // destructor -{ - delete this->ptr_; -} - -ACE_INLINE ImplementationRepository::EnvironmentVariable_var & -ImplementationRepository::EnvironmentVariable_var::operator= (EnvironmentVariable *p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentVariable_var & -ImplementationRepository::EnvironmentVariable_var::operator= (const ::ImplementationRepository::EnvironmentVariable_var &p) -{ - if (this != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::EnvironmentVariable (*p.ptr_), *this); - } - return *this; -} - -ACE_INLINE const ::ImplementationRepository::EnvironmentVariable * -ImplementationRepository::EnvironmentVariable_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentVariable * -ImplementationRepository::EnvironmentVariable_var::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::operator const ::ImplementationRepository::EnvironmentVariable &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::operator ::ImplementationRepository::EnvironmentVariable &() // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::operator ::ImplementationRepository::EnvironmentVariable &() const // cast -{ - return *this->ptr_; -} - -// variable-size types only -ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::operator ::ImplementationRepository::EnvironmentVariable *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE const ::ImplementationRepository::EnvironmentVariable & -ImplementationRepository::EnvironmentVariable_var::in (void) const -{ - return *this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentVariable & -ImplementationRepository::EnvironmentVariable_var::inout (void) -{ - return *this->ptr_; -} - -// mapping for variable size -ACE_INLINE ::ImplementationRepository::EnvironmentVariable *& -ImplementationRepository::EnvironmentVariable_var::out (void) -{ - delete this->ptr_; - this->ptr_ = 0; - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentVariable * -ImplementationRepository::EnvironmentVariable_var::_retn (void) -{ - ::ImplementationRepository::EnvironmentVariable *tmp = this->ptr_; - this->ptr_ = 0; - return tmp; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentVariable * -ImplementationRepository::EnvironmentVariable_var::ptr (void) const -{ - return this->ptr_; -} - -// ************************************************************* -// Inline operations for class ImplementationRepository::EnvironmentVariable_out -// ************************************************************* - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (::ImplementationRepository::EnvironmentVariable *&p) - : ptr_ (p) -{ - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (EnvironmentVariable_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - delete this->ptr_; - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (const ::ImplementationRepository::EnvironmentVariable_out &p) // copy constructor - : ptr_ (ACE_const_cast (EnvironmentVariable_out&, p).ptr_) -{} - -ACE_INLINE ImplementationRepository::EnvironmentVariable_out & -ImplementationRepository::EnvironmentVariable_out::operator= (const ::ImplementationRepository::EnvironmentVariable_out &p) -{ - this->ptr_ = ACE_const_cast (EnvironmentVariable_out&, p).ptr_; - return *this; -} - -ACE_INLINE ImplementationRepository::EnvironmentVariable_out & -ImplementationRepository::EnvironmentVariable_out::operator= (EnvironmentVariable *p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -ImplementationRepository::EnvironmentVariable_out::operator ::ImplementationRepository::EnvironmentVariable *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentVariable *& -ImplementationRepository::EnvironmentVariable_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentVariable * -ImplementationRepository::EnvironmentVariable_out::operator-> (void) -{ - return this->ptr_; -} - - -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - -#if !defined (__TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CI_) -#define __TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CI_ - - // = Static operations. - ACE_INLINE ImplementationRepository::EnvironmentVariable * - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (CORBA::ULong size) - // Allocate storage for the sequence. - { - ImplementationRepository::EnvironmentVariable *retval = 0; - ACE_NEW_RETURN (retval, ImplementationRepository::EnvironmentVariable[size], 0); - return retval; - } - - ACE_INLINE void ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (ImplementationRepository::EnvironmentVariable *buffer) - // Free the sequence. - { - delete [] buffer; - } - - ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (void) // Default constructor. - { - } - - ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (CORBA::ULong maximum) // Constructor using a maximum length value. - : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (maximum)) - { - } - - ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (CORBA::ULong maximum, - CORBA::ULong length, - ImplementationRepository::EnvironmentVariable *data, - CORBA::Boolean release) - : TAO_Unbounded_Base_Sequence (maximum, length, data, release) - { - } - - ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (const _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList &rhs) - // Copy constructor. - : TAO_Unbounded_Base_Sequence (rhs) - { - if (rhs.buffer_ != 0) - { - ImplementationRepository::EnvironmentVariable *tmp1 = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (this->maximum_); - ImplementationRepository::EnvironmentVariable * const tmp2 = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable * ACE_CAST_CONST, rhs.buffer_); - - for (CORBA::ULong i = 0; i < this->length_; ++i) - tmp1[i] = tmp2[i]; - - this->buffer_ = tmp1; - } - else - { - this->buffer_ = 0; - } - } - - ACE_INLINE ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList & - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::operator= (const _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList &rhs) - // Assignment operator. - { - if (this == &rhs) - return *this; - - if (this->release_) - { - if (this->maximum_ < rhs.maximum_) - { - // free the old buffer - ImplementationRepository::EnvironmentVariable *tmp = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable *, this->buffer_); - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (tmp); - this->buffer_ = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (rhs.maximum_); - } - } - else - this->buffer_ = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (rhs.maximum_); - - TAO_Unbounded_Base_Sequence::operator= (rhs); - - ImplementationRepository::EnvironmentVariable *tmp1 = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable *, this->buffer_); - ImplementationRepository::EnvironmentVariable * const tmp2 = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable * ACE_CAST_CONST, rhs.buffer_); - - for (CORBA::ULong i = 0; i < this->length_; ++i) - tmp1[i] = tmp2[i]; - - return *this; - } - - // = Accessors. - ACE_INLINE ImplementationRepository::EnvironmentVariable & - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::operator[] (CORBA::ULong i) - // operator [] - { - ACE_ASSERT (i < this->maximum_); - ImplementationRepository::EnvironmentVariable* tmp = ACE_reinterpret_cast(ImplementationRepository::EnvironmentVariable*,this->buffer_); - return tmp[i]; - } - - ACE_INLINE const ImplementationRepository::EnvironmentVariable & - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::operator[] (CORBA::ULong i) const - // operator [] - { - ACE_ASSERT (i < this->maximum_); - ImplementationRepository::EnvironmentVariable * const tmp = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable* ACE_CAST_CONST, this->buffer_); - return tmp[i]; - } - - // Implement the TAO_Base_Sequence methods (see Sequence.h) - - ACE_INLINE ImplementationRepository::EnvironmentVariable * - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::get_buffer (CORBA::Boolean orphan) - { - ImplementationRepository::EnvironmentVariable *result = 0; - if (orphan == 0) - { - // We retain ownership. - if (this->buffer_ == 0) - { - result = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (this->length_); - this->buffer_ = result; - this->release_ = 1; - } - else - { - result = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable*, this->buffer_); - } - } - else // if (orphan == 1) - { - if (this->release_ != 0) - { - // We set the state back to default and relinquish - // ownership. - result = ACE_reinterpret_cast(ImplementationRepository::EnvironmentVariable*,this->buffer_); - this->maximum_ = 0; - this->length_ = 0; - this->buffer_ = 0; - this->release_ = 0; - } - } - return result; - } - - ACE_INLINE const ImplementationRepository::EnvironmentVariable * - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::get_buffer (void) const - { - return ACE_reinterpret_cast(const ImplementationRepository::EnvironmentVariable * ACE_CAST_CONST, this->buffer_); - } - - ACE_INLINE void - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::replace (CORBA::ULong max, - CORBA::ULong length, - ImplementationRepository::EnvironmentVariable *data, - CORBA::Boolean release) - { - this->maximum_ = max; - this->length_ = length; - if (this->buffer_ && this->release_ == 1) - { - ImplementationRepository::EnvironmentVariable *tmp = ACE_reinterpret_cast(ImplementationRepository::EnvironmentVariable*,this->buffer_); - _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (tmp); - } - this->buffer_ = data; - this->release_ = release; - } - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CI_) -#define _IMPLEMENTATIONREPOSITORY_ENVIRONMENTLIST_CI_ - -// ************************************************************* -// Inline operations for class ImplementationRepository::EnvironmentList_var -// ************************************************************* - -ACE_INLINE -ImplementationRepository::EnvironmentList_var::EnvironmentList_var (void) // default constructor - : ptr_ (0) -{} - -ACE_INLINE -ImplementationRepository::EnvironmentList_var::EnvironmentList_var (EnvironmentList *p) - : ptr_ (p) -{} - -ACE_INLINE -ImplementationRepository::EnvironmentList_var::EnvironmentList_var (const ::ImplementationRepository::EnvironmentList_var &p) // copy constructor -{ - if (p.ptr_) - ACE_NEW (this->ptr_, ::ImplementationRepository::EnvironmentList (*p.ptr_)); - else - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::EnvironmentList_var::~EnvironmentList_var (void) // destructor -{ - delete this->ptr_; -} - -ACE_INLINE ImplementationRepository::EnvironmentList_var & -ImplementationRepository::EnvironmentList_var::operator= (EnvironmentList *p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -ACE_INLINE ImplementationRepository::EnvironmentList_var & -ImplementationRepository::EnvironmentList_var::operator= (const ::ImplementationRepository::EnvironmentList_var &p) // deep copy -{ - if (this != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::EnvironmentList (*p.ptr_), *this); - } - return *this; -} - -ACE_INLINE const ::ImplementationRepository::EnvironmentList * -ImplementationRepository::EnvironmentList_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentList * -ImplementationRepository::EnvironmentList_var::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::EnvironmentList_var::operator const ::ImplementationRepository::EnvironmentList &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::EnvironmentList_var::operator ::ImplementationRepository::EnvironmentList &() // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::EnvironmentList_var::operator ::ImplementationRepository::EnvironmentList &() const // cast -{ - return *this->ptr_; -} - -// variable-size types only -ACE_INLINE -ImplementationRepository::EnvironmentList_var::operator ::ImplementationRepository::EnvironmentList *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ImplementationRepository::EnvironmentVariable & -ImplementationRepository::EnvironmentList_var::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - -ACE_INLINE const ::ImplementationRepository::EnvironmentList & -ImplementationRepository::EnvironmentList_var::in (void) const -{ - return *this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentList & -ImplementationRepository::EnvironmentList_var::inout (void) -{ - return *this->ptr_; -} - -// mapping for variable size -ACE_INLINE ::ImplementationRepository::EnvironmentList *& -ImplementationRepository::EnvironmentList_var::out (void) -{ - delete this->ptr_; - this->ptr_ = 0; - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentList * -ImplementationRepository::EnvironmentList_var::_retn (void) -{ - ::ImplementationRepository::EnvironmentList *tmp = this->ptr_; - this->ptr_ = 0; - return tmp; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentList * -ImplementationRepository::EnvironmentList_var::ptr (void) const -{ - return this->ptr_; -} - -// ************************************************************* -// Inline operations for class ImplementationRepository::EnvironmentList_out -// ************************************************************* - -ACE_INLINE -ImplementationRepository::EnvironmentList_out::EnvironmentList_out (EnvironmentList *&p) - : ptr_ (p) -{ - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::EnvironmentList_out::EnvironmentList_out (EnvironmentList_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - delete this->ptr_; - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::EnvironmentList_out::EnvironmentList_out (const ::ImplementationRepository::EnvironmentList_out &p) // copy constructor - : ptr_ (ACE_const_cast (EnvironmentList_out&, p).ptr_) -{} - -ACE_INLINE ::ImplementationRepository::EnvironmentList_out & -ImplementationRepository::EnvironmentList_out::operator= (const ::ImplementationRepository::EnvironmentList_out &p) -{ - this->ptr_ = ACE_const_cast (EnvironmentList_out&, p).ptr_; - return *this; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentList_out & -ImplementationRepository::EnvironmentList_out::operator= (EnvironmentList *p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -ImplementationRepository::EnvironmentList_out::operator ::ImplementationRepository::EnvironmentList *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentList *& -ImplementationRepository::EnvironmentList_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::EnvironmentList * -ImplementationRepository::EnvironmentList_out::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE ImplementationRepository::EnvironmentVariable & -ImplementationRepository::EnvironmentList_out::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - - -#endif /* end #if !defined */ - -// ************************************************************* -// Inline operations for class ImplementationRepository::StartupOptions_var -// ************************************************************* - -ACE_INLINE -ImplementationRepository::StartupOptions_var::StartupOptions_var (void) // default constructor - : ptr_ (0) -{} - -ACE_INLINE -ImplementationRepository::StartupOptions_var::StartupOptions_var (StartupOptions *p) - : ptr_ (p) -{} - -ACE_INLINE -ImplementationRepository::StartupOptions_var::StartupOptions_var (const ::ImplementationRepository::StartupOptions_var &p) // copy constructor -{ - if (p.ptr_) - ACE_NEW (this->ptr_, ::ImplementationRepository::StartupOptions (*p.ptr_)); - else - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::StartupOptions_var::~StartupOptions_var (void) // destructor -{ - delete this->ptr_; -} - -ACE_INLINE ImplementationRepository::StartupOptions_var & -ImplementationRepository::StartupOptions_var::operator= (StartupOptions *p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -ACE_INLINE ::ImplementationRepository::StartupOptions_var & -ImplementationRepository::StartupOptions_var::operator= (const ::ImplementationRepository::StartupOptions_var &p) -{ - if (this != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::StartupOptions (*p.ptr_), *this); - } - return *this; -} - -ACE_INLINE const ::ImplementationRepository::StartupOptions * -ImplementationRepository::StartupOptions_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::StartupOptions * -ImplementationRepository::StartupOptions_var::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::StartupOptions_var::operator const ::ImplementationRepository::StartupOptions &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::StartupOptions_var::operator ::ImplementationRepository::StartupOptions &() // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::StartupOptions_var::operator ::ImplementationRepository::StartupOptions &() const // cast -{ - return *this->ptr_; -} - -// variable-size types only -ACE_INLINE -ImplementationRepository::StartupOptions_var::operator ::ImplementationRepository::StartupOptions *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE const ::ImplementationRepository::StartupOptions & -ImplementationRepository::StartupOptions_var::in (void) const -{ - return *this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::StartupOptions & -ImplementationRepository::StartupOptions_var::inout (void) -{ - return *this->ptr_; -} - -// mapping for variable size -ACE_INLINE ::ImplementationRepository::StartupOptions *& -ImplementationRepository::StartupOptions_var::out (void) -{ - delete this->ptr_; - this->ptr_ = 0; - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::StartupOptions * -ImplementationRepository::StartupOptions_var::_retn (void) -{ - ::ImplementationRepository::StartupOptions *tmp = this->ptr_; - this->ptr_ = 0; - return tmp; -} - -ACE_INLINE ::ImplementationRepository::StartupOptions * -ImplementationRepository::StartupOptions_var::ptr (void) const -{ - return this->ptr_; -} - -// ************************************************************* -// Inline operations for class ImplementationRepository::StartupOptions_out -// ************************************************************* - -ACE_INLINE -ImplementationRepository::StartupOptions_out::StartupOptions_out (::ImplementationRepository::StartupOptions *&p) - : ptr_ (p) -{ - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::StartupOptions_out::StartupOptions_out (StartupOptions_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - delete this->ptr_; - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::StartupOptions_out::StartupOptions_out (const ::ImplementationRepository::StartupOptions_out &p) // copy constructor - : ptr_ (ACE_const_cast (StartupOptions_out&, p).ptr_) -{} - -ACE_INLINE ImplementationRepository::StartupOptions_out & -ImplementationRepository::StartupOptions_out::operator= (const ::ImplementationRepository::StartupOptions_out &p) -{ - this->ptr_ = ACE_const_cast (StartupOptions_out&, p).ptr_; - return *this; -} - -ACE_INLINE ImplementationRepository::StartupOptions_out & -ImplementationRepository::StartupOptions_out::operator= (StartupOptions *p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -ImplementationRepository::StartupOptions_out::operator ::ImplementationRepository::StartupOptions *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::StartupOptions *& -ImplementationRepository::StartupOptions_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::StartupOptions * -ImplementationRepository::StartupOptions_out::operator-> (void) -{ - return this->ptr_; -} - -// ************************************************************* -// Inline operations for class ImplementationRepository::ServerInformation_var -// ************************************************************* - -ACE_INLINE -ImplementationRepository::ServerInformation_var::ServerInformation_var (void) // default constructor - : ptr_ (0) -{} - -ACE_INLINE -ImplementationRepository::ServerInformation_var::ServerInformation_var (ServerInformation *p) - : ptr_ (p) -{} - -ACE_INLINE -ImplementationRepository::ServerInformation_var::ServerInformation_var (const ::ImplementationRepository::ServerInformation_var &p) // copy constructor -{ - if (p.ptr_) - ACE_NEW (this->ptr_, ::ImplementationRepository::ServerInformation (*p.ptr_)); - else - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::ServerInformation_var::~ServerInformation_var (void) // destructor -{ - delete this->ptr_; -} - -ACE_INLINE ImplementationRepository::ServerInformation_var & -ImplementationRepository::ServerInformation_var::operator= (ServerInformation *p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -ACE_INLINE ::ImplementationRepository::ServerInformation_var & -ImplementationRepository::ServerInformation_var::operator= (const ::ImplementationRepository::ServerInformation_var &p) -{ - if (this != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::ServerInformation (*p.ptr_), *this); - } - return *this; -} - -ACE_INLINE const ::ImplementationRepository::ServerInformation * -ImplementationRepository::ServerInformation_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformation * -ImplementationRepository::ServerInformation_var::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerInformation_var::operator const ::ImplementationRepository::ServerInformation &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerInformation_var::operator ::ImplementationRepository::ServerInformation &() // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerInformation_var::operator ::ImplementationRepository::ServerInformation &() const // cast -{ - return *this->ptr_; -} - -// variable-size types only -ACE_INLINE -ImplementationRepository::ServerInformation_var::operator ::ImplementationRepository::ServerInformation *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE const ::ImplementationRepository::ServerInformation & -ImplementationRepository::ServerInformation_var::in (void) const -{ - return *this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformation & -ImplementationRepository::ServerInformation_var::inout (void) -{ - return *this->ptr_; -} - -// mapping for variable size -ACE_INLINE ::ImplementationRepository::ServerInformation *& -ImplementationRepository::ServerInformation_var::out (void) -{ - delete this->ptr_; - this->ptr_ = 0; - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformation * -ImplementationRepository::ServerInformation_var::_retn (void) -{ - ::ImplementationRepository::ServerInformation *tmp = this->ptr_; - this->ptr_ = 0; - return tmp; -} - -ACE_INLINE ::ImplementationRepository::ServerInformation * -ImplementationRepository::ServerInformation_var::ptr (void) const -{ - return this->ptr_; -} - -// ************************************************************* -// Inline operations for class ImplementationRepository::ServerInformation_out -// ************************************************************* - -ACE_INLINE -ImplementationRepository::ServerInformation_out::ServerInformation_out (::ImplementationRepository::ServerInformation *&p) - : ptr_ (p) -{ - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::ServerInformation_out::ServerInformation_out (ServerInformation_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - delete this->ptr_; - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::ServerInformation_out::ServerInformation_out (const ::ImplementationRepository::ServerInformation_out &p) // copy constructor - : ptr_ (ACE_const_cast (ServerInformation_out&, p).ptr_) -{} - -ACE_INLINE ImplementationRepository::ServerInformation_out & -ImplementationRepository::ServerInformation_out::operator= (const ::ImplementationRepository::ServerInformation_out &p) -{ - this->ptr_ = ACE_const_cast (ServerInformation_out&, p).ptr_; - return *this; -} - -ACE_INLINE ImplementationRepository::ServerInformation_out & -ImplementationRepository::ServerInformation_out::operator= (ServerInformation *p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -ImplementationRepository::ServerInformation_out::operator ::ImplementationRepository::ServerInformation *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformation *& -ImplementationRepository::ServerInformation_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformation * -ImplementationRepository::ServerInformation_out::operator-> (void) -{ - return this->ptr_; -} - - -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - -#if !defined (__TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CI_) -#define __TAO_UNBOUNDED_SEQUENCE_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CI_ - - // = Static operations. - ACE_INLINE ImplementationRepository::ServerInformation * - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (CORBA::ULong size) - // Allocate storage for the sequence. - { - ImplementationRepository::ServerInformation *retval = 0; - ACE_NEW_RETURN (retval, ImplementationRepository::ServerInformation[size], 0); - return retval; - } - - ACE_INLINE void ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (ImplementationRepository::ServerInformation *buffer) - // Free the sequence. - { - delete [] buffer; - } - - ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (void) // Default constructor. - { - } - - ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (CORBA::ULong maximum) // Constructor using a maximum length value. - : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (maximum)) - { - } - - ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (CORBA::ULong maximum, - CORBA::ULong length, - ImplementationRepository::ServerInformation *data, - CORBA::Boolean release) - : TAO_Unbounded_Base_Sequence (maximum, length, data, release) - { - } - - ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (const _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList &rhs) - // Copy constructor. - : TAO_Unbounded_Base_Sequence (rhs) - { - if (rhs.buffer_ != 0) - { - ImplementationRepository::ServerInformation *tmp1 = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (this->maximum_); - ImplementationRepository::ServerInformation * const tmp2 = ACE_reinterpret_cast (ImplementationRepository::ServerInformation * ACE_CAST_CONST, rhs.buffer_); - - for (CORBA::ULong i = 0; i < this->length_; ++i) - tmp1[i] = tmp2[i]; - - this->buffer_ = tmp1; - } - else - { - this->buffer_ = 0; - } - } - - ACE_INLINE ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList & - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::operator= (const _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList &rhs) - // Assignment operator. - { - if (this == &rhs) - return *this; - - if (this->release_) - { - if (this->maximum_ < rhs.maximum_) - { - // free the old buffer - ImplementationRepository::ServerInformation *tmp = ACE_reinterpret_cast (ImplementationRepository::ServerInformation *, this->buffer_); - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (tmp); - this->buffer_ = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (rhs.maximum_); - } - } - else - this->buffer_ = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (rhs.maximum_); - - TAO_Unbounded_Base_Sequence::operator= (rhs); - - ImplementationRepository::ServerInformation *tmp1 = ACE_reinterpret_cast (ImplementationRepository::ServerInformation *, this->buffer_); - ImplementationRepository::ServerInformation * const tmp2 = ACE_reinterpret_cast (ImplementationRepository::ServerInformation * ACE_CAST_CONST, rhs.buffer_); - - for (CORBA::ULong i = 0; i < this->length_; ++i) - tmp1[i] = tmp2[i]; - - return *this; - } - - // = Accessors. - ACE_INLINE ImplementationRepository::ServerInformation & - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::operator[] (CORBA::ULong i) - // operator [] - { - ACE_ASSERT (i < this->maximum_); - ImplementationRepository::ServerInformation* tmp = ACE_reinterpret_cast(ImplementationRepository::ServerInformation*,this->buffer_); - return tmp[i]; - } - - ACE_INLINE const ImplementationRepository::ServerInformation & - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::operator[] (CORBA::ULong i) const - // operator [] - { - ACE_ASSERT (i < this->maximum_); - ImplementationRepository::ServerInformation * const tmp = ACE_reinterpret_cast (ImplementationRepository::ServerInformation* ACE_CAST_CONST, this->buffer_); - return tmp[i]; - } - - // Implement the TAO_Base_Sequence methods (see Sequence.h) - - ACE_INLINE ImplementationRepository::ServerInformation * - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::get_buffer (CORBA::Boolean orphan) - { - ImplementationRepository::ServerInformation *result = 0; - if (orphan == 0) - { - // We retain ownership. - if (this->buffer_ == 0) - { - result = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (this->length_); - this->buffer_ = result; - this->release_ = 1; - } - else - { - result = ACE_reinterpret_cast (ImplementationRepository::ServerInformation*, this->buffer_); - } - } - else // if (orphan == 1) - { - if (this->release_ != 0) - { - // We set the state back to default and relinquish - // ownership. - result = ACE_reinterpret_cast(ImplementationRepository::ServerInformation*,this->buffer_); - this->maximum_ = 0; - this->length_ = 0; - this->buffer_ = 0; - this->release_ = 0; - } - } - return result; - } - - ACE_INLINE const ImplementationRepository::ServerInformation * - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::get_buffer (void) const - { - return ACE_reinterpret_cast(const ImplementationRepository::ServerInformation * ACE_CAST_CONST, this->buffer_); - } - - ACE_INLINE void - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::replace (CORBA::ULong max, - CORBA::ULong length, - ImplementationRepository::ServerInformation *data, - CORBA::Boolean release) - { - this->maximum_ = max; - this->length_ = length; - if (this->buffer_ && this->release_ == 1) - { - ImplementationRepository::ServerInformation *tmp = ACE_reinterpret_cast(ImplementationRepository::ServerInformation*,this->buffer_); - _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (tmp); - } - this->buffer_ = data; - this->release_ = release; - } - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CI_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONLIST_CI_ - -// ************************************************************* -// Inline operations for class ImplementationRepository::ServerInformationList_var -// ************************************************************* - -ACE_INLINE -ImplementationRepository::ServerInformationList_var::ServerInformationList_var (void) // default constructor - : ptr_ (0) -{} - -ACE_INLINE -ImplementationRepository::ServerInformationList_var::ServerInformationList_var (ServerInformationList *p) - : ptr_ (p) -{} - -ACE_INLINE -ImplementationRepository::ServerInformationList_var::ServerInformationList_var (const ::ImplementationRepository::ServerInformationList_var &p) // copy constructor -{ - if (p.ptr_) - ACE_NEW (this->ptr_, ::ImplementationRepository::ServerInformationList (*p.ptr_)); - else - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::ServerInformationList_var::~ServerInformationList_var (void) // destructor -{ - delete this->ptr_; -} - -ACE_INLINE ImplementationRepository::ServerInformationList_var & -ImplementationRepository::ServerInformationList_var::operator= (ServerInformationList *p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -ACE_INLINE ImplementationRepository::ServerInformationList_var & -ImplementationRepository::ServerInformationList_var::operator= (const ::ImplementationRepository::ServerInformationList_var &p) // deep copy -{ - if (this != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::ServerInformationList (*p.ptr_), *this); - } - return *this; -} - -ACE_INLINE const ::ImplementationRepository::ServerInformationList * -ImplementationRepository::ServerInformationList_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationList * -ImplementationRepository::ServerInformationList_var::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerInformationList_var::operator const ::ImplementationRepository::ServerInformationList &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerInformationList_var::operator ::ImplementationRepository::ServerInformationList &() // cast -{ - return *this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerInformationList_var::operator ::ImplementationRepository::ServerInformationList &() const // cast -{ - return *this->ptr_; -} - -// variable-size types only -ACE_INLINE -ImplementationRepository::ServerInformationList_var::operator ::ImplementationRepository::ServerInformationList *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ImplementationRepository::ServerInformation & -ImplementationRepository::ServerInformationList_var::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - -ACE_INLINE const ::ImplementationRepository::ServerInformationList & -ImplementationRepository::ServerInformationList_var::in (void) const -{ - return *this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationList & -ImplementationRepository::ServerInformationList_var::inout (void) -{ - return *this->ptr_; -} - -// mapping for variable size -ACE_INLINE ::ImplementationRepository::ServerInformationList *& -ImplementationRepository::ServerInformationList_var::out (void) -{ - delete this->ptr_; - this->ptr_ = 0; - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationList * -ImplementationRepository::ServerInformationList_var::_retn (void) -{ - ::ImplementationRepository::ServerInformationList *tmp = this->ptr_; - this->ptr_ = 0; - return tmp; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationList * -ImplementationRepository::ServerInformationList_var::ptr (void) const -{ - return this->ptr_; -} - -// ************************************************************* -// Inline operations for class ImplementationRepository::ServerInformationList_out -// ************************************************************* - -ACE_INLINE -ImplementationRepository::ServerInformationList_out::ServerInformationList_out (ServerInformationList *&p) - : ptr_ (p) -{ - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::ServerInformationList_out::ServerInformationList_out (ServerInformationList_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - delete this->ptr_; - this->ptr_ = 0; -} - -ACE_INLINE -ImplementationRepository::ServerInformationList_out::ServerInformationList_out (const ::ImplementationRepository::ServerInformationList_out &p) // copy constructor - : ptr_ (ACE_const_cast (ServerInformationList_out&, p).ptr_) -{} - -ACE_INLINE ::ImplementationRepository::ServerInformationList_out & -ImplementationRepository::ServerInformationList_out::operator= (const ::ImplementationRepository::ServerInformationList_out &p) -{ - this->ptr_ = ACE_const_cast (ServerInformationList_out&, p).ptr_; - return *this; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationList_out & -ImplementationRepository::ServerInformationList_out::operator= (ServerInformationList *p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -ImplementationRepository::ServerInformationList_out::operator ::ImplementationRepository::ServerInformationList *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationList *& -ImplementationRepository::ServerInformationList_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationList * -ImplementationRepository::ServerInformationList_out::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE ImplementationRepository::ServerInformation & -ImplementationRepository::ServerInformationList_out::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - - -#endif /* end #if !defined */ - -ACE_INLINE -ImplementationRepository::Administration::Administration (void) // default constructor -{} - -ACE_INLINE -ImplementationRepository::Administration::Administration (TAO_Stub *objref, TAO_ServantBase *_tao_servant, CORBA::Boolean _tao_collocated) // constructor - : CORBA_Object (objref, _tao_servant, _tao_collocated) -{} - -ACE_INLINE -ImplementationRepository::Administration::~Administration (void) // destructor -{} - - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION___VAR_CI_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION___VAR_CI_ - -// ************************************************************* -// Inline operations for class ImplementationRepository::Administration_var -// ************************************************************* - -ACE_INLINE -ImplementationRepository::Administration_var::Administration_var (void) // default constructor - : ptr_ (Administration::_nil ()) -{} - -ACE_INLINE -ImplementationRepository::Administration_var::Administration_var (Administration_ptr p) - : ptr_ (p) -{} - -ACE_INLINE ::ImplementationRepository::Administration_ptr -ImplementationRepository::Administration_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::Administration_var::Administration_var (const ::ImplementationRepository::Administration_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (Administration::_duplicate (p.ptr ())) -{} - -ACE_INLINE -ImplementationRepository::Administration_var::~Administration_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE ImplementationRepository::Administration_var & -ImplementationRepository::Administration_var::operator= (Administration_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE ImplementationRepository::Administration_var & -ImplementationRepository::Administration_var::operator= (const ::ImplementationRepository::Administration_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::ImplementationRepository::Administration::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -ImplementationRepository::Administration_var::operator const ::ImplementationRepository::Administration_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::Administration_var::operator ::ImplementationRepository::Administration_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::Administration_ptr -ImplementationRepository::Administration_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::Administration_ptr -ImplementationRepository::Administration_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::Administration_ptr & -ImplementationRepository::Administration_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::Administration_ptr & -ImplementationRepository::Administration_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::ImplementationRepository::Administration::_nil (); - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::Administration_ptr -ImplementationRepository::Administration_var::_retn (void) -{ - // yield ownership of managed obj reference - ::ImplementationRepository::Administration_ptr val = this->ptr_; - this->ptr_ = ::ImplementationRepository::Administration::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION___OUT_CI_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION___OUT_CI_ - -// ************************************************************* -// Inline operations for class ImplementationRepository::Administration_out -// ************************************************************* - -ACE_INLINE -ImplementationRepository::Administration_out::Administration_out (Administration_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::ImplementationRepository::Administration::_nil (); -} - -ACE_INLINE -ImplementationRepository::Administration_out::Administration_out (Administration_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::ImplementationRepository::Administration::_nil (); -} - -ACE_INLINE -ImplementationRepository::Administration_out::Administration_out (const ::ImplementationRepository::Administration_out &p) // copy constructor - : ptr_ (ACE_const_cast (Administration_out &, p).ptr_) -{} - -ACE_INLINE ::ImplementationRepository::Administration_out & -ImplementationRepository::Administration_out::operator= (const ::ImplementationRepository::Administration_out &p) -{ - this->ptr_ = ACE_const_cast (Administration_out&, p).ptr_; - return *this; -} - -ACE_INLINE ImplementationRepository::Administration_out & -ImplementationRepository::Administration_out::operator= (const ::ImplementationRepository::Administration_var &p) -{ - this->ptr_ = ::ImplementationRepository::Administration::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE ImplementationRepository::Administration_out & -ImplementationRepository::Administration_out::operator= (Administration_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -ImplementationRepository::Administration_out::operator ::ImplementationRepository::Administration_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::Administration_ptr & -ImplementationRepository::Administration_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::Administration_ptr -ImplementationRepository::Administration_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -// ************************************************************* -// Inline operations for exception ImplementationRepository::Administration::AlreadyRegistered -// ************************************************************* - -// ************************************************************* -// Inline operations for exception ImplementationRepository::Administration::CannotActivate -// ************************************************************* - -// ************************************************************* -// Inline operations for exception ImplementationRepository::Administration::NotFound -// ************************************************************* - -ACE_INLINE -ImplementationRepository::ServerInformationIterator::ServerInformationIterator (void) // default constructor -{} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator::ServerInformationIterator (TAO_Stub *objref, TAO_ServantBase *_tao_servant, CORBA::Boolean _tao_collocated) // constructor - : CORBA_Object (objref, _tao_servant, _tao_collocated) -{} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator::~ServerInformationIterator (void) // destructor -{} - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___VAR_CI_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___VAR_CI_ - -// ************************************************************* -// Inline operations for class ImplementationRepository::ServerInformationIterator_var -// ************************************************************* - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::ServerInformationIterator_var (void) // default constructor - : ptr_ (ServerInformationIterator::_nil ()) -{} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::ServerInformationIterator_var (ServerInformationIterator_ptr p) - : ptr_ (p) -{} - -ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr -ImplementationRepository::ServerInformationIterator_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::ServerInformationIterator_var (const ::ImplementationRepository::ServerInformationIterator_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (ServerInformationIterator::_duplicate (p.ptr ())) -{} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::~ServerInformationIterator_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE ImplementationRepository::ServerInformationIterator_var & -ImplementationRepository::ServerInformationIterator_var::operator= (ServerInformationIterator_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE ImplementationRepository::ServerInformationIterator_var & -ImplementationRepository::ServerInformationIterator_var::operator= (const ::ImplementationRepository::ServerInformationIterator_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::operator const ::ImplementationRepository::ServerInformationIterator_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::operator ::ImplementationRepository::ServerInformationIterator_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr -ImplementationRepository::ServerInformationIterator_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr -ImplementationRepository::ServerInformationIterator_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr & -ImplementationRepository::ServerInformationIterator_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr & -ImplementationRepository::ServerInformationIterator_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_nil (); - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr -ImplementationRepository::ServerInformationIterator_var::_retn (void) -{ - // yield ownership of managed obj reference - ::ImplementationRepository::ServerInformationIterator_ptr val = this->ptr_; - this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___OUT_CI_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___OUT_CI_ - -// ************************************************************* -// Inline operations for class ImplementationRepository::ServerInformationIterator_out -// ************************************************************* - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_out::ServerInformationIterator_out (ServerInformationIterator_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_nil (); -} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_out::ServerInformationIterator_out (ServerInformationIterator_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_nil (); -} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_out::ServerInformationIterator_out (const ::ImplementationRepository::ServerInformationIterator_out &p) // copy constructor - : ptr_ (ACE_const_cast (ServerInformationIterator_out &, p).ptr_) -{} - -ACE_INLINE ::ImplementationRepository::ServerInformationIterator_out & -ImplementationRepository::ServerInformationIterator_out::operator= (const ::ImplementationRepository::ServerInformationIterator_out &p) -{ - this->ptr_ = ACE_const_cast (ServerInformationIterator_out&, p).ptr_; - return *this; -} - -ACE_INLINE ImplementationRepository::ServerInformationIterator_out & -ImplementationRepository::ServerInformationIterator_out::operator= (const ::ImplementationRepository::ServerInformationIterator_var &p) -{ - this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE ImplementationRepository::ServerInformationIterator_out & -ImplementationRepository::ServerInformationIterator_out::operator= (ServerInformationIterator_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -ImplementationRepository::ServerInformationIterator_out::operator ::ImplementationRepository::ServerInformationIterator_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr & -ImplementationRepository::ServerInformationIterator_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr -ImplementationRepository::ServerInformationIterator_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -ACE_INLINE CORBA::Boolean -operator<< ( - TAO_OutputCDR &, - const ImplementationRepository::ServerObject_ptr - ); -ACE_INLINE CORBA::Boolean -operator>> ( - TAO_InputCDR &, - ImplementationRepository::ServerObject_ptr & - ); - -ACE_INLINE CORBA::Boolean -operator<< ( - TAO_OutputCDR &strm, - const ImplementationRepository::ServerObject_ptr _tao_objref - ) -{ - CORBA::Object_ptr _tao_corba_obj = _tao_objref; - return (strm << _tao_corba_obj); -} - -ACE_INLINE CORBA::Boolean -operator>> ( - TAO_InputCDR &strm, - ImplementationRepository::ServerObject_ptr &_tao_objref - ) -{ - ACE_TRY_NEW_ENV - { - CORBA::Object_var obj; - if ((strm >> obj.inout ()) == 0) - return 0; - // narrow to the right type - _tao_objref = - ImplementationRepository::ServerObject::_unchecked_narrow ( - obj.in (), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - ACE_CATCHANY - { - // do nothing - } - ACE_ENDTRY; - return 0; -} - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationRepository::EnvironmentVariable &_tao_aggregate) -{ - if ( - (strm << _tao_aggregate.name.in ()) && - (strm << _tao_aggregate.value.in ()) - ) - return 1; - else - return 0; - -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, ImplementationRepository::EnvironmentVariable &_tao_aggregate) -{ - if ( - (strm >> _tao_aggregate.name.out ()) && - (strm >> _tao_aggregate.value.out ()) - ) - return 1; - else - return 0; - -} - - -#if !defined _TAO_CDR_OP_ImplementationRepository_EnvironmentList_I_ -#define _TAO_CDR_OP_ImplementationRepository_EnvironmentList_I_ - -CORBA::Boolean TAO_Export operator<< ( - TAO_OutputCDR &, - const ImplementationRepository::EnvironmentList & - ); -CORBA::Boolean TAO_Export operator>> ( - TAO_InputCDR &, - ImplementationRepository::EnvironmentList & - ); - -#endif /* _TAO_CDR_OP_ImplementationRepository_EnvironmentList_I_ */ - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationRepository::ActivationMode &_tao_enumval) -{ - CORBA::ULong _tao_temp = _tao_enumval; - return strm << _tao_temp; -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, ImplementationRepository::ActivationMode &_tao_enumval) -{ - CORBA::ULong _tao_temp = 0; - CORBA::Boolean _tao_result = strm >> _tao_temp; - - if (_tao_result == 1) - { - _tao_enumval = ACE_static_cast (ImplementationRepository::ActivationMode, _tao_temp); - } - - return _tao_result; -} - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationRepository::StartupOptions &_tao_aggregate) -{ - if ( - (strm << _tao_aggregate.command_line.in ()) && - (strm << _tao_aggregate.environment) && - (strm << _tao_aggregate.working_directory.in ()) && - (strm << _tao_aggregate.activation) - ) - return 1; - else - return 0; - -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, ImplementationRepository::StartupOptions &_tao_aggregate) -{ - if ( - (strm >> _tao_aggregate.command_line.out ()) && - (strm >> _tao_aggregate.environment) && - (strm >> _tao_aggregate.working_directory.out ()) && - (strm >> _tao_aggregate.activation) - ) - return 1; - else - return 0; - -} - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationRepository::ServerInformation &_tao_aggregate) -{ - if ( - (strm << _tao_aggregate.logical_server.in ()) && - (strm << _tao_aggregate.server.in ()) && - (strm << _tao_aggregate.startup) && - (strm << _tao_aggregate.location.in ()) - ) - return 1; - else - return 0; - -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, ImplementationRepository::ServerInformation &_tao_aggregate) -{ - if ( - (strm >> _tao_aggregate.logical_server.out ()) && - (strm >> _tao_aggregate.server.out ()) && - (strm >> _tao_aggregate.startup) && - (strm >> _tao_aggregate.location.out ()) - ) - return 1; - else - return 0; - -} - - -#if !defined _TAO_CDR_OP_ImplementationRepository_ServerInformationList_I_ -#define _TAO_CDR_OP_ImplementationRepository_ServerInformationList_I_ - -CORBA::Boolean TAO_Export operator<< ( - TAO_OutputCDR &, - const ImplementationRepository::ServerInformationList & - ); -CORBA::Boolean TAO_Export operator>> ( - TAO_InputCDR &, - ImplementationRepository::ServerInformationList & - ); - -#endif /* _TAO_CDR_OP_ImplementationRepository_ServerInformationList_I_ */ - -ACE_INLINE CORBA::Boolean -operator<< ( - TAO_OutputCDR &, - const ImplementationRepository::ServerInformationIterator_ptr - ); -ACE_INLINE CORBA::Boolean -operator>> ( - TAO_InputCDR &, - ImplementationRepository::ServerInformationIterator_ptr & - ); -ACE_INLINE CORBA::Boolean -operator<< ( - TAO_OutputCDR &, - const ImplementationRepository::Administration_ptr - ); -ACE_INLINE CORBA::Boolean -operator>> ( - TAO_InputCDR &, - ImplementationRepository::Administration_ptr & - ); - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationRepository::Administration::AlreadyRegistered &_tao_aggregate) -{ - // first marshal the repository ID - if (strm << _tao_aggregate._id ()) - return 1; - else - return 0; -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &,ImplementationRepository::Administration::AlreadyRegistered&) -{ - return 1; -} - -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -ACE_INLINE -ostream & operator<< (ostream &os, const ImplementationRepository::Administration::AlreadyRegistered &_tao_aggregate) -{ - CORBA::TypeCode_ptr tc = _tao_aggregate._type (); - if (tc) - { - os << tc->name () << " ("; - } - os << _tao_aggregate._id (); - if (tc) - { - os << ")"; - } - return os; -} - -#endif /* ACE_LACKS_IOSTREAM_TOTALLY */ - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationRepository::Administration::CannotActivate &_tao_aggregate) -{ - // first marshal the repository ID - if (strm << _tao_aggregate._id ()) - { - // now marshal the members (if any) - if ( - (strm << _tao_aggregate.reason.in ()) - ) - return 1; - else - return 0; - } - else - return 0; -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm,ImplementationRepository::Administration::CannotActivate &_tao_aggregate) -{ - // now marshal the members - if ( - (strm >> _tao_aggregate.reason.out ()) - ) - return 1; - else - return 0; -} - -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -ACE_INLINE -ostream & operator<< (ostream &os, const ImplementationRepository::Administration::CannotActivate &_tao_aggregate) -{ - CORBA::TypeCode_ptr tc = _tao_aggregate._type (); - if (tc) - { - os << tc->name () << " ("; - } - os << _tao_aggregate._id (); - if (tc) - { - os << ")"; - } - return os; -} - -#endif /* ACE_LACKS_IOSTREAM_TOTALLY */ - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationRepository::Administration::NotFound &_tao_aggregate) -{ - // first marshal the repository ID - if (strm << _tao_aggregate._id ()) - return 1; - else - return 0; -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &,ImplementationRepository::Administration::NotFound&) -{ - return 1; -} - -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -ACE_INLINE -ostream & operator<< (ostream &os, const ImplementationRepository::Administration::NotFound &_tao_aggregate) -{ - CORBA::TypeCode_ptr tc = _tao_aggregate._type (); - if (tc) - { - os << tc->name () << " ("; - } - os << _tao_aggregate._id (); - if (tc) - { - os << ")"; - } - return os; -} - -#endif /* ACE_LACKS_IOSTREAM_TOTALLY */ - -ACE_INLINE CORBA::Boolean -operator<< ( - TAO_OutputCDR &strm, - const ImplementationRepository::Administration_ptr _tao_objref - ) -{ - CORBA::Object_ptr _tao_corba_obj = _tao_objref; - return (strm << _tao_corba_obj); -} - -ACE_INLINE CORBA::Boolean -operator>> ( - TAO_InputCDR &strm, - ImplementationRepository::Administration_ptr &_tao_objref - ) -{ - ACE_TRY_NEW_ENV - { - CORBA::Object_var obj; - if ((strm >> obj.inout ()) == 0) - return 0; - // narrow to the right type - _tao_objref = - ImplementationRepository::Administration::_unchecked_narrow ( - obj.in (), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - ACE_CATCHANY - { - // do nothing - } - ACE_ENDTRY; - return 0; -} - -ACE_INLINE CORBA::Boolean -operator<< ( - TAO_OutputCDR &, - const ImplementationRepository::ServerInformationIterator_ptr - ); -ACE_INLINE CORBA::Boolean -operator>> ( - TAO_InputCDR &, - ImplementationRepository::ServerInformationIterator_ptr & - ); - -ACE_INLINE CORBA::Boolean -operator<< ( - TAO_OutputCDR &strm, - const ImplementationRepository::ServerInformationIterator_ptr _tao_objref - ) -{ - CORBA::Object_ptr _tao_corba_obj = _tao_objref; - return (strm << _tao_corba_obj); -} - -ACE_INLINE CORBA::Boolean -operator>> ( - TAO_InputCDR &strm, - ImplementationRepository::ServerInformationIterator_ptr &_tao_objref - ) -{ - ACE_TRY_NEW_ENV - { - CORBA::Object_var obj; - if ((strm >> obj.inout ()) == 0) - return 0; - // narrow to the right type - _tao_objref = - ImplementationRepository::ServerInformationIterator::_unchecked_narrow ( - obj.in (), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - ACE_CATCHANY - { - // do nothing - } - ACE_ENDTRY; - return 0; -} - diff --git a/TAO/tao/ImplRepoS.cpp b/TAO/tao/ImplRepoS.cpp deleted file mode 100644 index 66ea012ce61..00000000000 --- a/TAO/tao/ImplRepoS.cpp +++ /dev/null @@ -1,1793 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#include "ImplRepoS.h" -#include "tao/Operation_Table.h" -//#include "tao/PortableInterceptor.h" -#include "tao/Object_Adapter.h" -#include "tao/Stub.h" -#include "tao/GIOP_Server_Request.h" -#include "tao/ORB_Core.h" -#include "tao/NVList.h" - -#if !defined (__ACE_INLINE__) -#include "ImplRepoS.i" -#endif /* !defined INLINE */ - -class TAO_ImplementationRepository_ServerObject_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 12:16:37 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: /home/coryan/subsets/ACE_wrappers/build/Linux/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_ImplementationRepository_ServerObject_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_ImplementationRepository_ServerObject_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { -#if defined (ACE_MVS) - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 14, 14, 14, 14, 14, 0, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 14, 0, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 0, 0, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, -#else - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 0, 14, 0, 14, 14, - 14, 14, 14, 0, 14, 14, 14, 14, 14, 14, - 0, 14, 0, 14, 14, 0, 0, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, -#endif /* ACE_MVS */ - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_ImplementationRepository_ServerObject_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 4, - MIN_WORD_LENGTH = 4, - MAX_WORD_LENGTH = 13, - MIN_HASH_VALUE = 4, - MAX_HASH_VALUE = 13, - HASH_VALUE_RANGE = 10, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0},{"",0},{"",0},{"",0}, - {"ping", &POA_ImplementationRepository::ServerObject::ping_skel}, - {"_is_a", &POA_ImplementationRepository::ServerObject::_is_a_skel}, - {"",0},{"",0}, - {"shutdown", &POA_ImplementationRepository::ServerObject::shutdown_skel}, - {"",0},{"",0},{"",0},{"",0}, - {"_non_existent", &POA_ImplementationRepository::ServerObject::_non_existent_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 12:16:37 */ -static TAO_ImplementationRepository_ServerObject_Perfect_Hash_OpTable tao_ImplementationRepository_ServerObject_optable; - -ImplementationRepository::ServerObject_ptr _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory ( - CORBA::Object_ptr obj - ) -{ - TAO_Stub *stub = obj->_stubobj (); - - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ImplementationRepository::ServerObject_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_ImplementationRepository::_tao_thru_poa_collocated_ServerObject (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - break; - default: - break; - } - return 0; -} - -int _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory_Initializer (long dummy) -{ - ACE_UNUSED_ARG (dummy); - - _TAO_collocation_ImplementationRepository_ServerObject_Stub_Factory_function_pointer = - _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory; - - return 0; -} - -static int _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory_Initializer_Scarecrow = - _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory_Initializer)); - -// skeleton constructor -POA_ImplementationRepository::ServerObject::ServerObject (void) -{ - this->optable_ = &tao_ImplementationRepository_ServerObject_optable; -} - -// copy ctor -POA_ImplementationRepository::ServerObject::ServerObject (const ServerObject& rhs) - : TAO_ServantBase (rhs) -{} - -// skeleton destructor -POA_ImplementationRepository::ServerObject::~ServerObject (void) -{ -} - -void POA_ImplementationRepository::ServerObject::ping_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - POA_ImplementationRepository::ServerObject *_tao_impl = (POA_ImplementationRepository::ServerObject *)_tao_object_reference; - - _tao_impl->ping ( - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_ImplementationRepository::ServerObject::shutdown_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - POA_ImplementationRepository::ServerObject *_tao_impl = (POA_ImplementationRepository::ServerObject *)_tao_object_reference; - _tao_impl->shutdown ( - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_ImplementationRepository::ServerObject::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::ServerObject *_tao_impl = (POA_ImplementationRepository::ServerObject *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!((_tao_in >> value.out ()))) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void POA_ImplementationRepository::ServerObject::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_ImplementationRepository::ServerObject *_tao_impl = (POA_ImplementationRepository::ServerObject *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean POA_ImplementationRepository::ServerObject::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:ImplementationRepository/ServerObject:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* POA_ImplementationRepository::ServerObject::_downcast ( - const char* logical_type_id - ) -{ -if (ACE_OS::strcmp (logical_type_id, "IDL:ImplementationRepository/ServerObject:1.0") == 0) - return ACE_static_cast (POA_ImplementationRepository::ServerObject_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void POA_ImplementationRepository::ServerObject::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* POA_ImplementationRepository::ServerObject::_interface_repository_id (void) const -{ - return "IDL:ImplementationRepository/ServerObject:1.0"; -} - -ImplementationRepository::ServerObject* -POA_ImplementationRepository::ServerObject::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ()) - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ::ImplementationRepository::ServerObject_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_ImplementationRepository::_tao_thru_poa_collocated_ServerObject (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - } - else - { - // stub->_incr_refcnt (); - CORBA::Object_ptr tmp = CORBA::Object::_nil (); - ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); - CORBA::Object_var obj = tmp; - return ::ImplementationRepository::ServerObject::_unchecked_narrow (obj.in ()); - } -} - -POA_ImplementationRepository::_tao_thru_poa_collocated_ServerObject::_tao_thru_poa_collocated_ServerObject ( - TAO_Stub *stub -) - : CORBA_Object (stub, 0, 1) -{ -} - -CORBA::Boolean POA_ImplementationRepository::_tao_thru_poa_collocated_ServerObject::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_is_a", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_ImplementationRepository::ServerObject_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/ServerObject:1.0" - ) - )->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -CORBA::Boolean POA_ImplementationRepository::_tao_thru_poa_collocated_ServerObject::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_non_existent", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_ImplementationRepository::ServerObject_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/ServerObject:1.0" - ) - )->_non_existent (ACE_TRY_ENV); -} - - -void POA_ImplementationRepository::_tao_thru_poa_collocated_ServerObject::ping ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "ping", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::ServerObject_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/ServerObject:1.0" - ) - )->ping ( - ACE_TRY_ENV - ); - return; -} - -void POA_ImplementationRepository::_tao_thru_poa_collocated_ServerObject::shutdown ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "shutdown", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::ServerObject_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/ServerObject:1.0" - ) - )->shutdown ( - ACE_TRY_ENV - ); - return; -} - - - -class TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 12:16:37 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: /home/coryan/subsets/ACE_wrappers/build/Linux/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { -#if defined (ACE_MVS) - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 15, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 10, - 34, 34, 5, 34, 0, 0, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 0, 34, 5, - 34, 34, 34, 0, 34, 34, 34, 34, 34, 34, - 34, 34, 5, 0, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, -#else - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 15, 34, 10, 34, 34, - 5, 34, 0, 0, 34, 34, 34, 34, 0, 34, - 5, 34, 34, 34, 0, 5, 0, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, -#endif /* ACE_MVS */ - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 11, - MIN_WORD_LENGTH = 4, - MAX_WORD_LENGTH = 23, - MIN_HASH_VALUE = 4, - MAX_HASH_VALUE = 33, - HASH_VALUE_RANGE = 30, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0},{"",0},{"",0},{"",0}, - {"list", &POA_ImplementationRepository::Administration::list_skel}, - {"",0},{"",0},{"",0},{"",0}, - {"find", &POA_ImplementationRepository::Administration::find_skel}, - {"",0},{"",0},{"",0}, - {"remove_server", &POA_ImplementationRepository::Administration::remove_server_skel}, - {"",0}, - {"register_server", &POA_ImplementationRepository::Administration::register_server_skel}, - {"",0}, - {"reregister_server", &POA_ImplementationRepository::Administration::reregister_server_skel}, - {"",0},{"",0}, - {"shutdown_server", &POA_ImplementationRepository::Administration::shutdown_server_skel}, - {"",0}, - {"server_is_running", &POA_ImplementationRepository::Administration::server_is_running_skel}, - {"",0},{"",0}, - {"activate_server", &POA_ImplementationRepository::Administration::activate_server_skel}, - {"",0},{"",0}, - {"_non_existent", &POA_ImplementationRepository::Administration::_non_existent_skel}, - {"",0}, - {"_is_a", &POA_ImplementationRepository::Administration::_is_a_skel}, - {"",0},{"",0}, - {"server_is_shutting_down", &POA_ImplementationRepository::Administration::server_is_shutting_down_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 12:16:37 */ -static TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable tao_ImplementationRepository_Administration_optable; - -ImplementationRepository::Administration_ptr _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory ( - CORBA::Object_ptr obj - ) -{ - TAO_Stub *stub = obj->_stubobj (); - - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ImplementationRepository::Administration_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_ImplementationRepository::_tao_thru_poa_collocated_Administration (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - break; - default: - break; - } - return 0; -} - -int _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory_Initializer (long dummy) -{ - ACE_UNUSED_ARG (dummy); - - _TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer = - _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory; - - return 0; -} - -static int _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory_Initializer_Scarecrow = - _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory_Initializer)); - -// skeleton constructor -POA_ImplementationRepository::Administration::Administration (void) -{ - this->optable_ = &tao_ImplementationRepository_Administration_optable; -} - -// copy ctor -POA_ImplementationRepository::Administration::Administration (const Administration& rhs) - : TAO_ServantBase (rhs) -{} - -// skeleton destructor -POA_ImplementationRepository::Administration::~Administration (void) -{ -} - -void POA_ImplementationRepository::Administration::activate_server_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *)_tao_object_reference; - - CORBA::String_var server; - if (!( - (_tao_in >> server.out ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - - _tao_impl->activate_server ( - server.in (), - ACE_TRY_ENV - ); - - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_ImplementationRepository::Administration::register_server_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *)_tao_object_reference; - - CORBA::String_var server; - ImplementationRepository::StartupOptions options; - if (!( - (_tao_in >> server.out ()) && - (_tao_in >> options) - )) - ACE_THROW (CORBA::MARSHAL () ); - - - _tao_impl->register_server ( - server.in (), - options, - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_ImplementationRepository::Administration::reregister_server_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *)_tao_object_reference; - - CORBA::String_var server; - ImplementationRepository::StartupOptions options; - if (!( - (_tao_in >> server.out ()) && - (_tao_in >> options) - )) - ACE_THROW (CORBA::MARSHAL () ); - - _tao_impl->reregister_server ( - server.in (), - options, - ACE_TRY_ENV - ); - - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_ImplementationRepository::Administration::remove_server_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *)_tao_object_reference; - - CORBA::String_var server; - if (!( - (_tao_in >> server.out ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - - - _tao_impl->remove_server ( - server.in (), - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_ImplementationRepository::Administration::shutdown_server_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *)_tao_object_reference; - - CORBA::String_var server; - if (!( - (_tao_in >> server.out ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - - - _tao_impl->shutdown_server ( - server.in (), - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_ImplementationRepository::Administration::server_is_running_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *)_tao_object_reference; - - CORBA::String_var _tao_retval; - CORBA::String_var server; - CORBA::String_var addr; - ImplementationRepository::ServerObject_var server_object; - if (!( - (_tao_in >> server.out ()) && - (_tao_in >> addr.out ()) && - (_tao_in >> server_object.out ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - - - _tao_retval = _tao_impl->server_is_running ( - server.in (), - addr.in (), - server_object.in (), - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << _tao_retval.in ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void POA_ImplementationRepository::Administration::server_is_shutting_down_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *)_tao_object_reference; - - CORBA::String_var server; - if (!( - (_tao_in >> server.out ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - - - _tao_impl->server_is_shutting_down ( - server.in (), - ACE_TRY_ENV - ); - - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_ImplementationRepository::Administration::find_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *)_tao_object_reference; - - CORBA::String_var server; - ImplementationRepository::ServerInformation_var info; - if (!( - (_tao_in >> server.out ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - - - _tao_impl->find ( - server.in (), - info.out (), - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << info.in ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void POA_ImplementationRepository::Administration::list_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *)_tao_object_reference; - - CORBA::ULong how_many; - ImplementationRepository::ServerInformationList_var server_list; - ImplementationRepository::ServerInformationIterator_var server_iterator; - if (!( - (_tao_in >> how_many) - )) - ACE_THROW (CORBA::MARSHAL () ); - - - _tao_impl->list ( - how_many, - server_list.out (), - server_iterator.out (), - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << server_list.in ()) && - (_tao_out << server_iterator.in ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void POA_ImplementationRepository::Administration::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!((_tao_in >> value.out ()))) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void POA_ImplementationRepository::Administration::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean POA_ImplementationRepository::Administration::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:ImplementationRepository/Administration:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* POA_ImplementationRepository::Administration::_downcast ( - const char* logical_type_id - ) -{ -if (ACE_OS::strcmp (logical_type_id, "IDL:ImplementationRepository/Administration:1.0") == 0) - return ACE_static_cast (POA_ImplementationRepository::Administration_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void POA_ImplementationRepository::Administration::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* POA_ImplementationRepository::Administration::_interface_repository_id (void) const -{ - return "IDL:ImplementationRepository/Administration:1.0"; -} - -ImplementationRepository::Administration* -POA_ImplementationRepository::Administration::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ()) - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ::ImplementationRepository::Administration_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_ImplementationRepository::_tao_thru_poa_collocated_Administration (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - } - else - { - // stub->_incr_refcnt (); - CORBA::Object_ptr tmp = CORBA::Object::_nil (); - ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); - CORBA::Object_var obj = tmp; - return ::ImplementationRepository::Administration::_unchecked_narrow (obj.in ()); - } -} - -POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::_tao_thru_poa_collocated_Administration ( - TAO_Stub *stub -) - : CORBA_Object (stub, 0, 1) -{ -} - -CORBA::Boolean POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_is_a", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -CORBA::Boolean POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_non_existent", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->_non_existent (ACE_TRY_ENV); -} - - -void POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::activate_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound, - ImplementationRepository::Administration::CannotActivate - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "activate_server", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->activate_server ( - server, - ACE_TRY_ENV - ); - return; -} - -void POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::register_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::AlreadyRegistered - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "register_server", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->register_server ( - server, - options, - ACE_TRY_ENV - ); - return; -} - -void POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::reregister_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "reregister_server", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->reregister_server ( - server, - options, - ACE_TRY_ENV - ); - return; -} - -void POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::remove_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "remove_server", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->remove_server ( - server, - ACE_TRY_ENV - ); - return; -} - -void POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::shutdown_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "shutdown_server", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->shutdown_server ( - server, - ACE_TRY_ENV - ); - return; -} - -char * POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::server_is_running ( - const char * server, - const char * addr, - ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - CORBA::String_var _tao_retval; - ACE_UNUSED_ARG (_tao_retval); - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "server_is_running", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->server_is_running ( - server, - addr, - server_object, - ACE_TRY_ENV - ); - -} - -void POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::server_is_shutting_down ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "server_is_shutting_down", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->server_is_shutting_down ( - server, - ACE_TRY_ENV - ); - return; -} - -void POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::find ( - const char * server, - ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "find", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->find ( - server, - info, - ACE_TRY_ENV - ); - return; -} - -void POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::list ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "list", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::Administration_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/Administration:1.0" - ) - )->list ( - how_many, - server_list, - server_iterator, - ACE_TRY_ENV - ); - return; -} - - - -class TAO_ImplementationRepository_ServerInformationIterator_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 12:16:37 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: /home/coryan/subsets/ACE_wrappers/build/Linux/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_ImplementationRepository_ServerInformationIterator_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_ImplementationRepository_ServerInformationIterator_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { -#if defined (ACE_MVS) - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 14, 14, 0, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 0, 14, 14, 14, 14, 0, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, -#else - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 0, 14, 0, 14, 14, - 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 0, 14, 14, 14, 14, 14, 0, 14, 14, 14, - 14, 0, 14, 14, 14, 14, 14, 14, -#endif /* ACE_MVS */ - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_ImplementationRepository_ServerInformationIterator_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 4, - MIN_WORD_LENGTH = 5, - MAX_WORD_LENGTH = 13, - MIN_HASH_VALUE = 5, - MAX_HASH_VALUE = 13, - HASH_VALUE_RANGE = 9, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0},{"",0},{"",0},{"",0},{"",0}, - {"_is_a", &POA_ImplementationRepository::ServerInformationIterator::_is_a_skel}, - {"next_n", &POA_ImplementationRepository::ServerInformationIterator::next_n_skel}, - {"destroy", &POA_ImplementationRepository::ServerInformationIterator::destroy_skel}, - {"",0},{"",0},{"",0},{"",0},{"",0}, - {"_non_existent", &POA_ImplementationRepository::ServerInformationIterator::_non_existent_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 12:16:37 */ -static TAO_ImplementationRepository_ServerInformationIterator_Perfect_Hash_OpTable tao_ImplementationRepository_ServerInformationIterator_optable; - -ImplementationRepository::ServerInformationIterator_ptr _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory ( - CORBA::Object_ptr obj - ) -{ - TAO_Stub *stub = obj->_stubobj (); - - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ImplementationRepository::ServerInformationIterator_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIterator (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - break; - default: - break; - } - return 0; -} - -int _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory_Initializer (long dummy) -{ - ACE_UNUSED_ARG (dummy); - - _TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer = - _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory; - - return 0; -} - -static int _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory_Initializer_Scarecrow = - _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory_Initializer)); - -// skeleton constructor -POA_ImplementationRepository::ServerInformationIterator::ServerInformationIterator (void) -{ - this->optable_ = &tao_ImplementationRepository_ServerInformationIterator_optable; -} - -// copy ctor -POA_ImplementationRepository::ServerInformationIterator::ServerInformationIterator (const ServerInformationIterator& rhs) - : TAO_ServantBase (rhs) -{} - -// skeleton destructor -POA_ImplementationRepository::ServerInformationIterator::~ServerInformationIterator (void) -{ -} - -void POA_ImplementationRepository::ServerInformationIterator::next_n_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::ServerInformationIterator *_tao_impl = (POA_ImplementationRepository::ServerInformationIterator *)_tao_object_reference; - - CORBA::Boolean _tao_retval = 0; - CORBA::ULong how_many; - ImplementationRepository::ServerInformationList_var server_list; - if (!( - (_tao_in >> how_many) - )) - ACE_THROW (CORBA::MARSHAL () ); - - _tao_retval = _tao_impl->next_n ( - how_many, - server_list.out (), - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << CORBA::Any::from_boolean (_tao_retval)) && - (_tao_out << server_list.in ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void POA_ImplementationRepository::ServerInformationIterator::destroy_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - POA_ImplementationRepository::ServerInformationIterator *_tao_impl = (POA_ImplementationRepository::ServerInformationIterator *)_tao_object_reference; - - - _tao_impl->destroy ( - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_ImplementationRepository::ServerInformationIterator::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_ImplementationRepository::ServerInformationIterator *_tao_impl = (POA_ImplementationRepository::ServerInformationIterator *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!((_tao_in >> value.out ()))) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void POA_ImplementationRepository::ServerInformationIterator::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_ImplementationRepository::ServerInformationIterator *_tao_impl = (POA_ImplementationRepository::ServerInformationIterator *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean POA_ImplementationRepository::ServerInformationIterator::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:ImplementationRepository/ServerInformationIterator:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* POA_ImplementationRepository::ServerInformationIterator::_downcast ( - const char* logical_type_id - ) -{ -if (ACE_OS::strcmp (logical_type_id, "IDL:ImplementationRepository/ServerInformationIterator:1.0") == 0) - return ACE_static_cast (POA_ImplementationRepository::ServerInformationIterator_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void POA_ImplementationRepository::ServerInformationIterator::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* POA_ImplementationRepository::ServerInformationIterator::_interface_repository_id (void) const -{ - return "IDL:ImplementationRepository/ServerInformationIterator:1.0"; -} - -ImplementationRepository::ServerInformationIterator* -POA_ImplementationRepository::ServerInformationIterator::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ()) - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ::ImplementationRepository::ServerInformationIterator_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIterator (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - } - else - { - // stub->_incr_refcnt (); - CORBA::Object_ptr tmp = CORBA::Object::_nil (); - ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); - CORBA::Object_var obj = tmp; - return ::ImplementationRepository::ServerInformationIterator::_unchecked_narrow (obj.in ()); - } -} - -POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIterator::_tao_thru_poa_collocated_ServerInformationIterator ( - TAO_Stub *stub -) - : CORBA_Object (stub, 0, 1) -{ -} - -CORBA::Boolean POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIterator::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_is_a", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_ImplementationRepository::ServerInformationIterator_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/ServerInformationIterator:1.0" - ) - )->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -CORBA::Boolean POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIterator::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_non_existent", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_ImplementationRepository::ServerInformationIterator_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/ServerInformationIterator:1.0" - ) - )->_non_existent (ACE_TRY_ENV); -} - - -CORBA::Boolean POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIterator::next_n ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - CORBA::Boolean _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "next_n", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (_tao_retval); - return ACE_reinterpret_cast ( - POA_ImplementationRepository::ServerInformationIterator_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/ServerInformationIterator:1.0" - ) - )->next_n ( - how_many, - server_list, - ACE_TRY_ENV - ); - -} - -void POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIterator::destroy ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "destroy", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_ImplementationRepository::ServerInformationIterator_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:ImplementationRepository/ServerInformationIterator:1.0" - ) - )->destroy ( - ACE_TRY_ENV - ); - return; -} diff --git a/TAO/tao/ImplRepoS.h b/TAO/tao/ImplRepoS.h deleted file mode 100644 index 3cd719559b2..00000000000 --- a/TAO/tao/ImplRepoS.h +++ /dev/null @@ -1,917 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_IMPLREPOS_H_ -#define _TAO_IDL_IMPLREPOS_H_ -#include "ace/pre.h" - -#include "ImplRepoC.h" -#include "tao/PortableServerC.h" -#include "tao/Servant_Base.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -TAO_NAMESPACE POA_ImplementationRepository -{ - class ServerObject; - typedef ServerObject *ServerObject_ptr; - class TAO_Export ServerObject : public virtual PortableServer::ServantBase - { - protected: - ServerObject (void); - - public: - ServerObject (const ServerObject& rhs); - virtual ~ServerObject (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - ::ImplementationRepository::ServerObject *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual void ping ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void ping_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void shutdown ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void shutdown_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - - }; - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVEROBJECT___THRU_POA_COLLOCATED_SH_) -#define _IMPLEMENTATIONREPOSITORY_SERVEROBJECT___THRU_POA_COLLOCATED_SH_ - - class TAO_Export _tao_thru_poa_collocated_ServerObject : public virtual ::ImplementationRepository::ServerObject - { - public: - _tao_thru_poa_collocated_ServerObject ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual void ping ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void shutdown ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - }; - - -#endif /* end #if !defined */ - - -#if defined (ACE_HAS_USING_KEYWORD) - // TIE class: Refer to CORBA v2.2, Section 20.34.4 - template - class TAO_Export ServerObject_tie : public ServerObject - { - public: - ServerObject_tie (T &t); - // the T& ctor - ServerObject_tie (T &t, PortableServer::POA_ptr poa); - // ctor taking a POA - ServerObject_tie (T *tp, CORBA::Boolean release=1); - // ctor taking pointer and an ownership flag - ServerObject_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release=1); - // ctor with T*, ownership flag and a POA - ~ServerObject_tie (void); - // dtor - - // TIE specific functions - T *_tied_object (void); - // return the underlying object - void _tied_object (T &obj); - // set the underlying object - void _tied_object (T *obj, CORBA::Boolean release=1); - // set the underlying object and the ownership flag - CORBA::Boolean _is_owner (void); - // do we own it - void _is_owner (CORBA::Boolean b); - // set the ownership - - // overridden ServantBase operations - PortableServer::POA_ptr _default_POA ( - CORBA::Environment &env = - TAO_default_environment () - ); - void ping ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - void shutdown ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -private: - T *ptr_; - PortableServer::POA_var poa_; - CORBA::Boolean rel_; - - // copy and assignment are not allowed - ServerObject_tie (const ServerObject_tie &); - void operator= (const ServerObject_tie &); - }; - -#endif /* ACE_HAS_USING_KEYWORD */ - - class Administration; - typedef Administration *Administration_ptr; - class TAO_Export Administration : public virtual PortableServer::ServantBase - { - protected: - Administration (void); - - public: - Administration (const Administration& rhs); - virtual ~Administration (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - ::ImplementationRepository::Administration *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual void activate_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound, - ImplementationRepository::Administration::CannotActivate - )) = 0; - - static void activate_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void register_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::AlreadyRegistered - )) = 0; - - static void register_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void reregister_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void reregister_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void remove_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) = 0; - - static void remove_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void shutdown_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) = 0; - - static void shutdown_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual char * server_is_running ( - const char * server, - const char * addr, - ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) = 0; - - static void server_is_running_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void server_is_shutting_down ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) = 0; - - static void server_is_shutting_down_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void find ( - const char * server, - ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) = 0; - - static void find_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void list ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void list_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - - }; - - -#if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION___THRU_POA_COLLOCATED_SH_) -#define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION___THRU_POA_COLLOCATED_SH_ - - class TAO_Export _tao_thru_poa_collocated_Administration : public virtual ::ImplementationRepository::Administration - { - public: - _tao_thru_poa_collocated_Administration ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual void activate_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound, - ImplementationRepository::Administration::CannotActivate - )); - - virtual void register_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::AlreadyRegistered - )); - - virtual void reregister_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void remove_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void shutdown_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual char * server_is_running ( - const char * server, - const char * addr, - ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void server_is_shutting_down ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void find ( - const char * server, - ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - virtual void list ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - }; - - -#endif /* end #if !defined */ - - -#if defined (ACE_HAS_USING_KEYWORD) - // TIE class: Refer to CORBA v2.2, Section 20.34.4 - template - class TAO_Export Administration_tie : public Administration - { - public: - Administration_tie (T &t); - // the T& ctor - Administration_tie (T &t, PortableServer::POA_ptr poa); - // ctor taking a POA - Administration_tie (T *tp, CORBA::Boolean release=1); - // ctor taking pointer and an ownership flag - Administration_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release=1); - // ctor with T*, ownership flag and a POA - ~Administration_tie (void); - // dtor - - // TIE specific functions - T *_tied_object (void); - // return the underlying object - void _tied_object (T &obj); - // set the underlying object - void _tied_object (T *obj, CORBA::Boolean release=1); - // set the underlying object and the ownership flag - CORBA::Boolean _is_owner (void); - // do we own it - void _is_owner (CORBA::Boolean b); - // set the ownership - - // overridden ServantBase operations - PortableServer::POA_ptr _default_POA ( - CORBA::Environment &env = - TAO_default_environment () - ); - void activate_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound, - ImplementationRepository::Administration::CannotActivate - )); - - void register_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::AlreadyRegistered - )); - - void reregister_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - void remove_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - void shutdown_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - char * server_is_running ( - const char * server, - const char * addr, - ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - void server_is_shutting_down ( - const char * server, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - void find ( - const char * server, - ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )); - - void list ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -private: - T *ptr_; - PortableServer::POA_var poa_; - CORBA::Boolean rel_; - - // copy and assignment are not allowed - Administration_tie (const Administration_tie &); - void operator= (const Administration_tie &); - }; - -#endif /* ACE_HAS_USING_KEYWORD */ - - class ServerInformationIterator; - typedef ServerInformationIterator *ServerInformationIterator_ptr; - class TAO_Export ServerInformationIterator : public virtual PortableServer::ServantBase - { - protected: - ServerInformationIterator (void); - - public: - ServerInformationIterator (const ServerInformationIterator& rhs); - virtual ~ServerInformationIterator (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - ::ImplementationRepository::ServerInformationIterator *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual CORBA::Boolean next_n ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void next_n_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void destroy_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - - }; - - -#if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___THRU_POA_COLLOCATED_SH_) -#define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___THRU_POA_COLLOCATED_SH_ - - class TAO_Export _tao_thru_poa_collocated_ServerInformationIterator : public virtual ::ImplementationRepository::ServerInformationIterator - { - public: - _tao_thru_poa_collocated_ServerInformationIterator ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean next_n ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - }; - - -#endif /* end #if !defined */ - - -#if defined (ACE_HAS_USING_KEYWORD) - // TIE class: Refer to CORBA v2.2, Section 20.34.4 - template - class TAO_Export ServerInformationIterator_tie : public ServerInformationIterator - { - public: - ServerInformationIterator_tie (T &t); - // the T& ctor - ServerInformationIterator_tie (T &t, PortableServer::POA_ptr poa); - // ctor taking a POA - ServerInformationIterator_tie (T *tp, CORBA::Boolean release=1); - // ctor taking pointer and an ownership flag - ServerInformationIterator_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release=1); - // ctor with T*, ownership flag and a POA - ~ServerInformationIterator_tie (void); - // dtor - - // TIE specific functions - T *_tied_object (void); - // return the underlying object - void _tied_object (T &obj); - // set the underlying object - void _tied_object (T *obj, CORBA::Boolean release=1); - // set the underlying object and the ownership flag - CORBA::Boolean _is_owner (void); - // do we own it - void _is_owner (CORBA::Boolean b); - // set the ownership - - // overridden ServantBase operations - PortableServer::POA_ptr _default_POA ( - CORBA::Environment &env = - TAO_default_environment () - ); - CORBA::Boolean next_n ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - -private: - T *ptr_; - PortableServer::POA_var poa_; - CORBA::Boolean rel_; - - // copy and assignment are not allowed - ServerInformationIterator_tie (const ServerInformationIterator_tie &); - void operator= (const ServerInformationIterator_tie &); - }; - -#endif /* ACE_HAS_USING_KEYWORD */ - -} -TAO_NAMESPACE_CLOSE - -#include "ImplRepoS_T.h" - -#if defined (__ACE_INLINE__) -#include "ImplRepoS.i" -#endif /* defined INLINE */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#include "ace/post.h" -#endif /* ifndef */ diff --git a/TAO/tao/ImplRepoS.i b/TAO/tao/ImplRepoS.i deleted file mode 100644 index d41d475fa1a..00000000000 --- a/TAO/tao/ImplRepoS.i +++ /dev/null @@ -1,9 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - diff --git a/TAO/tao/ImplRepoS_T.cpp b/TAO/tao/ImplRepoS_T.cpp deleted file mode 100644 index 341ff292dff..00000000000 --- a/TAO/tao/ImplRepoS_T.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_IMPLREPOS_T_CPP_ -#define _TAO_IDL_IMPLREPOS_T_CPP_ - -#include "ImplRepoS_T.h" - -#if !defined (__ACE_INLINE__) -#include "ImplRepoS_T.i" -#endif /* !defined INLINE */ - - -#endif /* ifndef */ diff --git a/TAO/tao/ImplRepoS_T.h b/TAO/tao/ImplRepoS_T.h deleted file mode 100644 index 37cf44e03f2..00000000000 --- a/TAO/tao/ImplRepoS_T.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_IMPLREPOS_T_H_ -#define _TAO_IDL_IMPLREPOS_T_H_ -#include "ace/pre.h" - -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - - -#if defined (__ACE_INLINE__) -#include "ImplRepoS_T.i" -#endif /* defined INLINE */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ImplRepoS_T.cpp" -#endif /* defined REQUIRED SOURCE */ - - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("ImplRepoS_T.cpp") -#endif /* defined REQUIRED PRAGMA */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#include "ace/post.h" -#endif /* ifndef */ diff --git a/TAO/tao/ImplRepoS_T.i b/TAO/tao/ImplRepoS_T.i deleted file mode 100644 index c9f070e9a57..00000000000 --- a/TAO/tao/ImplRepoS_T.i +++ /dev/null @@ -1,462 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - - -#if defined (ACE_HAS_USING_KEYWORD) -template ACE_INLINE -POA_ImplementationRepository::ServerObject_tie::ServerObject_tie (T &t) - : ptr_ (&t), - poa_ (PortableServer::POA::_nil ()), - rel_ (0) -{} - -template ACE_INLINE -POA_ImplementationRepository::ServerObject_tie::ServerObject_tie (T &t, PortableServer::POA_ptr poa) - : ptr_ (&t), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (0) -{} - -template ACE_INLINE -POA_ImplementationRepository::ServerObject_tie::ServerObject_tie (T *tp, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_nil ()), - rel_ (release) -{} - -template ACE_INLINE -POA_ImplementationRepository::ServerObject_tie::ServerObject_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (release) -{} - -template ACE_INLINE -POA_ImplementationRepository::ServerObject_tie::~ServerObject_tie (void) -{ - if (this->rel_) delete this->ptr_; -} - -template ACE_INLINE T * -POA_ImplementationRepository::ServerObject_tie::_tied_object (void) -{ - return this->ptr_; -} - -template ACE_INLINE void -POA_ImplementationRepository::ServerObject_tie::_tied_object (T &obj) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = &obj; - this->rel_ = 0; -} - -template ACE_INLINE void -POA_ImplementationRepository::ServerObject_tie::_tied_object (T *obj, CORBA::Boolean release) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = obj; - this->rel_ = release; -} - -template ACE_INLINE CORBA::Boolean -POA_ImplementationRepository::ServerObject_tie::_is_owner (void) -{ - return this->rel_; -} - -template ACE_INLINE void -POA_ImplementationRepository::ServerObject_tie::_is_owner (CORBA::Boolean b) -{ - this->rel_ = b; -} - -template ACE_INLINE PortableServer::POA_ptr -POA_ImplementationRepository::ServerObject_tie::_default_POA (CORBA::Environment &env) -{ - if (!CORBA::is_nil (this->poa_.in ())) - return PortableServer::POA::_duplicate (this->poa_.in ()); - - return this->ServerObject::_default_POA (env); -} - -template ACE_INLINE -void POA_ImplementationRepository::ServerObject_tie::ping ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->ptr_->ping ( - ACE_TRY_ENV - ); -} - -template ACE_INLINE -void POA_ImplementationRepository::ServerObject_tie::shutdown ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->ptr_->shutdown ( - ACE_TRY_ENV - ); -} - -#endif /* ACE_HAS_USING_KEYWORD */ - -#if defined (ACE_HAS_USING_KEYWORD) -template ACE_INLINE -POA_ImplementationRepository::Administration_tie::Administration_tie (T &t) - : ptr_ (&t), - poa_ (PortableServer::POA::_nil ()), - rel_ (0) -{} - -template ACE_INLINE -POA_ImplementationRepository::Administration_tie::Administration_tie (T &t, PortableServer::POA_ptr poa) - : ptr_ (&t), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (0) -{} - -template ACE_INLINE -POA_ImplementationRepository::Administration_tie::Administration_tie (T *tp, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_nil ()), - rel_ (release) -{} - -template ACE_INLINE -POA_ImplementationRepository::Administration_tie::Administration_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (release) -{} - -template ACE_INLINE -POA_ImplementationRepository::Administration_tie::~Administration_tie (void) -{ - if (this->rel_) delete this->ptr_; -} - -template ACE_INLINE T * -POA_ImplementationRepository::Administration_tie::_tied_object (void) -{ - return this->ptr_; -} - -template ACE_INLINE void -POA_ImplementationRepository::Administration_tie::_tied_object (T &obj) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = &obj; - this->rel_ = 0; -} - -template ACE_INLINE void -POA_ImplementationRepository::Administration_tie::_tied_object (T *obj, CORBA::Boolean release) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = obj; - this->rel_ = release; -} - -template ACE_INLINE CORBA::Boolean -POA_ImplementationRepository::Administration_tie::_is_owner (void) -{ - return this->rel_; -} - -template ACE_INLINE void -POA_ImplementationRepository::Administration_tie::_is_owner (CORBA::Boolean b) -{ - this->rel_ = b; -} - -template ACE_INLINE PortableServer::POA_ptr -POA_ImplementationRepository::Administration_tie::_default_POA (CORBA::Environment &env) -{ - if (!CORBA::is_nil (this->poa_.in ())) - return PortableServer::POA::_duplicate (this->poa_.in ()); - - return this->Administration::_default_POA (env); -} - -template ACE_INLINE -void POA_ImplementationRepository::Administration_tie::activate_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound, - ImplementationRepository::Administration::CannotActivate - )) -{ - this->ptr_->activate_server ( - server, - ACE_TRY_ENV - ); -} - -template ACE_INLINE -void POA_ImplementationRepository::Administration_tie::register_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::AlreadyRegistered - )) -{ - this->ptr_->register_server ( - server, - options, - ACE_TRY_ENV - ); -} - -template ACE_INLINE -void POA_ImplementationRepository::Administration_tie::reregister_server ( - const char * server, - const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->ptr_->reregister_server ( - server, - options, - ACE_TRY_ENV - ); -} - -template ACE_INLINE -void POA_ImplementationRepository::Administration_tie::remove_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - this->ptr_->remove_server ( - server, - ACE_TRY_ENV - ); -} - -template ACE_INLINE -void POA_ImplementationRepository::Administration_tie::shutdown_server ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - this->ptr_->shutdown_server ( - server, - ACE_TRY_ENV - ); -} - -template ACE_INLINE -char * POA_ImplementationRepository::Administration_tie::server_is_running ( - const char * server, - const char * addr, - ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - return this->ptr_->server_is_running ( - server, - addr, - server_object, - ACE_TRY_ENV - ); -} - -template ACE_INLINE -void POA_ImplementationRepository::Administration_tie::server_is_shutting_down ( - const char * server, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - this->ptr_->server_is_shutting_down ( - server, - ACE_TRY_ENV - ); -} - -template ACE_INLINE -void POA_ImplementationRepository::Administration_tie::find ( - const char * server, - ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - ImplementationRepository::Administration::NotFound - )) -{ - this->ptr_->find ( - server, - info, - ACE_TRY_ENV - ); -} - -template ACE_INLINE -void POA_ImplementationRepository::Administration_tie::list ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->ptr_->list ( - how_many, - server_list, - server_iterator, - ACE_TRY_ENV - ); -} - -#endif /* ACE_HAS_USING_KEYWORD */ - -#if defined (ACE_HAS_USING_KEYWORD) -template ACE_INLINE -POA_ImplementationRepository::ServerInformationIterator_tie::ServerInformationIterator_tie (T &t) - : ptr_ (&t), - poa_ (PortableServer::POA::_nil ()), - rel_ (0) -{} - -template ACE_INLINE -POA_ImplementationRepository::ServerInformationIterator_tie::ServerInformationIterator_tie (T &t, PortableServer::POA_ptr poa) - : ptr_ (&t), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (0) -{} - -template ACE_INLINE -POA_ImplementationRepository::ServerInformationIterator_tie::ServerInformationIterator_tie (T *tp, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_nil ()), - rel_ (release) -{} - -template ACE_INLINE -POA_ImplementationRepository::ServerInformationIterator_tie::ServerInformationIterator_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (release) -{} - -template ACE_INLINE -POA_ImplementationRepository::ServerInformationIterator_tie::~ServerInformationIterator_tie (void) -{ - if (this->rel_) delete this->ptr_; -} - -template ACE_INLINE T * -POA_ImplementationRepository::ServerInformationIterator_tie::_tied_object (void) -{ - return this->ptr_; -} - -template ACE_INLINE void -POA_ImplementationRepository::ServerInformationIterator_tie::_tied_object (T &obj) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = &obj; - this->rel_ = 0; -} - -template ACE_INLINE void -POA_ImplementationRepository::ServerInformationIterator_tie::_tied_object (T *obj, CORBA::Boolean release) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = obj; - this->rel_ = release; -} - -template ACE_INLINE CORBA::Boolean -POA_ImplementationRepository::ServerInformationIterator_tie::_is_owner (void) -{ - return this->rel_; -} - -template ACE_INLINE void -POA_ImplementationRepository::ServerInformationIterator_tie::_is_owner (CORBA::Boolean b) -{ - this->rel_ = b; -} - -template ACE_INLINE PortableServer::POA_ptr -POA_ImplementationRepository::ServerInformationIterator_tie::_default_POA (CORBA::Environment &env) -{ - if (!CORBA::is_nil (this->poa_.in ())) - return PortableServer::POA::_duplicate (this->poa_.in ()); - - return this->ServerInformationIterator::_default_POA (env); -} - -template ACE_INLINE -CORBA::Boolean POA_ImplementationRepository::ServerInformationIterator_tie::next_n ( - CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - return this->ptr_->next_n ( - how_many, - server_list, - ACE_TRY_ENV - ); -} - -template ACE_INLINE -void POA_ImplementationRepository::ServerInformationIterator_tie::destroy ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - this->ptr_->destroy ( - ACE_TRY_ENV - ); -} - -#endif /* ACE_HAS_USING_KEYWORD */ diff --git a/TAO/tao/Key_Adapters.cpp b/TAO/tao/Key_Adapters.cpp deleted file mode 100644 index e8afbeb534a..00000000000 --- a/TAO/tao/Key_Adapters.cpp +++ /dev/null @@ -1,142 +0,0 @@ -// $Id$ - -#include "tao/Key_Adapters.h" - -#if !defined (__ACE_INLINE__) -# include "tao/Key_Adapters.i" -#endif /* __ACE_INLINE__ */ - -//////////////////////////////////////////////////////////////////////////////// - -TAO_Incremental_Key_Generator::TAO_Incremental_Key_Generator (void) - : counter_ (0) -{ -} - -int -TAO_Incremental_Key_Generator::operator() (PortableServer::ObjectId &id) -{ - // Resize to accommodate the counter. - id.length (sizeof this->counter_); - - // Add new key data. - ACE_OS::memcpy (id.get_buffer (), - &++this->counter_, - sizeof this->counter_); - - // Success. - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// - -u_long -TAO_ObjectId_Hash::operator () (const PortableServer::ObjectId &id) const -{ - return ACE::hash_pjw ((const char *) id.get_buffer (), - id.length ()); -} - -//////////////////////////////////////////////////////////////////////////////// - -int -TAO_Ignore_Original_Key_Adapter::encode (const PortableServer::ObjectId &original_key, - const ACE_Active_Map_Manager_Key &active_key, - PortableServer::ObjectId &modified_key) -{ - ACE_UNUSED_ARG (original_key); - - // Size of active key. - size_t active_key_size = active_key.size (); - - // Resize to accommodate both the original data and the new active key. - modified_key.length (active_key_size); - - // Copy active key data into user key. - active_key.encode (modified_key.get_buffer ()); - - // Success. - return 0; -} - -int -TAO_Ignore_Original_Key_Adapter::decode (const PortableServer::ObjectId &modified_key, - ACE_Active_Map_Manager_Key &active_key) -{ - // Read off value of index and generation. - active_key.decode (modified_key.get_buffer ()); - - // Success. - return 0; -} - -int -TAO_Ignore_Original_Key_Adapter::decode (const PortableServer::ObjectId &modified_key, - PortableServer::ObjectId &original_key) -{ - // Smartly copy all the data; . - original_key.replace (modified_key.maximum (), - modified_key.length (), - ACE_const_cast (CORBA::Octet *, - modified_key.get_buffer ()), - 0); - - // Success. - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// - -int -TAO_Preserve_Original_Key_Adapter::encode (const PortableServer::ObjectId &original_key, - const ACE_Active_Map_Manager_Key &active_key, - PortableServer::ObjectId &modified_key) -{ - // Size of active key. - size_t active_key_size = active_key.size (); - - // Resize to accommodate both the original data and the new active key. - modified_key.length (active_key_size + original_key.length ()); - - // Copy active key data into user key. - active_key.encode (modified_key.get_buffer ()); - - // Copy the original key after the active key. - ACE_OS::memcpy (modified_key.get_buffer () + active_key_size, - original_key.get_buffer (), - original_key.length ()); - - // Success. - return 0; -} - -int -TAO_Preserve_Original_Key_Adapter::decode (const PortableServer::ObjectId &modified_key, - ACE_Active_Map_Manager_Key &active_key) -{ - // Read off value of index and generation. - active_key.decode (modified_key.get_buffer ()); - - // Success. - return 0; -} - -int -TAO_Preserve_Original_Key_Adapter::decode (const PortableServer::ObjectId &modified_key, - PortableServer::ObjectId &original_key) -{ - // Size of active key. - size_t active_key_size = ACE_Active_Map_Manager_Key::size (); - - // Smartly copy all the data; . - original_key.replace (modified_key.maximum () - active_key_size, - modified_key.length () - active_key_size, - ACE_const_cast (CORBA::Octet *, - modified_key.get_buffer ()) + active_key_size, - 0); - - // Success. - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/TAO/tao/Key_Adapters.h b/TAO/tao/Key_Adapters.h deleted file mode 100644 index 564fd6ee672..00000000000 --- a/TAO/tao/Key_Adapters.h +++ /dev/null @@ -1,119 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// Key_Adapters.h -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#ifndef TAO_KEY_ADAPTERS_H -#define TAO_KEY_ADAPTERS_H -#include "ace/pre.h" - -#include "tao/corbafwd.h" -#include "ace/Map.h" -#include "tao/PortableServerC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -//////////////////////////////////////////////////////////////////////////////// - -class TAO_Incremental_Key_Generator -{ - // = TITLE - // Defines a key generator. - // - // = DESCRIPTION - // This class is used in adapters of maps that do not produce keys. -public: - - TAO_Incremental_Key_Generator (void); - - int operator() (PortableServer::ObjectId &id); - -protected: - - CORBA::ULong counter_; -}; - -//////////////////////////////////////////////////////////////////////////////// - -class TAO_Export TAO_ObjectId_Hash -{ - // = TITLE - // Hashing class for Object Ids. - // - // = DESCRIPTION - // Define the hash() method for Object Ids. -public: - - u_long operator () (const PortableServer::ObjectId &id) const; - // Returns hash value. -}; - -//////////////////////////////////////////////////////////////////////////////// - -class TAO_Ignore_Original_Key_Adapter -{ - // = TITLE - // A key adapter (encode/decode) class. - // - // = DESCRIPTION - // Define the encoding and decoding methods for converting - // between Object Ids and active keys. This class ignores the - // passed to it. -public: - - int encode (const PortableServer::ObjectId &original_key, - const ACE_Active_Map_Manager_Key &active_key, - PortableServer::ObjectId &modified_key); - - int decode (const PortableServer::ObjectId &modified_key, - ACE_Active_Map_Manager_Key &active_key); - - int decode (const PortableServer::ObjectId &modified_key, - PortableServer::ObjectId &original_key); -}; - -//////////////////////////////////////////////////////////////////////////////// - -class TAO_Preserve_Original_Key_Adapter -{ - // = TITLE - // A key adapter (encode/decode) class. - // - // = DESCRIPTION - // Define the encoding and decoding methods for converting - // between Object Ids and active keys. This class remembers the - // passed to it. -public: - - int encode (const PortableServer::ObjectId &original_key, - const ACE_Active_Map_Manager_Key &active_key, - PortableServer::ObjectId &modified_key); - - int decode (const PortableServer::ObjectId &modified_key, - ACE_Active_Map_Manager_Key &active_key); - - int decode (const PortableServer::ObjectId &modified_key, - PortableServer::ObjectId &original_key); -}; - -//////////////////////////////////////////////////////////////////////////////// - -#if defined (__ACE_INLINE__) -# include "tao/Key_Adapters.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_KEY_ADAPTERS_H */ diff --git a/TAO/tao/Key_Adapters.i b/TAO/tao/Key_Adapters.i deleted file mode 100644 index cfa1da318d3..00000000000 --- a/TAO/tao/Key_Adapters.i +++ /dev/null @@ -1 +0,0 @@ -// $Id$ diff --git a/TAO/tao/MessagingS.cpp b/TAO/tao/MessagingS.cpp deleted file mode 100644 index e69e23e68ca..00000000000 --- a/TAO/tao/MessagingS.cpp +++ /dev/null @@ -1,404 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#include "tao/orbconf.h" - -#if (TAO_HAS_CORBA_MESSAGING == 1) - -#include "MessagingS.h" -#include "Operation_Table.h" -#include "Server_Request.h" -#include "Stub.h" -#include "ORB_Core.h" -#include "Object_Adapter.h" - -#if !defined (__ACE_INLINE__) -#include "MessagingS.i" -#endif /* !defined INLINE */ - -ACE_RCSID(tao, MessagingS, "$Id$") - -#if (TAO_HAS_AMI_CALLBACK == 1) || (TAO_HAS_AMI_POLLER == 1) - -class TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 12:21:06 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { -#if defined (ACE_MVS) - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 0, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, -#else - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 0, 14, 0, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, -#endif /* ACE_MVS */ - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 2, - MIN_WORD_LENGTH = 5, - MAX_WORD_LENGTH = 13, - MIN_HASH_VALUE = 5, - MAX_HASH_VALUE = 13, - HASH_VALUE_RANGE = 9, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0},{"",0},{"",0},{"",0},{"",0}, - {"_is_a", &POA_Messaging::ReplyHandler::_is_a_skel}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, - {"_non_existent", &POA_Messaging::ReplyHandler::_non_existent_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 12:21:06 */ -static TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable tao_Messaging_ReplyHandler_optable; - -Messaging::ReplyHandler_ptr _TAO_collocation_POA_Messaging_ReplyHandler_Stub_Factory ( - CORBA::Object_ptr obj - ) -{ - TAO_Stub *stub = obj->_stubobj (); - - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - Messaging::ReplyHandler_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_Messaging::_tao_thru_poa_collocated_ReplyHandler (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - if (obj->_servant () != 0) - { - POA_Messaging::ReplyHandler *servant = ACE_reinterpret_cast (POA_Messaging::ReplyHandler*, obj->_servant ()->_downcast ("IDL:omg.org/Messaging/ReplyHandler:1.0")); - if (servant != 0) - { - Messaging::ReplyHandler *retval = 0; - ACE_NEW_RETURN ( - retval, - POA_Messaging::_tao_direct_collocated_ReplyHandler (servant, stub), - 0 - ); - return retval; - } - } - break; - default: - break; - } - return 0; -} - -int _TAO_collocation_POA_Messaging_ReplyHandler_Stub_Factory_Initializer (long dummy) -{ - ACE_UNUSED_ARG (dummy); - - _TAO_collocation_Messaging_ReplyHandler_Stub_Factory_function_pointer = - _TAO_collocation_POA_Messaging_ReplyHandler_Stub_Factory; - - return 0; -} - -static int _TAO_collocation_POA_Messaging_ReplyHandler_Stub_Factory_Initializer_Scarecrow = - _TAO_collocation_POA_Messaging_ReplyHandler_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_Messaging_ReplyHandler_Stub_Factory_Initializer)); - -// skeleton constructor -POA_Messaging::ReplyHandler::ReplyHandler (void) -{ - this->optable_ = &tao_Messaging_ReplyHandler_optable; -} - -// copy ctor -POA_Messaging::ReplyHandler::ReplyHandler (const ReplyHandler& rhs) - : TAO_ServantBase (rhs) -{} - -// skeleton destructor -POA_Messaging::ReplyHandler::~ReplyHandler (void) -{ -} - -void POA_Messaging::ReplyHandler::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_Messaging::ReplyHandler *_tao_impl = (POA_Messaging::ReplyHandler *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!((_tao_in >> value.out ()))) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void POA_Messaging::ReplyHandler::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_Messaging::ReplyHandler *_tao_impl = (POA_Messaging::ReplyHandler *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval)))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean POA_Messaging::ReplyHandler::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/Messaging/ReplyHandler:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* POA_Messaging::ReplyHandler::_downcast ( - const char* logical_type_id - ) -{ -if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/Messaging/ReplyHandler:1.0") == 0) - return ACE_static_cast (POA_Messaging::ReplyHandler_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void POA_Messaging::ReplyHandler::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* POA_Messaging::ReplyHandler::_interface_repository_id (void) const -{ - return "IDL:omg.org/Messaging/ReplyHandler:1.0"; -} - -Messaging::ReplyHandler* -POA_Messaging::ReplyHandler::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ()) - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ::Messaging::ReplyHandler_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_Messaging::_tao_thru_poa_collocated_ReplyHandler (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - { - ::Messaging::ReplyHandler_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_Messaging::_tao_direct_collocated_ReplyHandler (this, stub), - 0 - ); - return retval; - } - default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - } - else - { - // stub->_incr_refcnt (); - CORBA::Object_ptr tmp = CORBA::Object::_nil (); - ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); - CORBA::Object_var obj = tmp; - return ::Messaging::ReplyHandler::_unchecked_narrow (obj.in ()); - } -} - -POA_Messaging::_tao_thru_poa_collocated_ReplyHandler::_tao_thru_poa_collocated_ReplyHandler ( - TAO_Stub *stub -) - : CORBA_Object (stub, 0, 1) -{ -} - -CORBA::Boolean POA_Messaging::_tao_thru_poa_collocated_ReplyHandler::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_is_a", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_Messaging::ReplyHandler_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/Messaging/ReplyHandler:1.0" - ) - )->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -CORBA::Boolean POA_Messaging::_tao_thru_poa_collocated_ReplyHandler::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_non_existent", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_Messaging::ReplyHandler_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/Messaging/ReplyHandler:1.0" - ) - )->_non_existent (ACE_TRY_ENV); -} - - -POA_Messaging::_tao_direct_collocated_ReplyHandler::_tao_direct_collocated_ReplyHandler ( - POA_Messaging::ReplyHandler_ptr servant, - TAO_Stub *stub - ) - : ACE_NESTED_CLASS (Messaging,ReplyHandler) (), - CORBA_Object (stub, servant, 1), - servant_ (servant) -{ -} - -CORBA::Boolean POA_Messaging::_tao_direct_collocated_ReplyHandler::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - return this->servant_->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -POA_Messaging::ReplyHandler_ptr POA_Messaging::_tao_direct_collocated_ReplyHandler::_get_servant (void) const -{ - return this->servant_; -} - -CORBA::Boolean POA_Messaging::_tao_direct_collocated_ReplyHandler::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - return this->servant_->_non_existent (ACE_TRY_ENV); -} - -#endif /* TAO_HAS_AMI_CALLBACK == 1 || TAO_HAS_AMI_POLLER == 1 */ - -#endif /* TAO_HAS_CORBA_MESSAGING == 1 */ diff --git a/TAO/tao/MessagingS.h b/TAO/tao/MessagingS.h deleted file mode 100644 index 919d32da5f0..00000000000 --- a/TAO/tao/MessagingS.h +++ /dev/null @@ -1,215 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_ORIG_MESSAGINGS_H_ -#define _TAO_IDL_ORIG_MESSAGINGS_H_ - -#include "ace/pre.h" - -#include "orbconf.h" - -#if (TAO_HAS_CORBA_MESSAGING == 1) - -#include "TimeBaseS.h" -#include "MessagingC.h" -#include "PortableServerC.h" -#include "Servant_Base.h" - - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -TAO_NAMESPACE POA_Messaging -{ - -#if (TAO_HAS_AMI_CALLBACK == 1) - - class ReplyHandler; - typedef ReplyHandler *ReplyHandler_ptr; - class TAO_Export ReplyHandler : public virtual PortableServer::ServantBase - { - protected: - ReplyHandler (void); - - public: - ReplyHandler (const ReplyHandler& rhs); - virtual ~ReplyHandler (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - ::Messaging::ReplyHandler *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - - }; - - -#if !defined (_MESSAGING_REPLYHANDLER___THRU_POA_COLLOCATED_SH_) -#define _MESSAGING_REPLYHANDLER___THRU_POA_COLLOCATED_SH_ - - class TAO_Export _tao_thru_poa_collocated_ReplyHandler : public virtual ::Messaging::ReplyHandler - { - public: - _tao_thru_poa_collocated_ReplyHandler ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - }; - - -#endif /* end #if !defined */ - - -#if !defined (_MESSAGING_REPLYHANDLER___DIRECT_COLLOCATED_SH_) -#define _MESSAGING_REPLYHANDLER___DIRECT_COLLOCATED_SH_ - - class TAO_Export _tao_direct_collocated_ReplyHandler : public virtual Messaging::ReplyHandler - { - public: - _tao_direct_collocated_ReplyHandler ( - ReplyHandler_ptr servant, - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - ReplyHandler_ptr _get_servant (void) const; - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - - private: - ReplyHandler_ptr servant_; - }; - - -#endif /* end #if !defined */ - - -#if defined (ACE_HAS_USING_KEYWORD) - // TIE class: Refer to CORBA v2.2, Section 20.34.4 - template - class TAO_Export ReplyHandler_tie : public ReplyHandler - { - public: - ReplyHandler_tie (T &t); - // the T& ctor - ReplyHandler_tie (T &t, PortableServer::POA_ptr poa); - // ctor taking a POA - ReplyHandler_tie (T *tp, CORBA::Boolean release=1); - // ctor taking pointer and an ownership flag - ReplyHandler_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release=1); - // ctor with T*, ownership flag and a POA - ~ReplyHandler_tie (void); - // dtor - - // TIE specific functions - T *_tied_object (void); - // return the underlying object - void _tied_object (T &obj); - // set the underlying object - void _tied_object (T *obj, CORBA::Boolean release=1); - // set the underlying object and the ownership flag - CORBA::Boolean _is_owner (void); - // do we own it - void _is_owner (CORBA::Boolean b); - // set the ownership - - // overridden ServantBase operations - PortableServer::POA_ptr _default_POA ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); -private: - T *ptr_; - PortableServer::POA_var poa_; - CORBA::Boolean rel_; - - // copy and assignment are not allowed - ReplyHandler_tie (const ReplyHandler_tie &); - void operator= (const ReplyHandler_tie &); - }; - -#endif /* ACE_HAS_USING_KEYWORD */ - -#endif /* TAO_HAS_AMI_CALLBACK == 1 */ - -} -TAO_NAMESPACE_CLOSE - -#include "MessagingS_T.h" - -#if defined (__ACE_INLINE__) -#include "MessagingS.i" -#endif /* defined INLINE */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#endif /* TAO_HAS_CORBA_MESSAGING == 1 */ - -#include "ace/post.h" -#endif /* ifndef */ diff --git a/TAO/tao/MessagingS.i b/TAO/tao/MessagingS.i deleted file mode 100644 index d41d475fa1a..00000000000 --- a/TAO/tao/MessagingS.i +++ /dev/null @@ -1,9 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - diff --git a/TAO/tao/MessagingS_T.cpp b/TAO/tao/MessagingS_T.cpp deleted file mode 100644 index 44b2c4f35cb..00000000000 --- a/TAO/tao/MessagingS_T.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_ORIG_MESSAGINGS_T_CPP_ -#define _TAO_IDL_ORIG_MESSAGINGS_T_CPP_ - -#include "MessagingS_T.h" - -#if !defined (__ACE_INLINE__) -#include "MessagingS_T.i" -#endif /* !defined INLINE */ - - -#endif /* ifndef */ diff --git a/TAO/tao/MessagingS_T.h b/TAO/tao/MessagingS_T.h deleted file mode 100644 index 11c18ac244b..00000000000 --- a/TAO/tao/MessagingS_T.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_ORIG_MESSAGINGS_T_H_ -#define _TAO_IDL_ORIG_MESSAGINGS_T_H_ - -#include "ace/pre.h" -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - - -#if defined (__ACE_INLINE__) -#include "MessagingS_T.i" -#endif /* defined INLINE */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "MessagingS_T.cpp" -#endif /* defined REQUIRED SOURCE */ - - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("MessagingS_T.cpp") -#endif /* defined REQUIRED PRAGMA */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#include "ace/post.h" -#endif /* ifndef */ diff --git a/TAO/tao/MessagingS_T.i b/TAO/tao/MessagingS_T.i deleted file mode 100644 index e14ce71aea7..00000000000 --- a/TAO/tao/MessagingS_T.i +++ /dev/null @@ -1,91 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - - -#if (TAO_HAS_AMI_CALLBACK == 1) -#if defined (ACE_HAS_USING_KEYWORD) -template ACE_INLINE -POA_Messaging::ReplyHandler_tie::ReplyHandler_tie (T &t) - : ptr_ (&t), - poa_ (PortableServer::POA::_nil ()), - rel_ (0) -{} - -template ACE_INLINE -POA_Messaging::ReplyHandler_tie::ReplyHandler_tie (T &t, PortableServer::POA_ptr poa) - : ptr_ (&t), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (0) -{} - -template ACE_INLINE -POA_Messaging::ReplyHandler_tie::ReplyHandler_tie (T *tp, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_nil ()), - rel_ (release) -{} - -template ACE_INLINE -POA_Messaging::ReplyHandler_tie::ReplyHandler_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (release) -{} - -template ACE_INLINE -POA_Messaging::ReplyHandler_tie::~ReplyHandler_tie (void) -{ - if (this->rel_) delete this->ptr_; -} - -template ACE_INLINE T * -POA_Messaging::ReplyHandler_tie::_tied_object (void) -{ - return this->ptr_; -} - -template ACE_INLINE void -POA_Messaging::ReplyHandler_tie::_tied_object (T &obj) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = &obj; - this->rel_ = 0; -} - -template ACE_INLINE void -POA_Messaging::ReplyHandler_tie::_tied_object (T *obj, CORBA::Boolean release) -{ - if (this->rel_) delete this->ptr_; - this->ptr_ = obj; - this->rel_ = release; -} - -template ACE_INLINE CORBA::Boolean -POA_Messaging::ReplyHandler_tie::_is_owner (void) -{ - return this->rel_; -} - -template ACE_INLINE void -POA_Messaging::ReplyHandler_tie::_is_owner (CORBA::Boolean b) -{ - this->rel_ = b; -} - -template ACE_INLINE PortableServer::POA_ptr -POA_Messaging::ReplyHandler_tie::_default_POA (CORBA::Environment &ACE_TRY_ENV) -{ - if (!CORBA::is_nil (this->poa_.in ())) - return PortableServer::POA::_duplicate (this->poa_.in ()); - - return this->ReplyHandler::_default_POA (ACE_TRY_ENV); -} - -#endif /* ACE_HAS_USING_KEYWORD */ -#endif /* TAO_HAS_AMI_CALLBACK == 1 */ diff --git a/TAO/tao/Object_Adapter.cpp b/TAO/tao/Object_Adapter.cpp deleted file mode 100644 index bad62d109da..00000000000 --- a/TAO/tao/Object_Adapter.cpp +++ /dev/null @@ -1,1441 +0,0 @@ -// $Id$ - -#include "tao/Object_Adapter.h" -#include "tao/POA.h" -#include "tao/ORB.h" -#include "tao/ORB_Core.h" -#include "tao/Server_Request.h" -#include "ace/Auto_Ptr.h" - -#if !defined (__ACE_INLINE__) -# include "tao/Object_Adapter.i" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(tao, Object_Adapter, "$Id$") - -// Timeprobes class -#include "tao/Timeprobe.h" - -#if defined (ACE_ENABLE_TIMEPROBES) - -static const char *TAO_Object_Adapter_Timeprobe_Description[] = -{ - "Object_Adapter::dispatch_servant - start", - "Object_Adapter::dispatch_servant - end", - - "POA::parse_key - start", - "POA::parse_key - end", - - "Object_Adapter::find_poa - start", - "Object_Adapter::find_poa - end", - - "POA::locate_servant - start", - "POA::locate_servant - end", - - "Servant::_dispatch - start", - "Servant::_dispatch - end", -}; - -enum -{ - // Timeprobe description table start key - TAO_OBJECT_ADAPTER_DISPATCH_SERVANT_START = 200, - TAO_OBJECT_ADAPTER_DISPATCH_SERVANT_END, - - TAO_POA_PARSE_KEY_START, - TAO_POA_PARSE_KEY_END, - - TAO_OBJECT_ADAPTER_FIND_POA_START, - TAO_OBJECT_ADAPTER_FIND_POA_END, - - TAO_POA_LOCATE_SERVANT_START, - TAO_POA_LOCATE_SERVANT_END, - - TAO_SERVANT_DISPATCH_START, - TAO_SERVANT_DISPATCH_END -}; - -// Setup Timeprobes -ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Object_Adapter_Timeprobe_Description, - TAO_OBJECT_ADAPTER_DISPATCH_SERVANT_START); - -#endif /* ACE_ENABLE_TIMEPROBES */ - -/* static */ -size_t TAO_Object_Adapter::transient_poa_name_size_ = 0; - -void -TAO_Object_Adapter::set_transient_poa_name_size (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters) -{ - if (TAO_Object_Adapter::transient_poa_name_size_ == 0) - { - switch (creation_parameters.poa_lookup_strategy_for_transient_id_policy_) - { -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - case TAO_LINEAR: - TAO_Object_Adapter::transient_poa_name_size_ = - sizeof (CORBA::ULong); - break; - case TAO_DYNAMIC_HASH: - TAO_Object_Adapter::transient_poa_name_size_ = - sizeof (CORBA::ULong); - break; -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - case TAO_ACTIVE_DEMUX: - default: - TAO_Object_Adapter::transient_poa_name_size_ = - ACE_Active_Map_Manager_Key::size (); - break; - } - } -} - -TAO_Object_Adapter::TAO_Object_Adapter (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters, - TAO_ORB_Core &orb_core) - : hint_strategy_ (0), - persistent_poa_name_map_ (0), - transient_poa_map_ (0), - orb_core_ (orb_core), - enable_locking_ (orb_core_.server_factory ()->enable_poa_locking ()), - thread_lock_ (), - lock_ (TAO_Object_Adapter::create_lock (enable_locking_, - thread_lock_)), - reverse_lock_ (*lock_), - non_servant_upcall_condition_ (thread_lock_), - non_servant_upcall_in_progress_ (0), - non_servant_upcall_thread_ (ACE_OS::NULL_thread) -{ - TAO_Object_Adapter::set_transient_poa_name_size (creation_parameters); - - Hint_Strategy *hint_strategy = 0; - if (creation_parameters.use_active_hint_in_poa_names_) - ACE_NEW (hint_strategy, - Active_Hint_Strategy (creation_parameters.poa_map_size_)); - else - ACE_NEW (hint_strategy, - No_Hint_Strategy); - - // Give ownership to the auto pointer. - auto_ptr new_hint_strategy (hint_strategy); - - new_hint_strategy->object_adapter (this); - - persistent_poa_name_map *ppnm; - switch (creation_parameters.poa_lookup_strategy_for_persistent_id_policy_) - { - case TAO_LINEAR: -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - ACE_NEW (ppnm, - persistent_poa_name_linear_map (creation_parameters.poa_map_size_)); - - break; -#else - ACE_ERROR ((LM_ERROR, - "linear option for -ORBPersistentidPolicyDemuxStrategy " - "not supported with minimum POA maps. " - "Ingoring option to use default... \n")); - /* FALL THROUGH */ -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - case TAO_DYNAMIC_HASH: - default: - ACE_NEW (ppnm, - persistent_poa_name_hash_map (creation_parameters.poa_map_size_)); - break; - } - // Give ownership to the auto pointer. - auto_ptr new_persistent_poa_name_map (ppnm); - - transient_poa_map *tpm = 0; - switch (creation_parameters.poa_lookup_strategy_for_transient_id_policy_) - { -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - case TAO_LINEAR: - ACE_NEW (tpm, - transient_poa_linear_map (creation_parameters.poa_map_size_)); - break; - case TAO_DYNAMIC_HASH: - ACE_NEW (tpm, - transient_poa_hash_map (creation_parameters.poa_map_size_)); - break; -#else - case TAO_LINEAR: - case TAO_DYNAMIC_HASH: - ACE_ERROR ((LM_ERROR, - "linear and dynamic options for -ORBTransientidPolicyDemuxStrategy " - "are not supported with minimum POA maps. " - "Ingoring option to use default... \n")); - /* FALL THROUGH */ -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - case TAO_ACTIVE_DEMUX: - default: - ACE_NEW (tpm, - transient_poa_active_map (creation_parameters.poa_map_size_)); - break; - } - // Give ownership to the auto pointer. - auto_ptr new_transient_poa_map (tpm); - - this->hint_strategy_ = - new_hint_strategy.release (); - this->persistent_poa_name_map_ = - new_persistent_poa_name_map.release (); - this->transient_poa_map_ = - new_transient_poa_map.release (); -} - -TAO_Object_Adapter::~TAO_Object_Adapter (void) -{ - delete this->hint_strategy_; - delete this->persistent_poa_name_map_; - delete this->transient_poa_map_; - delete this->lock_; -} - -/* static */ -ACE_Lock * -TAO_Object_Adapter::create_lock (int enable_locking, - ACE_SYNCH_MUTEX &thread_lock) -{ -#if defined (ACE_HAS_THREADS) - if (enable_locking) - { - ACE_Lock *the_lock; - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter (thread_lock), - 0); - return the_lock; - } -#else - ACE_UNUSED_ARG (enable_locking); - ACE_UNUSED_ARG (thread_lock); -#endif /* ACE_HAS_THREADS */ - - ACE_Lock *the_lock; - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter (), - 0); - return the_lock; -} - -void -TAO_Object_Adapter::dispatch_servant (const TAO_ObjectKey &key, - CORBA::ServerRequest &req, - void *context, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_FUNCTION_TIMEPROBE (TAO_OBJECT_ADAPTER_DISPATCH_SERVANT_START); - - // This object is magical, i.e., it has a non-trivial constructor - // and destructor. - Servant_Upcall servant_upcall (*this); - - // Set up state in the POA et al (including the POA Current), so - // that we know that this servant is currently in an upcall. - const char *operation = req.operation (); - servant_upcall.prepare_for_upcall (key, - operation, - ACE_TRY_ENV); - ACE_CHECK; - -#if (TAO_HAS_RT_CORBA == 1) - - // RTCORBA PriorityModelPolicy processing (may need to be - // moved/adjusted when POA threadpools are added). - // This is the earliest place we can do the processing, since only - // at this point we know the target POA. - - Priority_Model_Processing priority_processing (servant_upcall.poa ()); - - // Set thread's priority. - priority_processing.pre_invoke (req.service_info (), ACE_TRY_ENV); - ACE_CHECK; - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - // Servant dispatch. - { - ACE_FUNCTION_TIMEPROBE (TAO_SERVANT_DISPATCH_START); - - servant_upcall.servant ()->_dispatch (req, - context, - ACE_TRY_ENV); - ACE_CHECK; - } - -#if (TAO_HAS_RT_CORBA == 1) - - // Reset thread's priority to its original value. If this method - // isn't reached, i.e., because of an exception, the reset takes - // place in Priority_Model_Processing destructor. - priority_processing.post_invoke (ACE_TRY_ENV); - ACE_CHECK; - -#endif /* TAO_HAS_RT_CORBA == 1 */ -} - -void -TAO_Object_Adapter::locate_poa (const TAO_ObjectKey &key, - PortableServer::ObjectId &system_id, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Object_Adapter::poa_name poa_system_name; - CORBA::Boolean is_root = 0; - CORBA::Boolean is_persistent = 0; - CORBA::Boolean is_system_id = 0; - TAO_Temporary_Creation_Time poa_creation_time; - - int result = 0; - - { - ACE_FUNCTION_TIMEPROBE (TAO_POA_PARSE_KEY_START); - - result = TAO_POA::parse_key (key, - poa_system_name, - system_id, - is_root, - is_persistent, - is_system_id, - poa_creation_time); - } - - if (result != 0) - ACE_THROW (CORBA::OBJ_ADAPTER ()); - - { - ACE_FUNCTION_TIMEPROBE (TAO_OBJECT_ADAPTER_FIND_POA_START); - - result = this->find_poa (poa_system_name, - is_persistent, - is_root, - poa_creation_time, - poa, - ACE_TRY_ENV); - ACE_CHECK; - } - - if (result != 0) - ACE_THROW (CORBA::OBJECT_NOT_EXIST ()); -} - -int -TAO_Object_Adapter::activate_poa (const poa_name &folded_name, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV) -{ - int result = -1; - -#if (TAO_HAS_MINIMUM_POA == 0) - - // A recursive thread lock without using a recursive thread lock. - // Non_Servant_Upcall has a magic constructor and destructor. We - // unlock the Object_Adapter lock for the duration of the adapter - // activator(s) upcalls; reacquiring once the upcalls complete. - // Even though we are releasing the lock, other threads will not be - // able to make progress since - // has been set. - Non_Servant_Upcall non_servant_upcall (*this); - ACE_UNUSED_ARG (non_servant_upcall); - - iteratable_poa_name ipn (folded_name); - iteratable_poa_name::iterator iterator = ipn.begin (); - iteratable_poa_name::iterator end = ipn.end (); - - TAO_POA *parent = this->orb_core_.root_poa (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - if (parent->name () != *iterator) - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - -1); - else - ++iterator; - - for (; - iterator != end; - ++iterator) - { - TAO_POA *current = 0; - - ACE_TRY - { - current = parent->find_POA_i (*iterator, - 1, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCH (PortableServer::POA::AdapterNonExistent, ex) - { - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); - - parent = current; - } - - poa = parent; - result = 0; -#else - ACE_UNUSED_ARG (folded_name); - ACE_UNUSED_ARG (poa); - ACE_UNUSED_ARG (ACE_TRY_ENV); -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - return result; -} - -int -TAO_Object_Adapter::find_transient_poa (const poa_name &system_name, - CORBA::Boolean root, - const TAO_Temporary_Creation_Time &poa_creation_time, - TAO_POA *&poa, - CORBA::Environment &ACE_TRY_ENV) -{ - int result = 0; - - if (root) - { - poa = this->orb_core_.root_poa (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - } - else - { - result = this->transient_poa_map_->find (system_name, - poa); - } - - if (result == 0 && poa->creation_time () != poa_creation_time) - result = -1; - - return result; -} - -int -TAO_Object_Adapter::bind_poa (const poa_name &folded_name, - TAO_POA *poa, - poa_name_out system_name) -{ - if (poa->persistent ()) - return this->bind_persistent_poa (folded_name, - poa, - system_name); - else - return this->bind_transient_poa (poa, - system_name); -} - -int -TAO_Object_Adapter::unbind_poa (TAO_POA *poa, - const poa_name &folded_name, - const poa_name &system_name) -{ - if (poa->persistent ()) - return this->unbind_persistent_poa (folded_name, - system_name); - else - return this->unbind_transient_poa (system_name); -} - -int -TAO_Object_Adapter::locate_servant_i (const TAO_ObjectKey &key, - CORBA::Environment &ACE_TRY_ENV) -{ - PortableServer::ObjectId id; - TAO_POA *poa = 0; - - this->locate_poa (key, - id, - poa, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - PortableServer::Servant servant = 0; - TAO_SERVANT_LOCATION servant_location = - poa->locate_servant_i (id, - servant, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - switch (servant_location) - { - case TAO_SERVANT_FOUND: - // Optimistic attitude - case TAO_DEFAULT_SERVANT: - case TAO_SERVANT_MANAGER: - return 0; - - case TAO_SERVANT_NOT_FOUND: - return -1; - } - - return -1; -} - -TAO_SERVANT_LOCATION -TAO_Object_Adapter::find_servant_i (const TAO_ObjectKey &key, - PortableServer::Servant &servant, - CORBA::Environment &ACE_TRY_ENV) -{ - PortableServer::ObjectId id; - TAO_POA *poa = 0; - - this->locate_poa (key, - id, - poa, - ACE_TRY_ENV); - ACE_CHECK_RETURN (TAO_SERVANT_NOT_FOUND); - - TAO_SERVANT_LOCATION servant_location = poa->locate_servant_i (id, - servant, - ACE_TRY_ENV); - ACE_CHECK_RETURN (TAO_SERVANT_NOT_FOUND); - - return servant_location; -} - -TAO_Object_Adapter::Hint_Strategy::~Hint_Strategy (void) -{ -} - -void -TAO_Object_Adapter::Hint_Strategy::object_adapter (TAO_Object_Adapter *oa) -{ - this->object_adapter_ = oa; -} - -TAO_Object_Adapter::Active_Hint_Strategy::Active_Hint_Strategy (CORBA::ULong map_size) - : persistent_poa_system_map_ (map_size) -{ -} - -TAO_Object_Adapter::Active_Hint_Strategy::~Active_Hint_Strategy (void) -{ -} - -int -TAO_Object_Adapter::Active_Hint_Strategy::find_persistent_poa (const poa_name &system_name, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV) -{ - poa_name folded_name; - int result = this->persistent_poa_system_map_.recover_key (system_name, - folded_name); - - if (result == 0) - { - result = this->persistent_poa_system_map_.find (system_name, - poa); - if (result != 0 - || folded_name != poa->folded_name ()) - { - result = this->object_adapter_->persistent_poa_name_map_->find (folded_name, - poa); - if (result != 0) - { - result = this->object_adapter_->activate_poa (folded_name, - poa, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - } - } - } - - return result; -} - -int -TAO_Object_Adapter::Active_Hint_Strategy::bind_persistent_poa (const poa_name &folded_name, - TAO_POA *poa, - poa_name_out system_name) -{ - poa_name name = folded_name; - int result = this->persistent_poa_system_map_.bind_modify_key (poa, - name); - - if (result == 0) - { - result = - this->object_adapter_->persistent_poa_name_map_->bind (folded_name, - poa); - - if (result != 0) - this->persistent_poa_system_map_.unbind (name); - else - ACE_NEW_RETURN (system_name, - poa_name (name), - -1); - } - - return result; -} - -int -TAO_Object_Adapter::Active_Hint_Strategy::unbind_persistent_poa (const poa_name &folded_name, - const poa_name &system_name) -{ - int result = this->persistent_poa_system_map_.unbind (system_name); - - if (result == 0) - result = - this->object_adapter_->persistent_poa_name_map_->unbind (folded_name); - - return result; -} - -TAO_Object_Adapter::No_Hint_Strategy::~No_Hint_Strategy (void) -{ -} - -int -TAO_Object_Adapter::No_Hint_Strategy::find_persistent_poa (const poa_name &system_name, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV) -{ - int result = this->object_adapter_->persistent_poa_name_map_->find (system_name, - poa); - if (result != 0) - { - result = - this->object_adapter_->activate_poa (system_name, - poa, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - } - - return result; -} - -int -TAO_Object_Adapter::No_Hint_Strategy::bind_persistent_poa (const poa_name &folded_name, - TAO_POA *poa, - poa_name_out system_name) -{ - int result = - this->object_adapter_->persistent_poa_name_map_->bind (folded_name, - poa); - if (result == 0) - ACE_NEW_RETURN (system_name, - poa_name (folded_name), - -1); - return result; -} - -int -TAO_Object_Adapter::No_Hint_Strategy::unbind_persistent_poa (const poa_name &folded_name, - const poa_name &system_name) -{ - ACE_UNUSED_ARG (system_name); - - return this->object_adapter_->persistent_poa_name_map_->unbind (folded_name); -} - -TAO_Object_Adapter::poa_name_iterator::poa_name_iterator (int begin, - CORBA::ULong size, - const CORBA::Octet *folded_buffer) - : size_ (size), - folded_buffer_ (folded_buffer), - last_separator_ ((CORBA::ULong) ~0) -{ - if (begin) - { - this->position_ = (CORBA::ULong) ~0; - this->operator++ (); - } - else - this->position_ = this->size_; -} - -int -TAO_Object_Adapter::poa_name_iterator::operator== (const poa_name_iterator &rhs) const -{ - return this->position_ == rhs.position_; -} - -int -TAO_Object_Adapter::poa_name_iterator::operator!= (const poa_name_iterator &rhs) const -{ - return !this->operator== (rhs); -} - -ACE_CString -TAO_Object_Adapter::poa_name_iterator::operator* () const -{ - CORBA::ULong start_at = - this->last_separator_ + - TAO_POA::name_separator_length (); - - CORBA::ULong how_many = - this->position_ - - this->last_separator_ - - TAO_POA::name_separator_length (); - - return ACE_CString (ACE_reinterpret_cast (const char *, - &this->folded_buffer_[start_at]), - how_many); -} - -TAO_Object_Adapter::poa_name_iterator & -TAO_Object_Adapter::poa_name_iterator::operator++ (void) -{ - for (this->last_separator_ = this->position_; - ; - ) - { - ++this->position_; - if (this->position_ < this->size_) - { - if (this->folded_buffer_[this->position_] == TAO_POA::name_separator ()) - break; - } - else - break; - } - - return *this; -} - -TAO_Object_Adapter::iteratable_poa_name::iteratable_poa_name (const poa_name &folded_name) - : folded_name_ (folded_name) -{ -} - -TAO_Object_Adapter::iteratable_poa_name::iterator -TAO_Object_Adapter::iteratable_poa_name::begin (void) const -{ - return iterator (1, - this->folded_name_.length (), - this->folded_name_.get_buffer ()); -} - -TAO_Object_Adapter::iteratable_poa_name::iterator -TAO_Object_Adapter::iteratable_poa_name::end (void) const -{ - return iterator (0, - this->folded_name_.length (), - this->folded_name_.get_buffer ()); -} - -TAO_Object_Adapter::Non_Servant_Upcall::Non_Servant_Upcall (TAO_Object_Adapter &object_adapter) - : object_adapter_ (object_adapter) -{ - // Mark the fact that a non-servant upcall is in progress. - this->object_adapter_.non_servant_upcall_in_progress_ = 1; - - // Remember which thread is calling the adapter activators. - this->object_adapter_.non_servant_upcall_thread_ = ACE_OS::thr_self (); - - // Release the Object Adapter lock. - this->object_adapter_.lock ().release (); -} - -TAO_Object_Adapter::Non_Servant_Upcall::~Non_Servant_Upcall (void) -{ - // Reacquire the Object Adapter lock. - this->object_adapter_.lock ().acquire (); - - // We are no longer in a non-servant upcall. - this->object_adapter_.non_servant_upcall_in_progress_ = 0; - - // Reset thread id. - this->object_adapter_.non_servant_upcall_thread_ = - ACE_OS::NULL_thread; - - // If locking is enabled. - if (this->object_adapter_.enable_locking_) - // Wakeup all waiting threads. - this->object_adapter_.non_servant_upcall_condition_.broadcast (); -} - -TAO_Object_Adapter::Servant_Upcall::Servant_Upcall (TAO_Object_Adapter &object_adapter) - : object_adapter_ (object_adapter), - poa_ (0), - servant_ (0), - state_ (INITIAL_STAGE), - id_ (), - current_context_ (), -#if (TAO_HAS_MINIMUM_POA == 0) - cookie_ (0), - operation_ (0), -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - active_object_map_entry_ (0), - using_servant_locator_ (0) -{ -} - -void -TAO_Object_Adapter::Servant_Upcall::prepare_for_upcall (const TAO_ObjectKey &key, - const char *operation, - CORBA::Environment &ACE_TRY_ENV) -{ - // Acquire the object adapter lock first. - int result = this->object_adapter_.lock ().acquire (); - if (result == -1) - // Locking error. - ACE_THROW (CORBA::OBJ_ADAPTER ()); - - // We have acquired the object adapater lock. Record this for later - // use. - this->state_ = OBJECT_ADAPTER_LOCK_ACQUIRED; - - // Check if a non-servant upcall is in progress. If a non-servant - // upcall is in progress, wait for it to complete. Unless of - // course, the thread making the non-servant upcall is this thread. - this->object_adapter_.wait_for_non_servant_upcalls_to_complete (ACE_TRY_ENV); - ACE_CHECK; - - // Locate the POA. - this->object_adapter_.locate_poa (key, - this->id_, - this->poa_, - ACE_TRY_ENV); - ACE_CHECK; - - // Check the state of the POA Manager. - this->poa_->check_poa_manager_state (ACE_TRY_ENV); - ACE_CHECK; - - // Setup current for this request. - this->current_context_.setup (this->poa_, - key); - - // We have setup the POA Current. Record this for later use. - this->state_ = POA_CURRENT_SETUP; - - { - ACE_FUNCTION_TIMEPROBE (TAO_POA_LOCATE_SERVANT_START); - - // Lookup the servant. - this->servant_ = this->poa_->locate_servant_i (operation, - this->id_, - *this, - this->current_context_, - ACE_TRY_ENV); - ACE_CHECK; - } - - // Now that we know the servant. - this->current_context_.servant (this->servant_); - - if (this->active_object_map_entry ()) - this->current_context_.priority (this->active_object_map_entry ()->priority_); - - // Increase outstanding_requests_> for the duration of the - // upcall. - // - // Note that the object adapter lock is released after - // is increased. - this->poa_->increment_outstanding_requests (); - - // Release the object adapter lock. - this->object_adapter_.lock ().release (); - - // We have release the object adapater lock. Record this for later - // use. - this->state_ = OBJECT_ADAPTER_LOCK_RELEASED; - - // Lock servant (if appropriate). - this->single_threaded_poa_setup (ACE_TRY_ENV); - ACE_CHECK; - - // We have acquired the servant lock. Record this for later use. - this->state_ = SERVANT_LOCK_ACQUIRED; - - // After this point, servant_> is ready for dispatching. -} - -TAO_Object_Adapter::Servant_Upcall::~Servant_Upcall () -{ - switch (this->state_) - { - case SERVANT_LOCK_ACQUIRED: - // Unlock servant (if appropriate). - this->single_threaded_poa_cleanup (); - /* FALLTHRU */ - - case OBJECT_ADAPTER_LOCK_RELEASED: - // Cleanup servant locator related state. Note that because - // this operation does not change any Object Adapter related - // state, it is ok to call it outside the lock. - this->servant_locator_cleanup (); - - // Since the object adapter lock was released, we must acquire - // it. - // - // Note that errors are ignored here since we cannot do much - // with it. - this->object_adapter_.lock ().acquire (); - - // Cleanup servant related state. - this->servant_cleanup (); - - // Cleanup POA related state. - this->poa_cleanup (); - /* FALLTHRU */ - - case POA_CURRENT_SETUP: - // Teardown current for this request. - this->current_context_.teardown (); - /* FALLTHRU */ - - case OBJECT_ADAPTER_LOCK_ACQUIRED: - // Finally, since the object adapter lock was acquired, we must - // release it. - this->object_adapter_.lock ().release (); - - /* FALLTHRU */ - case INITIAL_STAGE: - default: - // @@ Keep compiler happy, the states above are the only - // possible ones. - break; - } -} - -void -TAO_Object_Adapter::wait_for_non_servant_upcalls_to_complete (CORBA::Environment &ACE_TRY_ENV) -{ - // Check if a non-servant upcall is in progress. If a non-servant - // upcall is in progress, wait for it to complete. Unless of - // course, the thread making the non-servant upcall is this thread. - while (this->enable_locking_ && - this->non_servant_upcall_in_progress_ && - ! ACE_OS::thr_equal (this->non_servant_upcall_thread_, - ACE_OS::thr_self ())) - { - // If so wait... - int result = - this->non_servant_upcall_condition_.wait (); - if (result == -1) - ACE_THROW (CORBA::OBJ_ADAPTER ()); - } -} - -void -TAO_Object_Adapter::Servant_Upcall::servant_locator_cleanup (void) -{ -#if (TAO_HAS_MINIMUM_POA == 0) - - if (this->using_servant_locator_) - { - // If we are a single threaded POA, teardown the appropriate - // locking in the servant. - // - // Note that teardown of the servant lock must happen before the - // post_invoke() call since that might end up deleting the - // servant. - // - this->poa_->teardown_servant_lock (this->servant_); - - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - this->poa_->servant_locator_->postinvoke (this->current_context_.object_id (), - this->poa_, - this->operation_, - this->cookie_, - this->servant_ - TAO_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // Ignore errors from servant locator .... - } - ACE_ENDTRY; - } - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ -} - -void -TAO_Object_Adapter::Servant_Upcall::single_threaded_poa_setup (CORBA::Environment &ACE_TRY_ENV) -{ -#if (TAO_HAS_MINIMUM_POA == 0) - - // Lock servant (if necessary). - // - // Note that this lock must be acquired *after* the object adapter - // lock has been released. This is necessary since we cannot block - // waiting for the servant lock while holding the object adapter - // lock. Otherwise, the thread that wants to release this lock will - // not be able to do so since it can't acquire the object adapterx - // lock. - if (this->poa_->policies ().thread () == PortableServer::SINGLE_THREAD_MODEL) - { - int result = this->servant_->_single_threaded_poa_lock ().acquire (); - - if (result == -1) - // Locking error. - ACE_THROW (CORBA::OBJ_ADAPTER ()); - } -#else - ACE_UNUSED_ARG (ACE_TRY_ENV); -#endif /* !TAO_HAS_MINIMUM_POA == 0 */ -} - -void -TAO_Object_Adapter::Servant_Upcall::single_threaded_poa_cleanup (void) -{ - // Since the servant lock was acquired, we must release it. -#if (TAO_HAS_MINIMUM_POA == 0) - if (this->poa_->policies ().thread () == PortableServer::SINGLE_THREAD_MODEL) - this->servant_->_single_threaded_poa_lock ().release (); -#endif /* TAO_HAS_MINIMUM_POA == 0 */ -} - -void -TAO_Object_Adapter::Servant_Upcall::servant_cleanup (void) -{ - // Cleanup servant related stuff. - if (this->active_object_map_entry_ != 0) - { - // Decrement the reference count. - CORBA::UShort new_count = --this->active_object_map_entry_->reference_count_; - - if (new_count == 0) - { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - this->poa_->cleanup_servant (this->active_object_map_entry_, - ACE_TRY_ENV); - - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // Ignore errors from servant cleanup .... - } - ACE_ENDTRY; - - if (this->poa_->waiting_servant_deactivation_ > 0 && - this->object_adapter_.enable_locking_) - { - // Wakeup all waiting threads. - this->poa_->servant_deactivation_condition_.broadcast (); - } - } - } -} - -void -TAO_Object_Adapter::Servant_Upcall::poa_cleanup (void) -{ - // Decrease outstanding_requests_> now that the upcall - // is complete. - // - // Note that the object adapter lock is acquired before - // is increased. - CORBA::ULong outstanding_requests = - this->poa_->decrement_outstanding_requests (); - - // Check if all pending requests are over. - if (outstanding_requests == 0) - { - // If locking is enabled and some thread is waiting in POA::destroy. - if (this->object_adapter_.enable_locking_ && - this->poa_->wait_for_completion_pending_) - { - // Wakeup all waiting threads. - this->poa_->outstanding_requests_condition_.broadcast (); - } - if (this->poa_->waiting_destruction_) - { - ACE_TRY_NEW_ENV - { - this->poa_->complete_destruction_i (ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // Ignore exceptions - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_POA::~complete_destruction_i"); - } - ACE_ENDTRY; - - this->poa_ = 0; - } - } -} - -#if (TAO_HAS_RT_CORBA == 1) - -TAO_Object_Adapter::Priority_Model_Processing::~Priority_Model_Processing -(void) -{ - if (this->state_ == PRIORITY_RESET_REQUIRED) - { - this->state_ = NO_ACTION_REQUIRED; - - // Reset the priority of the current thread back to its original - // value. - if (poa_.orb_core ().set_thread_priority (this->original_priority_) - == -1) - // At this point we cannot throw an exception. Just log the - // error. - ACE_DEBUG ((LM_ERROR, - ACE_TEXT ("TAO (%P|%t) - Priority_Model_Processing:: ") - ACE_TEXT (" Priority_Model_Processing\n"))); - } -} - -void -TAO_Object_Adapter::Priority_Model_Processing::pre_invoke ( - IOP::ServiceContextList &service_context_list, - CORBA::Environment &ACE_TRY_ENV) -{ - TAO_POA_Policies &poa_policies = this->poa_.policies (); - - // CLIENT_PROPAGATED PriorityModel processing. - if (poa_policies.priority_model () - == TAO_POA_Policies::CLIENT_PROPAGATED - && poa_policies.server_priority () - != TAO_INVALID_PRIORITY) - { - // Remember current thread's priority. - if (poa_.orb_core ().get_thread_priority (this->original_priority_) - == -1) - ACE_THROW (CORBA::DATA_CONVERSION (1, - CORBA::COMPLETED_NO)); - - // Attempt to extract client-propagated priority from the - // ServiceContextList of the request. - RTCORBA::Priority target_priority; - int priority_found = 0; - for (CORBA::ULong i = 0; - i < service_context_list.length () && !priority_found; - ++i) - { - IOP::ServiceContext &context = service_context_list[i]; - - if (context.context_id == IOP::RTCorbaPriority) - { - TAO_InputCDR cdr (ACE_reinterpret_cast - (const char*, - context.context_data.get_buffer ()), - context.context_data.length ()); - - CORBA::Boolean byte_order; - if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) - ACE_THROW (CORBA::MARSHAL ()); - cdr.reset_byte_order (ACE_static_cast(int,byte_order)); - - if ((cdr >> target_priority) == 0) - ACE_THROW (CORBA::MARSHAL ()); - - priority_found = 1; - break; - } - } - - // Use default priority if none came in the request. (Request - // must have come from a non-RT ORB.) - if (!priority_found) - target_priority = poa_policies.server_priority (); - - // Change the priority of the current thread to the - // client-propagated value for the duration of - // request. - if (original_priority_ != target_priority) - { - if (poa_.orb_core ().set_thread_priority (target_priority) == -1) - ACE_THROW (CORBA::DATA_CONVERSION (1, CORBA::COMPLETED_NO)); - - this->state_ = PRIORITY_RESET_REQUIRED; - } - } -} - -void -TAO_Object_Adapter::Priority_Model_Processing::post_invoke ( - CORBA::Environment &ACE_TRY_ENV) -{ - if (this->state_ == PRIORITY_RESET_REQUIRED) - { - this->state_ = NO_ACTION_REQUIRED; - - // Reset the priority of the current thread back to its original - // value. - if (poa_.orb_core ().set_thread_priority (this->original_priority_) - == -1) - ACE_THROW (CORBA::DATA_CONVERSION (1, CORBA::COMPLETED_NO)); - } -} - -#endif /* TAO_HAS_RT_CORBA == 1 */ - -TAO_POA_Current_Impl::TAO_POA_Current_Impl (void) - : poa_ (0), - object_id_ (), - object_key_ (0), - servant_ (0), - priority_ (TAO_INVALID_PRIORITY), - previous_current_impl_ (0), - setup_done_ (0) -{ -} - -void -TAO_POA_Current_Impl::setup (TAO_POA *p, - const TAO_ObjectKey &key) -{ - // Remember information about this upcall. - this->poa_ = p; - this->object_key_ = &key; - - // Set the current context and remember the old one. - this->tss_resources_ = TAO_TSS_RESOURCES::instance (); - - this->previous_current_impl_ = this->tss_resources_->poa_current_impl_; - this->tss_resources_->poa_current_impl_ = this; - - // Setup is complete. - this->setup_done_ = 1; -} - -void -TAO_POA_Current_Impl::teardown (void) -{ - if (this->setup_done_) - { - // Reset the old context. - this->tss_resources_->poa_current_impl_ = this->previous_current_impl_; - } -} - -PortableServer::POA_ptr -TAO_POA_Current_Impl::get_POA (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::Current::NoContext)) -{ - return PortableServer::POA::_duplicate (this->poa_); -} - -PortableServer::ObjectId * -TAO_POA_Current_Impl::get_object_id (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::Current::NoContext)) -{ - PortableServer::ObjectId *objid = 0; - - // Create a new one and pass it back - ACE_NEW_RETURN (objid, - PortableServer::ObjectId (this->object_id_), - 0); - return objid; -} - -TAO_ORB_Core & -TAO_POA_Current_Impl::orb_core (void) const -{ - return this->poa_->orb_core_; -} - -PortableServer::POA_ptr -TAO_POA_Current::get_POA (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::Current::NoContext)) -{ - TAO_POA_Current_Impl *impl = this->implementation (); - - if (impl == 0) - ACE_THROW_RETURN (PortableServer::Current::NoContext (), - 0); - return impl->get_POA (ACE_TRY_ENV); -} - -PortableServer::ObjectId * -TAO_POA_Current::get_object_id (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::Current::NoContext)) -{ - TAO_POA_Current_Impl *impl = this->implementation (); - - if (impl == 0) - ACE_THROW_RETURN (PortableServer::Current::NoContext (), - 0); - return impl->get_object_id (ACE_TRY_ENV); -} - -TAO_POA_Current_Impl * -TAO_POA_Current::implementation (void) -{ - return TAO_TSS_RESOURCES::instance ()->poa_current_impl_; -} - -TAO_POA_Current_Impl * -TAO_POA_Current::implementation (TAO_POA_Current_Impl *new_current) -{ - TAO_TSS_Resources *tss = - TAO_TSS_RESOURCES::instance (); - - TAO_POA_Current_Impl *old = tss->poa_current_impl_; - tss->poa_current_impl_ = new_current; - return old; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -// Common typedefs. -typedef TAO_Object_Adapter::poa_name key; -typedef TAO_POA *value; -typedef ACE_Reverse_Lock REVERSE_LOCK; - -typedef ACE_Pair expanded_value; -typedef ACE_Reference_Pair tao_value_type; -typedef ACE_Equal_To compare_keys; -typedef TAO_ObjectId_Hash hash_key; -typedef ACE_Noop_Key_Generator noop_key_generator; - -template class ACE_Reverse_Lock; -template class ACE_Guard; - -template class auto_ptr; -template class auto_ptr; - -template class ACE_Auto_Basic_Ptr; -template class ACE_Auto_Basic_Ptr; - -template class ACE_Noop_Key_Generator; - -// Common -template class ACE_Reference_Pair; - -// Map and iterator classes. -template class ACE_Map; -template class ACE_Iterator; -template class ACE_Reverse_Iterator; - -// Iterator base classes. -template class ACE_Iterator_Impl; -template class ACE_Reverse_Iterator_Impl; - -// Active Map Manager related. -template class ACE_Pair; -template class ACE_Active_Map_Manager_Adapter; -template class ACE_Active_Map_Manager_Adapter; -template class ACE_Active_Map_Manager_Iterator_Adapter; -template class ACE_Active_Map_Manager_Reverse_Iterator_Adapter; -template class ACE_Active_Map_Manager; -template class ACE_Map_Manager; -template class ACE_Map_Iterator_Base; -template class ACE_Map_Iterator; -template class ACE_Map_Reverse_Iterator; -template class ACE_Map_Entry; - -// Hash Map Manager related. -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) -template class ACE_Hash_Map_Manager_Ex_Adapter; -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ -template class ACE_Hash_Map_Manager_Ex_Adapter; -template class ACE_Hash_Map_Manager_Ex_Iterator_Adapter; -template class ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter; -template class ACE_Hash_Map_Manager_Ex; -template class ACE_Hash_Map_Iterator_Base_Ex; -template class ACE_Hash_Map_Iterator_Ex; -template class ACE_Hash_Map_Reverse_Iterator_Ex; -template class ACE_Hash_Map_Entry; - -// Already in Active_Object_Map.cpp -// template class ACE_Equal_To; - -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) -// Map Manager related. -template class ACE_Map_Manager_Iterator_Adapter; -template class ACE_Map_Manager_Reverse_Iterator_Adapter; -template class ACE_Map_Manager_Adapter; -template class ACE_Map_Manager_Adapter; -template class ACE_Map_Manager; -template class ACE_Map_Iterator_Base; -template class ACE_Map_Iterator; -template class ACE_Map_Reverse_Iterator; -template class ACE_Map_Entry; -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - -template class ACE_Unbounded_Set; -template class ACE_Node; -template class ACE_Unbounded_Set_Iterator; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -// Common typedefs. -typedef TAO_Object_Adapter::poa_name key; -typedef TAO_POA *value; -typedef ACE_Reverse_Lock REVERSE_LOCK; - -typedef ACE_Pair expanded_value; -typedef ACE_Reference_Pair tao_value_type; -typedef ACE_Equal_To compare_keys; -typedef TAO_ObjectId_Hash hash_key; -typedef ACE_Noop_Key_Generator noop_key_generator; - -#pragma instantiate ACE_Reverse_Lock -#pragma instantiate ACE_Guard - -#pragma instantiate auto_ptr -#pragma instantiate auto_ptr - -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Auto_Basic_Ptr - -#pragma instantiate ACE_Noop_Key_Generator - -// Common -#pragma instantiate ACE_Reference_Pair - -// Map and iterator classes. -#pragma instantiate ACE_Map -#pragma instantiate ACE_Iterator -#pragma instantiate ACE_Reverse_Iterator - -// Iterator base classes. -#pragma instantiate ACE_Iterator_Impl -#pragma instantiate ACE_Reverse_Iterator_Impl - -// Active Map Manager related. -#pragma instantiate ACE_Pair -#pragma instantiate ACE_Active_Map_Manager_Adapter -#pragma instantiate ACE_Active_Map_Manager_Adapter -#pragma instantiate ACE_Active_Map_Manager_Iterator_Adapter -#pragma instantiate ACE_Active_Map_Manager_Reverse_Iterator_Adapter -#pragma instantiate ACE_Active_Map_Manager -#pragma instantiate ACE_Map_Manager -#pragma instantiate ACE_Map_Iterator_Base -#pragma instantiate ACE_Map_Iterator -#pragma instantiate ACE_Map_Reverse_Iterator -#pragma instantiate ACE_Map_Entry - -// Hash Map Manager related. -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) -#pragma instantiate ACE_Hash_Map_Manager_Ex_Adapter -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ -#pragma instantiate ACE_Hash_Map_Manager_Ex_Adapter -#pragma instantiate ACE_Hash_Map_Manager_Ex_Iterator_Adapter -#pragma instantiate ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter -#pragma instantiate ACE_Hash_Map_Manager_Ex -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex -#pragma instantiate ACE_Hash_Map_Iterator_Ex -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex -#pragma instantiate ACE_Hash_Map_Entry - -// Already in Active_Object_Map.cpp -// #pragma instantiate ACE_Equal_To - -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) -// Map Manager related. -#pragma instantiate ACE_Map_Manager_Iterator_Adapter -#pragma instantiate ACE_Map_Manager_Reverse_Iterator_Adapter -#pragma instantiate ACE_Map_Manager_Adapter -#pragma instantiate ACE_Map_Manager_Adapter -#pragma instantiate ACE_Map_Manager -#pragma instantiate ACE_Map_Iterator_Base -#pragma instantiate ACE_Map_Iterator -#pragma instantiate ACE_Map_Reverse_Iterator -#pragma instantiate ACE_Map_Entry -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - -#pragma instantiate ACE_Unbounded_Set -#pragma instantiate ACE_Node -#pragma instantiate ACE_Unbounded_Set_Iterator - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/Object_Adapter.h b/TAO/tao/Object_Adapter.h deleted file mode 100644 index 2f9e0f1737d..00000000000 --- a/TAO/tao/Object_Adapter.h +++ /dev/null @@ -1,747 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// Object_Adapter.h -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#ifndef TAO_OBJECT_ADAPTER_H -#define TAO_OBJECT_ADAPTER_H -#include "ace/pre.h" - -#include "tao/Key_Adapters.h" -#include "tao/Server_Strategy_Factory.h" -#include "tao/poa_macros.h" - -// Stubs -#include "tao/PortableServerC.h" - -// Servant -#include "tao/Servant_Base.h" - -// Active Object Table -#include "tao/Active_Object_Map.h" - -// RTCORBA -#include "tao/RTCORBAC.h" - -// Local Object -#include "tao/LocalObject.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -//////////////////////////////////////////////////////////////////////////////// - -// Forward declaration -class TAO_POA; -class TAO_POA_Manager; -class TAO_Temporary_Creation_Time; -class TAO_POA_Current_Impl; -class TAO_TSS_Resources; -class TAO_Transport; - -class TAO_Export TAO_POA_Current : - public PortableServer::Current, - public TAO_Local_RefCounted_Object -{ -public: - TAO_POA_Current (void); - // Constructor - - PortableServer::POA_ptr get_POA (CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::Current::NoContext)); - // Returns the POA on which the current request is being invoked. - // Can raise the exception if this function is - // not invoked in the context of an upcall. - - PortableServer::ObjectId *get_object_id (CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::Current::NoContext)); - // Returns the object id of the current request being invoked. Can - // raise the exception if this function is not - // invoked in the context of an upcall. - - TAO_POA_Current_Impl *implementation (void); - // Returns the class that implements this interface. - - TAO_POA_Current_Impl *implementation (TAO_POA_Current_Impl *new_current); - // Sets the thread-specific pointer to the new POA Current state, - // returning a pointer to the existing POA Current state. -}; - -class TAO_Export TAO_POA_Current_Impl -{ - // = TITLE - // - // Implementation of the PortableServer::Current object. - // - // = DESCRIPTION - // - // Objects of this class hold state information regarding the - // current POA invocation. Savvy readers will notice that this - // contains substantially more methods than the POA spec shows; - // they exist because the ORB either (a) needs them or (b) finds - // them useful for implementing a more efficient ORB. - // - // The intent is that instances of this class are held in - // Thread-Specific Storage so that upcalls can get context - // information regarding their invocation. The POA itself must - // insure that all operations are performed in the - // execution thread so that the proper pointer - // is obtained from TSS. -public: - - friend class TAO_POA; - - PortableServer::POA_ptr get_POA (CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::Current::NoContext)); - // Return pointer to the invoking POA. Raises the - // exception. - - PortableServer::ObjectId *get_object_id (CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::Current::NoContext)); - // Return pointer to the object id through which this was invoked. - // This may be necessary in cases where a is serving under - // the guise of multiple object ids. This has _out semantics Raises - // the exception. - - void poa (TAO_POA *); - // Set the POA implementation. - - TAO_POA *poa (void) const; - // Get the POA imeplemantation - - TAO_ORB_Core &orb_core (void) const; - // ORB Core for this current. - - void object_id (const PortableServer::ObjectId &id); - // Set the object ID. - - const PortableServer::ObjectId &object_id (void) const; - // Get the object ID. - - void object_key (const TAO_ObjectKey &key); - // Set the object key. - - const TAO_ObjectKey &object_key (void) const; - // Get the object key. - - void servant (PortableServer::Servant servant); - // Set the servant for the current upcall. - - PortableServer::Servant servant (void) const; - // Get the servant for the current upcall. - - void priority (CORBA::Short priority); - // Set the priority for the current upcall. - - CORBA::Short priority (void) const; - // Get the priority for the current upcall. - - TAO_POA_Current_Impl (void); - // Convenience constructor combining construction & initialization. - - void teardown (void); - // Teardown the current for this request. - - void setup (TAO_POA *impl, - const TAO_ObjectKey &key); - // Setup the current. - -protected: - TAO_POA *poa_; - // The POA implementation invoking an upcall - - PortableServer::ObjectId object_id_; - // The object ID of the current context. This is the user id and - // not the id the goes into the IOR. Note also that unlike the - // , this field is stored by value. - - const TAO_ObjectKey *object_key_; - // The object key of the current context. - - PortableServer::Servant servant_; - // The servant for the current upcall. - - CORBA::Short priority_; - // The priority for the current upcall. - - TAO_POA_Current_Impl *previous_current_impl_; - // Current previous from . - - int setup_done_; - // Is setup complete? - - TAO_TSS_Resources *tss_resources_; - // Pointer to tss resources. - - // = Hidden because we don't allow these - TAO_POA_Current_Impl (const TAO_POA_Current_Impl &); - void operator= (const TAO_POA_Current_Impl &); -}; - -class TAO_Export TAO_Object_Adapter -{ - // = TITLE - // Defines the Object Adapter abstraction. - // - // = DESCRIPTION - // This class will be used as a facade for the POAs in a server -public: - - friend class TAO_POA; - - typedef PortableServer::ObjectId poa_name; - typedef PortableServer::ObjectId_var poa_name_var; - typedef PortableServer::ObjectId_out poa_name_out; - - TAO_Object_Adapter (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters, - TAO_ORB_Core &orb_core); - // Constructor. - - ~TAO_Object_Adapter (void); - // Destructor. - - void dispatch_servant (const TAO_ObjectKey &key, - CORBA::ServerRequest &req, - void *context, - CORBA_Environment &ACE_TRY_ENV); - - int locate_servant (const TAO_ObjectKey &key, - CORBA_Environment &ACE_TRY_ENV); - - TAO_SERVANT_LOCATION find_servant (const TAO_ObjectKey &key, - PortableServer::Servant &servant, - CORBA_Environment &ACE_TRY_ENV); - - int find_poa (const poa_name &system_name, - CORBA::Boolean activate_it, - CORBA::Boolean root, - const TAO_Temporary_Creation_Time &poa_creation_time, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV); - - int bind_poa (const poa_name &folded_name, - TAO_POA *poa, - poa_name_out system_name); - - int unbind_poa (TAO_POA *poa, - const poa_name &folded_name, - const poa_name &system_name); - - int activate_poa (const poa_name &folded_name, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV); - - ACE_Lock &lock (void); - - ACE_SYNCH_MUTEX &thread_lock (void); - - ACE_Reverse_Lock &reverse_lock (void); - - void wait_for_non_servant_upcalls_to_complete (CORBA::Environment &ACE_TRY_ENV); - - static CORBA::ULong transient_poa_name_size (void); - -protected: - - int locate_servant_i (const TAO_ObjectKey &key, - CORBA_Environment &ACE_TRY_ENV); - - TAO_SERVANT_LOCATION find_servant_i (const TAO_ObjectKey &key, - PortableServer::Servant &servant, - CORBA_Environment &ACE_TRY_ENV); - - void dispatch_servant_i (const TAO_ObjectKey &key, - CORBA::ServerRequest &req, - void *context, - CORBA_Environment &ACE_TRY_ENV); - - void locate_poa (const TAO_ObjectKey &key, - PortableServer::ObjectId &id, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV); - - int find_transient_poa (const poa_name &system_name, - CORBA::Boolean root, - const TAO_Temporary_Creation_Time &poa_creation_time, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV); - - int find_persistent_poa (const poa_name &system_name, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV); - - int bind_transient_poa (TAO_POA *poa, - poa_name_out system_name); - - int bind_persistent_poa (const poa_name &folded_name, - TAO_POA *poa, - poa_name_out system_name); - - int unbind_transient_poa (const poa_name &system_name); - - int unbind_persistent_poa (const poa_name &folded_name, - const poa_name &system_name); - - static ACE_Lock *create_lock (int enable_locking, - ACE_SYNCH_MUTEX &thread_lock); - -public: - - class TAO_Export Hint_Strategy - { - // = TITLE - // Base class for POA active hint strategy. - // - // = DESCRIPTION - // This class also provides for common structures used by all - // the derived classes. - public: - - virtual ~Hint_Strategy (void); - - virtual int find_persistent_poa (const poa_name &system_name, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV) = 0; - - virtual int bind_persistent_poa (const poa_name &folded_name, - TAO_POA *poa, - poa_name_out system_name) = 0; - - virtual int unbind_persistent_poa (const poa_name &folded_name, - const poa_name &system_name) = 0; - - void object_adapter (TAO_Object_Adapter *oa); - - protected: - - TAO_Object_Adapter *object_adapter_; - }; - - class TAO_Export Active_Hint_Strategy : public Hint_Strategy - { - // = TITLE - // This class uses active demux hint for POA active hint - // strategy. - // - // = DESCRIPTION - // This class will append an active hint to the POA name, - // making the POA lookups fast and predictable. - public: - - Active_Hint_Strategy (CORBA::ULong map_size); - - virtual ~Active_Hint_Strategy (void); - - virtual int find_persistent_poa (const poa_name &system_name, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV); - - virtual int bind_persistent_poa (const poa_name &folded_name, - TAO_POA *poa, - poa_name_out system_name); - - virtual int unbind_persistent_poa (const poa_name &folded_name, - const poa_name &system_name); - - protected: - - typedef ACE_Active_Map_Manager_Adapter< - poa_name, - TAO_POA *, - TAO_Preserve_Original_Key_Adapter> persistent_poa_system_map; - - persistent_poa_system_map persistent_poa_system_map_; - }; - - class TAO_Export No_Hint_Strategy : public Hint_Strategy - { - // = TITLE - // This class doesn't use any hints for POA active hint - // strategy. - // - // = DESCRIPTION - // This class will simply use the POA names as is. And since - // no hint is added, the IORs will be smaller. - public: - - virtual ~No_Hint_Strategy (void); - - virtual int find_persistent_poa (const poa_name &system_name, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV); - - virtual int bind_persistent_poa (const poa_name &folded_name, - TAO_POA *poa, - poa_name_out system_name); - - virtual int unbind_persistent_poa (const poa_name &folded_name, - const poa_name &system_name); - - }; - -protected: - - Hint_Strategy *hint_strategy_; - - typedef ACE_Map< - poa_name, - TAO_POA *> transient_poa_map; - // Base class of the id map. - -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - typedef ACE_Hash_Map_Manager_Ex_Adapter< - poa_name, - TAO_POA *, - TAO_ObjectId_Hash, - ACE_Equal_To, - TAO_Incremental_Key_Generator> transient_poa_hash_map; - // Id hash map. -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - typedef ACE_Map_Manager_Adapter< - poa_name, - TAO_POA *, - TAO_Incremental_Key_Generator> transient_poa_linear_map; - // Id linear map. -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - - typedef ACE_Active_Map_Manager_Adapter< - poa_name, - TAO_POA *, - TAO_Ignore_Original_Key_Adapter> transient_poa_active_map; - // Id active map. - - typedef ACE_Map< - poa_name, - TAO_POA *> persistent_poa_name_map; - // Base class of the name map. - - typedef ACE_Hash_Map_Manager_Ex_Adapter< - poa_name, - TAO_POA *, - TAO_ObjectId_Hash, - ACE_Equal_To, - ACE_Noop_Key_Generator > persistent_poa_name_hash_map; - // Id hash map. - -#if (TAO_HAS_MINIMUM_POA_MAPS == 0) - typedef ACE_Map_Manager_Adapter< - poa_name, - TAO_POA *, - ACE_Noop_Key_Generator > persistent_poa_name_linear_map; - // Id linear map. -#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ - -public: - - persistent_poa_name_map *persistent_poa_name_map_; - transient_poa_map *transient_poa_map_; - -protected: - - static size_t transient_poa_name_size_; - - static void set_transient_poa_name_size (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters); - - TAO_ORB_Core &orb_core_; - - int enable_locking_; - - ACE_SYNCH_MUTEX thread_lock_; - - ACE_Lock *lock_; - - ACE_Reverse_Lock reverse_lock_; - - ACE_SYNCH_CONDITION non_servant_upcall_condition_; - // Condition variable for waiting on non-servant upcalls to end. - - CORBA::Boolean non_servant_upcall_in_progress_; - // Flag for knowing when an non-servant upcall is in progress. - - ACE_thread_t non_servant_upcall_thread_; - // Id of thread making the non-servant upcall. - -public: - - class TAO_Export poa_name_iterator - { - // = TITLE - // Iterator for a folded poa name. - public: - - poa_name_iterator (int begin, - CORBA::ULong size, - const CORBA::Octet *folded_buffer); - // Constructor. - - int operator== (const poa_name_iterator &rhs) const; - int operator!= (const poa_name_iterator &rhs) const; - // Comparison operators. - - ACE_CString operator* () const; - // Dereference operator. - - poa_name_iterator &operator++ (void); - // Prefix advance. - - protected: - - CORBA::ULong size_; - CORBA::ULong position_; - const CORBA::Octet *folded_buffer_; - CORBA::ULong last_separator_; - }; - - class TAO_Export iteratable_poa_name - { - // = TITLE - // This class allows iteration over a folded poa name. - public: - - typedef poa_name_iterator iterator; - - iteratable_poa_name (const poa_name &folded_name); - - iterator begin (void) const; - iterator end (void) const; - - protected: - - const poa_name &folded_name_; - }; - - class TAO_Export Non_Servant_Upcall - { - // = TITLE - // This class helps us with a recursive thread lock without - // using a recursive thread lock. Non_Servant_Upcall has a - // magic constructor and destructor. We unlock the - // Object_Adapter lock for the duration of the non-servant - // (i.e., adapter activator and servant activator) upcalls; - // reacquiring once the upcalls complete. Even though we are - // releasing the lock, other threads will not be able to make - // progress since - // has been - // set. - public: - - Non_Servant_Upcall (TAO_Object_Adapter &object_adapter); - // Constructor. - - ~Non_Servant_Upcall (void); - // Destructor. - - protected: - - TAO_Object_Adapter &object_adapter_; - }; - - friend class Non_Servant_Upcall; - - class TAO_Export Servant_Upcall - { - // = TITLE - // This class finds out the POA and the servant to perform an - // upcall. It can only be instantiated without the object - // adapter's lock held. - public: - - friend class TAO_POA; - - Servant_Upcall (TAO_Object_Adapter &object_adapter); - // Constructor. - - ~Servant_Upcall (void); - // Destructor. - - void prepare_for_upcall (const TAO_ObjectKey &key, - const char *operation, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Locate POA and servant. - - TAO_POA &poa (void) const; - // POA accessor. - - TAO_Object_Adapter &object_adapter (void) const; - // Object Adapter accessor. - - const PortableServer::ObjectId &id (void) const; - // ID accessor. - - PortableServer::Servant servant (void) const; - // Servant accessor. - -#if (TAO_HAS_MINIMUM_POA == 0) - - PortableServer::ServantLocator::Cookie locator_cookie (void) const; - // Get the Servant Locator's cookie - - void locator_cookie (PortableServer::ServantLocator::Cookie cookie); - // Set the Servant Locator's cookie - - const char *operation (void) const; - // Get the operation name. - - void operation (const char *); - // Set the operation name. - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - void active_object_map_entry (TAO_Active_Object_Map::Map_Entry *entry); - // Set the . - - TAO_Active_Object_Map::Map_Entry *active_object_map_entry (void) const; - // Get the . - - void using_servant_locator (void); - // We are using the servant locator for this upcall. - - protected: - - void servant_locator_cleanup (void); - void single_threaded_poa_setup (CORBA::Environment &ACE_TRY_ENV); - void single_threaded_poa_cleanup (void); - void servant_cleanup (void); - void poa_cleanup (void); - - TAO_Object_Adapter &object_adapter_; - - TAO_POA *poa_; - - PortableServer::Servant servant_; - - enum State - { - INITIAL_STAGE, - OBJECT_ADAPTER_LOCK_ACQUIRED, - POA_CURRENT_SETUP, - OBJECT_ADAPTER_LOCK_RELEASED, - SERVANT_LOCK_ACQUIRED - }; - - State state_; - - PortableServer::ObjectId id_; - - TAO_POA_Current_Impl current_context_; - -#if (TAO_HAS_MINIMUM_POA == 0) - - PortableServer::ServantLocator::Cookie cookie_; - // Servant Locator's cookie - - const char *operation_; - // Operation name for this current. - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - TAO_Active_Object_Map::Map_Entry *active_object_map_entry_; - // Pointer to the entry in the TAO_Active_Object_Map corresponding - // to the servant for this request. - - int using_servant_locator_; - // Are we using the servant locator? - - private: - Servant_Upcall (const Servant_Upcall &); - void operator= (const Servant_Upcall &); - }; - - friend class Servant_Upcall; - -#if (TAO_HAS_RT_CORBA == 1) - - class TAO_Export Priority_Model_Processing - { - // = TITLE - // This class encapsulates processing necessary for - // RTCORBA CLIENT_PROPAGATED priority model. - // - // Although the destructor of this class resets the priority of - // the thread to it's original value, application should use - // method for that purpose: destructor cannot - // propagate possible exceptions to the callee. Destructor's - // reset capability is intended as a last resort, i.e., if - // isn't reached for some reason. - // - public: - - Priority_Model_Processing (TAO_POA &poa); - // Constructor. - - ~Priority_Model_Processing (void); - // Resets the priority of the current thread back to its original - // value if necessary, i.e., if it was changed and the - // method hasn't been called. Unlike , - // this method cannot propagate exceptions to the user. - - void pre_invoke (IOP::ServiceContextList &service_context_list, - CORBA::Environment &ACE_TRY_ENV); - // Checks if target POA supports RTCORBA::CLIENT_PROPAGATED - // PriorityModel. If so, stores the original priority of the - // current thread, and sets the thread to the client-propagated - // priority. - - void post_invoke (CORBA::Environment &ACE_TRY_ENV); - // Resets the priority of the current thread back to its original - // value, if necessary. - - private: - - Priority_Model_Processing (const Priority_Model_Processing &); - void operator= (const Priority_Model_Processing &); - - enum State - { - NO_ACTION_REQUIRED, - PRIORITY_RESET_REQUIRED - }; - - State state_; - // Indicates whether the priority of the thread needs to be reset - // back to its original value. - - TAO_POA &poa_; - // Poa of the target servant. - - RTCORBA::Priority original_priority_; - // Original priority of the thread. - }; - -#endif /* TAO_HAS_RT_CORBA == 1 */ -}; - - -//////////////////////////////////////////////////////////////////////////////// - -#if defined (__ACE_INLINE__) -# include "tao/Object_Adapter.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_OBJECT_ADAPTER_H */ diff --git a/TAO/tao/Object_Adapter.i b/TAO/tao/Object_Adapter.i deleted file mode 100644 index 2862b7d2d11..00000000000 --- a/TAO/tao/Object_Adapter.i +++ /dev/null @@ -1,277 +0,0 @@ -// $Id$ - - -ACE_INLINE -TAO_POA_Current::TAO_POA_Current (void) -{ -} - -ACE_INLINE ACE_Lock & -TAO_Object_Adapter::lock (void) -{ - return *this->lock_; -} - -ACE_INLINE ACE_SYNCH_MUTEX & -TAO_Object_Adapter::thread_lock (void) -{ - return this->thread_lock_; -} - -ACE_INLINE ACE_Reverse_Lock & -TAO_Object_Adapter::reverse_lock (void) -{ - return this->reverse_lock_; -} - -/* static */ -ACE_INLINE CORBA::ULong -TAO_Object_Adapter::transient_poa_name_size () -{ - return TAO_Object_Adapter::transient_poa_name_size_; -} - -ACE_INLINE int -TAO_Object_Adapter::locate_servant (const TAO_ObjectKey &key, - CORBA::Environment &ACE_TRY_ENV) -{ - // Lock access for the duration of this transaction. - TAO_OBJECT_ADAPTER_GUARD_RETURN (-1); - - return this->locate_servant_i (key, - ACE_TRY_ENV); -} - -ACE_INLINE TAO_SERVANT_LOCATION -TAO_Object_Adapter::find_servant (const TAO_ObjectKey &key, - PortableServer::Servant &servant, - CORBA::Environment &ACE_TRY_ENV) -{ - // Lock access for the duration of this transaction. - TAO_OBJECT_ADAPTER_GUARD_RETURN (TAO_SERVANT_NOT_FOUND); - - return this->find_servant_i (key, - servant, - ACE_TRY_ENV); -} - -ACE_INLINE int -TAO_Object_Adapter::find_persistent_poa (const poa_name &system_name, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV) -{ - return this->hint_strategy_->find_persistent_poa (system_name, - poa, - ACE_TRY_ENV); -} - -ACE_INLINE int -TAO_Object_Adapter::find_poa (const poa_name &system_name, - CORBA::Boolean activate_it, - CORBA::Boolean root, - const TAO_Temporary_Creation_Time &poa_creation_time, - TAO_POA *&poa, - CORBA_Environment &ACE_TRY_ENV) -{ - if (activate_it) - { - return this->find_persistent_poa (system_name, - poa, - ACE_TRY_ENV); - } - else - { - return this->find_transient_poa (system_name, - root, - poa_creation_time, - poa, - ACE_TRY_ENV); - } -} - -ACE_INLINE int -TAO_Object_Adapter::bind_transient_poa (TAO_POA *poa, - poa_name_out system_name) -{ - poa_name name; - int result = this->transient_poa_map_->bind_create_key (poa, - name); - - if (result == 0) - { - ACE_NEW_RETURN (system_name, - poa_name (name), - -1); - } - - return result; -} - -ACE_INLINE int -TAO_Object_Adapter::bind_persistent_poa (const poa_name &folded_name, - TAO_POA *poa, - poa_name_out system_name) -{ - return this->hint_strategy_->bind_persistent_poa (folded_name, - poa, - system_name); -} - -ACE_INLINE int -TAO_Object_Adapter::unbind_transient_poa (const poa_name &system_name) -{ - return this->transient_poa_map_->unbind (system_name); -} - -ACE_INLINE int -TAO_Object_Adapter::unbind_persistent_poa (const poa_name &folded_name, - const poa_name &system_name) -{ - return this->hint_strategy_->unbind_persistent_poa (folded_name, - system_name); -} - -ACE_INLINE TAO_POA & -TAO_Object_Adapter::Servant_Upcall::poa (void) const -{ - return *this->poa_; -} - -ACE_INLINE PortableServer::Servant -TAO_Object_Adapter::Servant_Upcall::servant (void) const -{ - return this->servant_; -} - -ACE_INLINE TAO_Object_Adapter & -TAO_Object_Adapter::Servant_Upcall::object_adapter (void) const -{ - return this->object_adapter_; -} - -ACE_INLINE const PortableServer::ObjectId & -TAO_Object_Adapter::Servant_Upcall::id (void) const -{ - return this->id_; -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -ACE_INLINE PortableServer::ServantLocator::Cookie -TAO_Object_Adapter::Servant_Upcall::locator_cookie (void) const -{ - return this->cookie_; -} - -ACE_INLINE void -TAO_Object_Adapter::Servant_Upcall::locator_cookie (PortableServer::ServantLocator::Cookie cookie) -{ - this->cookie_ = cookie; -} - -ACE_INLINE const char * -TAO_Object_Adapter::Servant_Upcall::operation (void) const -{ - return this->operation_; -} - -ACE_INLINE void -TAO_Object_Adapter::Servant_Upcall::operation (const char *name) -{ - this->operation_ = name; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -ACE_INLINE void -TAO_Object_Adapter::Servant_Upcall::active_object_map_entry (TAO_Active_Object_Map::Map_Entry *entry) -{ - this->active_object_map_entry_ = entry; -} - -ACE_INLINE TAO_Active_Object_Map::Map_Entry * -TAO_Object_Adapter::Servant_Upcall::active_object_map_entry (void) const -{ - return this->active_object_map_entry_; -} - -ACE_INLINE void -TAO_Object_Adapter::Servant_Upcall::using_servant_locator (void) -{ - this->using_servant_locator_ = 1; -} - -//////////////////////////////////////////////////////////////////////////////// - -ACE_INLINE void -TAO_POA_Current_Impl::poa (TAO_POA *p) -{ - this->poa_ = p; -} - -ACE_INLINE TAO_POA * -TAO_POA_Current_Impl::poa (void) const -{ - return this->poa_; -} - -ACE_INLINE void -TAO_POA_Current_Impl::object_id (const PortableServer::ObjectId &id) -{ - this->object_id_ = id; -} - -ACE_INLINE const PortableServer::ObjectId & -TAO_POA_Current_Impl::object_id (void) const -{ - return this->object_id_; -} - -ACE_INLINE void -TAO_POA_Current_Impl::object_key (const TAO_ObjectKey &key) -{ - this->object_key_ = &key; -} - -ACE_INLINE const TAO_ObjectKey & -TAO_POA_Current_Impl::object_key (void) const -{ - return *this->object_key_; -} - -ACE_INLINE void -TAO_POA_Current_Impl::servant (PortableServer::Servant servant) -{ - this->servant_ = servant; -} - -ACE_INLINE PortableServer::Servant -TAO_POA_Current_Impl::servant (void) const -{ - return this->servant_; -} - -ACE_INLINE void -TAO_POA_Current_Impl::priority (CORBA::Short priority) -{ - this->priority_ = priority; -} - -ACE_INLINE CORBA::Short -TAO_POA_Current_Impl::priority (void) const -{ - return this->priority_; -} - -#if (TAO_HAS_RT_CORBA == 1) - -ACE_INLINE -TAO_Object_Adapter::Priority_Model_Processing::Priority_Model_Processing -(TAO_POA &poa) - : state_ (NO_ACTION_REQUIRED), - poa_ (poa), - original_priority_ (0) -{ -} - -#endif /* TAO_HAS_RT_CORBA == 1 */ diff --git a/TAO/tao/Operation_Table.cpp b/TAO/tao/Operation_Table.cpp deleted file mode 100644 index 8d0e56b30fa..00000000000 --- a/TAO/tao/Operation_Table.cpp +++ /dev/null @@ -1,383 +0,0 @@ -// $Id$ - -#include "tao/Operation_Table.h" -#include "tao/Timeprobe.h" -#include "tao/ORB.h" - -ACE_RCSID(tao, Operation_Table, "$Id$") - -#if defined (ACE_ENABLE_TIMEPROBES) - -static const char *TAO_Operation_Table_Timeprobe_Description[] = - { - "TAO_Dynamic_Hash_OpTable::find - start", - "TAO_Dynamic_Hash_OpTable::find - end", - - "TAO_Linear_Search_OpTable::find - start", - "TAO_Linear_Search_OpTable::find - end", - - "TAO_Active_Demux_OpTable::find - start", - "TAO_Active_Demux_OpTable::find - end", - - "TAO_Perfect_Hash_OpTable::find - start", - "TAO_Perfect_Hash_OpTable::find - end", - - "TAO_Binary_Search_OpTable::find - start", - "TAO_Binary_Search_OpTable::find - end" - }; - -enum - { - // Timeprobe description table start key - TAO_DYNAMIC_HASH_OPTABLE_FIND_START = 600, - TAO_DYNAMIC_HASH_OPTABLE_FIND_END, - - TAO_LINEAR_SEARCH_OPTABLE_FIND_START, - TAO_LINEAR_SEARCH_OPTABLE_FIND_END, - - TAO_ACTIVE_DEMUX_OPTABLE_FIND_START, - TAO_ACTIVE_DEMUX_OPTABLE_FIND_END, - - TAO_PERFECT_HASH_OPTABLE_FIND_START, - TAO_PERFECT_HASH_OPTABLE_FIND_END, - - TAO_BINARY_SEARCH_OPTABLE_FIND_START, - TAO_BINARY_SEARCH_OPTABLE_FIND_END - }; - -// Setup Timeprobes -ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Operation_Table_Timeprobe_Description, - TAO_DYNAMIC_HASH_OPTABLE_FIND_START); - -#endif /* ACE_ENABLE_TIMEPROBES */ - -// destructor -TAO_Operation_Table::~TAO_Operation_Table (void) -{ -} - -// constructor -TAO_Dynamic_Hash_OpTable::TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry *db, - CORBA::ULong dbsize, - CORBA::ULong hashtblsize, - ACE_Allocator *alloc) - : hash_ (hashtblsize, alloc) -{ - // Iterate thru each entry in the database and bind the operation - // name to its corresponding skeleton. - - for (CORBA::ULong i = 0; i < dbsize; i++) - // @@ (ASG): what happens if bind fails ??? - if (this->bind (db[i].opname_, db[i].skel_ptr_) == -1) - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) %p\n"), - ACE_TEXT ("bind failed"))); -} - -TAO_Dynamic_Hash_OpTable::~TAO_Dynamic_Hash_OpTable (void) -{ - // Initialize an iterator. We need to go thru each entry and free - // up storage allocated to hold the external ids. In this case, - // these are strings. - OP_MAP_MANAGER::ITERATOR iterator (this->hash_); - - for (OP_MAP_MANAGER::ENTRY *entry = 0; - iterator.next (entry) != 0; - iterator.advance ()) - { - // We had allocated memory and stored the string. So we free the - // memory. - CORBA::string_free ((char *) entry->ext_id_); - entry->ext_id_ = 0; - - // We do not own this. So we just set it to 0. - entry->int_id_ = 0; - } -} - -int -TAO_Dynamic_Hash_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) -{ - return this->hash_.bind (CORBA::string_dup (opname), skel_ptr); -} - -int -TAO_Dynamic_Hash_OpTable::find (const char *opname, - TAO_Skeleton& skel_ptr, - const unsigned int length) -{ - ACE_UNUSED_ARG (length); - ACE_FUNCTION_TIMEPROBE (TAO_DYNAMIC_HASH_OPTABLE_FIND_START); - - return this->hash_.find ((const char *)opname, skel_ptr); -} - -// Linear search strategy - -TAO_Linear_Search_OpTable::TAO_Linear_Search_OpTable (void) -{ -} - -TAO_Linear_Search_OpTable::~TAO_Linear_Search_OpTable (void) -{ -} - -int -TAO_Linear_Search_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) -{ - ACE_UNUSED_ARG (opname); - ACE_UNUSED_ARG (skel_ptr); - return 0; -} - -int -TAO_Linear_Search_OpTable::find (const char *opname, - TAO_Skeleton& skelfunc, - const unsigned int length) -{ - ACE_UNUSED_ARG (length); - ACE_FUNCTION_TIMEPROBE (TAO_LINEAR_SEARCH_OPTABLE_FIND_START); - - const TAO_operation_db_entry *entry = lookup (opname); - if (entry == 0) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("TAO_Linear_Search_Table:find failed\n")), - -1); - - // Valid entry. Figure out the skel_ptr. - skelfunc = entry->skel_ptr_; - - return 0; -} - -// Active Demux search strategy -TAO_Active_Demux_OpTable::TAO_Active_Demux_OpTable (const - TAO_operation_db_entry *db, - CORBA::ULong dbsize) - : next_ (0), - tablesize_ (dbsize), - tbl_ (0) -{ - ACE_NEW (tbl_, - TAO_Active_Demux_OpTable_Entry[dbsize]); - - // The job of the constructor is to go thru each entry of the - // database and bind the operation name to its corresponding - // skeleton. - for (CORBA::ULong i=0; i < dbsize; i++) - // @@ (ASG): what happens if bind fails ??? - (void) this->bind (db[i].opname_, db[i].skel_ptr_); -} - -TAO_Active_Demux_OpTable::~TAO_Active_Demux_OpTable (void) -{ - delete [] this->tbl_; -} - -int -TAO_Active_Demux_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) -{ - CORBA::ULong i = ACE_OS::atoi (opname); - - if (i < this->tablesize_) - { - if (this->tbl_[i].skel_ptr_ != 0) - // overwriting previous one - return 1; - else - { - this->tbl_[i].skel_ptr_ = skel_ptr; - return 0; - } - } - return -1; // error -} - -int -TAO_Active_Demux_OpTable::find (const char *opname, - TAO_Skeleton& skel_ptr, - const unsigned int length) -{ - ACE_UNUSED_ARG (length); - - ACE_FUNCTION_TIMEPROBE (TAO_ACTIVE_DEMUX_OPTABLE_FIND_START); - - CORBA::ULong i = ACE_OS::atoi (opname); - - ACE_ASSERT (i < this->tablesize_); - skel_ptr = this->tbl_[i].skel_ptr_; - return 0; //success -} - -TAO_Active_Demux_OpTable_Entry::TAO_Active_Demux_OpTable_Entry (void) -{ - this->skel_ptr_ = 0; -} - -TAO_Active_Demux_OpTable_Entry::~TAO_Active_Demux_OpTable_Entry (void) -{ - this->skel_ptr_ = 0; // cannot delete this as we do not own it -} - -// Do nothing constructor. -TAO_Perfect_Hash_OpTable::TAO_Perfect_Hash_OpTable (void) -{ -} - -// Do nothing destrctor. -TAO_Perfect_Hash_OpTable::~TAO_Perfect_Hash_OpTable (void) -{ -} - -// Uses <{opname}> to look up the skeleton function and pass it back -// in <{skelfunc}>. Returns non-negative integer on success, or -1 on -// failure. - -int -TAO_Perfect_Hash_OpTable::find (const char *opname, - TAO_Skeleton &skelfunc, - const unsigned int length) -{ - ACE_FUNCTION_TIMEPROBE (TAO_PERFECT_HASH_OPTABLE_FIND_START); - - const TAO_operation_db_entry *entry = lookup (opname, - length); - if (entry == 0) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("TAO_Perfect_Hash_Table:find failed\n")), - -1); - - // Valid entry. Figure out the skel_ptr. - skelfunc = entry->skel_ptr_; - - return 0; -} - -int -TAO_Perfect_Hash_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) -{ - ACE_UNUSED_ARG (opname); - ACE_UNUSED_ARG (skel_ptr); - return 0; -} - -// Do nothing constructor. -TAO_Binary_Search_OpTable::TAO_Binary_Search_OpTable (void) -{ -} - -// Do nothing destrctor. -TAO_Binary_Search_OpTable::~TAO_Binary_Search_OpTable (void) -{ -} - -// Uses <{opname}> to look up the skeleton function and pass it back -// in <{skelfunc}>. Returns non-negative integer on success, or -1 on -// failure. - -int -TAO_Binary_Search_OpTable::find (const char *opname, - TAO_Skeleton &skelfunc, - const unsigned int /* length */) -{ - ACE_FUNCTION_TIMEPROBE (TAO_BINARY_SEARCH_OPTABLE_FIND_START); - - const TAO_operation_db_entry *entry = lookup (opname); - - if (entry == 0) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("TAO_Binary_Search_Table:find failed\n")), - -1); - // Valid entry. Figure out the skel_ptr. - skelfunc = entry->skel_ptr_; - - return 0; -} - -int -TAO_Binary_Search_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) -{ - ACE_UNUSED_ARG (opname); - ACE_UNUSED_ARG (skel_ptr); - return 0; -} - -// constructor -TAO_Operation_Table_Parameters::TAO_Operation_Table_Parameters (void) - : strategy_ (0), - type_ (TAO_Operation_Table_Parameters::TAO_DYNAMIC_HASH) // default -{ -} - -TAO_Operation_Table_Parameters::~TAO_Operation_Table_Parameters (void) -{ -} - -void -TAO_Operation_Table_Parameters::lookup_strategy (TAO_Operation_Table_Parameters::DEMUX_STRATEGY s) -{ - this->type_ = s; -} - -// get the lookup type -TAO_Operation_Table_Parameters::DEMUX_STRATEGY -TAO_Operation_Table_Parameters::lookup_strategy (void) const -{ - return this->type_; -} - -// set the concrete strategy -void -TAO_Operation_Table_Parameters::concrete_strategy (TAO_Operation_Table *ot) -{ - this->strategy_ = ot; -} - -// return the concrete strategy -TAO_Operation_Table* TAO_Operation_Table_Parameters::concrete_strategy (void) -{ - return this->strategy_; -} - -TAO_Operation_Table_Factory::TAO_Operation_Table_Factory (void) -{ -} - -TAO_Operation_Table_Factory::~TAO_Operation_Table_Factory (void) -{ -} - -TAO_Operation_Table * -TAO_Operation_Table_Factory::opname_lookup_strategy (void) -{ - TAO_Operation_Table_Parameters *p = - TAO_OP_TABLE_PARAMETERS::instance (); - - return p->concrete_strategy (); -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Hash_Map_Iterator_Base_Ex, ACE_Equal_To, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_Null_Mutex>; -template class ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex>; -template class ACE_Hash_Map_Entry; -template class TAO_Singleton; -#elif defined (ACE_HAS_GNU_REPO) -// This is necessary with g++ 2.91.66 to avoid a couple of strange -// unresolved ACE_Hash_Map_Entry symbols. (Strange because c++filt -// can't demangle them.) -template class ACE_Hash_Map_Entry; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex, ACE_Equal_To, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Entry -#pragma instantiate TAO_Singleton -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/Operation_Table.h b/TAO/tao/Operation_Table.h deleted file mode 100644 index bcc2ab32ce5..00000000000 --- a/TAO/tao/Operation_Table.h +++ /dev/null @@ -1,341 +0,0 @@ -// This may look like C, but it's really -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// Operation_Table.h -// -// = AUTHOR -// Aniruddha Gokhale -// -// ============================================================================ - -#ifndef TAO_OPTABLE_H -#define TAO_OPTABLE_H -#include "ace/pre.h" - -#include "ace/Hash_Map_Manager.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/TAO_Singleton.h" -#include "ace/Synch.h" -#include "tao/corbafwd.h" - -class TAO_operation_db_entry -{ - // = TITLE - // Define a table entry that holds an operation name and its - // corresponding skeleton. A table of such entries is used to - // initialize the different lookup strategies. -public: - const char* opname_; - // operation name - - TAO_Skeleton skel_ptr_; - // skeleton pointer -}; - -class TAO_Export TAO_Operation_Table -{ - // = TITLE - // Abstract class for maintaining and lookup of CORBA IDL - // operation names. -public: - virtual int find (const char *opname, - TAO_Skeleton &skelfunc, - const unsigned int length = 0) = 0; - // Uses <{opname}> to look up the skeleton function and pass it back - // in <{skelfunc}>. Returns non-negative integer on success, or -1 - // on failure. - - virtual int bind (const char *opname, - const TAO_Skeleton skel_ptr) = 0; - // Associate the skeleton <{skel_ptr}> with an operation named - // <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. - - virtual ~TAO_Operation_Table (void); -}; - -class TAO_Export TAO_Operation_Table_Factory -{ - // = TITLE - // Factory for producing operation table lookup objects based on - // the enumerated value of strategy held by the parameters. -public: - TAO_Operation_Table *opname_lookup_strategy (void); - // return an instance of the specified lookup strategy - - TAO_Operation_Table_Factory (void); - // constructor - - ~TAO_Operation_Table_Factory (void); - // destructor -}; - -class TAO_Export TAO_Operation_Table_Parameters -{ - // = TITLE - // Parameters used to create the operation table. -public: - enum DEMUX_STRATEGY - { - // various lookup strategies - TAO_LINEAR_SEARCH, - TAO_DYNAMIC_HASH, - TAO_PERFECT_HASH, - TAO_BINARY_SEARCH, - TAO_ACTIVE_DEMUX, - TAO_USER_DEFINED - }; - - void lookup_strategy (DEMUX_STRATEGY s); - // set the lookup strategy from the list of enumerated values - - DEMUX_STRATEGY lookup_strategy (void) const; - // Return the enumerated value for the lookup strategy. Default is - // Dynamic Hashing. - - void concrete_strategy (TAO_Operation_Table *ot); - // Provide a data structure that will do the lookup. This is useful - // for user-defined lookup strategies. - - TAO_Operation_Table *concrete_strategy (void); - // Return the operation table that is being used to do the lookup. - - TAO_Operation_Table_Parameters (void); - // constructor. - - ~TAO_Operation_Table_Parameters (void); - // destructor -private: - TAO_Operation_Table *strategy_; - // pointer to the object that implements a lookup strategy - - DEMUX_STRATEGY type_; - // the enumerated value indicating the lookup strategy -}; - -class TAO_Export TAO_Dynamic_Hash_OpTable : public TAO_Operation_Table -{ - // = TITLE - // Dynamic Hashing scheme for CORBA IDL operation name lookup. -public: - // = Initialization and termination methods. - TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry *db, - CORBA::ULong dbsize, - CORBA::ULong hashtblsize, - ACE_Allocator *alloc); - // Initialize the dynamic hash operation table with a database of - // operation names. The hash table size may be different from the - // size of the database. Hence we use the third argument to specify - // the size of the internal hash table. The argument is - // used to determine where the memory comes from (usually from - // ). - - ~TAO_Dynamic_Hash_OpTable (void); - // destructor - - virtual int bind (const char *opname, - const TAO_Skeleton skel_ptr); - // Associate the skeleton <{skel_ptr}> with an operation named - // <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. - - virtual int find (const char *opname, - TAO_Skeleton &skelfunc, - const unsigned int length = 0); - // Uses <{opname}> to look up the skeleton function and pass it back - // in <{skelfunc}>. Returns non-negative integer on success, or -1 - // on failure. - -private: - typedef ACE_Hash_Map_Manager_Ex, - ACE_Equal_To, - ACE_Null_Mutex> - OP_MAP_MANAGER; - - OP_MAP_MANAGER hash_; - // The hash table data structure. -}; - -class TAO_Export TAO_Linear_Search_OpTable : public TAO_Operation_Table -{ - // = TITLE - // Operation table lookup strategy based on - // linear search. Not efficient, but it works. -public: - // = Initialization and termination methods. - TAO_Linear_Search_OpTable (void); - // Default constructor. - - ~TAO_Linear_Search_OpTable (void); - // Destructor. - - virtual int find (const char *opname, - TAO_Skeleton &skel_ptr, - const unsigned int length = 0); - // Uses <{opname}> to look up the skeleton function and pass it back - // in <{skelfunc}>. Returns non-negative integer on success, or -1 - // on failure. - - virtual int bind (const char *opname, - const TAO_Skeleton skelptr); - // Associate the skeleton <{skel_ptr}> with an operation named - // <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. - -private: - // = Method that should defined by the subclasses. GPERF program - // will generate this routine routines. - virtual const TAO_operation_db_entry* lookup (const char *str) = 0; -}; - -class TAO_Export TAO_Active_Demux_OpTable_Entry -{ - // = TITLE - // Active Demux lookup table entry. -public: - // = Initialization and termination methods. - TAO_Active_Demux_OpTable_Entry (void); - // constructor - - ~TAO_Active_Demux_OpTable_Entry (void); - // destructor - - TAO_Skeleton skel_ptr_; - // Skeleton pointer corresponding to the index. -}; - -class TAO_Export TAO_Active_Demux_OpTable : public TAO_Operation_Table -{ - // = TITLE - // Implements the active demultiplexed lookup strategy. The key is - // assumed to provide an index directly into the internal table. -public: - // = Initialization and termination methods. - TAO_Active_Demux_OpTable (const TAO_operation_db_entry *db, CORBA::ULong dbsize); - // Initializes the internal table with the database of operations - - ~TAO_Active_Demux_OpTable (void); - // destructor. - - virtual int find (const char *opname, - TAO_Skeleton &skel_ptr, - const unsigned int length = 0); - // Uses <{opname}> to look up the skeleton function and pass it back - // in <{skelfunc}>. Returns non-negative integer on success, or -1 - // on failure. - - virtual int bind (const char *opname, - const TAO_Skeleton skelptr); - // Associate the skeleton <{skel_ptr}> with an operation named - // <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. - -private: - CORBA::ULong next_; - // the next available free slot - - CORBA::ULong tablesize_; - // size of the internal table - - TAO_Active_Demux_OpTable_Entry *tbl_; - // internal lookup table -}; - -class TAO_Export TAO_Perfect_Hash_OpTable : public TAO_Operation_Table -{ - // = TITLE - // Helper class for use of perfect hashing operation lookup - // strategy. - // - // = DESCRIPTION - // This class declares pure virtual methods called 'lookup ()' - // and 'hash ()' which will be generated by the GPERF - // program. These methods are used by 'bind ()' and 'find ()' - // methods. Subclasses will define the lookup and hash - // functions. -public: - TAO_Perfect_Hash_OpTable (void); - // Do nothing constructor. - - virtual ~TAO_Perfect_Hash_OpTable (void); - // Do nothing destrctor. - - virtual int find (const char *opname, - TAO_Skeleton &skelfunc, - const unsigned int length = 0); - // Uses <{opname}> to look up the skeleton function and pass it back - // in <{skelfunc}>. Returns non-negative integer on success, or -1 - // on failure. - - virtual int bind (const char *opname, - const TAO_Skeleton skel_ptr); - // Associate the skeleton <{skel_ptr}> with an operation named - // <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. - -private: - // = Methods that should defined by the subclasses. GPERF program - // will generate these routines. - - virtual unsigned int hash (const char *str, unsigned int len) = 0; - - virtual const TAO_operation_db_entry* lookup (const char *str, unsigned int len) = 0; -}; - -class TAO_Export TAO_Binary_Search_OpTable : public TAO_Operation_Table -{ - // = TITLE - // Helper class for using binary search operatin lookup strategy - // in the server skeletons. - // - // = DESCRIPTION - // This class declares pure virtual method called 'lookup ()' - // which will be generated by the GPERF program. This method is - // used by 'bind ()' and 'find ()' methods. Subclasses will - // define the lookup method. -public: - TAO_Binary_Search_OpTable (void); - // Do nothing constructor. - - virtual ~TAO_Binary_Search_OpTable (void); - // Do nothing destrctor. - - virtual int find (const char *opname, - TAO_Skeleton &skelfunc, - const unsigned int length = 0); - // Uses <{opname}> to look up the skeleton function and pass it back - // in <{skelfunc}>. Returns non-negative integer on success, or -1 - // on failure. - - virtual int bind (const char *opname, - const TAO_Skeleton skel_ptr); - // Associate the skeleton <{skel_ptr}> with an operation named - // <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. - -private: - // = Method that should defined by the subclasses. GPERF program - // will generate this routine routines. - virtual const TAO_operation_db_entry* lookup (const char *str) = 0; -}; - - -// Define a singleton instance of operation table parameters. -typedef TAO_Singleton - TAO_OP_TABLE_PARAMETERS; - - -// Define a singleton instance of the operation table factory. -typedef TAO_Singleton - TAO_OP_TABLE_FACTORY; - -#include "ace/post.h" -#endif /* TAO_OPTABLE_H */ diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp deleted file mode 100644 index 28ba3bb0243..00000000000 --- a/TAO/tao/POA.cpp +++ /dev/null @@ -1,4240 +0,0 @@ -// @(#) $Id$ - -// auto_ptr class -#include "ace/Auto_Ptr.h" - -#include "tao/POA.h" -#include "tao/ORB_Core.h" -#include "tao/ORB.h" -#include "tao/Server_Strategy_Factory.h" -#include "tao/Environment.h" -#include "tao/Exception.h" -#include "tao/Stub.h" -#include "tao/debug.h" - -#include "tao/RT_Policy_i.h" - -// -// ImplRepo related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) -# include "tao/ImplRepoC.h" -# include "tao/ImplRepoS.h" -#endif /* TAO_HAS_MINIMUM_CORBA */ - - -// -// ImplRepo related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) - -// This is to remove "inherits via dominance" warnings from MSVC. -// MSVC is being a little too paranoid. -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -// @@ Darrell: could you move this to some other file? It is kind of -// ugly around here. Also: we probably want this "optional", -// i.e. some kind of hook that creates this object only when IMR is -// enabled, we should talk about it. -class ServerObject_i - : public POA_ImplementationRepository::ServerObject, - public PortableServer::RefCountServantBase -{ - // = TITLE - // IMR Server Object Implementation - // - // = DESCRIPTION - // Implementation Repository uses this to communicate with the IMR - // registered server. -public: - ServerObject_i (CORBA::ORB_ptr orb) - : orb_ (orb) {} - - virtual void ping (CORBA::Environment &) - ACE_THROW_SPEC (()) - { - } - - virtual void shutdown (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC (()) - { - this->orb_->shutdown (0, ACE_TRY_ENV); - } -private: - CORBA::ORB_ptr orb_; -}; - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#endif /* TAO_HAS_MINIMUM_CORBA */ - - -// Forwarding Servant class -#include "tao/Forwarding_Servant.h" - -#if !defined (__ACE_INLINE__) -# include "tao/POA.i" -#endif /* ! __ACE_INLINE__ */ - -ACE_RCSID(tao, POA, "$Id$") - -#if (TAO_NO_IOR_TABLE == 0) - // This is the TAO_Object_key-prefix that is appended to all TAO Object keys. - // It's an array of octets representing ^t^a^o/0 in octal. - CORBA::Octet -TAO_POA::objectkey_prefix [TAO_POA::TAO_OBJECTKEY_PREFIX_SIZE] = { - 024, // octal for ^t - 001, // octal for ^a - 017, // octal for ^o - 000 -}; -#endif /* TAO_NO_IOR_TABLE */ - -TAO_POA::TAO_POA (const TAO_POA::String &name, - TAO_POA_Manager &poa_manager, - const TAO_POA_Policies &policies, - TAO_POA *parent, - ACE_Lock &lock, - ACE_SYNCH_MUTEX &thread_lock, - TAO_ORB_Core &orb_core, - CORBA::Environment &ACE_TRY_ENV) - : name_ (name), - poa_manager_ (poa_manager), - policies_ (policies), - parent_ (parent), - active_object_map_ (0), - -#if (TAO_HAS_MINIMUM_POA == 0) - - adapter_activator_ (), - servant_activator_ (), - servant_locator_ (), - default_servant_ (), - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - // - // ImplRepo related. - // -#if (TAO_HAS_MINIMUM_CORBA == 0) - - server_object_ (0), - use_imr_ (1), - -#endif /* TAO_HAS_MINIMUM_CORBA */ - - children_ (), - lock_ (lock), - persistent_ (policies.lifespan () == PortableServer::PERSISTENT), - system_id_ (policies.id_assignment () == PortableServer::SYSTEM_ID), - creation_time_ (ACE_OS::gettimeofday ()), - orb_core_ (orb_core), - cleanup_in_progress_ (0), - etherealize_objects_ (1), - outstanding_requests_ (0), - outstanding_requests_condition_ (thread_lock), - wait_for_completion_pending_ (0), - waiting_destruction_ (0), - servant_deactivation_condition_ (thread_lock), - waiting_servant_deactivation_ (0) -{ - // Set the folded name of this POA. - this->set_folded_name (); - - // Create the active object map. - TAO_Active_Object_Map *active_object_map = 0; - ACE_NEW_THROW_EX (active_object_map, - TAO_Active_Object_Map (!this->system_id (), - this->policies ().id_uniqueness () == PortableServer::UNIQUE_ID, - this->persistent (), - this->orb_core_.server_factory ()->active_object_map_creation_parameters (), - ACE_TRY_ENV), - CORBA::NO_MEMORY ()); - - // Give ownership of the new map to the auto pointer. Note, that it - // is important for the auto pointer to take ownership before - // checking for exception since we may need to delete the new map. - auto_ptr new_active_object_map (active_object_map); - - // Check for exception in construction of the active object map. - ACE_CHECK; - - // Register self with manager. - int result = this->poa_manager_.register_poa (this); - if (result != 0) - { - ACE_THROW (CORBA::OBJ_ADAPTER ()); - } - - // Add self to Object Adapter class. - result = this->object_adapter ().bind_poa (this->folded_name_, - this, - this->system_name_.out ()); - if (result != 0) - { - // Remove from POA Manager in case of errors. No checks of - // further errors... - this->poa_manager_.remove_poa (this); - - ACE_THROW (CORBA::OBJ_ADAPTER ()); - } - - // Finally everything is fine. Make sure to take ownership away - // from the auto pointer. - this->active_object_map_ = new_active_object_map.release (); - -// -// ImplRepo related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) - if (this->policies_.lifespan () == PortableServer::PERSISTENT) - { - int temp = this->use_imr_; - this->use_imr_ = 0; - this->imr_notify_startup (ACE_TRY_ENV); - ACE_CHECK; - this->use_imr_ = temp; - } - -#endif /* TAO_HAS_MINIMUM_CORBA */ -} - -TAO_POA::~TAO_POA (void) -{ -} - -void -TAO_POA::complete_destruction_i (CORBA::Environment &ACE_TRY_ENV) -{ - // Delete the active object map. - delete this->active_object_map_; - - // Remove POA from the POAManager. - int result = this->poa_manager_.remove_poa (this); - if (result != 0) - ACE_THROW (CORBA::OBJ_ADAPTER ()); - - // Remove POA from the Object Adapter. - result = this->object_adapter ().unbind_poa (this, - this->folded_name_, - this->system_name_.in ()); - if (result != 0) - ACE_THROW (CORBA::OBJ_ADAPTER ()); - - // Forced cleanup. The new memory management scheme is evil and can - // lead to reference deadlock, i.e., POA holds object A, but POA - // cannot die because object A hold POA. - { - // A recursive thread lock without using a recursive thread lock. - // Non_Servant_Upcall has a magic constructor and destructor. We - // unlock the Object_Adapter lock for the duration of the servant - // activator upcalls; reacquiring once the upcalls complete. Even - // though we are releasing the lock, other threads will not be - // able to make progress since - // has been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - -#if (TAO_HAS_MINIMUM_POA == 0) - this->adapter_activator_ = PortableServer::AdapterActivator::_nil (); - - this->servant_activator_ = PortableServer::ServantActivator::_nil (); - - this->servant_locator_ = PortableServer::ServantLocator::_nil (); - - this->default_servant_ = 0; -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - } - - CORBA::release (this); -} - -PortableServer::POA_ptr -TAO_POA::create_POA_i (const char *adapter_name, - PortableServer::POAManager_ptr poa_manager, - const CORBA::PolicyList &policies, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterAlreadyExists, - PortableServer::POA::InvalidPolicy)) -{ - // If any of the policy objects specified are not valid for the ORB - // implementation, if conflicting policy objects are specified, or - // if any of the specified policy objects require prior - // administrative action that has not been performed, an - // InvalidPolicy exception is raised containing the index in the - // policies parameter value of the first offending policy object. - TAO_POA_Policies tao_policies (this->orb_core_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); - - tao_policies.parse_policies (policies, - ACE_TRY_ENV); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); - - // If the poa_manager parameter is null, a new POAManager object is - // created and associated with the new POA. Otherwise, the specified - // POAManager object is associated with the new POA. The POAManager - // object can be obtained using the attribute name the_POAManager. - - TAO_POA_Manager *tao_poa_manager = 0; - if (CORBA::is_nil (poa_manager)) - { - ACE_NEW_THROW_EX (tao_poa_manager, - TAO_POA_Manager (this->object_adapter ()), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); - } - else - { - tao_poa_manager = ACE_dynamic_cast (TAO_POA_Manager *, - poa_manager); - } - - TAO_POA *poa = this->create_POA_i (adapter_name, - *tao_poa_manager, - tao_policies, - ACE_TRY_ENV); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); - - return PortableServer::POA::_duplicate (poa); -} - -TAO_POA * -TAO_POA::create_POA_i (const TAO_POA::String &adapter_name, - TAO_POA_Manager &poa_manager, - const TAO_POA_Policies &policies, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterAlreadyExists, - PortableServer::POA::InvalidPolicy)) -{ - // This operaton creates a new POA as a child of the target POA. The - // specified name identifies the new POA with respect to other POAs - // with the same parent POA. If the target POA already has a child - // POA with the specified name, the AdapterAlreadyExists exception - // is raised. - int result = this->children_.find (adapter_name); - - // Child was found - if (result != -1) - { - ACE_THROW_RETURN (PortableServer::POA::AdapterAlreadyExists (), - 0); - } - - // - // Child was not found - // - - // The specified policy objects are associated with the POA and used - // to control its behavior. The policy objects are effectively - // copied before this operation returns, so the application is free - // to destroy them while the POA is in use. Policies are not - // inherited from the parent POA. - TAO_POA *poa = 0; - ACE_NEW_THROW_EX (poa, - TAO_POA (adapter_name, - poa_manager, - policies, - this, - this->object_adapter ().lock (), - this->object_adapter ().thread_lock (), - this->orb_core_, - ACE_TRY_ENV), - CORBA::NO_MEMORY ()); - - // Give ownership of the new map to the auto pointer. Note, that it - // is important for the auto pointer to take ownership before - // checking for exception since we may need to delete the new map. - auto_ptr new_poa (poa); - - // Check for exception in construction of the POA. - ACE_CHECK_RETURN (0); - - // Add to children map - result = this->children_.bind (adapter_name, - new_poa.get ()); - if (result != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - - // Note: Creating a POA using a POA manager that is in the active - // state can lead to race conditions if the POA supports preexisting - // objects, because the new POA may receive a request before its - // adapter activator, servant manager, or default servant have been - // initialized. These problems do not occur if the POA is created by - // an adapter activator registered with a parent of the new POA, - // because requests are queued until the adapter activator - // returns. To avoid these problems when a POA must be explicitly - // initialized, the application can initialize the POA by invoking - // find_POA with a TRUE activate parameter. - - // Everything is fine. Don't let the auto_ptr delete the - // implementation. - return new_poa.release (); -} - -PortableServer::POA_ptr -TAO_POA::find_POA (const char *adapter_name, - CORBA::Boolean activate_it, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterNonExistent)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - // A recursive thread lock without using a recursive thread lock. - // Non_Servant_Upcall has a magic constructor and destructor. We - // unlock the Object_Adapter lock for the duration of the servant - // activator upcalls; reacquiring once the upcalls complete. Even - // though we are releasing the lock, other threads will not be able - // to make progress since - // has been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - TAO_POA *poa = this->find_POA_i (adapter_name, - activate_it, - ACE_TRY_ENV); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); - - return PortableServer::POA::_duplicate (poa); -} - -TAO_POA * -TAO_POA::find_POA_i (const ACE_CString &child_name, - CORBA::Boolean activate_it, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterNonExistent)) -{ - TAO_POA *child; - int result = this->children_.find (child_name, - child); - -#if (TAO_HAS_MINIMUM_POA == 0) - - if (result != 0) - { - if (activate_it) - { - if (!CORBA::is_nil (this->adapter_activator_.in ())) - { - // Check the state of the POA Manager. - this->check_poa_manager_state (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::Boolean success = - this->adapter_activator_->unknown_adapter (this, - child_name.c_str (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - if (success) - { - result = this->children_.find (child_name, - child); - } - else - { - result = -1; - } - } - else - { - result = -1; - } - } - else - { - result = -1; - } - } -#else - ACE_UNUSED_ARG (activate_it); -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - if (result == 0) - { - return child; - } - else - { - // Otherwise, the AdapterNonExistent exception is raised. - ACE_THROW_RETURN (PortableServer::POA::AdapterNonExistent (), - 0); - } -} - -void -TAO_POA::destroy_i (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - if (this->cleanup_in_progress_) - return; - - // Is the semantics for this thread correct? - TAO_POA::check_for_valid_wait_for_completions (wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; - - this->cleanup_in_progress_ = 1; - - // This operation destroys the POA and all descendant POAs. The POA - // so destroyed (that is, the POA with its name) may be re-created - // later in the same process. (This differs from the - // POAManager::deactivate operation that does not allow a - // re-creation of its associated POA in the same process.) - - // Remove POA from the parent - if (this->parent_ != 0) - { - int result = this->parent_->delete_child (this->name_); - if (result != 0) - { - ACE_THROW (CORBA::OBJ_ADAPTER ()); - } - } - - // Remove all children POAs - for (CHILDREN::iterator iterator = this->children_.begin (); - iterator != this->children_.end (); - ++iterator) - { - TAO_POA *child_poa = (*iterator).int_id_; - child_poa->destroy_i (etherealize_objects, - wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; - } - - - // - // ImplRepo related. - // -#if (TAO_HAS_MINIMUM_CORBA == 0) - if (this->policies_.lifespan () == PortableServer::PERSISTENT) - { - this->imr_notify_shutdown (); - // Delete the servant, if there is one. - - if (this->server_object_) - { - TAO_POA *root_poa = this->orb_core ().root_poa (); - - PortableServer::ObjectId_var id = - root_poa->servant_to_id_i (this->server_object_, ACE_TRY_ENV); - ACE_CHECK; - - root_poa->deactivate_object_i (id.in (), ACE_TRY_ENV); - ACE_CHECK; - - this->server_object_->_remove_ref (); - } - } -#endif /* TAO_HAS_MINIMUM_CORBA */ - - // When a POA is destroyed, any requests that have started execution - // continue to completion. Any requests that have not started - // execution are processed as if they were newly arrived, that is, - // the POA will attempt to cause recreation of the POA by invoking - // one or more adapter activators as described in Section 3.3.3. - - // If the wait_for_completion parameter is TRUE, the destroy - // operation will return only after all requests in process have - // completed and all invocations of etherealize have - // completed. Otherwise, the destroy operation returns after - // destroying the POAs. - - this->deactivate_all_objects_i (etherealize_objects, - wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; - - // If there are no outstanding requests. - if (this->outstanding_requests_ == 0) - { - this->complete_destruction_i (ACE_TRY_ENV); - ACE_CHECK; - } - else - { - // Mark that we are ready for destruction. - this->waiting_destruction_ = 1; - } -} - -int -TAO_POA::delete_child (const TAO_POA::String &child) -{ - int result = 0; - - // If we are not closing down, we must remove this child from our - // collection. - if (!this->cleanup_in_progress_) - result = this->children_.unbind (child); - - // Otherwise, if we are closing down, we are currently iterating - // over our children and there is not need to remove this child from - // our collection. - - return result; -} - -PortableServer::POAList * -TAO_POA::the_children_i (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - PortableServer::POAList_var children; - - ACE_NEW_THROW_EX (children, - PortableServer::POAList (this->children_.current_size ()), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (0); - - children->length (this->children_.current_size ()); - - CORBA::ULong index = 0; - for (CHILDREN::iterator iterator = this->children_.begin (); - iterator != this->children_.end (); - ++iterator, ++index) - { - TAO_POA *child_poa = (*iterator).int_id_; - children[index] = PortableServer::POA::_duplicate (child_poa); - } - - return children._retn (); -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -PortableServer::ServantManager_ptr -TAO_POA::get_servant_manager_i (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the USE_SERVANT_MANAGER policy; if not - // present, the WrongPolicy exception is raised. - if (this->policies ().request_processing () != PortableServer::USE_SERVANT_MANAGER) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - PortableServer::ServantManager::_nil ()); - } - - // This operation returns the servant manager associated with the - // POA. If no servant manager has been associated with the POA, it - // returns a null reference. - if (this->policies ().servant_retention () == PortableServer::RETAIN) - return PortableServer::ServantManager::_duplicate (this->servant_activator_.in ()); - else - return PortableServer::ServantManager::_duplicate (this->servant_locator_.in ()); -} - -void -TAO_POA::set_servant_manager_i (PortableServer::ServantManager_ptr imgr, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the USE_SERVANT_MANAGER policy; if not - // present, the WrongPolicy exception is raised. - if (this->policies ().request_processing () != PortableServer::USE_SERVANT_MANAGER) - { - ACE_THROW (PortableServer::POA::WrongPolicy ()); - } - - // This operation sets the default servant manager associated with - // the POA. - if (this->policies ().servant_retention () == PortableServer::RETAIN) - { - this->servant_activator_ = PortableServer::ServantActivator::_narrow (imgr, - ACE_TRY_ENV); - ACE_CHECK; - - if (CORBA::is_nil (this->servant_activator_.in ())) - { - ACE_THROW (PortableServer::POA::WrongPolicy ()); - } - } - else - { - this->servant_locator_ = PortableServer::ServantLocator::_narrow (imgr, - ACE_TRY_ENV); - ACE_CHECK; - - if (CORBA::is_nil (this->servant_locator_.in ())) - { - ACE_THROW (PortableServer::POA::WrongPolicy ()); - } - } -} - -PortableServer::Servant -TAO_POA::get_servant_i (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::NoServant, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the USE_DEFAULT_SERVANT policy; if not - // present, the WrongPolicy exception is raised. - if (this->policies ().request_processing () != PortableServer::USE_DEFAULT_SERVANT) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - 0); - } - - // This operation returns the default servant associated with the - // POA. - PortableServer::Servant result = this->default_servant_.in (); - if (result != 0) - { - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring once - // the upcalls complete. Even though we are releasing the lock, - // other threads will not be able to make progress since - // has been - // set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // The POA invokes _add_ref once on the Servant before returning - // it. If the application uses reference counting, the caller of - // get_servant is responsible for invoking _remove_ref once on - // the returned Servant when it is finished with it. A - // conforming caller need not invoke _remove_ref on the returned - // Servant if the type of the Servant uses the default reference - // counting inherited from ServantBase. - result->_add_ref (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - return result; - } - else - // If no servant has been associated with the POA, the NoServant - // exception is raised. - { - ACE_THROW_RETURN (PortableServer::POA::NoServant (), - 0); - } -} - -void -TAO_POA::set_servant_i (PortableServer::Servant servant, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the USE_DEFAULT_SERVANT policy; if not - // present, the WrongPolicy exception is raised. - if (this->policies ().request_processing () != PortableServer::USE_DEFAULT_SERVANT) - { - ACE_THROW (PortableServer::POA::WrongPolicy ()); - } - - // This operation registers the specified servant with the POA as - // the default servant. This servant will be used for all requests - // for which no servant is found in the Active Object Map. - this->default_servant_ = servant; - - // The implementation of set_servant will invoke _add_ref at least - // once on the Servant argument before returning. When the POA no - // longer needs the Servant, it will invoke _remove_ref on it the - // same number of times. - if (servant != 0) - { - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring once - // the upcalls complete. Even though we are releasing the lock, - // other threads will not be able to make progress since - // has been - // set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - servant->_add_ref (ACE_TRY_ENV); - ACE_CHECK; - - // If we are a single threaded POA, set up the appropriate - // locking in the servant. - this->establish_servant_lock (servant); - } -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -int -TAO_POA::is_servant_in_map (PortableServer::Servant servant) -{ - while (1) - { - int deactivated = 0; - int servant_in_map = - this->active_object_map ().is_servant_in_map (servant, - deactivated); - - if (!servant_in_map) - { - return 0; - } - else - { - if (deactivated) - { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) TAO_POA::is_servant_in_map: waiting for servant to deactivate\n"))); - - ++this->waiting_servant_deactivation_; - - if (this->object_adapter ().enable_locking_) - this->servant_deactivation_condition_.wait (); - - --this->waiting_servant_deactivation_; - } - else - { - return 1; - } - } - } -} - -int -TAO_POA::is_user_id_in_map (const PortableServer::ObjectId &id, - CORBA::Short priority, - int &priorities_match) -{ - while (1) - { - int deactivated = 0; - int user_id_in_map = - this->active_object_map ().is_user_id_in_map (id, - priority, - priorities_match, - deactivated); - - if (!user_id_in_map) - { - return 0; - } - else - { - if (deactivated) - { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) TAO_POA::is_user_id_in_map: waiting for servant to deactivate\n"))); - - ++this->waiting_servant_deactivation_; - - if (this->object_adapter ().enable_locking_) - this->servant_deactivation_condition_.wait (); - - --this->waiting_servant_deactivation_; - } - else - { - return 1; - } - } - } -} - -PortableServer::ObjectId * -TAO_POA::activate_object_i (PortableServer::Servant servant, - CORBA::Short priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the SYSTEM_ID and RETAIN policy; if not - // present, the WrongPolicy exception is raised. - if (!(this->policies ().id_assignment () == PortableServer::SYSTEM_ID && - this->policies ().servant_retention () == PortableServer::RETAIN)) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - 0); - } - - // If the POA has the UNIQUE_ID policy and the specified servant is - // already in the Active Object Map, the ServantAlreadyActive - // exception is raised. - if (this->policies ().id_uniqueness () == PortableServer::UNIQUE_ID && - this->is_servant_in_map (servant)) - { - ACE_THROW_RETURN (PortableServer::POA::ServantAlreadyActive (), - 0); - } - - // Otherwise, the activate_object operation generates an Object Id - // and enters the Object Id and the specified servant in the Active - // Object Map. The Object Id is returned. - PortableServer::ObjectId_var user_id; - if (this->active_object_map ().bind_using_system_id_returning_user_id (servant, - priority, - user_id.out ()) != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - - // - // Everything is finally ok - // - - // A recursive thread lock without using a recursive thread lock. - // Non_Servant_Upcall has a magic constructor and destructor. We - // unlock the Object_Adapter lock for the duration of the servant - // activator upcalls; reacquiring once the upcalls complete. Even - // though we are releasing the lock, other threads will not be able - // to make progress since - // has been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // The implementation of activate_object will invoke _add_ref at - // least once on the Servant argument before returning. When the POA - // no longer needs the Servant, it will invoke _remove_ref on it the - // same number of times. - servant->_add_ref (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - // If we are a single threaded POA, set up the appropriate locking - // in the servant. - this->establish_servant_lock (servant); - - return user_id._retn (); -} - -void -TAO_POA::activate_object_with_id_i (const PortableServer::ObjectId &id, - PortableServer::Servant servant, - CORBA::Short priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::ObjectAlreadyActive, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the RETAIN policy; if not present, the - // WrongPolicy exception is raised. - if (this->policies ().servant_retention () != PortableServer::RETAIN) - { - ACE_THROW (PortableServer::POA::WrongPolicy ()); - } - - // If the POA has the SYSTEM_ID policy and it detects that the - // Object Id value was not generated by the system or for this POA, - // the activate_object_with_id operation may raise the BAD_PARAM - // system exception. An ORB is not required to detect all such - // invalid Object Id values, but a portable application must not - // invoke activate_object_with_id on a POA that has the SYSTEM_ID - // policy with an Object Id value that was not previously generated - // by the system for that POA, or, if the POA also has the - // PERSISTENT policy, for a previous instantiation of the same POA. - if (this->policies ().id_assignment () == PortableServer::SYSTEM_ID && - !this->is_poa_generated_id (id)) - { - ACE_THROW (CORBA::BAD_PARAM ()); - } - - // If the CORBA object denoted by the Object Id value is already - // active in this POA (there is a servant bound to it in the Active - // Object Map), the ObjectAlreadyActive exception is raised. - int priorities_match = 1; - if (is_user_id_in_map (id, - priority, - priorities_match)) - { - ACE_THROW (PortableServer::POA::ObjectAlreadyActive ()); - } - - // If the activate_object_with_id_and_priority operation is invoked - // with a different priority to an earlier invocation of one of the - // create reference with priority operations, for the same object, - // then the ORB shall raise a BAD_INV_ORDER system exception (with a - // Standard Minor Exception Code of 1). If the priority value is the - // same then the ORB shall return SUCCESS. - if (!priorities_match) - { - ACE_THROW (CORBA::BAD_INV_ORDER (1, - CORBA::COMPLETED_NO)); - } - - // If the POA has the UNIQUE_ID policy and the servant is already in - // the Active Object Map, the ServantAlreadyActive exception is - // raised. - if (this->policies ().id_uniqueness () == PortableServer::UNIQUE_ID && - this->is_servant_in_map (servant)) - { - ACE_THROW (PortableServer::POA::ServantAlreadyActive ()); - } - - // Otherwise, the activate_object_with_id operation enters an - // association between the specified Object Id and the specified - // servant in the Active Object Map. - if (this->active_object_map ().bind_using_user_id (servant, - id, - priority) != 0) - { - ACE_THROW (CORBA::OBJ_ADAPTER ()); - } - - // - // Everything is finally ok - // - - // A recursive thread lock without using a recursive thread lock. - // Non_Servant_Upcall has a magic constructor and destructor. We - // unlock the Object_Adapter lock for the duration of the servant - // activator upcalls; reacquiring once the upcalls complete. Even - // though we are releasing the lock, other threads will not be able - // to make progress since - // has been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // The implementation of activate_object_with_id will invoke - // _add_ref at least once on the Servant argument before - // returning. When the POA no longer needs the Servant, it will - // invoke _remove_ref on it the same number of times. - servant->_add_ref (ACE_TRY_ENV); - ACE_CHECK; - - // If we are a single threaded POA, set up the appropriate locking - // in the servant. - this->establish_servant_lock (servant); -} - -void -TAO_POA::deactivate_all_objects_i (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - this->deactivate_all_objects_i (etherealize_objects, - ACE_TRY_ENV); - ACE_CHECK; - - this->wait_for_completions (wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; -} - -void -TAO_POA::wait_for_completions (CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV) -{ - while (this->object_adapter ().enable_locking_ && - wait_for_completion && - this->outstanding_requests_ > 0) - { - this->wait_for_completion_pending_ = 1; - - int result = this->outstanding_requests_condition_.wait (); - if (result == -1) - { - ACE_THROW (CORBA::OBJ_ADAPTER ()); - } - } -} - -/* static */ -void -TAO_POA::check_for_valid_wait_for_completions (CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV) -{ - if (wait_for_completion) - { - TAO_POA_Current_Impl *poa_current_impl = - TAO_TSS_RESOURCES::instance ()->poa_current_impl_; - - // This thread cannot currently be in an upcall. - if (poa_current_impl != 0) - { - // CORBA 2.3 specifies which minor code corresponds to this - // particular problem. - ACE_THROW (CORBA::BAD_INV_ORDER (3, CORBA::COMPLETED_NO)); - } - } -} - -void -TAO_POA::deactivate_all_objects_i (CORBA::Boolean etherealize_objects, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - this->etherealize_objects_ = etherealize_objects; - - // This operation is a no-op for the non-RETAIN policy. - if (this->policies ().servant_retention () != PortableServer::RETAIN) - { - return; - } - - // If the etherealize_objects parameter is TRUE, the POA has the - // RETAIN policy, and a servant manager is registered with the POA, - // the etherealize operation on the servant manager will be called - // for each active object in the Active Object Map. The apparent - // destruction of the POA occurs before any calls to etherealize are - // made. Thus, for example, an etherealize method that attempts to - // invoke operations on the POA will receive the OBJECT_NOT_EXIST - // exception. - - // We must copy the user ids into a separate place since we cannot - // remove entries while iterating through the map. - ACE_Array ids (this->active_object_map ().current_size ()); - - size_t counter = 0; - TAO_Active_Object_Map::user_id_map::iterator end - = this->active_object_map ().user_id_map_->end (); - - for (TAO_Active_Object_Map::user_id_map::iterator iter - = this->active_object_map ().user_id_map_->begin (); - iter != end; - ++iter) - { - TAO_Active_Object_Map::user_id_map::value_type map_pair = *iter; - TAO_Active_Object_Map::Map_Entry *active_object_map_entry = map_pair.second (); - - if (!active_object_map_entry->deactivated_) - { - ids[counter] = active_object_map_entry->user_id_; - ++counter; - } - } - - for (size_t i = 0; - i < counter; - ++i) - { - this->deactivate_object_i (ids[i], - ACE_TRY_ENV); - ACE_CHECK; - } -} - -void -TAO_POA::deactivate_object_i (const PortableServer::ObjectId &id, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the RETAIN policy; if not present, the - // WrongPolicy exception is raised. - if (this->policies ().servant_retention () != PortableServer::RETAIN) - { - ACE_THROW (PortableServer::POA::WrongPolicy ()); - } - - TAO_Active_Object_Map::Map_Entry *active_object_map_entry = 0; - int result = this->active_object_map ().find_servant_and_system_id_using_user_id (id, - active_object_map_entry); - - // If there is no active object associated with the specified Object - // Id, the operation raises an ObjectNotActive exception. - if (result != 0) - { - ACE_THROW (PortableServer::POA::ObjectNotActive ()); - } - - // Decrement the reference count. - CORBA::UShort new_count = --active_object_map_entry->reference_count_; - - if (new_count == 0) - { - this->cleanup_servant (active_object_map_entry, - ACE_TRY_ENV); - ACE_CHECK; - } - else - { - // It should be noted that there may be a period of time between - // an object's deactivation and the etherealization (during - // which outstanding requests are being processed) in which - // arriving requests on that object should not be passed to its - // servant. During this period, requests targeted for such an - // object act as if the POA were in holding state until - // etherealize completes. If etherealize is called as a - // consequence of a deactivate call with a etherealize_objects - // parameter of TRUE, incoming requests are rejected. - - // Else mark entry as closed... - active_object_map_entry->deactivated_ = 1; - } -} - -void -TAO_POA::cleanup_servant (TAO_Active_Object_Map::Map_Entry *active_object_map_entry, - CORBA::Environment &ACE_TRY_ENV) -{ - // If a servant manager is associated with the POA, - // ServantLocator::etherealize will be invoked with the oid and the - // servant. (The deactivate_object operation does not wait for the - // etherealize operation to complete before deactivate_object - // returns.) - // - // Note: If the servant associated with the oid is serving multiple - // Object Ids, ServantLocator::etherealize may be invoked multiple - // times with the same servant when the other objects are - // deactivated. It is the responsibility of the object - // implementation to refrain from destroying the servant while it is - // active with any Id. - - // If the POA has no ServantActivator associated with it, the POA - // implementation calls _remove_ref when all operation invocations - // have completed. If there is a ServantActivator, the Servant is - // consumed by the call to ServantActivator::etherealize instead. - - // First check for a non-zero servant. - if (active_object_map_entry->servant_) - { - // If we are a single threaded POA, teardown the appropriate - // locking in the servant. - // - // Note that teardown of the servant lock must happen before the - // _remove_ref() or etherealize() calls since they might end up - // deleting the servant. - // - this->teardown_servant_lock (active_object_map_entry->servant_); - -#if (TAO_HAS_MINIMUM_POA == 0) - - if (this->etherealize_objects_ && - this->policies ().request_processing () == PortableServer::USE_SERVANT_MANAGER && - !CORBA::is_nil (this->servant_activator_.in ())) - { - CORBA::Boolean remaining_activations = - this->active_object_map ().remaining_activations (active_object_map_entry->servant_); - - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring - // once the upcalls complete. Even though we are releasing - // the lock, other threads will not be able to make progress - // since - // has been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // If the cleanup_in_progress parameter is TRUE, the reason - // for the etherealize operation is that either the - // deactivate or destroy operation was called with an - // etherealize_objects parameter of TRUE. If the parameter - // is FALSE, the etherealize operation is called for other - // reasons. - this->servant_activator_->etherealize (active_object_map_entry->user_id_, - this, - active_object_map_entry->servant_, - this->cleanup_in_progress_, - remaining_activations - TAO_ENV_ARG_PARAMETER); - ACE_CHECK; - } - else - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - { - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring - // once the upcalls complete. Even though we are releasing - // the lock, other threads will not be able to make progress - // since - // has been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - active_object_map_entry->servant_->_remove_ref (ACE_TRY_ENV); - ACE_CHECK; - } - } - - // This operation causes the association of the Object Id specified - // by the oid parameter and its servant to be removed from the - // Active Object Map. - int result = this->active_object_map ().unbind_using_user_id (active_object_map_entry->user_id_); - - if (result != 0) - { - ACE_THROW (CORBA::OBJ_ADAPTER ()); - } -} - -void -TAO_POA::check_poa_manager_state (CORBA::Environment &ACE_TRY_ENV) -{ - PortableServer::POAManager::State state = this->poa_manager_.get_state_i (); - - if (state == PortableServer::POAManager::ACTIVE) - { - // When a POA manager is in the active state, the associated - // POAs will receive and start processing requests (assuming - // that appropriate thread resources are available). - return; - } - - if (state == PortableServer::POAManager::DISCARDING) - { - // When a POA manager is in the discarding state, the associated - // POAs will discard all incoming requests (whose processing has - // not yet begun). When a request is discarded, the TRANSIENT - // system exception must be returned to the client-side to - // indicate that the request should be re-issued. (Of course, an - // ORB may always reject a request for other reasons and raise - // some other system exception.) - ACE_THROW ( - CORBA::TRANSIENT ( - CORBA_SystemException::_tao_minor_code ( - TAO_POA_DISCARDING, - 0), - CORBA::COMPLETED_NO)); - } - - if (state == PortableServer::POAManager::HOLDING) - { - // When a POA manager is in the holding state, the associated - // POAs will queue incoming requests. The number of requests - // that can be queued is an implementation limit. If this limit - // is reached, the POAs may discard requests and return the - // TRANSIENT system exception to the client to indicate that the - // client should reissue the request. (Of course, an ORB may - // always reject a request for other reasons and raise some - // other system exception.) - - // Since there is no queuing in TAO, we immediately raise a - // TRANSIENT exception. - ACE_THROW (CORBA::TRANSIENT ( - CORBA_SystemException::_tao_minor_code ( - TAO_POA_HOLDING, - 0), - CORBA::COMPLETED_NO)); - } - - if (state == PortableServer::POAManager::INACTIVE) - { - // The inactive state is entered when the associated POAs are to - // be shut down. Unlike the discarding state, the inactive state - // is not a temporary state. When a POA manager is in the - // inactive state, the associated POAs will reject new - // requests. The rejection mechanism used is specific to the - // vendor. The GIOP location forwarding mechanism and - // CloseConnection message are examples of mechanisms that could - // be used to indicate the rejection. If the client is - // co-resident in the same process, the ORB could raise the - // OBJ_ADAPTER exception to indicate that the object - // implementation is unavailable. - ACE_THROW (CORBA::OBJ_ADAPTER ()); - } -} - -CORBA::Object_ptr -TAO_POA::create_reference_i (const char *intf, - CORBA::Short priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the SYSTEM_ID policy; if not present, the - // WrongPolicy exception is raised. - if (this->policies ().id_assignment () != PortableServer::SYSTEM_ID) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - CORBA::Object::_nil ()); - } - - // This operation creates an object reference that encapsulates a - // POA-generated Object Id value and the specified interface - // repository id. This operation does not cause an activation to - // take place. The resulting reference may be passed to clients, so - // that subsequent requests on those references will cause the - // appropriate servant manager to be invoked, if one is - // available. The generated Object Id value may be obtained by - // invoking POA::reference_to_id with the created reference. - - PortableServer::ObjectId_var system_id; - - // Do the following if we going to retain this object in the active - // object map. - if (this->policies ().servant_retention () == PortableServer::RETAIN) - { - if (this->active_object_map ().bind_using_system_id_returning_system_id (0, - priority, - system_id.out ()) != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - CORBA::Object::_nil ()); - } - } - else - { - // Otherwise, it is the NON_RETAIN policy. Therefore, any ol' - // object id will do (even an empty one). - PortableServer::ObjectId *sys_id; - ACE_NEW_THROW_EX (sys_id, - PortableServer::ObjectId, - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - system_id = sys_id; - } - - // Create object key. - TAO_ObjectKey_var key = this->create_object_key (system_id.in ()); - - // Ask the ORB to create you a reference - return this->key_to_object (key.in (), - intf, - 0, - 1, - priority, - ACE_TRY_ENV); -} - -CORBA::Object_ptr -TAO_POA::create_reference_with_id_i (const PortableServer::ObjectId &user_id, - const char *intf, - CORBA::Short priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // If the POA has the SYSTEM_ID policy and it detects that the - // Object Id value was not generated by the system or for this POA, - // the create_reference_with_id operation may raise the BAD_PARAM - // system exception. An ORB is not required to detect all such - // invalid Object Id values, but a portable application must not - // invoke this operation on a POA that has the SYSTEM_ID policy with - // an Object Id value that was not previously generated by the - // system for that POA, or, if the POA also has the PERSISTENT - // policy, for a previous instantiation of the same POA. - if (this->policies ().id_assignment () == PortableServer::SYSTEM_ID && - !this->is_poa_generated_id (user_id)) - { - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - CORBA::Object::_nil ()); - } - - // This operation creates an object reference that encapsulates the - // specified Object Id and interface repository Id values. This - // operation does not cause an activation to take place. The - // resulting reference may be passed to clients, so that subsequent - // requests on those references will cause the object to be - // activated if necessary, or the default servant used, depending on - // the applicable policies. - - PortableServer::Servant servant = 0; - PortableServer::ObjectId_var system_id; - - // Do the following if we going to retain this object in the active - // object map. - if (this->policies ().servant_retention () == PortableServer::RETAIN) - { - // @@ We need something that can find the system id using - // appropriate strategy, at the same time, return the servant if - // one is available. Before we have that function, - // basically generates broken - // collocated object when DIRECT collocation strategy is used. - - if (this->active_object_map ().find_system_id_using_user_id (user_id, - priority, - system_id.out ()) != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - CORBA::Object::_nil ()); - } - } - else - { - // Otherwise, it is the NON_RETAIN policy. Therefore, user id - // is the same as system id. - PortableServer::ObjectId *sys_id; - ACE_NEW_THROW_EX (sys_id, - PortableServer::ObjectId (user_id), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - system_id = sys_id; - } - - // Create object key. - TAO_ObjectKey_var key = this->create_object_key (system_id.in ()); - - // Ask the ORB to create you a reference - return this->key_to_object (key.in (), - intf, - servant, - 1, - priority, - ACE_TRY_ENV); -} - -PortableServer::ObjectId * -TAO_POA::servant_to_id_i (PortableServer::Servant servant, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the RETAIN and either the UNIQUE_ID or - // IMPLICIT_ACTIVATION policies; or it requires the USE_DEFAULT_SERVANT - // policy; if not present, the WrongPolicy exception is raised. - if (!(this->policies ().servant_retention () == PortableServer::RETAIN - && (this->policies ().id_uniqueness () == PortableServer::UNIQUE_ID - || this->policies ().implicit_activation () == PortableServer::IMPLICIT_ACTIVATION)) - && !(this->policies ().request_processing () == PortableServer::USE_DEFAULT_SERVANT)) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - 0); - } - - // This operation has four possible behaviors. - - // If the POA has the UNIQUE_ID policy and the specified servant is - // active, the Object Id associated with that servant is returned. - PortableServer::ObjectId_var user_id; - if (this->policies ().id_uniqueness () == PortableServer::UNIQUE_ID && - this->active_object_map ().find_user_id_using_servant (servant, - user_id.out ()) != -1) - { - return user_id._retn (); - } - - // If the POA has the IMPLICIT_ACTIVATION policy and either the POA - // has the MULTIPLE_ID policy or the specified servant is not - // active, the servant is activated using a POA-generated Object Id - // and the Interface Id associated with the servant, and that Object - // Id is returned. - if (this->policies ().implicit_activation () == PortableServer::IMPLICIT_ACTIVATION) - { - // If we reach here, then we either have the MULTIPLE_ID policy - // or we have the UNIQUE_ID policy and we are not in the active - // object map. - PortableServer::ObjectId_var user_id; - if (this->active_object_map ().bind_using_system_id_returning_user_id (servant, - TAO_INVALID_PRIORITY, - user_id.out ()) != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - - // - // Everything is finally ok - // - - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring once - // the upcalls complete. Even though we are releasing the lock, - // other threads will not be able to make progress since - // has been - // set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // If this operation causes the object to be activated, _add_ref - // is invoked at least once on the Servant argument before - // returning. Otherwise, the POA does not increment or decrement - // the reference count of the Servant passed to this function. - servant->_add_ref (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - // If we are a single threaded POA, set up the appropriate - // locking in the servant. - this->establish_servant_lock (servant); - - return user_id._retn (); - } - -#if (TAO_HAS_MINIMUM_POA == 0) - - // If the POA has the USE_DEFAULT_SERVANT policy, the servant - // specified is the default servant, and the operation is being - // invoked in he context of executin a request on the default - // servant, then the ObjectId associated with the current invocation - // is returned. - if (this->policies ().request_processing () == PortableServer::USE_DEFAULT_SERVANT) - { - // Compare the servant specified in the parameter list to the - // default servant registered with this POA. - PortableServer::Servant default_servant = this->default_servant_.in (); - if (default_servant != 0 && - default_servant == servant) - { - // If they are the same servant, then check if we are in an - // upcall. - TAO_POA_Current_Impl *poa_current_impl = - TAO_TSS_RESOURCES::instance ()->poa_current_impl_; - // If we are in an upcall on the default servant, return the - // ObjectId associated with the current invocation. - if (poa_current_impl != 0 && - servant == poa_current_impl->servant ()) - { - return poa_current_impl->get_object_id (ACE_TRY_ENV); - } - } - } - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - // Otherwise, the ServantNotActive exception is raised. - ACE_THROW_RETURN (PortableServer::POA::ServantNotActive (), - 0); -} - -PortableServer::ObjectId * -TAO_POA::servant_to_system_id_i (PortableServer::Servant servant, - CORBA::Short &priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the RETAIN and either the UNIQUE_ID or - // IMPLICIT_ACTIVATION policies; if not present, the WrongPolicy - // exception is raised. - if (!(this->policies ().servant_retention () == PortableServer::RETAIN - && (this->policies ().id_uniqueness () == PortableServer::UNIQUE_ID - || this->policies ().implicit_activation () == PortableServer::IMPLICIT_ACTIVATION))) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - 0); - } - - // This operation has three possible behaviors. - - // If the POA has the UNIQUE_ID policy and the specified servant is - // active, the Object Id associated with that servant is returned. - PortableServer::ObjectId_var system_id; - if (this->policies ().id_uniqueness () == PortableServer::UNIQUE_ID && - this->active_object_map ().find_system_id_using_servant (servant, - system_id.out (), - priority) != -1) - { - return system_id._retn (); - } - - // If the POA has the IMPLICIT_ACTIVATION policy and either the POA - // has the MULTIPLE_ID policy or the specified servant is not - // active, the servant is activated using a POA-generated Object Id - // and the Interface Id associated with the servant, and that Object - // Id is returned. - if (this->policies ().implicit_activation () == PortableServer::IMPLICIT_ACTIVATION) - { - // If we reach here, then we either have the MULTIPLE_ID policy - // or we xhave the UNIQUE_ID policy and we are not in the active - // object map. - PortableServer::ObjectId_var system_id; - if (this->active_object_map ().bind_using_system_id_returning_system_id (servant, - priority, - system_id.out ()) != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - - // - // Everything is finally ok - // - - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring once - // the upcalls complete. Even though we are releasing the lock, - // other threads will not be able to make progress since - // has been - // set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // If this operation causes the object to be activated, _add_ref - // is invoked at least once on the Servant argument before - // returning. Otherwise, the POA does not increment or decrement - // the reference count of the Servant passed to this function. - servant->_add_ref (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - // If we are a single threaded POA, set up the appropriate - // locking in the servant. - this->establish_servant_lock (servant); - - return system_id._retn (); - } - - // Otherwise, the ServantNotActive exception is raised. - ACE_THROW_RETURN (PortableServer::POA::ServantNotActive (), - 0); -} - -CORBA::Object_ptr -TAO_POA::servant_to_reference (PortableServer::Servant servant, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)) -{ - // Note: The allocation of an Object Id value and installation in - // the Active Object Map caused by implicit activation may actually - // be deferred until an attempt is made to externalize the - // reference. The real requirement here is that a reference is - // produced that will behave appropriately (that is, yield a - // consistent Object Id value when asked politely). - CORBA::Short priority = TAO_INVALID_PRIORITY; - PortableServer::ObjectId_var id = this->servant_to_system_id (servant, - priority, - ACE_TRY_ENV); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - // Create object key. - TAO_ObjectKey_var key = this->create_object_key (id.in ()); - - // Ask the ORB to create you a reference - return this->key_to_object (key.in (), - servant->_interface_repository_id (), - servant, - 1, - priority, - ACE_TRY_ENV); -} - -PortableServer::Servant -TAO_POA::reference_to_servant (CORBA::Object_ptr reference, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the RETAIN policy or the - // USE_DEFAULT_SERVANT policy. If neither policy is present, the - // WrongPolicy exception is raised. - if (!(this->policies ().servant_retention () == PortableServer::RETAIN - || this->policies ().request_processing () == PortableServer::USE_DEFAULT_SERVANT)) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - 0); - } - - // If the POA has the RETAIN policy and the specified object is - // present in the Active Object Map, this operation returns the - // servant associated with that object in the Active Object Map. - if (this->policies ().servant_retention () == PortableServer::RETAIN) - { - TAO_ObjectKey_var key = reference->_key (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - // If the object reference was not created by this POA, the - // WrongAdapter exception is raised. - PortableServer::ObjectId system_id; - TAO_Object_Adapter::poa_name poa_system_name; - CORBA::Boolean is_root = 0; - CORBA::Boolean is_persistent = 0; - CORBA::Boolean is_system_id = 0; - TAO_Temporary_Creation_Time poa_creation_time; - - int result = this->parse_key (key.in (), - poa_system_name, - system_id, - is_root, - is_persistent, - is_system_id, - poa_creation_time); - if (result != 0 || - !this->root () && - poa_system_name != this->system_name () || - is_root != this->root () || - is_persistent != this->persistent () || - is_system_id != this->system_id () || - !this->persistent () && - poa_creation_time != this->creation_time_) - { - ACE_THROW_RETURN (PortableServer::POA::WrongAdapter (), - 0); - } - - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - // Find user id from system id. - PortableServer::ObjectId user_id; - if (this->active_object_map ().find_user_id_using_system_id (system_id, - user_id) != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - - // This operation returns the active servant associated with the - // specified system Object Id value. If the Object Id value is - // not active in the POA, an ObjectNotActive exception is - // raised. - PortableServer::Servant servant = 0; - TAO_Active_Object_Map::Map_Entry *entry = 0; - - if (this->active_object_map ().find_servant_using_system_id_and_user_id (system_id, - user_id, - servant, - entry) != -1) - { - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring - // once the upcalls complete. Even though we are releasing - // the lock, other threads will not be able to make progress - // since - // has been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // The POA invokes _add_ref once on the Servant before - // returning it. If the application uses reference counting, - // the caller of reference_to_servant is responsible for - // invoking _remove_ref once on the returned Servant when it - // is finished with it. A conforming caller need not invoke - // _remove_ref on the returned Servant if the type of the - // Servant uses the default reference counting inherited - // from ServantBase. - servant->_add_ref (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - return servant; - } - else - // Otherwise, the ObjectNotActive exception is raised. - { - ACE_THROW_RETURN (PortableServer::POA::ObjectNotActive (), - 0); - } - } - -#if (TAO_HAS_MINIMUM_POA == 0) - - // Otherwise, if the POA has the USE_DEFAULT_SERVANT policy and a - // default servant has been registered with the POA, this operation - // returns the default servant. - if (this->policies ().request_processing () == PortableServer::USE_DEFAULT_SERVANT) - { - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - PortableServer::Servant result = this->default_servant_.in (); - if (result != 0) - { - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring - // once the upcalls complete. Even though we are releasing - // the lock, other threads will not be able to make progress - // since - // has been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // The POA invokes _add_ref once on the Servant before - // returning it. If the application uses reference counting, - // the caller of reference_to_servant is responsible for - // invoking _remove_ref once on the returned Servant when it - // is finished with it. A conforming caller need not invoke - // _remove_ref on the returned Servant if the type of the - // Servant uses the default reference counting inherited - // from ServantBase. - result->_add_ref (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - return result; - } - else - // Otherwise, the ObjectNotActive exception is raised. - { - ACE_THROW_RETURN (PortableServer::POA::ObjectNotActive (), - 0); - } - } - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - // Not reached - return 0; -} - -PortableServer::ObjectId * -TAO_POA::reference_to_id (CORBA::Object_ptr reference, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongAdapter, - PortableServer::POA::WrongPolicy)) -{ - // The WrongPolicy exception is declared to allow future extensions. - - // This operation returns the Object Id value encapsulated by the - // specified reference. - - // This operation is valid only if the reference was created by the - // POA on which the operation is being performed. If the object - // reference was not created by this POA, the WrongAdapter exception - // is raised. - TAO_ObjectKey_var key = reference->_key (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - PortableServer::ObjectId system_id; - TAO_Object_Adapter::poa_name poa_system_name; - CORBA::Boolean is_root = 0; - CORBA::Boolean is_persistent = 0; - CORBA::Boolean is_system_id = 0; - TAO_Temporary_Creation_Time poa_creation_time; - - int result = this->parse_key (key.in (), - poa_system_name, - system_id, - is_root, - is_persistent, - is_system_id, - poa_creation_time); - if (result != 0 || - !this->root () && - poa_system_name != this->system_name () || - is_root != this->root () || - is_persistent != this->persistent () || - is_system_id != this->system_id () || - !this->persistent () && - poa_creation_time != this->creation_time_) - { - ACE_THROW_RETURN (PortableServer::POA::WrongAdapter (), - 0); - } - - // Do the following if we have the RETAIN policy. - if (this->policies ().servant_retention () == PortableServer::RETAIN) - { - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - // The object denoted by the reference does not have to be - // active for this operation to succeed. - PortableServer::ObjectId_var user_id; - if (this->active_object_map ().find_user_id_using_system_id (system_id, - user_id.out ()) != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - - return user_id._retn (); - } - else - { - // Otherwise, it is the NON_RETAIN policy. Therefore, the - // system id is the id (and no conversion/transformation is - // needed). - return new PortableServer::ObjectId (system_id); - } -} - -PortableServer::Servant -TAO_POA::id_to_servant_i (const PortableServer::ObjectId &id, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the RETAIN policy; if not present, the - // WrongPolicy exception is raised. - if (this->policies ().servant_retention () != PortableServer::RETAIN) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - 0); - } - - // This operation returns the active servant associated with the - // specified Object Id value. If the Object Id value is not active - // in the POA, an ObjectNotActive exception is raised. - PortableServer::Servant servant = 0; - if (this->active_object_map ().find_servant_using_user_id (id, - servant) != -1) - { - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring once - // the upcalls complete. Even though we are releasing the lock, - // other threads will not be able to make progress since - // has been - // set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // The POA invokes _add_ref once on the Servant before returning - // it. If the application uses reference counting, the caller of - // id_to_servant is responsible for invoking _remove_ref once on - // the returned Servant when it is finished with it. A - // conforming caller need not invoke _remove_ref on the returned - // Servant if the type of the Servant uses the default reference - // counting inherited from ServantBase. - servant->_add_ref (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - return servant; - } - else - // Otherwise, the ObjectNotActive exception is raised. - { - ACE_THROW_RETURN (PortableServer::POA::ObjectNotActive (), - 0); - } -} - -CORBA::Object_ptr -TAO_POA::id_to_reference_i (const PortableServer::ObjectId &id, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)) -{ - // This operation requires the RETAIN policy; if not present, the - // WrongPolicy exception is raised. - if (this->policies ().servant_retention () != PortableServer::RETAIN) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - CORBA::Object::_nil ()); - } - - // If an object with the specified Object Id value is currently - // active, a reference encapsulating the information used to - // activate the object is returned. - PortableServer::ObjectId_var system_id; - PortableServer::Servant servant; - CORBA::Short priority; - if (this->active_object_map ().find_servant_and_system_id_using_user_id (id, - servant, - system_id.out (), - priority) == 0) - { - // Create object key. - TAO_ObjectKey_var key = this->create_object_key (system_id.in ()); - - // Ask the ORB to create you a reference - return this->key_to_object (key.in (), - servant->_interface_repository_id (), - servant, - 1, - priority, - ACE_TRY_ENV); - } - else - // If the Object Id value is not active in the POA, an - // ObjectNotActive exception is raised. - { - ACE_THROW_RETURN (PortableServer::POA::ObjectNotActive (), - CORBA::Object::_nil ()); - } -} - -#if (TAO_HAS_RT_CORBA == 1) - -int -TAO_POA::valid_priority (RTCORBA::Priority /* priority */) -{ - return 1; -} - -void -TAO_POA::validate_priority_and_policies (RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV) -{ - // For each of the above operations, if the POA supports the - // IMPLICIT_ACTIVATION option for the ImplicitActivationPolicy then - // the ORB shall raise a WrongPolicy user exception. This relieves - // an ORB implementation of the need to retrieve the target object's - // priority from "somewhere" when a request arrives for an inactive - // object. - if (this->policies ().implicit_activation () == PortableServer::IMPLICIT_ACTIVATION) - { - ACE_THROW (PortableServer::POA::WrongPolicy ()); - } - - // For each of the above operations, if the POA does not support the - // SERVER_DECLARED option for the PriorityModelPolicy then the ORB - // shall raise a WrongPolicy user exception. - if (this->policies ().priority_model () != TAO_POA_Policies::SERVER_DECLARED) - { - ACE_THROW (PortableServer::POA::WrongPolicy ()); - } - - // If the priority parameter of any of the above operations is not a - // valid CORBA priority or if it fails to match the priority - // configuration for resources assigned to the POA, then the ORB - // shall raise a BAD_PARAM system exception. - if (!this->valid_priority (priority)) - { - ACE_THROW (PortableServer::POA::ObjectNotActive ()); - } - - // In all other respects the semantics of the corresponding - // (i.e. without the name extensions "_with_priority" and - // "_and_priority") PortableServer::POA operations shall be - // observed. -} - -#endif /* TAO_HAS_RT_CORBA */ - -// -// Forwarding related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) - -void -TAO_POA::forward_object_i (const PortableServer::ObjectId &oid, - CORBA::Object_ptr forward_to, - CORBA::Environment &ACE_TRY_ENV) -{ - // First, deactivate the object - this->deactivate_object_i (oid, - ACE_TRY_ENV); - ACE_CHECK; - - // Create a forwarding servant - TAO_Forwarding_Servant *forwarding_servant = 0; - ACE_NEW_THROW_EX (forwarding_servant, - TAO_Forwarding_Servant (forward_to, - forward_to->_interface_repository_id ()), - CORBA::NO_MEMORY ()); - ACE_CHECK; - - // Give ownership to the auto pointer. - auto_ptr new_forwarding_servant (forwarding_servant); - - // Register the forwarding servant with the same object Id. - this->activate_object_with_id_i (oid, - forwarding_servant, - TAO_INVALID_PRIORITY, - ACE_TRY_ENV); - ACE_CHECK; - - // Finally everything is fine. Make sure to take ownership away - // from the auto pointer. - new_forwarding_servant.release (); -} - -#endif /* TAO_HAS_MINIMUM_CORBA */ - -TAO_SERVANT_LOCATION -TAO_POA::locate_servant_i (const PortableServer::ObjectId &system_id, - PortableServer::Servant &servant, - CORBA::Environment &ACE_TRY_ENV) -{ - // If the POA has the RETAIN policy, the POA looks in the Active - // Object Map to find if there is a servant associated with the - // Object Id value from the request. If such a servant exists, - // return TAO_SERVANT_FOUND. - if (this->policies ().servant_retention () == PortableServer::RETAIN) - { - // Find user id from system id. - PortableServer::ObjectId user_id; - if (this->active_object_map ().find_user_id_using_system_id (system_id, - user_id) != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - TAO_SERVANT_NOT_FOUND); - } - - TAO_Active_Object_Map::Map_Entry *entry = 0; - int result = this->active_object_map ().find_servant_using_system_id_and_user_id (system_id, - user_id, - servant, - entry); - if (result == 0) - { - // Success - return TAO_SERVANT_FOUND; - } - } - - // If the POA has the NON_RETAIN policy or has the RETAIN policy but - // didn't find a servant in the Active Object Map, the POA takes the - // following actions: - - // If the USE_ACTIVE_OBJECT_MAP_ONLY policy is in effect, the POA raises - // the OBJECT_NOT_EXIST system exception. - if (this->policies ().request_processing () == PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY) - { - return TAO_SERVANT_NOT_FOUND; - } - -#if (TAO_HAS_MINIMUM_POA == 0) - - // If the POA has the USE_DEFAULT_SERVANT policy, a default servant - // has been associated with the POA, return TAO_DEFAULT_SERVANT. If - // no servant has been associated with the POA, return - // TAO_SERVANT_NOT_FOUND. - if (this->policies ().request_processing () == PortableServer::USE_DEFAULT_SERVANT) - { - if (this->default_servant_.in () == 0) - { - return TAO_SERVANT_NOT_FOUND; - } - else - { - // Success - return TAO_DEFAULT_SERVANT; - } - } - - // If the POA has the USE_SERVANT_MANAGER policy, a servant manager - // has been associated with the POA, return - // TAO_SERVANT_MANAGER. If no servant manager has been - // associated with the POA, return TAO_SERVANT_NOT_FOUND. - if (this->policies ().request_processing () == PortableServer::USE_SERVANT_MANAGER) - { - if (CORBA::is_nil (this->servant_activator_.in ()) && - CORBA::is_nil (this->servant_locator_.in ())) - { - return TAO_SERVANT_NOT_FOUND; - } - else - { - // Success - return TAO_SERVANT_MANAGER; - } - } - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - // Failure - return TAO_SERVANT_NOT_FOUND; -} - -PortableServer::Servant -TAO_POA::locate_servant_i (const char *operation, - const PortableServer::ObjectId &system_id, - TAO_Object_Adapter::Servant_Upcall &servant_upcall, - TAO_POA_Current_Impl &poa_current_impl, - CORBA::Environment &ACE_TRY_ENV) -{ - // If we have the RETAIN policy, convert/transform from system id to - // user id. - if (this->policies ().servant_retention () == PortableServer::RETAIN) - { - if (this->active_object_map ().find_user_id_using_system_id (system_id, - poa_current_impl.object_id_) != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - } - else - { - // We have the NON_RETAIN policy, user id is the system id. - - // Smartly copy all the data; does - // not own the data. - poa_current_impl.object_id_.replace (system_id.maximum (), - system_id.length (), - ACE_const_cast (CORBA::Octet *, - system_id.get_buffer ()), - 0); - } - - // If the POA has the RETAIN policy, the POA looks in the Active - // Object Map to find if there is a servant associated with the - // Object Id value from the request. If such a servant exists, the - // POA invokes the appropriate method on the servant. - if (this->policies ().servant_retention () == PortableServer::RETAIN) - { - PortableServer::Servant servant = 0; - int result = this->active_object_map ().find_servant_using_system_id_and_user_id (system_id, - poa_current_impl.object_id (), - servant, - servant_upcall.active_object_map_entry_); - - if (result == 0) - { - // Increment the reference count. - ++servant_upcall.active_object_map_entry ()->reference_count_; - - // Success - return servant; - } - } - - // If the POA has the NON_RETAIN policy or has the RETAIN policy but - // didn't find a servant in the Active Object Map, the POA takes the - // following actions: - - // If the USE_ACTIVE_OBJECT_MAP_ONLY policy is in effect, the POA raises - // the OBJECT_NOT_EXIST system exception. - if (this->policies ().request_processing () == PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY) - { - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - 0); - } - -#if (TAO_HAS_MINIMUM_POA == 0) - - // If the POA has the USE_DEFAULT_SERVANT policy, a default servant - // has been associated with the POA so the POA will invoke the - // appropriate method on that servant. If no servant has been - // associated with the POA, the POA raises the OBJ_ADAPTER system - // exception. - if (this->policies ().request_processing () == PortableServer::USE_DEFAULT_SERVANT) - { - PortableServer::Servant result = this->default_servant_.in (); - if (result == 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - else - { - // Success - return result; - } - } - - // If the POA has the USE_SERVANT_MANAGER policy, a servant manager - // has been associated with the POA so the POA will invoke incarnate - // or preinvoke on it to find a servant that may handle the - // request. (The choice of method depends on the NON_RETAIN or - // RETAIN policy of the POA.) If no servant manager has been - // associated with the POA, the POA raises the OBJ_ADAPTER system - // exception. - // - // If a servant manager is located and invoked, but the servant - // manager is not directly capable of incarnating the object, it - // (the servant manager) may deal with the circumstance in a variety - // of ways, all of which are the application's responsibility. Any - // system exception raised by the servant manager will be returned - // to the client in the reply. In addition to standard CORBA - // exceptions, a servant manager is capable of raising a - // ForwardRequest exception. This exception includes an object - // reference. - // - if (this->policies ().request_processing () == PortableServer::USE_SERVANT_MANAGER) - { - if (CORBA::is_nil (this->servant_activator_.in ()) && - CORBA::is_nil (this->servant_locator_.in ())) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - - PortableServer::Servant servant = 0; - if (this->policies ().servant_retention () == PortableServer::RETAIN) - { - { - // A recursive thread lock without using a recursive - // thread lock. Non_Servant_Upcall has a magic - // constructor and destructor. We unlock the - // Object_Adapter lock for the duration of the servant - // activator upcalls; reacquiring once the upcalls - // complete. Even though we are releasing the lock, other - // threads will not be able to make progress since - // has - // been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // @@ - // Invocations of incarnate on the servant manager are serialized. - // Invocations of etherealize on the servant manager are serialized. - // Invocations of incarnate and etherealize on the servant manager are mutually exclusive. - servant = this->servant_activator_->incarnate (poa_current_impl.object_id (), - this - TAO_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (servant == 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - } - - // If the incarnate operation returns a servant that is - // already active for a different Object Id and if the POA - // also has the UNIQUE_ID policy, the incarnate has violated - // the POA policy and is considered to be in error. The POA - // will raise an OBJ_ADAPTER system exception for the - // request. - if (this->policies ().id_uniqueness () == PortableServer::UNIQUE_ID && - this->is_servant_in_map (servant)) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - - // The POA enters the returned Servant value into the Active - // Object Map so that subsequent requests with the same - // ObjectId value will be delivered directly to that servant - // without invoking the servant manager. - int result = this->active_object_map ().rebind_using_user_id_and_system_id (servant, - poa_current_impl.object_id (), - system_id, - servant_upcall.active_object_map_entry_); - if (result != 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - else - { - // Increment the reference count. - ++servant_upcall.active_object_map_entry ()->reference_count_; - - // A recursive thread lock without using a recursive - // thread lock. Non_Servant_Upcall has a magic - // constructor and destructor. We unlock the - // Object_Adapter lock for the duration of the servant - // activator upcalls; reacquiring once the upcalls - // complete. Even though we are releasing the lock, - // other threads will not be able to make progress since - // has - // been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // If this operation causes the object to be activated, - // _add_ref is invoked at least once on the Servant - // argument before returning. Otherwise, the POA does - // not increment or decrement the reference count of the - // Servant passed to this function. - servant->_add_ref (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - // If we are a single threaded POA, set up the - // appropriate locking in the servant. - this->establish_servant_lock (servant); - - // Success - return servant; - } - } - else - // - // Don't retain servant - // - { - // A recursive thread lock without using a recursive thread - // lock. Non_Servant_Upcall has a magic constructor and - // destructor. We unlock the Object_Adapter lock for the - // duration of the servant activator upcalls; reacquiring - // once the upcalls complete. Even though we are releasing - // the lock, other threads will not be able to make progress - // since - // has been set. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (this->object_adapter ()); - ACE_UNUSED_ARG (non_servant_upcall); - - // No serialization of invocations of preinvoke or - // postinvoke may be assumed; there may be multiple - // concurrent invocations of preinvoke for the same - // ObjectId. - // - // The same thread will be used to preinvoke the object, - // process the request, and postinvoke the object. - // - PortableServer::ServantLocator::Cookie cookie; - PortableServer::Servant servant = this->servant_locator_->preinvoke (poa_current_impl.object_id (), - this, - operation, - cookie - TAO_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (servant == 0) - { - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); - } - - // If we are a single threaded POA, set up the - // appropriate locking in the servant. - this->establish_servant_lock (servant); - - // Remember to invoke - servant_upcall.using_servant_locator (); - - // Remember the cookie - servant_upcall.locator_cookie (cookie); - - // Remember operation name. - servant_upcall.operation (operation); - - // Success - return servant; - } - } -#else - ACE_UNUSED_ARG (operation); -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - // Failure - ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - 0); -} - -/* static */ -int -TAO_POA::parse_key (const TAO_ObjectKey &key, - TAO_Object_Adapter::poa_name &poa_system_name, - PortableServer::ObjectId &system_id, - CORBA::Boolean &is_root, - CORBA::Boolean &is_persistent, - CORBA::Boolean &is_system_id, - TAO_Temporary_Creation_Time &poa_creation_time) -{ - // Start at zero. - CORBA::ULong starting_at = 0; - - // Get the object key octets. - const CORBA::Octet *key_data = key.get_buffer (); - -#if (TAO_NO_IOR_TABLE == 0) - // Skip the object key prefix since we have already checked for - // this. - starting_at += TAO_OBJECTKEY_PREFIX_SIZE; -#endif /* TAO_NO_IOR_TABLE */ - - // Check the root indicator. - char root_key_type = key_data[starting_at]; - if (root_key_type == TAO_POA::root_key_char ()) - { - is_root = 1; - } - else if (root_key_type == TAO_POA::non_root_key_char ()) - { - is_root = 0; - } - else - { - // Incorrect key - return -1; - } - - // Skip past the system id indicator - starting_at += TAO_POA::root_key_type_length (); - - // Check the system id indicator. - char system_id_key_type = key_data[starting_at]; - if (system_id_key_type == TAO_POA::system_id_key_char ()) - { - is_system_id = 1; - } - else if (system_id_key_type == TAO_POA::user_id_key_char ()) - { - is_system_id = 0; - } - else - { - // Incorrect key - return -1; - } - - // Skip past the system id indicator - starting_at += TAO_POA::system_id_key_type_length (); - - // Check the persistence indicator - char persistent_key_type = key_data[starting_at]; - if (persistent_key_type == TAO_POA::persistent_key_char ()) - { - is_persistent = 1; - } - else if (persistent_key_type == TAO_POA::transient_key_char ()) - { - is_persistent = 0; - } - else - { - // Incorrect key - return -1; - } - - // Skip past the persistent indicator - starting_at += TAO_POA::persistent_key_type_length (); - -#if (POA_NO_TIMESTAMP == 0) - // Grab the timestamp for transient POAs. - if (!is_persistent) - { - // Take the creation time for the timestamp - poa_creation_time.creation_time (key_data + starting_at); - - // Skip past the timestamp - starting_at += TAO_Creation_Time::creation_time_length (); - } -#else - ACE_UNUSED_ARG (poa_creation_time); -#endif /* POA_NO_TIMESTAMP */ - - // Calculate the size of the POA name. - CORBA::ULong poa_name_size = 0; - if (!is_persistent) - { - // Transient POAs have fixed size. - poa_name_size = TAO_Object_Adapter::transient_poa_name_size (); - } - else if (is_system_id) - { - // System ids have fixed size. - poa_name_size = key.length () - starting_at - TAO_Active_Object_Map::system_id_size (); - } - else - { - // Get the size from the object key. - ACE_OS::memcpy (&poa_name_size, - key_data + starting_at, - sizeof (poa_name_size)); - poa_name_size = ACE_NTOHL (poa_name_size); - - starting_at += sizeof (poa_name_size); - } - - // For non-root POAs, grab their name. - if (!is_root) - { - poa_system_name.replace (poa_name_size, - poa_name_size, - (CORBA::Octet *) key_data + starting_at, - 0); - - starting_at += poa_name_size; - } - - // The rest is the system id. - CORBA::ULong system_id_size = key.length () - starting_at; - - // Reset . - system_id.replace (system_id_size, - system_id_size, - (CORBA::Octet *) key_data + starting_at, - 0); - - // Success - return 0; -} - -TAO_ObjectKey * -TAO_POA::create_object_key (const PortableServer::ObjectId &id) -{ - // Calculate the prefix size. - CORBA::ULong prefix_size = 0; -#if (TAO_NO_IOR_TABLE == 0) - prefix_size += TAO_OBJECTKEY_PREFIX_SIZE; -#endif /* TAO_NO_IOR_TABLE */ - - // If we are dealing with a persistent POA and user ids are being - // used, then we need to add the POA name length field to the object - // key. Otherwise, the POA name length can be calculated by looking - // at the remainder after extracting other parts of the key. - int add_poa_name_length = - this->persistent_ && - !this->system_id_; - - // Size required by the POA name. - CORBA::ULong poa_name = 0; - - // Calculate the space required for the POA name. - CORBA::ULong poa_name_length = this->system_name_->length (); - if (!this->root ()) - { - poa_name += poa_name_length; - } - - // Check if we need to added the length of the POA name. - if (add_poa_name_length) - { - poa_name += sizeof (poa_name_length); - } - - // Calculate the space required for the timestamp and the persistent - // byte. - CORBA::ULong creation_time = this->persistent_key_type_length (); -#if (POA_NO_TIMESTAMP == 0) - // Calculate the space required for the timestamp. - CORBA::ULong creation_time_length = TAO_Creation_Time::creation_time_length (); - if (!this->persistent_) - { - creation_time += creation_time_length; - } -#endif /* POA_NO_TIMESTAMP */ - - // Calculate the space required for the key. - CORBA::ULong buffer_size = - prefix_size + - this->root_key_type_length () + - this->system_id_key_type_length () + - creation_time + - poa_name + - id.length (); - - // Create the buffer for the key. - CORBA::Octet *buffer = TAO_ObjectKey::allocbuf (buffer_size); - - // Keeps track of where the next infomation goes; start at 0 byte. - CORBA::ULong starting_at = 0; - -#if (TAO_NO_IOR_TABLE == 0) - // Add the object key prefix. - ACE_OS::memcpy (&buffer[starting_at], - &objectkey_prefix[0], - TAO_OBJECTKEY_PREFIX_SIZE); - - starting_at += TAO_OBJECTKEY_PREFIX_SIZE; -#endif /* TAO_NO_IOR_TABLE */ - - // Copy the root byte. - buffer[starting_at] = (CORBA::Octet) this->root_key_type (); - starting_at += this->root_key_type_length (); - - // Copy the system id byte. - buffer[starting_at] = (CORBA::Octet) this->system_id_key_type (); - starting_at += this->system_id_key_type_length (); - - // Copy the persistence byte. - buffer[starting_at] = (CORBA::Octet) this->persistent_key_type (); - starting_at += this->persistent_key_type_length (); - -#if (POA_NO_TIMESTAMP == 0) - // Then copy the timestamp for transient POAs. - if (!this->persistent ()) - { - ACE_OS::memcpy (&buffer[starting_at], - this->creation_time_.creation_time (), - creation_time_length); - starting_at += creation_time_length; - } -#endif /* POA_NO_TIMESTAMP */ - - // Check if we need to added the length of the POA name. - if (add_poa_name_length) - { - poa_name_length = ACE_HTONL (poa_name_length); - ACE_OS::memcpy (&buffer[starting_at], - &poa_name_length, - sizeof (poa_name_length)); - starting_at += sizeof (poa_name_length); - } - - // Put the POA name into the key (for non-root POAs). - if (!this->root ()) - { - ACE_OS::memcpy (&buffer[starting_at], - this->system_name_->get_buffer (), - this->system_name_->length ()); - starting_at += this->system_name_->length (); - } - - // Then copy the object id into the key. - ACE_OS::memcpy (&buffer[starting_at], - id.get_buffer (), - id.length ()); - - // Create the key, giving the ownership of the buffer to the - // sequence. - TAO_ObjectKey *key = 0; - ACE_NEW_RETURN (key, - TAO_ObjectKey (buffer_size, - buffer_size, - buffer, - 1), - 0); - - return key; -} - -int -TAO_POA::is_poa_generated_id (const PortableServer::ObjectId &id) -{ - -#if defined (POA_NAME_IN_POA_GENERATED_ID) - - // Grab the buffer - const char *id_buffer = (const char *) id.get_buffer (); - - // Check to see if the POA name is the first part of the id - return - this->name_.length () < id.length () && - ACE_OS::strncmp (id_buffer, - this->name_.c_str (), - this->name_.length ()) == 0; - -#else /* POA_NAME_IN_POA_GENERATED_ID */ - - ACE_UNUSED_ARG (id); - return 1; - -#endif /* POA_NAME_IN_POA_GENERATED_ID */ -} - -void -TAO_POA::set_folded_name (void) -{ - CORBA::ULong length = 0; - CORBA::ULong parent_length = 0; - - if (this->parent_ != 0) - { - parent_length = this->parent_->folded_name ().length (); - length += parent_length; - } - - length += this->name_.length (); - length += TAO_POA::name_separator_length (); - - this->folded_name_.length (length); - CORBA::Octet *folded_name_buffer = this->folded_name_.get_buffer (); - - if (this->parent_ != 0) - { - ACE_OS::memcpy (folded_name_buffer, - this->parent_->folded_name ().get_buffer (), - parent_length); - } - - ACE_OS::memcpy (&folded_name_buffer[parent_length], - this->name_.c_str (), - this->name_.length ()); - - folded_name_buffer[length - TAO_POA::name_separator_length ()] = TAO_POA::name_separator (); -} - -PortableServer::ObjectId * -TAO_POA::string_to_ObjectId (const char *string) -{ - // Size of string - // - // We DO NOT include the zero terminator, as this is simply an - // artifact of the way strings are stored in C. - // - CORBA::ULong buffer_size = ACE_OS::strlen (string); - - // Create the buffer for the Id - CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (buffer_size); - - // Copy the contents - ACE_OS::memcpy (buffer, string, buffer_size); - - // Create and return a new ID - PortableServer::ObjectId *id = 0; - ACE_NEW_RETURN (id, - PortableServer::ObjectId (buffer_size, - buffer_size, - buffer, - 1), - 0); - - return id; -} - -PortableServer::ObjectId * -TAO_POA::string_to_ObjectId (const char *string, - int size) -{ - // Create the buffer for the Id - CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (size); - - // Copy the contents - ACE_OS::memcpy (buffer, string, size); - - // Create and return a new ID - PortableServer::ObjectId *id = 0; - ACE_NEW_RETURN (id, - PortableServer::ObjectId (size, - size, - buffer, - 1), - 0); - - return id; -} - -PortableServer::ObjectId * -TAO_POA::wstring_to_ObjectId (const CORBA::WChar *string) -{ - // Size of Id - // - // We DO NOT include the zero terminator, as this is simply an - // artifact of the way strings are stored in C. - // - CORBA::ULong string_length = ACE_OS::wslen (string); - - size_t buffer_size = string_length * sizeof (CORBA::WChar); - - // Create the buffer for the Id - CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (buffer_size); - - // Copy contents - ACE_OS::memcpy (buffer, string, buffer_size); - - // Create a new ID - PortableServer::ObjectId *id = 0; - ACE_NEW_RETURN (id, - PortableServer::ObjectId (buffer_size, - buffer_size, - buffer, - 1), - 0); - - return id; -} - -char * -TAO_POA::ObjectId_to_string (const PortableServer::ObjectId &id) -{ - // Create space - char * string = CORBA::string_alloc (id.length ()); - - // Copy the data - ACE_OS::memcpy (string, id.get_buffer (), id.length ()); - - // Null terminate the string - string[id.length ()] = '\0'; - - // Return string - return string; -} - -CORBA::WChar * -TAO_POA::ObjectId_to_wstring (const PortableServer::ObjectId &id) -{ - // Compute resulting wide string's length. - CORBA::ULong string_length = - id.length () / sizeof (CORBA::WChar) + 1; - - // Allocate an extra slot if the id's length is not "aligned" on a - // CORBA::WChar. - if (id.length () % sizeof (CORBA::WChar)) - string_length++; - - // Create space. - CORBA::WChar* string = CORBA::wstring_alloc (string_length); - - // Copy the data - ACE_OS::memcpy (string, - id.get_buffer (), - id.length ()); - - // Null terminate the string - string[string_length] = '\0'; - - // Return string. - return string; -} - -TAO_Object_Adapter & -TAO_POA::object_adapter (void) -{ - return *this->orb_core_.object_adapter (); -} - -void -TAO_POA::encode_sequence_to_string (char * &str, - const TAO_Unbounded_Sequence &seq) -{ - // We must allocate a buffer which is (gag) 3 times the length - // of the sequence, which is the length required in the worst-case - // scenario of all non-printable characters. - // - // There are two strategies here...we could allocate all that space here, - // fill it up, then copy-allocate new space of just the right length. - // OR, we could just return this space. The classic time-space tradeoff, - // and for now we'll let time win out, which means that we only do the - // allocation once. - u_int len = 3 * seq.length (); /* space for zero termination not needed */; - str = CORBA::string_alloc (len); - - char *cp = str; - - for (u_int i = 0; - cp < (cp + len) && i < seq.length(); - ++i) - { - u_char byte = seq[i]; - if (isprint (byte) && byte != '\\') - { - *cp++ = (char) byte; - continue; - } - - *cp++ = '\\'; - *cp++ = ACE::nibble2hex ((byte >> 4) & 0x0f); - *cp++ = ACE::nibble2hex (byte & 0x0f); - } - // Zero terminate - *cp = '\0'; -} - -void -TAO_POA::decode_string_to_sequence (TAO_Unbounded_Sequence &seq, - const char *str) -{ - if (str == 0) - { - seq.length (0); - return; - } - - u_int length = ACE_OS::strlen (str); - const char *eos = str + length; - const char *cp = str; - - // Set the length of the sequence to be as long as - // we'll possibly need...we'll reset it to the actual - // length later. - seq.length (length); - - u_int i = 0; - for (; - cp < eos && i < seq.length (); - i++) - { - if (*cp == '\\') - { - // This is an escaped non-printable, - // so we decode the hex values into - // the sequence's octet - seq[i] = (u_char) (ACE::hex2byte (cp[1]) << 4); - seq[i] |= (u_char) ACE::hex2byte (cp[2]); - cp += 3; - } - else - // Copy it in - seq[i] = *cp++; - } - - // Set the length appropriately - seq.length (i); -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -PortableServer::ThreadPolicy_ptr -TAO_POA::create_thread_policy (PortableServer::ThreadPolicyValue value, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Thread_Policy *thread_policy = 0; - ACE_NEW_THROW_EX (thread_policy, - TAO_Thread_Policy (value), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (PortableServer::ThreadPolicy::_nil ()); - - return thread_policy; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -PortableServer::LifespanPolicy_ptr -TAO_POA::create_lifespan_policy (PortableServer::LifespanPolicyValue value, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Lifespan_Policy *lifespan_policy = 0; - ACE_NEW_THROW_EX (lifespan_policy, - TAO_Lifespan_Policy (value), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (PortableServer::LifespanPolicy::_nil ()); - - return lifespan_policy; -} - -PortableServer::IdUniquenessPolicy_ptr -TAO_POA::create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Id_Uniqueness_Policy *id_uniqueness_policy = 0; - ACE_NEW_THROW_EX (id_uniqueness_policy, - TAO_Id_Uniqueness_Policy (value), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (PortableServer::IdUniquenessPolicy::_nil ()); - - return id_uniqueness_policy; -} - -PortableServer::IdAssignmentPolicy_ptr -TAO_POA::create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Id_Assignment_Policy *id_assignment_policy = 0; - ACE_NEW_THROW_EX (id_assignment_policy, - TAO_Id_Assignment_Policy (value), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (PortableServer::IdAssignmentPolicy::_nil ()); - - return id_assignment_policy; -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -PortableServer::ImplicitActivationPolicy_ptr -TAO_POA::create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Implicit_Activation_Policy *implicit_activation_policy = 0; - ACE_NEW_THROW_EX (implicit_activation_policy, - TAO_Implicit_Activation_Policy (value), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (PortableServer::ImplicitActivationPolicy::_nil ()); - - return implicit_activation_policy; -} - -PortableServer::ServantRetentionPolicy_ptr -TAO_POA::create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Servant_Retention_Policy *servant_retention_policy = 0; - ACE_NEW_THROW_EX (servant_retention_policy, - TAO_Servant_Retention_Policy (value), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (PortableServer::ServantRetentionPolicy::_nil ()); - - return servant_retention_policy; -} - -PortableServer::RequestProcessingPolicy_ptr -TAO_POA::create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Request_Processing_Policy *request_processing_policy = 0; - ACE_NEW_THROW_EX (request_processing_policy, - TAO_Request_Processing_Policy (value), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (PortableServer::RequestProcessingPolicy::_nil ()); - - return request_processing_policy; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -TAO_Thread_Policy::TAO_Thread_Policy (PortableServer::ThreadPolicyValue value) - : value_ (value) -{ -} - -PortableServer::ThreadPolicyValue -TAO_Thread_Policy::value (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->value_; -} - -CORBA::Policy_ptr -TAO_Thread_Policy::copy (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Thread_Policy *thread_policy_copy = 0; - ACE_NEW_THROW_EX (thread_policy_copy, - TAO_Thread_Policy (this->value_), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (CORBA::Policy::_nil ()); - - return thread_policy_copy; -} - -void -TAO_Thread_Policy::destroy (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -CORBA::PolicyType -TAO_Thread_Policy::policy_type (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::THREAD_POLICY_ID; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -TAO_Lifespan_Policy::TAO_Lifespan_Policy (PortableServer::LifespanPolicyValue value) - : value_ (value) -{ -} - -PortableServer::LifespanPolicyValue -TAO_Lifespan_Policy::value (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->value_; -} - -CORBA::Policy_ptr -TAO_Lifespan_Policy::copy (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Lifespan_Policy *lifespan_policy_copy = 0; - ACE_NEW_THROW_EX (lifespan_policy_copy, - TAO_Lifespan_Policy (this->value_), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (CORBA::Policy::_nil ()); - - return lifespan_policy_copy; -} - -void -TAO_Lifespan_Policy::destroy (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -CORBA::PolicyType -TAO_Lifespan_Policy::policy_type (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::LIFESPAN_POLICY_ID; -} - -TAO_Id_Uniqueness_Policy::TAO_Id_Uniqueness_Policy (PortableServer::IdUniquenessPolicyValue value) - : value_ (value) -{ -} - -PortableServer::IdUniquenessPolicyValue -TAO_Id_Uniqueness_Policy::value (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->value_; -} - -CORBA::Policy_ptr -TAO_Id_Uniqueness_Policy::copy (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Id_Uniqueness_Policy *id_uniqueness_policy_copy = 0; - ACE_NEW_THROW_EX (id_uniqueness_policy_copy, - TAO_Id_Uniqueness_Policy (this->value_), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (CORBA::Policy::_nil ()); - - return id_uniqueness_policy_copy; -} - -void -TAO_Id_Uniqueness_Policy::destroy (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -CORBA::PolicyType -TAO_Id_Uniqueness_Policy::policy_type (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::ID_UNIQUENESS_POLICY_ID; -} - -TAO_Id_Assignment_Policy::TAO_Id_Assignment_Policy (PortableServer::IdAssignmentPolicyValue value) - : value_ (value) -{ -} - -PortableServer::IdAssignmentPolicyValue -TAO_Id_Assignment_Policy::value (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->value_; -} - -CORBA::Policy_ptr -TAO_Id_Assignment_Policy::copy (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Id_Assignment_Policy *id_assignment_policy_copy = 0; - ACE_NEW_THROW_EX (id_assignment_policy_copy, - TAO_Id_Assignment_Policy (this->value_), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (CORBA::Policy::_nil ()); - - return id_assignment_policy_copy; -} - -void -TAO_Id_Assignment_Policy::destroy (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -CORBA::PolicyType -TAO_Id_Assignment_Policy::policy_type (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::ID_ASSIGNMENT_POLICY_ID; -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -TAO_Implicit_Activation_Policy::TAO_Implicit_Activation_Policy (PortableServer::ImplicitActivationPolicyValue value) - : value_ (value) -{ -} - -PortableServer::ImplicitActivationPolicyValue -TAO_Implicit_Activation_Policy::value (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->value_; -} - -CORBA::Policy_ptr -TAO_Implicit_Activation_Policy::copy (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Implicit_Activation_Policy *implicit_activation_policy_copy = 0; - ACE_NEW_THROW_EX (implicit_activation_policy_copy, - TAO_Implicit_Activation_Policy (this->value_), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (CORBA::Policy::_nil ()); - - return implicit_activation_policy_copy; -} - -void -TAO_Implicit_Activation_Policy::destroy (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -CORBA::PolicyType -TAO_Implicit_Activation_Policy::policy_type (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::IMPLICIT_ACTIVATION_POLICY_ID; -} - -TAO_Servant_Retention_Policy::TAO_Servant_Retention_Policy (PortableServer::ServantRetentionPolicyValue value) - : value_ (value) -{ -} - -PortableServer::ServantRetentionPolicyValue -TAO_Servant_Retention_Policy::value (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->value_; -} - -CORBA::Policy_ptr -TAO_Servant_Retention_Policy::copy (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Servant_Retention_Policy *servant_retention_policy_copy = 0; - ACE_NEW_THROW_EX (servant_retention_policy_copy, - TAO_Servant_Retention_Policy (this->value_), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (CORBA::Policy::_nil ()); - - return servant_retention_policy_copy; -} - -void -TAO_Servant_Retention_Policy::destroy (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -CORBA::PolicyType -TAO_Servant_Retention_Policy::policy_type (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::SERVANT_RETENTION_POLICY_ID; -} - -TAO_Request_Processing_Policy::TAO_Request_Processing_Policy (PortableServer::RequestProcessingPolicyValue value) - : value_ (value) -{ -} - -PortableServer::RequestProcessingPolicyValue -TAO_Request_Processing_Policy::value (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->value_; -} - -CORBA::Policy_ptr -TAO_Request_Processing_Policy::copy (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_Request_Processing_Policy *request_processing_policy_copy = 0; - ACE_NEW_THROW_EX (request_processing_policy_copy, - TAO_Request_Processing_Policy (this->value_), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (CORBA::Policy::_nil ()); - - return request_processing_policy_copy; -} - -void -TAO_Request_Processing_Policy::destroy (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -CORBA::PolicyType -TAO_Request_Processing_Policy::policy_type (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::REQUEST_PROCESSING_POLICY_ID; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -TAO_POA_Policies::TAO_POA_Policies (TAO_ORB_Core &orb_core, - CORBA::Environment &ACE_TRY_ENV) - : thread_ (PortableServer::ORB_CTRL_MODEL), - lifespan_ (PortableServer::TRANSIENT), - id_uniqueness_ (PortableServer::UNIQUE_ID), - id_assignment_ (PortableServer::SYSTEM_ID), - implicit_activation_ (PortableServer::NO_IMPLICIT_ACTIVATION), - servant_retention_ (PortableServer::RETAIN), - request_processing_ (PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY), - priority_model_ (TAO_POA_Policies::CLIENT_PROPAGATED), - server_priority_ (TAO_INVALID_PRIORITY), - -#if (TAO_HAS_RT_CORBA == 1) - - server_protocol_ (0), - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - client_exposed_fixed_policies_ () -{ - -#if (TAO_HAS_RT_CORBA == 1) - - RTCORBA::PriorityModelPolicy_var priority_model = - orb_core.priority_model (); - - if (!CORBA::is_nil (priority_model.in ())) - { - RTCORBA::PriorityModel rt_priority_model = - priority_model->priority_model (ACE_TRY_ENV); - ACE_CHECK; - - this->priority_model_ = - TAO_POA_Policies::PriorityModel (rt_priority_model); - - this->server_priority_ = - priority_model->server_priority (ACE_TRY_ENV); - ACE_CHECK; - } - - TAO_ServerProtocolPolicy *server_protocol = - orb_core.server_protocol (); - - if (server_protocol != 0) - { - this->server_protocol (server_protocol); - server_protocol->_remove_ref (); - } - -#else - - ACE_UNUSED_ARG (orb_core); - ACE_UNUSED_ARG (ACE_TRY_ENV); - -#endif /* TAO_HAS_RT_CORBA == 1 */ - -} - -TAO_POA_Policies::TAO_POA_Policies (const TAO_POA_Policies &rhs) - : thread_ (rhs.thread ()), - lifespan_ (rhs.lifespan ()), - id_uniqueness_ (rhs.id_uniqueness ()), - id_assignment_ (rhs.id_assignment ()), - implicit_activation_ (rhs.implicit_activation ()), - servant_retention_ (rhs.servant_retention ()), - request_processing_ (rhs.request_processing ()), - priority_model_ (rhs.priority_model ()), - server_priority_ (rhs.server_priority ()), - -#if (TAO_HAS_RT_CORBA == 1) - - server_protocol_ (0), - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - client_exposed_fixed_policies_ ( rhs.client_exposed_fixed_policies ()) -{ - -#if (TAO_HAS_RT_CORBA == 1) - - this->server_protocol (rhs.server_protocol ()); - -#endif /* TAO_HAS_RT_CORBA == 1 */ - -} - -TAO_POA_Policies::~TAO_POA_Policies (void) -{ - for (CORBA::ULong i = 0; - i < this->client_exposed_fixed_policies_.length (); - ++i) - { - ACE_TRY_NEW_ENV - { - this->client_exposed_fixed_policies_[i]->destroy (ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // Ignore exceptions - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_POA_Policies::~TAO_POA_Policies"); - } - ACE_ENDTRY; - } - -#if (TAO_HAS_RT_CORBA == 1) - - this->server_protocol (0); - -#endif /* TAO_HAS_RT_CORBA == 1 */ - -} - -void -TAO_POA_Policies::parse_policies (const CORBA::PolicyList &policies, - CORBA::Environment &ACE_TRY_ENV) -{ - for (CORBA::ULong i = 0; - i < policies.length (); - i++) - { - this->parse_policy (policies[i], - ACE_TRY_ENV); - ACE_CHECK; - } - - if (this->validity_check () == -1) - { - ACE_THROW (PortableServer::POA::InvalidPolicy ()); - } -} - -int -TAO_POA_Policies::validity_check (void) -{ - // The NON_RETAIN policy requires either the USE_DEFAULT_SERVANT or - // USE_SERVANT_MANAGER policies. - if (this->servant_retention_ == PortableServer::NON_RETAIN) - if (this->request_processing_ != PortableServer::USE_SERVANT_MANAGER && - this->request_processing_ != PortableServer::USE_DEFAULT_SERVANT) - return -1; - - // USE_ACTIVE_OBJECT_MAP_ONLY requires the RETAIN policy. - if (this->request_processing_ == PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY) - if (this->servant_retention_ != PortableServer::RETAIN) - return -1; - - // USE_DEFAULT_SERVANT requires the MULTIPLE_ID policy. - if (this->request_processing_ == PortableServer::USE_DEFAULT_SERVANT) - if (this->id_uniqueness_ != PortableServer::MULTIPLE_ID) - return -1; - - // IMPLICIT_ACTIVATION requires the SYSTEM_ID and RETAIN policies. - if (this->implicit_activation_ == PortableServer::IMPLICIT_ACTIVATION) - if (this->servant_retention_ != PortableServer::RETAIN || - this->id_assignment_ != PortableServer::SYSTEM_ID) - return -1; - - int result = 0; - - result = this->validate_priority_model (); - if (result != 0) - return result; - - result = this->validate_server_protocol (); - if (result != 0) - return result; - - return 0; -} - -int -TAO_POA_Policies::validate_priority_model (void) -{ - return 0; -} - -int -TAO_POA_Policies::validate_server_protocol (void) -{ - return 0; -} - -#if (TAO_HAS_RT_CORBA == 1) - -int -TAO_POA_Policies::validate_client_protocol (RTCORBA::ClientProtocolPolicy_ptr) -{ - return 0; -} - -int -TAO_POA_Policies::validate_priority_bands (RTCORBA::PriorityBandedConnectionPolicy_ptr) -{ - return 0; -} - -#endif /* TAO_HAS_RT_CORBA == 1 */ - -void -TAO_POA_Policies::parse_policy (const CORBA::Policy_ptr policy, - CORBA::Environment &ACE_TRY_ENV) -{ - -#if (TAO_HAS_MINIMUM_POA == 0) - - PortableServer::ThreadPolicy_var thread - = PortableServer::ThreadPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (thread.in ())) - { - this->thread_ = thread->value (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - PortableServer::LifespanPolicy_var lifespan - = PortableServer::LifespanPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (lifespan.in ())) - { - this->lifespan_ = lifespan->value (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - - PortableServer::IdUniquenessPolicy_var id_uniqueness - = PortableServer::IdUniquenessPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (id_uniqueness.in ())) - { - this->id_uniqueness_ = id_uniqueness->value (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - - PortableServer::IdAssignmentPolicy_var id_assignment - = PortableServer::IdAssignmentPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (id_assignment.in ())) - { - this->id_assignment_ = id_assignment->value (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - -#if (TAO_HAS_MINIMUM_POA == 0) - - PortableServer::ImplicitActivationPolicy_var implicit_activation - = PortableServer::ImplicitActivationPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (implicit_activation.in ())) - { - this->implicit_activation_ = implicit_activation->value (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - - PortableServer::ServantRetentionPolicy_var servant_retention - = PortableServer::ServantRetentionPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (servant_retention.in ())) - { - this->servant_retention_ = servant_retention->value (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - - PortableServer::RequestProcessingPolicy_var request_processing - = PortableServer::RequestProcessingPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (request_processing.in ())) - { - this->request_processing_ = request_processing->value (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if (TAO_HAS_RT_CORBA == 1) - - RTCORBA::PriorityModelPolicy_var priority_model - = RTCORBA::PriorityModelPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (priority_model.in ())) - { - RTCORBA::PriorityModel rt_priority_model = - priority_model->priority_model (ACE_TRY_ENV); - ACE_CHECK; - - this->priority_model_ = - TAO_POA_Policies::PriorityModel (rt_priority_model); - - this->server_priority_ = - priority_model->server_priority (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - - RTCORBA::ClientProtocolPolicy_var client_protocol - = RTCORBA::ClientProtocolPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (client_protocol.in ())) - { - int result = - this->validate_client_protocol (client_protocol.in ()); - - if (result != 0) - ACE_THROW (PortableServer::POA::InvalidPolicy ()); - - CORBA::ULong current_length = - this->client_exposed_fixed_policies_.length (); - - this->client_exposed_fixed_policies_.length (current_length + 1); - - this->client_exposed_fixed_policies_[current_length] = - client_protocol->copy (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - - RTCORBA::PriorityBandedConnectionPolicy_var priority_bands - = RTCORBA::PriorityBandedConnectionPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (priority_bands.in ())) - { - int result = - this->validate_priority_bands (priority_bands.in ()); - - if (result != 0) - ACE_THROW (PortableServer::POA::InvalidPolicy ()); - - CORBA::ULong current_length = - this->client_exposed_fixed_policies_.length (); - - this->client_exposed_fixed_policies_.length (current_length + 1); - - this->client_exposed_fixed_policies_[current_length] = - priority_bands->copy (ACE_TRY_ENV); - ACE_CHECK; - - return; - } - - RTCORBA::ServerProtocolPolicy_var server_protocol - = RTCORBA::ServerProtocolPolicy::_narrow (policy, - ACE_TRY_ENV); - ACE_CHECK; - - if (!CORBA::is_nil (server_protocol.in ())) - { - TAO_ServerProtocolPolicy *server_protocol_i = - ACE_dynamic_cast (TAO_ServerProtocolPolicy *, - server_protocol.in ()); - - this->server_protocol (server_protocol_i); - - return; - } - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - ACE_THROW (PortableServer::POA::InvalidPolicy ()); -} - -#if (TAO_HAS_RT_CORBA == 1) - -void -TAO_POA_Policies::server_protocol (TAO_ServerProtocolPolicy *policy) -{ - if (this->server_protocol_) - { - this->server_protocol_->destroy (); - CORBA::release (this->server_protocol_); - this->server_protocol_ = 0; - } - - if (policy) - { - ACE_NEW (this->server_protocol_, - TAO_ServerProtocolPolicy (*policy)); - } - -} - -#endif /* TAO_HAS_RT_CORBA == 1 */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -TAO_Adapter_Activator::TAO_Adapter_Activator (PortableServer::POAManager_ptr poa_manager) - : poa_manager_ (PortableServer::POAManager::_duplicate (poa_manager)) -{ -} - -CORBA::Boolean -TAO_Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent, - const char *name, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // Default policies - CORBA::PolicyList default_policies; - - // This assumes that the lock on the parent is recursive - PortableServer::POA_var child = parent->create_POA (name, - this->poa_manager_.in (), - default_policies, - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - ACE_TRY - { - child->the_activator (this, ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - child->destroy (1, - 1, - ACE_TRY_ENV); - - return 0; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (0); - - // Finally everything is fine - return 1; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -CORBA::Object_ptr -TAO_POA::key_to_object (const TAO_ObjectKey &key, - const char *type_id, - TAO_ServantBase *servant, - CORBA::Boolean collocated, - CORBA::Short priority, - CORBA_Environment &ACE_TRY_ENV) -{ - CORBA::Object_ptr obj = CORBA::Object::_nil (); - - // - // ImplRepo related. - // -#if (TAO_HAS_MINIMUM_CORBA == 0) - - if (this->use_imr_ - && this->policies_.lifespan () == PortableServer::PERSISTENT) - { - // Check to see if we alter the IOR. - CORBA::Object_var imr = - this->orb_core ().implrepo_service (); - - if (CORBA::is_nil (imr.in ()) - || !imr->_stubobj () - || !imr->_stubobj ()->profile_in_use ()) - { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Invalid Implementation Repository IOR, skipping IMRification\n")); - goto orbkey; - } - - CORBA::String_var imr_str = - imr->_stubobj ()->profile_in_use ()->to_string (ACE_TRY_ENV); - ACE_CHECK_RETURN (obj); - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "IMR IOR = \n%s\n", - imr_str.in ())); - char *pos = ACE_OS::strstr (imr_str.inout (), - "://"); - pos = ACE_OS::strchr (pos + 3, - imr->_stubobj ()->profile_in_use ()->object_key_delimiter ()); - if (pos) - pos[1] = 0; // Crop the string. - else - { - if (TAO_debug_level > 0) - ACE_ERROR ((LM_ERROR, - "Could not parse IMR IOR, skipping IMRification\n")); - goto orbkey; - } - - ACE_CString ior (imr_str.in ()); - - // Add the key. - - CORBA::String_var key_str; - TAO_POA::encode_sequence_to_string (key_str.inout (), key); - - ior += key_str.in (); - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "IMR-ified IOR = \n%s\n", - ior.c_str ())); - - obj = - this->orb_core_.orb ()->string_to_object (ior.c_str (), ACE_TRY_ENV); - ACE_CHECK_RETURN (obj); - - return obj; - } - -orbkey: -#endif /* TAO_HAS_MINIMUM_CORBA */ - - CORBA::PolicyList_var client_exposed_policies = - this->client_exposed_policies (priority, - ACE_TRY_ENV); - ACE_CHECK_RETURN (obj); - - obj = this->orb_core_.orb ()->key_to_object (key, - type_id, - client_exposed_policies._retn (), - servant, - collocated, - this, - ACE_TRY_ENV); - ACE_CHECK_RETURN (obj); - - return obj; -} - -CORBA::PolicyList * -TAO_POA::client_exposed_policies (CORBA::Short object_priority, - CORBA_Environment &ACE_TRY_ENV) -{ - const CORBA::PolicyList &client_exposed_fixed_policies = - this->policies ().client_exposed_fixed_policies (); - - CORBA::PolicyList *client_exposed_policies = 0; - ACE_NEW_THROW_EX (client_exposed_policies, - CORBA::PolicyList (), - CORBA::NO_MEMORY (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (0); - - client_exposed_policies->length (client_exposed_fixed_policies.length ()); - - for (CORBA::ULong i = 0; - i < client_exposed_fixed_policies.length (); - ++i) - (*client_exposed_policies)[i] = - client_exposed_fixed_policies[i]->copy (); - -#if (TAO_HAS_RT_CORBA == 1) - - CORBA::Short poa_priority = - this->policies ().server_priority (); - - if (poa_priority != TAO_INVALID_PRIORITY) - { - TAO_POA_Policies::PriorityModel priority_model = - this->policies ().priority_model (); - - CORBA::Short priority; - if (priority_model == TAO_POA_Policies::CLIENT_PROPAGATED) - priority = poa_priority; - else - { - if (object_priority == TAO_INVALID_PRIORITY) - priority = poa_priority; - else - priority = object_priority; - } - - TAO_PriorityModelPolicy *priority_model_policy; - ACE_NEW_THROW_EX (priority_model_policy, - TAO_PriorityModelPolicy (RTCORBA::PriorityModel (priority_model), - priority), - CORBA::NO_MEMORY (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (0); - - CORBA::ULong current_length = client_exposed_policies->length (); - client_exposed_policies->length (current_length + 1); - (*client_exposed_policies)[current_length] = priority_model_policy; - } - -#else /* TAO_HAS_RT_CORBA == 1 */ - - ACE_UNUSED_ARG (object_priority); - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - return client_exposed_policies; -} - -// -// ImplRepo related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) - -void -TAO_POA::imr_notify_startup (CORBA_Environment &ACE_TRY_ENV) -{ - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "Notifying IMR of startup\n")); - - CORBA::Object_var imr = this->orb_core ().implrepo_service (); - - if (CORBA::is_nil (imr.in ())) - return; - - ACE_NEW_THROW_EX (this->server_object_, - ServerObject_i (this->orb_core_.orb ()), - CORBA::NO_MEMORY ()); - ACE_CHECK; - - // Activate the servant in the root poa. - TAO_POA *root_poa = this->orb_core ().root_poa (); - PortableServer::ObjectId_var id = - root_poa->activate_object_i (this->server_object_, - TAO_INVALID_PRIORITY, - ACE_TRY_ENV); - ACE_CHECK; - - CORBA::Object_var obj = root_poa->id_to_reference_i (id.in (), - ACE_TRY_ENV); - ACE_CHECK; - - ImplementationRepository::ServerObject_var svr - = ImplementationRepository::ServerObject::_narrow (obj.in (), - ACE_TRY_ENV); - ACE_CHECK; - - if (!svr->_stubobj () || !svr->_stubobj ()->profile_in_use ()) - { - ACE_ERROR ((LM_ERROR, "Invalid ServerObject, bailing out.\n")); - return; - } - - CORBA::String_var svr_str = - svr->_stubobj ()->profile_in_use ()->to_string (ACE_TRY_ENV); - ACE_CHECK; - - char *pos = ACE_OS::strstr (svr_str.inout (), "://"); - - pos = ACE_OS::strchr (pos + 3, - svr->_stubobj ()->profile_in_use ()->object_key_delimiter ()); - - if (pos) - *(pos + 1) = 0; // Crop the string - else - { - ACE_ERROR ((LM_ERROR, - "Could not parse ServerObject IOR, bailing out.\n")); - return; - } - - ACE_CString ior (svr_str.in ()); - - CORBA::String_var curr_addr (svr_str); - - ImplementationRepository::Administration_var imr_admin = - ImplementationRepository::Administration::_narrow (imr.in (), ACE_TRY_ENV); - ACE_CHECK; - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "Informing IMR that we are running at: %s\n", curr_addr.in ())); - - imr_admin->server_is_running (this->name ().c_str (), - curr_addr.in (), - svr.in (), - ACE_TRY_ENV); - ACE_CHECK; - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "Successfully notified IMR of Startup\n")); - -} - -void -TAO_POA::imr_notify_shutdown (void) -{ - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "Notifing IMR of Shutdown\n")); - - // Notify the Implementation Repository about shutting down. - CORBA::Object_var imr = this->orb_core ().implrepo_service (); - - // Check to see if there was an imr returned. If none, return ourselves. - if (CORBA::is_nil (imr.in ())) - return; - - ACE_TRY_NEW_ENV - { - // Get the IMR's administrative object and call shutting_down on it - ImplementationRepository::Administration_var imr_admin = - ImplementationRepository::Administration::_narrow (imr.in (), ACE_TRY_ENV); - ACE_TRY_CHECK; - - imr_admin->server_is_shutting_down (this->the_name (), ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Server_i::init"); - // Ignore exceptions - } - ACE_ENDTRY; -} - -#endif /* TAO_HAS_MINIMUM_CORBA */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Array; -template class ACE_Array_Base; - -// -// Forwarding related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) - -template class ACE_Auto_Basic_Ptr; -template class auto_ptr; - -#endif /* TAO_HAS_MINIMUM_CORBA */ - -//template class ACE_Auto_Basic_Ptr; -template class ACE_Auto_Basic_Ptr; -template class ACE_Auto_Basic_Ptr; -template class ACE_Auto_Basic_Ptr; -template class ACE_Lock_Adapter; -#if defined (ACE_HAS_THREADS) -template class ACE_Lock_Adapter; -template class ACE_Lock_Adapter; -#endif /* ACE_HAS_THREADS */ -template class ACE_Map_Entry, TAO_ServantBase *>; -template class ACE_Hash_Map_Entry; -template class ACE_Hash_Map_Manager; -template class ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator; -template class ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator; -template class ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex, ACE_Equal_To, ACE_Null_Mutex>; -template class ACE_Write_Guard; -template class ACE_Read_Guard; - -//template class auto_ptr; -template class auto_ptr; -template class auto_ptr; -template class auto_ptr; -template class ACE_Node; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Array -#pragma instantiate ACE_Array_Base - -// -// Forwarding related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) - -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate auto_ptr - -#endif /* TAO_HAS_MINIMUM_CORBA */ - -//#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_Lock_Adapter -#if defined (ACE_HAS_THREADS) -#pragma instantiate ACE_Lock_Adapter -#pragma instantiate ACE_Lock_Adapter -#endif /* ACE_HAS_THREADS */ -#pragma instantiate ACE_Map_Entry, TAO_ServantBase *> -#pragma instantiate ACE_Hash_Map_Entry -#pragma instantiate ACE_Hash_Map_Manager -#pragma instantiate ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator -#pragma instantiate ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex, ACE_Equal_To, ACE_Null_Mutex> -#pragma instantiate ACE_Write_Guard -#pragma instantiate ACE_Read_Guard - -//#pragma instantiate auto_ptr -#pragma instantiate auto_ptr -#pragma instantiate auto_ptr -#pragma instantiate auto_ptr -#pragma instantiate ACE_Node -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/POA.h b/TAO/tao/POA.h deleted file mode 100644 index 3769935f6b6..00000000000 --- a/TAO/tao/POA.h +++ /dev/null @@ -1,1065 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// POA.h -// -// = DESCRIPTION -// POA -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#ifndef TAO_POA_H -#define TAO_POA_H -#include "ace/pre.h" - -// String -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Map -#include "ace/Hash_Map_Manager.h" - -// Vector -#include "ace/Containers.h" - -// Locking -#include "ace/Synch.h" - -// Object Adapter -#include "tao/Object_Adapter.h" - -// Object_Key -#include "tao/Object_KeyC.h" - -// POA Manager -#include "tao/POAManager.h" - -// RT CORBA -#include "tao/RTCORBAC.h" - -// Local Object -#include "tao/LocalObject.h" - -// This is to remove "inherits via dominance" warnings from MSVC. -// MSVC is being a little too paranoid. -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -class TAO_POA; -class TAO_ServerProtocolPolicy; - -#if (TAO_HAS_MINIMUM_POA == 0) - -class TAO_Export TAO_Thread_Policy : - public PortableServer::ThreadPolicy, - public TAO_Local_RefCounted_Object -{ -public: - TAO_Thread_Policy (PortableServer::ThreadPolicyValue value); - - PortableServer::ThreadPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void destroy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::PolicyType policy_type (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -protected: - PortableServer::ThreadPolicyValue value_; -}; - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -class TAO_Export TAO_Lifespan_Policy : - public PortableServer::LifespanPolicy, - public TAO_Local_RefCounted_Object -{ -public: - TAO_Lifespan_Policy (PortableServer::LifespanPolicyValue value); - - PortableServer::LifespanPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void destroy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::PolicyType policy_type (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -protected: - PortableServer::LifespanPolicyValue value_; -}; - -class TAO_Export TAO_Id_Uniqueness_Policy : - public PortableServer::IdUniquenessPolicy, - public TAO_Local_RefCounted_Object -{ -public: - TAO_Id_Uniqueness_Policy (PortableServer::IdUniquenessPolicyValue value); - - PortableServer::IdUniquenessPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void destroy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::PolicyType policy_type (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -protected: - PortableServer::IdUniquenessPolicyValue value_; -}; - -class TAO_Export TAO_Id_Assignment_Policy : - public PortableServer::IdAssignmentPolicy, - public TAO_Local_RefCounted_Object -{ -public: - TAO_Id_Assignment_Policy (PortableServer::IdAssignmentPolicyValue value); - - PortableServer::IdAssignmentPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void destroy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::PolicyType policy_type (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -protected: - PortableServer::IdAssignmentPolicyValue value_; -}; - -#if (TAO_HAS_MINIMUM_POA == 0) - -class TAO_Export TAO_Implicit_Activation_Policy : - public PortableServer::ImplicitActivationPolicy, - public TAO_Local_RefCounted_Object -{ -public: - TAO_Implicit_Activation_Policy (PortableServer::ImplicitActivationPolicyValue value); - - PortableServer::ImplicitActivationPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void destroy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::PolicyType policy_type (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -protected: - PortableServer::ImplicitActivationPolicyValue value_; -}; - -class TAO_Export TAO_Servant_Retention_Policy : - public PortableServer::ServantRetentionPolicy, - public TAO_Local_RefCounted_Object -{ -public: - TAO_Servant_Retention_Policy (PortableServer::ServantRetentionPolicyValue value); - - PortableServer::ServantRetentionPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void destroy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::PolicyType policy_type (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -protected: - PortableServer::ServantRetentionPolicyValue value_; -}; - -class TAO_Export TAO_Request_Processing_Policy : - public PortableServer::RequestProcessingPolicy, - public TAO_Local_RefCounted_Object -{ -public: - TAO_Request_Processing_Policy (PortableServer::RequestProcessingPolicyValue value); - - PortableServer::RequestProcessingPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void destroy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::PolicyType policy_type (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -protected: - PortableServer::RequestProcessingPolicyValue value_; -}; - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -class TAO_Export TAO_POA_Policies -{ -public: - - enum PriorityModel - { - CLIENT_PROPAGATED, - SERVER_DECLARED - }; - - TAO_POA_Policies (TAO_ORB_Core &orb_core, - CORBA::Environment &ACE_TRY_ENV); - - TAO_POA_Policies (const TAO_POA_Policies &rhs); - - ~TAO_POA_Policies (void); - - PortableServer::ThreadPolicyValue thread (void) const; - void thread (PortableServer::ThreadPolicyValue value); - - PortableServer::LifespanPolicyValue lifespan (void) const; - void lifespan (PortableServer::LifespanPolicyValue value); - - PortableServer::IdUniquenessPolicyValue id_uniqueness (void) const; - void id_uniqueness (PortableServer::IdUniquenessPolicyValue value); - - PortableServer::IdAssignmentPolicyValue id_assignment (void) const; - void id_assignment (PortableServer::IdAssignmentPolicyValue value); - - PortableServer::ImplicitActivationPolicyValue implicit_activation (void) const; - void implicit_activation (PortableServer::ImplicitActivationPolicyValue value); - - PortableServer::ServantRetentionPolicyValue servant_retention (void) const; - void servant_retention (PortableServer::ServantRetentionPolicyValue value); - - PortableServer::RequestProcessingPolicyValue request_processing (void) const; - void request_processing (PortableServer::RequestProcessingPolicyValue value); - - PriorityModel priority_model (void) const; - void priority_model (PriorityModel value); - - CORBA::Short server_priority (void) const; - void server_priority (CORBA::Short value); - -#if (TAO_HAS_RT_CORBA == 1) - - TAO_ServerProtocolPolicy *server_protocol (void) const; - void server_protocol (TAO_ServerProtocolPolicy *policy); - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - void parse_policies (const CORBA::PolicyList &policies, - CORBA_Environment &ACE_TRY_ENV); - - const CORBA::PolicyList &client_exposed_fixed_policies (void) const; - -protected: - - void parse_policy (const CORBA::Policy_ptr policy, - CORBA_Environment &ACE_TRY_ENV); - - int validity_check (void); - - int validate_priority_model (void); - - int validate_server_protocol (void); - -#if (TAO_HAS_RT_CORBA == 1) - - int validate_client_protocol (RTCORBA::ClientProtocolPolicy_ptr); - - int validate_priority_bands (RTCORBA::PriorityBandedConnectionPolicy_ptr); - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - PortableServer::ThreadPolicyValue thread_; - - PortableServer::LifespanPolicyValue lifespan_; - - PortableServer::IdUniquenessPolicyValue id_uniqueness_; - - PortableServer::IdAssignmentPolicyValue id_assignment_; - - PortableServer::ImplicitActivationPolicyValue implicit_activation_; - - PortableServer::ServantRetentionPolicyValue servant_retention_; - - PortableServer::RequestProcessingPolicyValue request_processing_; - - PriorityModel priority_model_; - - CORBA::Short server_priority_; - -#if (TAO_HAS_RT_CORBA == 1) - - TAO_ServerProtocolPolicy *server_protocol_; - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - CORBA::PolicyList client_exposed_fixed_policies_; -}; - -class TAO_Temporary_Creation_Time; - -class TAO_Creation_Time -{ -public: - - TAO_Creation_Time (const ACE_Time_Value &creation_time); - - TAO_Creation_Time (void); - - void creation_time (const void *creation_time); - - const void *creation_time (void) const; - - static CORBA::ULong creation_time_length (void); - - int operator== (const TAO_Creation_Time &rhs) const; - - int operator!= (const TAO_Creation_Time &rhs) const; - - int operator== (const TAO_Temporary_Creation_Time &rhs) const; - - int operator!= (const TAO_Temporary_Creation_Time &rhs) const; - -protected: - - enum - { - SEC_FIELD = 0, - USEC_FIELD = 1 - }; - - // Timestamp - CORBA::ULong time_stamp_[2]; - -}; - -// Special creation time only useful in the lifetime of the upcall -class TAO_Temporary_Creation_Time -{ -public: - - TAO_Temporary_Creation_Time (void); - - void creation_time (const void *creation_time); - - int operator== (const TAO_Creation_Time &rhs) const; - - int operator!= (const TAO_Creation_Time &rhs) const; - -protected: - - void *time_stamp_; -}; - -// Forward Declaration -class ServerObject_i; - -class TAO_Export TAO_POA : - public PortableServer::POA, - public TAO_Local_RefCounted_Object -{ -public: - - friend class TAO_Object_Adapter; - friend class TAO_Object_Adapter::Servant_Upcall; - friend class TAO_POA_Current_Impl; - friend class TAO_POA_Manager; - -#if (TAO_HAS_RT_CORBA == 1) - - friend class TAO_Object_Adapter::Priority_Model_Processing; - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - typedef ACE_CString String; - - PortableServer::POA_ptr create_POA (const char *adapter_name, - PortableServer::POAManager_ptr poa_manager, - const CORBA::PolicyList &policies, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterAlreadyExists, - PortableServer::POA::InvalidPolicy)); - - PortableServer::POA_ptr find_POA (const char *adapter_name, - CORBA::Boolean activate_it, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterNonExistent)); - - void destroy (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -#if (TAO_HAS_MINIMUM_POA == 0) - - PortableServer::ThreadPolicy_ptr create_thread_policy (PortableServer::ThreadPolicyValue value, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - PortableServer::LifespanPolicy_ptr create_lifespan_policy (PortableServer::LifespanPolicyValue value, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -#if (TAO_HAS_MINIMUM_POA == 0) - - PortableServer::ImplicitActivationPolicy_ptr create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::ServantRetentionPolicy_ptr create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::RequestProcessingPolicy_ptr create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - char * the_name (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::POA_ptr the_parent (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::POAList *the_children (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::POAManager_ptr the_POAManager (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - -#if (TAO_HAS_MINIMUM_POA == 0) - - PortableServer::AdapterActivator_ptr the_activator (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void the_activator (PortableServer::AdapterActivator_ptr adapter_activator, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::ServantManager_ptr get_servant_manager (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - void set_servant_manager (PortableServer::ServantManager_ptr imgr, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - PortableServer::Servant get_servant (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::NoServant, - PortableServer::POA::WrongPolicy)); - - void set_servant (PortableServer::Servant servant, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - PortableServer::ObjectId *activate_object (PortableServer::Servant p_servant, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::WrongPolicy)); - - void activate_object_with_id (const PortableServer::ObjectId &id, - PortableServer::Servant p_servant, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::ObjectAlreadyActive, - PortableServer::POA::WrongPolicy)); - - void deactivate_object (const PortableServer::ObjectId &oid, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)); - - CORBA::Object_ptr create_reference (const char *intf, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - CORBA::Object_ptr create_reference_with_id (const PortableServer::ObjectId &oid, - const char *intf, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - PortableServer::ObjectId *servant_to_id (PortableServer::Servant p_servant, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)); - - CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)); - - PortableServer::Servant reference_to_servant (CORBA::Object_ptr reference, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)); - - PortableServer::ObjectId *reference_to_id (CORBA::Object_ptr reference, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongAdapter, - PortableServer::POA::WrongPolicy)); - - PortableServer::Servant id_to_servant (const PortableServer::ObjectId &oid, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)); - - CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)); - -#if (TAO_HAS_RT_CORBA == 1) - - CORBA::Object_ptr create_reference_with_priority (const char * intf, - RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - CORBA::Object_ptr create_reference_with_id_and_priority (const PortableServer::ObjectId & oid, - const char * intf, - RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - PortableServer::ObjectId * activate_object_with_priority (PortableServer::Servant p_servant, - RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::WrongPolicy)); - - void activate_object_with_id_and_priority (const PortableServer::ObjectId & oid, - PortableServer::Servant p_servant, - RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::ObjectAlreadyActive, - PortableServer::POA::WrongPolicy)); - -#endif /* TAO_HAS_RT_CORBA == 1 */ - - TAO_POA_Policies &policies (void); - // Accessor for POA policies. - - CORBA::PolicyList *client_exposed_policies (CORBA::Short object_priority, - CORBA_Environment &ACE_TRY_ENV); - // This method gives the policies that are exposed to the client. - // These policies are shipped within the IOR. - -#if (TAO_HAS_MINIMUM_CORBA == 0) - - // - // Forwarding related. - // - void forward_object (const PortableServer::ObjectId &oid, - CORBA::Object_ptr forward_to, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - -#endif /* TAO_HAS_MINIMUM_CORBA */ - - // Utility functions for the other - static void encode_sequence_to_string (char * &str, - const TAO_Unbounded_Sequence &seq); - static void decode_string_to_sequence (TAO_Unbounded_Sequence &seq, - const char *str); - - static char* ObjectId_to_string (const PortableServer::ObjectId &id); - - static CORBA::WChar* ObjectId_to_wstring (const PortableServer::ObjectId &id); - - static PortableServer::ObjectId *string_to_ObjectId (const char *id); - - static PortableServer::ObjectId *string_to_ObjectId (const char *string, - int size); - - static PortableServer::ObjectId *wstring_to_ObjectId (const CORBA::WChar *id); - - TAO_POA (const String &name, - TAO_POA_Manager &poa_manager, - const TAO_POA_Policies &policies, - TAO_POA *parent, - ACE_Lock &lock, - ACE_SYNCH_MUTEX &thread_lock, - TAO_ORB_Core &orb_core, - CORBA_Environment &ACE_TRY_ENV); - - ~TAO_POA (void); - - static char name_separator (void); - - static CORBA::ULong name_separator_length (void); - - enum - { - TAO_OBJECTKEY_PREFIX_SIZE = 4 - }; - - static CORBA::Octet objectkey_prefix[TAO_OBJECTKEY_PREFIX_SIZE]; - - const TAO_Object_Adapter::poa_name &folded_name (void) const; - - const TAO_Object_Adapter::poa_name &system_name (void) const; - - static void check_for_valid_wait_for_completions (CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV); - - TAO_ORB_Core &orb_core (void) const; - // ORB Core for POA. - - CORBA::Boolean cleanup_in_progress (void); - - TAO_Object_Adapter &object_adapter (void); - - ACE_Lock &lock (void); - -protected: - - const ACE_CString &name (void) const; - - PortableServer::POA_ptr create_POA_i (const char *adapter_name, - PortableServer::POAManager_ptr poa_manager, - const CORBA::PolicyList &policies, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterAlreadyExists, - PortableServer::POA::InvalidPolicy)); - - TAO_POA *create_POA_i (const String &adapter_name, - TAO_POA_Manager &poa_manager, - const TAO_POA_Policies &policies, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterAlreadyExists, - PortableServer::POA::InvalidPolicy)); - - TAO_POA *find_POA_i (const ACE_CString &child_name, - CORBA::Boolean activate_it, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterNonExistent)); - - void destroy_i (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void complete_destruction_i (CORBA::Environment &ACE_TRY_ENV); - - PortableServer::POAList *the_children_i (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)); - -#if (TAO_HAS_MINIMUM_POA == 0) - - PortableServer::ServantManager_ptr get_servant_manager_i (CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - void set_servant_manager_i (PortableServer::ServantManager_ptr imgr, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - PortableServer::Servant get_servant_i (CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::NoServant, - PortableServer::POA::WrongPolicy)); - - void set_servant_i (PortableServer::Servant servant, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -// -// ImplRepo related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) - - void imr_notify_startup (CORBA_Environment &ACE_TRY_ENV); - // ImplRepo helper method, notify the ImplRepo on startup - - void imr_notify_shutdown (void); - // ImplRepo helper method, notify the ImplRepo on shutdown - -#endif /* TAO_HAS_MINIMUM_CORBA */ - - CORBA::Object_ptr key_to_object (const TAO_ObjectKey &key, - const char *type_id, - TAO_ServantBase *servant, - CORBA::Boolean collocated, - CORBA::Short priority, - CORBA_Environment &ACE_TRY_ENV); - // Wrapper for the ORB's key_to_object that will alter the object pointer - // if the ImplRepo is used. - - int is_servant_in_map (PortableServer::Servant servant); - - int is_user_id_in_map (const PortableServer::ObjectId &user_id, - CORBA::Short priority, - int &priorities_match); - - PortableServer::ObjectId *activate_object_i (PortableServer::Servant p_servant, - CORBA::Short priority, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::WrongPolicy)); - - void activate_object_with_id_i (const PortableServer::ObjectId &id, - PortableServer::Servant p_servant, - CORBA::Short priority, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::ObjectAlreadyActive, - PortableServer::POA::WrongPolicy)); - - void deactivate_all_objects_i (CORBA::Boolean etherealize_objects, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - void deactivate_all_objects_i (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - void wait_for_completions (CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV); - - void check_poa_manager_state (CORBA::Environment &ACE_TRY_ENV); - - void deactivate_object_i (const PortableServer::ObjectId &oid, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)); - - void cleanup_servant (TAO_Active_Object_Map::Map_Entry *active_object_map_entry, - CORBA::Environment &ACE_TRY_ENV); - - CORBA::Object_ptr create_reference_i (const char *intf, - CORBA::Short priority, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - CORBA::Object_ptr create_reference_with_id_i (const PortableServer::ObjectId &oid, - const char *intf, - CORBA::Short priority, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)); - - PortableServer::ObjectId *servant_to_id_i (PortableServer::Servant servant, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)); - - PortableServer::ObjectId *servant_to_system_id (PortableServer::Servant p_servant, - CORBA::Short &priority, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)); - - PortableServer::ObjectId *servant_to_system_id_i (PortableServer::Servant p_servant, - CORBA::Short &priority, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)); - - PortableServer::Servant id_to_servant_i (const PortableServer::ObjectId &oid, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)); - - CORBA::Object_ptr id_to_reference_i (const PortableServer::ObjectId &oid, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)); -// -// Forwarding related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) - - void forward_object_i (const PortableServer::ObjectId &oid, - CORBA::Object_ptr forward_to, - CORBA_Environment &ACE_TRY_ENV); - -#endif /* TAO_HAS_MINIMUM_CORBA */ - - TAO_Active_Object_Map &active_object_map (void) const; - - int delete_child (const String &child); - - void set_folded_name (void); - - TAO_ObjectKey *create_object_key (const PortableServer::ObjectId &id); - - int is_poa_generated_id (const PortableServer::ObjectId &id); - - static int parse_key (const TAO_ObjectKey &key, - TAO_Object_Adapter::poa_name &poa_system_name, - PortableServer::ObjectId &system_id, - CORBA::Boolean &is_root, - CORBA::Boolean &is_persistent, - CORBA::Boolean &is_system_id, - TAO_Temporary_Creation_Time &poa_creation_time); - -#if (TAO_HAS_RT_CORBA == 1) - - int valid_priority (RTCORBA::Priority priority); - - void validate_priority_and_policies (RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV); - - -#endif /* TAO_HAS_RT_CORBA == 1 */ - -protected: - - TAO_SERVANT_LOCATION locate_servant_i (const PortableServer::ObjectId &id, - PortableServer::Servant &servant, - CORBA_Environment &ACE_TRY_ENV); - - PortableServer::Servant locate_servant_i (const char *operation, - const PortableServer::ObjectId &id, - TAO_Object_Adapter::Servant_Upcall &servant_upcall, - TAO_POA_Current_Impl &poa_current_impl, - CORBA_Environment &ACE_TRY_ENV); - - const TAO_Creation_Time &creation_time (void); - - CORBA::Boolean persistent (void); - - char persistent_key_type (void); - - static char persistent_key_char (void); - - static char transient_key_char (void); - - static CORBA::ULong persistent_key_type_length (void); - - CORBA::Boolean system_id (void); - - char system_id_key_type (void); - - static char system_id_key_char (void); - - static char user_id_key_char (void); - - static CORBA::ULong system_id_key_type_length (void); - - CORBA::Boolean root (void); - - char root_key_type (void); - - static char root_key_char (void); - - static char non_root_key_char (void); - - static CORBA::ULong root_key_type_length (void); - - CORBA::ULong outstanding_requests (void) const; - - void outstanding_requests (CORBA::ULong new_outstanding_requests); - - CORBA::ULong increment_outstanding_requests (void); - - CORBA::ULong decrement_outstanding_requests (void); - - void establish_servant_lock (PortableServer::Servant servant); - - void teardown_servant_lock (PortableServer::Servant servant); - - String name_; - - TAO_Object_Adapter::poa_name folded_name_; - - TAO_Object_Adapter::poa_name_var system_name_; - - TAO_POA_Manager &poa_manager_; - - TAO_POA_Policies policies_; - - TAO_POA *parent_; - - TAO_Active_Object_Map *active_object_map_; - - int delete_active_object_map_; - -#if (TAO_HAS_MINIMUM_POA == 0) - - PortableServer::AdapterActivator_var adapter_activator_; - - PortableServer::ServantActivator_var servant_activator_; - - PortableServer::ServantLocator_var servant_locator_; - - PortableServer::ServantBase_var default_servant_; - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if (TAO_HAS_MINIMUM_CORBA == 0) - - ServerObject_i *server_object_; - // Implementation Repository Server Object - - int use_imr_; - // Flag for whether the IR should be used or not. - -#endif /* TAO_HAS_MINIMUM_CORBA */ - - typedef ACE_Hash_Map_Manager - CHILDREN; - - CHILDREN children_; - - ACE_Lock &lock_; - - int persistent_; - - int system_id_; - - TAO_Creation_Time creation_time_; - - TAO_ORB_Core &orb_core_; - - CORBA::Boolean cleanup_in_progress_; - - CORBA::Boolean etherealize_objects_; - - CORBA::ULong outstanding_requests_; - - ACE_SYNCH_CONDITION outstanding_requests_condition_; - - CORBA::Boolean wait_for_completion_pending_; - - CORBA::Boolean waiting_destruction_; - - ACE_SYNCH_CONDITION servant_deactivation_condition_; - - CORBA::ULong waiting_servant_deactivation_; -}; - - -class TAO_POA_Guard -{ -public: - TAO_POA_Guard (TAO_POA &poa, - CORBA::Environment &ACE_TRY_ENV, - int check_for_destruction = 1); - -private: - ACE_Guard guard_; -}; - -#if (TAO_HAS_MINIMUM_POA == 0) - -class TAO_Export TAO_Adapter_Activator : public PortableServer::AdapterActivator -{ -public: - - TAO_Adapter_Activator (PortableServer::POAManager_ptr poa_manager); - - CORBA::Boolean unknown_adapter (PortableServer::POA_ptr parent, - const char *name, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)); - -protected: - - PortableServer::POAManager_var poa_manager_; - // POA Manager -}; - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#if defined (__ACE_INLINE__) -# include "tao/POA.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_POA_H */ diff --git a/TAO/tao/POA.i b/TAO/tao/POA.i deleted file mode 100644 index ab765d88f1c..00000000000 --- a/TAO/tao/POA.i +++ /dev/null @@ -1,871 +0,0 @@ -// $Id$ - -// Exception macros -#include "tao/poa_macros.h" -#include "tao/Environment.h" - -ACE_INLINE CORBA::Boolean -TAO_POA::cleanup_in_progress (void) -{ - return this->cleanup_in_progress_; -} - -ACE_INLINE ACE_Lock & -TAO_POA::lock (void) -{ - return this->lock_; -} - -ACE_INLINE -TAO_POA_Guard::TAO_POA_Guard (TAO_POA &poa, - CORBA::Environment &ACE_TRY_ENV, - int check_for_destruction) - : guard_ (poa.lock ()) -{ - if (!this->guard_.locked ()) - ACE_THROW ( - CORBA::INTERNAL ( - CORBA_SystemException::_tao_minor_code ( - TAO_GUARD_FAILURE, - 0), - CORBA::COMPLETED_NO)); - - if (check_for_destruction && - poa.cleanup_in_progress ()) - ACE_THROW ( - CORBA::BAD_INV_ORDER ( - CORBA_SystemException::_tao_minor_code ( - TAO_POA_BEING_DESTROYED, - 0), - CORBA::COMPLETED_NO)); - - poa.object_adapter ().wait_for_non_servant_upcalls_to_complete (ACE_TRY_ENV); -} - -ACE_INLINE PortableServer::ThreadPolicyValue -TAO_POA_Policies::thread (void) const -{ - return this->thread_; -} - -ACE_INLINE void -TAO_POA_Policies::thread (PortableServer::ThreadPolicyValue value) -{ - this->thread_ = value; -} - -ACE_INLINE PortableServer::LifespanPolicyValue -TAO_POA_Policies::lifespan (void) const -{ - return this->lifespan_; -} - -ACE_INLINE void -TAO_POA_Policies::lifespan (PortableServer::LifespanPolicyValue value) -{ - this->lifespan_ = value; -} - -ACE_INLINE PortableServer::IdUniquenessPolicyValue -TAO_POA_Policies::id_uniqueness (void) const -{ - return this->id_uniqueness_; -} - -ACE_INLINE void -TAO_POA_Policies::id_uniqueness (PortableServer::IdUniquenessPolicyValue value) -{ - this->id_uniqueness_ = value; -} - -ACE_INLINE PortableServer::IdAssignmentPolicyValue -TAO_POA_Policies::id_assignment (void) const -{ - return this->id_assignment_; -} - -ACE_INLINE void -TAO_POA_Policies::id_assignment (PortableServer::IdAssignmentPolicyValue value) -{ - this->id_assignment_ = value; -} - -ACE_INLINE PortableServer::ImplicitActivationPolicyValue -TAO_POA_Policies::implicit_activation (void) const -{ - return this->implicit_activation_; -} - -ACE_INLINE void -TAO_POA_Policies::implicit_activation (PortableServer::ImplicitActivationPolicyValue value) -{ - this->implicit_activation_ = value; -} - -ACE_INLINE PortableServer::ServantRetentionPolicyValue -TAO_POA_Policies::servant_retention (void) const -{ - return this->servant_retention_; -} - -ACE_INLINE void -TAO_POA_Policies::servant_retention (PortableServer::ServantRetentionPolicyValue value) -{ - this->servant_retention_ = value; -} - -ACE_INLINE PortableServer::RequestProcessingPolicyValue -TAO_POA_Policies::request_processing (void) const -{ - return this->request_processing_; -} - -ACE_INLINE void -TAO_POA_Policies::request_processing (PortableServer::RequestProcessingPolicyValue value) -{ - this->request_processing_ = value; -} - -ACE_INLINE TAO_POA_Policies::PriorityModel -TAO_POA_Policies::priority_model (void) const -{ - return this->priority_model_; -} - -ACE_INLINE void -TAO_POA_Policies::priority_model (PriorityModel value) -{ - this->priority_model_ = value; -} - -ACE_INLINE CORBA::Short -TAO_POA_Policies::server_priority (void) const -{ - return this->server_priority_; -} - -ACE_INLINE void -TAO_POA_Policies::server_priority (CORBA::Short value) -{ - this->server_priority_ = value; -} - -#if (TAO_HAS_RT_CORBA == 1) - -ACE_INLINE TAO_ServerProtocolPolicy * -TAO_POA_Policies::server_protocol (void) const -{ - return this->server_protocol_; -} - -#endif /* TAO_HAS_RT_CORBA == 1 */ - -ACE_INLINE const CORBA::PolicyList & -TAO_POA_Policies::client_exposed_fixed_policies (void) const -{ - return this->client_exposed_fixed_policies_; -} - -ACE_INLINE CORBA::ULong -TAO_Creation_Time::creation_time_length (void) -{ - return 2 * sizeof (CORBA::ULong); -} - -ACE_INLINE -TAO_Creation_Time::TAO_Creation_Time (const ACE_Time_Value &creation_time) -{ - this->time_stamp_[TAO_Creation_Time::SEC_FIELD] = (CORBA::ULong) creation_time.sec (); - this->time_stamp_[TAO_Creation_Time::USEC_FIELD] = (CORBA::ULong) creation_time.usec (); -} - -ACE_INLINE -TAO_Creation_Time::TAO_Creation_Time (void) -{ - this->time_stamp_[TAO_Creation_Time::SEC_FIELD] = 0; - this->time_stamp_[TAO_Creation_Time::USEC_FIELD] = 0; -} - -ACE_INLINE void -TAO_Creation_Time::creation_time (const void *creation_time) -{ - ACE_OS::memcpy (&this->time_stamp_, - creation_time, - TAO_Creation_Time::creation_time_length ()); -} - -ACE_INLINE const void * -TAO_Creation_Time::creation_time (void) const -{ - return &this->time_stamp_; -} - -ACE_INLINE int -TAO_Creation_Time::operator== (const TAO_Creation_Time &rhs) const -{ -#if (POA_NO_TIMESTAMP == 1) - ACE_UNUSED_ARG (rhs); - return 1; -#else - return ACE_OS::memcmp (&this->time_stamp_, - &rhs.time_stamp_, - TAO_Creation_Time::creation_time_length ()) == 0; -#endif /* POA_NO_TIMESTAMP */ -} - -ACE_INLINE int -TAO_Creation_Time::operator!= (const TAO_Creation_Time &rhs) const -{ -#if (POA_NO_TIMESTAMP == 1) - ACE_UNUSED_ARG (rhs); - return 0; -#else - return ACE_OS::memcmp (&this->time_stamp_, - &rhs.time_stamp_, - TAO_Creation_Time::creation_time_length ()) != 0; -#endif /* POA_NO_TIMESTAMP */ -} - -ACE_INLINE int -TAO_Temporary_Creation_Time::operator== (const TAO_Creation_Time &rhs) const -{ -#if (POA_NO_TIMESTAMP == 1) - ACE_UNUSED_ARG (rhs); - return 1; -#else - return ACE_OS::memcmp (this->time_stamp_, - rhs.creation_time (), - TAO_Creation_Time::creation_time_length ()) == 0; -#endif /* POA_NO_TIMESTAMP */ -} - -ACE_INLINE int -TAO_Temporary_Creation_Time::operator!= (const TAO_Creation_Time &rhs) const -{ -#if (POA_NO_TIMESTAMP == 1) - ACE_UNUSED_ARG (rhs); - return 0; -#else - return ACE_OS::memcmp (this->time_stamp_, - rhs.creation_time (), - TAO_Creation_Time::creation_time_length ()) != 0; -#endif /* POA_NO_TIMESTAMP */ -} - -ACE_INLINE int -TAO_Creation_Time::operator== (const TAO_Temporary_Creation_Time &rhs) const -{ - return rhs == *this; -} - -ACE_INLINE int -TAO_Creation_Time::operator!= (const TAO_Temporary_Creation_Time &rhs) const -{ - return rhs != *this; -} - -ACE_INLINE -TAO_Temporary_Creation_Time::TAO_Temporary_Creation_Time (void) - : time_stamp_ (0) -{ -} - -ACE_INLINE void -TAO_Temporary_Creation_Time::creation_time (const void *creation_time) -{ - this->time_stamp_ = (void *) creation_time; -} - -ACE_INLINE PortableServer::POA_ptr -TAO_POA::create_POA (const char *adapter_name, - PortableServer::POAManager_ptr poa_manager, - const CORBA::PolicyList &policies, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::AdapterAlreadyExists, - PortableServer::POA::InvalidPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->create_POA_i (adapter_name, - poa_manager, - policies, - ACE_TRY_ENV); -} - -ACE_INLINE void -TAO_POA::destroy (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // Lock access for the duration of this transaction. - TAO_POA_Guard poa_guard (*this, ACE_TRY_ENV, 0); - ACE_UNUSED_ARG (poa_guard); - ACE_CHECK; - - this->destroy_i (etherealize_objects, - wait_for_completion, - ACE_TRY_ENV); -} - -ACE_INLINE TAO_POA_Policies & -TAO_POA::policies (void) -{ - return this->policies_; -} - -ACE_INLINE TAO_Active_Object_Map & -TAO_POA::active_object_map (void) const -{ - return *this->active_object_map_; -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -ACE_INLINE PortableServer::ServantManager_ptr -TAO_POA::get_servant_manager (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (PortableServer::ServantManager::_nil ()); - - return this->get_servant_manager_i (ACE_TRY_ENV); -} - -ACE_INLINE void -TAO_POA::set_servant_manager (PortableServer::ServantManager_ptr imgr, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD; - - this->set_servant_manager_i (imgr, - ACE_TRY_ENV); -} - -ACE_INLINE PortableServer::Servant -TAO_POA::get_servant (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::NoServant, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->get_servant_i (ACE_TRY_ENV); -} - -ACE_INLINE void -TAO_POA::set_servant (PortableServer::Servant servant, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD; - - this->set_servant_i (servant, - ACE_TRY_ENV); -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -ACE_INLINE PortableServer::ObjectId * -TAO_POA::activate_object (PortableServer::Servant servant, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->activate_object_i (servant, - -1, - ACE_TRY_ENV); -} - -ACE_INLINE void -TAO_POA::activate_object_with_id (const PortableServer::ObjectId &id, - PortableServer::Servant servant, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::ObjectAlreadyActive, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD; - - this->activate_object_with_id_i (id, - servant, - -1, - ACE_TRY_ENV); -} - -ACE_INLINE void -TAO_POA::deactivate_object (const PortableServer::ObjectId &oid, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD; - - this->deactivate_object_i (oid, - ACE_TRY_ENV); -} - -ACE_INLINE CORBA::Object_ptr -TAO_POA::create_reference (const char *intf, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (CORBA::Object::_nil ()); - - return this->create_reference_i (intf, - -1, - ACE_TRY_ENV); -} - -ACE_INLINE CORBA::Object_ptr -TAO_POA::create_reference_with_id (const PortableServer::ObjectId &id, - const char *intf, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (CORBA::Object::_nil ()); - - return this->create_reference_with_id_i (id, - intf, - -1, - ACE_TRY_ENV); -} - -ACE_INLINE PortableServer::ObjectId * -TAO_POA::servant_to_id (PortableServer::Servant servant, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)) -{ - // If we had upgradeable locks, this would initially be a read lock - // - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->servant_to_id_i (servant, - ACE_TRY_ENV); -} - -ACE_INLINE PortableServer::ObjectId * -TAO_POA::servant_to_system_id (PortableServer::Servant servant, - CORBA::Short &priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->servant_to_system_id_i (servant, - priority, - ACE_TRY_ENV); -} - -ACE_INLINE PortableServer::Servant -TAO_POA::id_to_servant (const PortableServer::ObjectId &oid, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->id_to_servant_i (oid, - ACE_TRY_ENV); -} - -ACE_INLINE CORBA::Object_ptr -TAO_POA::id_to_reference (const PortableServer::ObjectId &oid, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->id_to_reference_i (oid, ACE_TRY_ENV); -} - -#if (TAO_HAS_RT_CORBA == 1) - -ACE_INLINE CORBA::Object_ptr -TAO_POA::create_reference_with_priority (const char * intf, - RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - this->validate_priority_and_policies (priority, - ACE_TRY_ENV); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->create_reference_i (intf, - priority, - ACE_TRY_ENV); -} - -ACE_INLINE CORBA::Object_ptr -TAO_POA::create_reference_with_id_and_priority (const PortableServer::ObjectId & oid, - const char * intf, - RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::WrongPolicy)) -{ - this->validate_priority_and_policies (priority, - ACE_TRY_ENV); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->create_reference_with_id_i (oid, - intf, - priority, - ACE_TRY_ENV); -} - -ACE_INLINE PortableServer::ObjectId * -TAO_POA::activate_object_with_priority (PortableServer::Servant servant, - RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::WrongPolicy)) -{ - this->validate_priority_and_policies (priority, - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->activate_object_i (servant, - priority, - ACE_TRY_ENV); -} - -ACE_INLINE void -TAO_POA::activate_object_with_id_and_priority (const PortableServer::ObjectId & oid, - PortableServer::Servant servant, - RTCORBA::Priority priority, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::ObjectAlreadyActive, - PortableServer::POA::WrongPolicy)) -{ - this->validate_priority_and_policies (priority, - ACE_TRY_ENV); - ACE_CHECK; - - // Lock access for the duration of this transaction. - TAO_POA_GUARD; - - this->activate_object_with_id_i (oid, - servant, - priority, - ACE_TRY_ENV); -} - -#endif /* TAO_HAS_RT_CORBA */ - -// -// Forwarding related. -// -#if (TAO_HAS_MINIMUM_CORBA == 0) - -ACE_INLINE void -TAO_POA::forward_object (const PortableServer::ObjectId &oid, - CORBA::Object_ptr forward_to, - CORBA::Environment &ACE_TRY_ENV) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD; - - this->forward_object_i (oid, - forward_to, - ACE_TRY_ENV); -} - -#endif /* TAO_HAS_MINIMUM_CORBA */ - -ACE_INLINE PortableServer::POA_ptr -TAO_POA::the_parent (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - if (this->parent_ != 0) - return PortableServer::POA::_duplicate (this->parent_); - else - return PortableServer::POA::_nil (); -} - -ACE_INLINE PortableServer::POAList * -TAO_POA::the_children (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (0); - - return this->the_children_i (ACE_TRY_ENV); -} - -ACE_INLINE PortableServer::POAManager_ptr -TAO_POA::the_POAManager (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POAManager::_duplicate (&this->poa_manager_); -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -ACE_INLINE PortableServer::AdapterActivator_ptr -TAO_POA::the_activator (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD_RETURN (PortableServer::AdapterActivator::_nil ()); - - return PortableServer::AdapterActivator::_duplicate (this->adapter_activator_.in ()); -} - -ACE_INLINE void -TAO_POA::the_activator (PortableServer::AdapterActivator_ptr adapter_activator, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // Lock access for the duration of this transaction. - TAO_POA_GUARD; - - this->adapter_activator_ = PortableServer::AdapterActivator::_duplicate (adapter_activator); -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -ACE_INLINE const TAO_Creation_Time & -TAO_POA::creation_time (void) -{ - return this->creation_time_; -} - -ACE_INLINE CORBA::Boolean -TAO_POA::system_id (void) -{ - return (CORBA::Boolean) this->system_id_; -} - - -ACE_INLINE CORBA::Boolean -TAO_POA::root (void) -{ - return this->parent_ == 0; -} - - -ACE_INLINE CORBA::Boolean -TAO_POA::persistent (void) -{ - return (CORBA::Boolean) this->persistent_; -} - -ACE_INLINE const ACE_CString & -TAO_POA::name (void) const -{ - return this->name_; -} - -ACE_INLINE char * -TAO_POA::the_name (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return CORBA::string_dup (this->name_.c_str ()); -} - -ACE_INLINE const TAO_Object_Adapter::poa_name & -TAO_POA::folded_name (void) const -{ - return this->folded_name_; -} - -ACE_INLINE const TAO_Object_Adapter::poa_name & -TAO_POA::system_name (void) const -{ - return this->system_name_.in (); -} - -ACE_INLINE char -TAO_POA::name_separator (void) -{ - return '\0'; -} - -ACE_INLINE CORBA::ULong -TAO_POA::name_separator_length (void) -{ - return sizeof (char); -} - -ACE_INLINE char -TAO_POA::persistent_key_char (void) -{ - return 'P'; -} - -ACE_INLINE char -TAO_POA::transient_key_char (void) -{ - return 'T'; -} - -ACE_INLINE char -TAO_POA::persistent_key_type (void) -{ - if (this->persistent ()) - return TAO_POA::persistent_key_char (); - else - return TAO_POA::transient_key_char (); -} - -ACE_INLINE CORBA::ULong -TAO_POA::persistent_key_type_length (void) -{ - return sizeof (char); -} - -ACE_INLINE char -TAO_POA::system_id_key_char (void) -{ - return 'S'; -} - -ACE_INLINE char -TAO_POA::user_id_key_char (void) -{ - return 'U'; -} - -ACE_INLINE char -TAO_POA::system_id_key_type (void) -{ - if (this->system_id ()) - return TAO_POA::system_id_key_char (); - else - return TAO_POA::user_id_key_char (); -} - -ACE_INLINE CORBA::ULong -TAO_POA::system_id_key_type_length (void) -{ - return sizeof (char); -} - -ACE_INLINE char -TAO_POA::root_key_char (void) -{ - return 'R'; -} - -ACE_INLINE char -TAO_POA::non_root_key_char (void) -{ - return 'N'; -} - -ACE_INLINE char -TAO_POA::root_key_type (void) -{ - if (this->root ()) - return TAO_POA::root_key_char (); - else - return TAO_POA::non_root_key_char (); -} - -ACE_INLINE CORBA::ULong -TAO_POA::root_key_type_length (void) -{ - return sizeof (char); -} - -ACE_INLINE CORBA::ULong -TAO_POA::outstanding_requests (void) const -{ - return this->outstanding_requests_; -} - -ACE_INLINE void -TAO_POA::outstanding_requests (CORBA::ULong new_outstanding_requests) -{ - this->outstanding_requests_ = new_outstanding_requests; -} - -ACE_INLINE CORBA::ULong -TAO_POA::increment_outstanding_requests (void) -{ - return ++this->outstanding_requests_; -} - -ACE_INLINE CORBA::ULong -TAO_POA::decrement_outstanding_requests (void) -{ - return --this->outstanding_requests_; -} - -ACE_INLINE void -TAO_POA::establish_servant_lock (PortableServer::Servant servant) -{ -#if (TAO_HAS_MINIMUM_POA == 0) - if (this->policies ().thread () == PortableServer::SINGLE_THREAD_MODEL) - { - servant->_increment_single_threaded_poa_lock_count (); - } -#else /* TAO_HAS_MINIMUM_POA == 0 */ - ACE_UNUSED_ARG (servant); -#endif /* TAO_HAS_MINIMUM_POA == 0 */ -} - -ACE_INLINE void -TAO_POA::teardown_servant_lock (PortableServer::Servant servant) -{ -#if (TAO_HAS_MINIMUM_POA == 0) - if (this->policies ().thread () == PortableServer::SINGLE_THREAD_MODEL) - { - servant->_decrement_single_threaded_poa_lock_count (); - } -#else /* TAO_HAS_MINIMUM_POA == 0 */ - ACE_UNUSED_ARG (servant); -#endif /* TAO_HAS_MINIMUM_POA == 0 */ -} - -ACE_INLINE TAO_ORB_Core & -TAO_POA::orb_core (void) const -{ - return this->orb_core_; -} diff --git a/TAO/tao/POAManager.cpp b/TAO/tao/POAManager.cpp deleted file mode 100644 index f0930d1bbed..00000000000 --- a/TAO/tao/POAManager.cpp +++ /dev/null @@ -1,263 +0,0 @@ -// $Id$ - -#include "tao/POAManager.h" -#include "tao/POA.h" -#include "tao/Server_Strategy_Factory.h" -#include "tao/poa_macros.h" - -#if !defined (__ACE_INLINE__) -# include "tao/POAManager.i" -#endif /* ! __ACE_INLINE__ */ - -TAO_POA_Manager::TAO_POA_Manager (TAO_Object_Adapter &object_adapter) - : state_ (PortableServer::POAManager::HOLDING), - lock_ (object_adapter.lock ()), - poa_collection_ (), - object_adapter_ (object_adapter) -{ -} - -TAO_POA_Manager::~TAO_POA_Manager (void) -{ -} - -void -TAO_POA_Manager::activate_i (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)) -{ - // This operation changes the state of the POA manager to active. If - // issued while the POA manager is in the inactive state, the - // AdapterInactive exception is raised. Entering the active state - // enables the associated POAs to process requests. - - if (this->state_ == PortableServer::POAManager::INACTIVE) - { - ACE_THROW (PortableServer::POAManager::AdapterInactive ()); - } - else - { - this->state_ = PortableServer::POAManager::ACTIVE; - } -} - -void -TAO_POA_Manager::deactivate_i (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)) -{ - // Is the semantics for this thread correct? - TAO_POA::check_for_valid_wait_for_completions (wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; - - // This operation changes the state of the POA manager to - // inactive. If issued while the POA manager is in the inactive - // state, the AdapterInactive exception is raised. Entering the - // inactive state causes the associated POAs to reject requests that - // have not begun to be executed as well as any new requests. - - if (this->state_ == PortableServer::POAManager::INACTIVE) - { - ACE_THROW (PortableServer::POAManager::AdapterInactive ()); - } - else - { - this->state_ = PortableServer::POAManager::INACTIVE; - } - - // After changing the state, if the etherealize_objects parameter is: - // - // a) TRUE - the POA manager will cause all associated POAs that - // have the RETAIN and USE_SERVANT_MANAGER policies to perform the - // etherealize operation on the associated servant manager for all - // active objects. - // - // b) FALSE - the etherealize operation is not called. The purpose - // is to provide developers with a means to shut down POAs in a - // crisis (for example, unrecoverable error) situation. - - // If the wait_for_completion parameter is FALSE, this operation - // will return immediately after changing the state. If the - // parameter is TRUE and the current thread is not in an invocation - // context dispatched by some POA belonging to the same ORB as this - // POA, this operation does not return until there are no actively - // executing requests in any of the POAs associated with this POA - // manager (that is, all requests that were started prior to the - // state change have completed) and, in the case of a TRUE - // etherealize_objects, all invocations of etherealize have - // completed for POAs having the RETAIN and USE_SERVANT_MANAGER - // policies. If the parameter is TRUE and the current thread is in - // an invocation context dispatched by some POA belonging to the - // same ORB as this POA the BAD_INV_ORDER exception is raised and - // the state is not changed. - - for (POA_COLLECTION::iterator iterator = this->poa_collection_.begin (); - iterator != this->poa_collection_.end (); - ++iterator) - { - TAO_POA *poa = *iterator; - poa->deactivate_all_objects_i (etherealize_objects, - wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; - } - - // If the ORB::shutdown operation is called, it makes a call on - // deactivate with a TRUE etherealize_objects parameter for each POA - // manager known in the process; the wait_for_completion parameter - // to deactivate will be the same as the similarly named parameter - // of ORB::shutdown. -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -void -TAO_POA_Manager::hold_requests_i (CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)) -{ - // Is the semantics for this thread correct? - TAO_POA::check_for_valid_wait_for_completions (wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; - - // This operation changes the state of the POA manager to - // holding. If issued while the POA manager is in the inactive - // state, the AdapterInactive exception is raised. Entering the - // holding state causes the associated POAs to queue incoming - // requests. Any requests that have been queued but have not - // started executing will continue to be queued while in the holding - // state. - - if (this->state_ == PortableServer::POAManager::INACTIVE) - { - ACE_THROW (PortableServer::POAManager::AdapterInactive ()); - } - else - { - this->state_ = PortableServer::POAManager::HOLDING; - } - - // If the wait_for_completion parameter is FALSE, this operation - // returns immediately after changing the state. If the parameter is - // TRUE and the current thread is not in an invocation context - // dispatched by some POA belonging to the same ORB as this POA, - // this operation does not return until either there are no actively - // executing requests in any of the POAs associated with this POA - // manager (that is, all requests that were started prior to the - // state change have completed) or the state of the POA manager is - // changed to a state other than holding. If the parameter is TRUE - // and the current thread is in an invocation context dispatched by - // some POA belonging to the same ORB as this POA the BAD_INV_ORDER - // exception is raised and the state is not changed. - - if (wait_for_completion) - { - for (POA_COLLECTION::iterator iterator = this->poa_collection_.begin (); - iterator != this->poa_collection_.end (); - ++iterator) - { - TAO_POA *poa = *iterator; - poa->wait_for_completions (wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; - } - } -} - -void -TAO_POA_Manager::discard_requests_i (CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)) -{ - // Is the semantics for this thread correct? - TAO_POA::check_for_valid_wait_for_completions (wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; - - // This operation changes the state of the POA manager to - // discarding. If issued while the POA manager is in the inactive - // state, the AdapterInactive exception is raised. Entering the - // discarding state causes the associated POAs to discard incoming - // requests. In addition, any requests that have been queued but - // have not started executing are discarded. When a request is - // discarded, a TRANSIENT system exception is returned to the - // client. - - if (this->state_ == PortableServer::POAManager::INACTIVE) - { - ACE_THROW (PortableServer::POAManager::AdapterInactive ()); - } - else - { - this->state_ = PortableServer::POAManager::DISCARDING; - } - - // If the wait_for_completion parameter is FALSE, this operation - // returns immediately after changing the state. If the - // parameter is TRUE and the current thread is not in an - // invocation context dispatched by some POA belonging to the - // same ORB as this POA, this operation does not return until - // either there are no actively executing requests in any of the - // POAs associated with this POA manager (that is, all requests - // that were started prior to the state change have completed) - // or the state of the POA manager is changed to a state other - // than discarding. If the parameter is TRUE and the current - // thread is in an invocation context dispatched by some POA - // belonging to the same ORB as this POA the BAD_INV_ORDER - // exception is raised and the state is not changed. - - if (wait_for_completion) - { - for (POA_COLLECTION::iterator iterator = this->poa_collection_.begin (); - iterator != this->poa_collection_.end (); - ++iterator) - { - TAO_POA *poa = *iterator; - poa->wait_for_completions (wait_for_completion, - ACE_TRY_ENV); - ACE_CHECK; - } - } -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -int -TAO_POA_Manager::remove_poa (TAO_POA *poa) -{ - int result = this->poa_collection_.remove (poa); - - if (result == 0) - { - if (this->poa_collection_.is_empty ()) - { - CORBA::release (this); - } - } - - return result; -} - -int -TAO_POA_Manager::register_poa (TAO_POA *poa) -{ - return this->poa_collection_.insert (poa); -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Unbounded_Set; -template class ACE_Unbounded_Set_Iterator; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Unbounded_Set -#pragma instantiate ACE_Unbounded_Set_Iterator - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/POAManager.h b/TAO/tao/POAManager.h deleted file mode 100644 index c17bc351253..00000000000 --- a/TAO/tao/POAManager.h +++ /dev/null @@ -1,139 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// POAManager.h -// -// = DESCRIPTION -// POAManager -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#ifndef TAO_POAMANAGER_H -#define TAO_POAMANAGER_H -#include "ace/pre.h" - -#include "tao/PortableServerC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/poa_macros.h" - -// Local Object -#include "tao/LocalObject.h" - -class TAO_POA; -class TAO_Object_Adapter; -// Forward decl. - -// This is to remove "inherits via dominance" warnings from MSVC. -// MSVC is being a little too paranoid. -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -class TAO_Export TAO_POA_Manager : - public PortableServer::POAManager, - public TAO_Local_RefCounted_Object -{ - friend class TAO_POA; - friend class TAO_Object_Adapter; - -public: - - void activate (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)); - -#if (TAO_HAS_MINIMUM_POA == 0) - - void hold_requests (CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)); - - void discard_requests (CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)); - - void deactivate (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - PortableServer::POAManager::State get_state (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); - - TAO_POA_Manager (TAO_Object_Adapter &object_adapter); - - ~TAO_POA_Manager (void); - -protected: - - void activate_i (CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)); - - void deactivate_i (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)); - -#if (TAO_HAS_MINIMUM_POA == 0) - - void hold_requests_i (CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)); - - void discard_requests_i (CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - - PortableServer::POAManager::State get_state_i () - ACE_THROW_SPEC ((CORBA::SystemException)); - - ACE_Lock &lock (void); - - int remove_poa (TAO_POA *poa); - - int register_poa (TAO_POA *poa); - - PortableServer::POAManager::State state_; - - ACE_Lock &lock_; - - typedef ACE_Unbounded_Set POA_COLLECTION; - - POA_COLLECTION poa_collection_; - - TAO_Object_Adapter &object_adapter_; -}; - -#if defined (__ACE_INLINE__) -# include "tao/POAManager.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_POAMANAGER_H */ diff --git a/TAO/tao/POAManager.i b/TAO/tao/POAManager.i deleted file mode 100644 index 8977b773bbd..00000000000 --- a/TAO/tao/POAManager.i +++ /dev/null @@ -1,80 +0,0 @@ -// $Id$ - -#include "tao/Environment.h" - -ACE_INLINE ACE_Lock & -TAO_POA_Manager::lock (void) -{ - return this->lock_; -} - -ACE_INLINE void -TAO_POA_Manager::activate (CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)) -{ - // Lock access to the POAManager for the duration of this transaction - TAO_OBJECT_ADAPTER_GUARD; - - this->activate_i (ACE_TRY_ENV); -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -ACE_INLINE void -TAO_POA_Manager::hold_requests (CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)) -{ - // Lock access to the POAManager for the duration of this transaction - TAO_OBJECT_ADAPTER_GUARD; - - this->hold_requests_i (wait_for_completion, ACE_TRY_ENV); -} - -ACE_INLINE void -TAO_POA_Manager::discard_requests (CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)) -{ - // Lock access to the POAManager for the duration of this transaction - TAO_OBJECT_ADAPTER_GUARD; - - this->discard_requests_i (wait_for_completion, ACE_TRY_ENV); -} - -ACE_INLINE void -TAO_POA_Manager::deactivate (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA_Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::POAManager::AdapterInactive)) -{ - // Lock access to the POAManager for the duration of this transaction - TAO_OBJECT_ADAPTER_GUARD; - - this->deactivate_i (etherealize_objects, - wait_for_completion, - ACE_TRY_ENV); -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -ACE_INLINE PortableServer::POAManager::State -TAO_POA_Manager::get_state_i (void) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->state_; -} - -ACE_INLINE PortableServer::POAManager::State -TAO_POA_Manager::get_state (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // Lock access to the POAManager for the duration of this transaction - TAO_OBJECT_ADAPTER_GUARD_RETURN (this->state_); - - return this->get_state_i (); -} diff --git a/TAO/tao/POA_CORBA.h b/TAO/tao/POA_CORBA.h deleted file mode 100644 index 5c44e051ed1..00000000000 --- a/TAO/tao/POA_CORBA.h +++ /dev/null @@ -1,1109 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// POA_CORBA.h -// -// This file is created by merging the PolicyS.h, -// DomainS.h and InterfaceS.h files which -// have been removed. -// -// = AUTHOR -// -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO ORB and the TAO IDL Compiler have been developed by Washington -// University Computer Science's Distributed Object Computing Group. -// -// Information on TAO is available at -// http://www.cs.wustl.edu/~schmidt/TAO.html -// -// -// Modified by Aniruddha Gokhale. -// -// ============================================================================ - -#ifndef TAO_IDL_POA_CORBA_H -#define TAO_IDL_POA_CORBA_H -#include "ace/pre.h" - -#include "tao/corbafwd.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/PolicyC.h" -#include "tao/DomainC.h" -#include "tao/Servant_Base.h" -#if (TAO_HAS_INTERFACE_REPOSITORY == 1) -#include "tao/InterfaceC.h" -#endif /* TAO_HAS_INTERFACE_REPOSITORY == 1 */ - -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -class IR_InterfaceDef; - -class TAO_Export POA_CORBA -{ -public: - - // **************************************************************** - - class Policy; - typedef Policy *Policy_ptr; - class TAO_Export Policy : public virtual PortableServer::ServantBase - { - protected: - Policy (void); - - public: - Policy (const Policy& rhs); - virtual ~Policy (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - ::CORBA_Policy *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual CORBA::PolicyType policy_type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void _get_policy_type_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA_Policy_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void copy_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void destroy_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - - }; - - - class TAO_Export _tao_thru_poa_collocated_CORBA_Policy : public virtual ::CORBA_Policy - { - public: - _tao_thru_poa_collocated_CORBA_Policy ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::PolicyType policy_type ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA_Policy_ptr copy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - }; - - // **************************************************************** - - class DomainManager; - typedef DomainManager *DomainManager_ptr; - class DomainManager : public virtual PortableServer::ServantBase - { - protected: - DomainManager (void); - - public: - DomainManager (const DomainManager& rhs); - virtual ~DomainManager (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - CORBA::DomainManager *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - virtual CORBA::Policy_ptr get_domain_policy ( - CORBA::PolicyType policy_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - static void get_domain_policy_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - }; - - class _tao_collocated_DomainManager : public virtual CORBA::DomainManager - { - public: - _tao_collocated_DomainManager ( - DomainManager_ptr servant, - TAO_Stub *stub - ); - DomainManager_ptr _get_servant (void) const; - virtual CORBA::Policy_ptr get_domain_policy ( - CORBA::PolicyType policy_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - private: - DomainManager_ptr servant_; - }; - - // **************************************************************** - -#if (TAO_HAS_MINIMUM_CORBA == 0) - - class ConstructionPolicy; - typedef ConstructionPolicy *ConstructionPolicy_ptr; - class ConstructionPolicy : public virtual Policy - { - protected: - ConstructionPolicy (void); - - public: - ConstructionPolicy (const ConstructionPolicy& rhs); - virtual ~ConstructionPolicy (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - CORBA::ConstructionPolicy *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - virtual void make_domain_manager ( - IR_InterfaceDef *object_type, - CORBA::Boolean constr_policy, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - static void make_domain_manager_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - }; - - class _tao_collocated_ConstructionPolicy : public virtual CORBA::ConstructionPolicy, - public virtual _tao_thru_poa_collocated_CORBA_Policy - { - public: - _tao_collocated_ConstructionPolicy ( - ConstructionPolicy_ptr servant, - TAO_Stub *stub - ); - ConstructionPolicy_ptr _get_servant (void) const; - virtual void make_domain_manager ( - IR_InterfaceDef *object_type, - CORBA::Boolean constr_policy, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - virtual CORBA::Boolean _is_a ( - const char *logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - CORBA::Environment::default_environment () - ); - - private: - ConstructionPolicy_ptr servant_; - }; - -#endif /* ! defined TAO_HAS_MINIMUM_CORBA */ - - // **************************************************************** - -#if (TAO_HAS_INTERFACE_REPOSITORY == 1) - - class IRObject; - typedef IRObject *IRObject_ptr; - class IRObject : public virtual PortableServer::ServantBase - { - protected: - IRObject (void); - - public: - IRObject (const IRObject& rhs); - virtual ~IRObject (void); - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - ::CORBA::IRObject *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual IR::DefinitionKind def_kind ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void _get_def_kind_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void destroy_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - }; - - class _tao_thru_poa_collocated_IRObject : public virtual CORBA::IRObject - { - public: - _tao_thru_poa_collocated_IRObject ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual IR::DefinitionKind def_kind ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - }; - - class TypeCodeFactory; - typedef TypeCodeFactory *TypeCodeFactory_ptr; - class TypeCodeFactory : public virtual PortableServer::ServantBase - { - protected: - TypeCodeFactory (void); - - public: - TypeCodeFactory (const TypeCodeFactory& rhs); - virtual ~TypeCodeFactory (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - static void _is_a_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - static void _non_existent_skel ( - CORBA::ServerRequest &req, - void *obj, - void *context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - ::CORBA::TypeCodeFactory *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual CORBA::TypeCode_ptr create_struct_tc ( - const char * id, - const char * name, - const IR::StructMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_struct_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_union_tc ( - const char * id, - const char * name, - CORBA::TypeCode_ptr discriminator_type, - const IR::UnionMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_union_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_enum_tc ( - const char * id, - const char * name, - const IR::EnumMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_enum_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_alias_tc ( - const char * id, - const char * name, - CORBA::TypeCode_ptr original_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_alias_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_exception_tc ( - const char * id, - const char * name, - const IR::StructMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_exception_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_interface_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_interface_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_string_tc ( - CORBA::ULong bound, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_string_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_wstring_tc ( - CORBA::ULong bound, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_wstring_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_fixed_tc ( - CORBA::UShort digits, - CORBA::UShort scale, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_fixed_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_sequence_tc ( - CORBA::ULong bound, - CORBA::TypeCode_ptr element_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_sequence_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_array_tc ( - CORBA::ULong length, - CORBA::TypeCode_ptr element_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_array_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_value_tc ( - const char * id, - const char * name, - CORBA::ValueModifier type_modifier, - CORBA::TypeCode_ptr concrete_base, - const IR::ValueMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_value_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_value_box_tc ( - const char * id, - const char * name, - CORBA::TypeCode_ptr boxed_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_value_box_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_native_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_native_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_recursive_tc ( - const char * id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_recursive_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_abstract_interface_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_abstract_interface_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_component_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_component_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_home_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - static void create_home_tc_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - - }; - - class _tao_thru_poa_collocated_TypeCodeFactory : public virtual CORBA::TypeCodeFactory - { - public: - _tao_thru_poa_collocated_TypeCodeFactory ( - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::TypeCode_ptr create_struct_tc ( - const char * id, - const char * name, - const IR::StructMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_union_tc ( - const char * id, - const char * name, - CORBA::TypeCode_ptr discriminator_type, - const IR::UnionMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_enum_tc ( - const char * id, - const char * name, - const IR::EnumMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_alias_tc ( - const char * id, - const char * name, - CORBA::TypeCode_ptr original_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_exception_tc ( - const char * id, - const char * name, - const IR::StructMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_interface_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_string_tc ( - CORBA::ULong bound, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_wstring_tc ( - CORBA::ULong bound, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_fixed_tc ( - CORBA::UShort digits, - CORBA::UShort scale, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_sequence_tc ( - CORBA::ULong bound, - CORBA::TypeCode_ptr element_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_array_tc ( - CORBA::ULong length, - CORBA::TypeCode_ptr element_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_value_tc ( - const char * id, - const char * name, - CORBA::ValueModifier type_modifier, - CORBA::TypeCode_ptr concrete_base, - const IR::ValueMemberSeq & members, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_value_box_tc ( - const char * id, - const char * name, - CORBA::TypeCode_ptr boxed_type, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_native_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_recursive_tc ( - const char * id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_abstract_interface_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_component_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - virtual CORBA::TypeCode_ptr create_home_tc ( - const char * id, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - - }; - -#endif /* TAO_HAS_INTERFACE_REPOSITORY == 1 */ -}; - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#include "ace/post.h" -#endif /* TAO_IDL_POA_CORBA_H */ diff --git a/TAO/tao/PolicyS.cpp b/TAO/tao/PolicyS.cpp deleted file mode 100644 index babf01ecb48..00000000000 --- a/TAO/tao/PolicyS.cpp +++ /dev/null @@ -1,502 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#include "tao/PolicyC.h" -#include "tao/Operation_Table.h" -#include "tao/Server_Request.h" -#include "tao/NVList.h" -#include "tao/Stub.h" -#include "tao/POA_CORBA.h" -#include "tao/Typecode.h" -#include "tao/Object_Adapter.h" -#include "tao/ORB_Core.h" - -class TAO_CORBA_Policy_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable -{ -private: - unsigned int hash (const char *str, unsigned int len); -public: - const TAO_operation_db_entry * lookup (const char *str, unsigned int len); -}; -/* starting time is 6:18:45 */ -/* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_CORBA_Policy_Perfect_Hash_OpTable -N lookup */ -unsigned int -TAO_CORBA_Policy_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) -{ - static const unsigned char asso_values[] = - { -#if defined (ACE_MVS) - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 0, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 0, - 17, 0, 0, 0, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 0, 17, 17, 17, 17, 0, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, -#else - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 0, 17, 0, 17, 0, - 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 0, 17, 17, 17, - 17, 0, 17, 17, 17, 17, 17, 17, -#endif /* ACE_MVS */ - }; - return len + asso_values[str[len - 1]] + asso_values[str[0]]; -} - -const class TAO_operation_db_entry * -TAO_CORBA_Policy_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 5, - MIN_WORD_LENGTH = 4, - MAX_WORD_LENGTH = 16, - MIN_HASH_VALUE = 4, - MAX_HASH_VALUE = 16, - HASH_VALUE_RANGE = 13, - DUPLICATES = 0 - }; - - static const class TAO_operation_db_entry wordlist[] = - { - {"",0},{"",0},{"",0},{"",0}, - {"copy", &POA_CORBA::Policy::copy_skel}, - {"_is_a", &POA_CORBA::Policy::_is_a_skel}, - {"",0}, - {"destroy", &POA_CORBA::Policy::destroy_skel}, - {"",0},{"",0},{"",0},{"",0},{"",0}, - {"_non_existent", &POA_CORBA::Policy::_non_existent_skel}, - {"",0},{"",0}, - {"_get_policy_type", &POA_CORBA::Policy::_get_policy_type_skel}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key].opname_; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} -/* ending time is 6:18:45 */ -static TAO_CORBA_Policy_Perfect_Hash_OpTable tao_CORBA_Policy_optable; - -CORBA_Policy_ptr _TAO_collocation_POA_CORBA_Policy_Stub_Factory ( - CORBA::Object_ptr obj - ) -{ - TAO_Stub *stub = obj->_stubobj (); - - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - CORBA_Policy_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - break; - default: - break; - } - return 0; -} - -int _TAO_collocation_POA_CORBA_Policy_Stub_Factory_Initializer (long dummy) -{ - ACE_UNUSED_ARG (dummy); - - _TAO_collocation_CORBA_Policy_Stub_Factory_function_pointer = - _TAO_collocation_POA_CORBA_Policy_Stub_Factory; - - return 0; -} - -static int _TAO_collocation_POA_CORBA_Policy_Stub_Factory_Initializer_Scarecrow = - _TAO_collocation_POA_CORBA_Policy_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_CORBA_Policy_Stub_Factory_Initializer)); - -// skeleton constructor -POA_CORBA::Policy::Policy (void) -{ - this->optable_ = &tao_CORBA_Policy_optable; -} - -// copy ctor -POA_CORBA::Policy::Policy (const POA_CORBA::Policy& rhs) - : TAO_ServantBase (rhs) -{} - -// skeleton destructor -POA_CORBA::Policy::~Policy (void) -{ -} - -void POA_CORBA::Policy::_get_policy_type_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - POA_CORBA::Policy *_tao_impl = (POA_CORBA::Policy *)_tao_object_reference; - - CORBA::PolicyType _tao_retval = 0; - - _tao_retval = _tao_impl->policy_type ( - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << _tao_retval) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void POA_CORBA::Policy::copy_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - POA_CORBA::Policy *_tao_impl = (POA_CORBA::Policy *)_tao_object_reference; - - CORBA_Policy_var _tao_retval; - - _tao_retval = _tao_impl->copy ( - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!( - (_tao_out << _tao_retval.in ()) - )) - ACE_THROW (CORBA::MARSHAL () ); - -} - -void POA_CORBA::Policy::destroy_skel ( - CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV -) -{ - POA_CORBA::Policy *_tao_impl = (POA_CORBA::Policy *)_tao_object_reference; - - _tao_impl->destroy ( - ACE_TRY_ENV - ); - - ACE_CHECK; - - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - } - -void POA_CORBA::Policy::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); - POA_CORBA::Policy *_tao_impl = (POA_CORBA::Policy *) _tao_object_reference; - CORBA::Boolean _tao_retval = 0; - CORBA::String_var value; - if (!(_tao_in >> value.out ())) - ACE_THROW (CORBA::MARSHAL ()); - - _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) - ACE_THROW (CORBA::MARSHAL ()); -} - -void POA_CORBA::Policy::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, - void * _tao_object_reference, - void * /* context */, - CORBA::Environment &ACE_TRY_ENV - ) -{ - POA_CORBA::Policy *_tao_impl = (POA_CORBA::Policy *) _tao_object_reference; - CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); - ACE_CHECK; - - _tao_server_request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) - ACE_THROW (CORBA::MARSHAL ()); -} - -CORBA::Boolean POA_CORBA::Policy::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA_Policy:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* POA_CORBA::Policy::_downcast ( - const char* logical_type_id - ) -{ -if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA_Policy:1.0") == 0) - return ACE_static_cast (POA_CORBA::Policy_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -void POA_CORBA::Policy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - this->synchronous_upcall_dispatch(req, context, this, ACE_TRY_ENV); -} - -const char* POA_CORBA::Policy::_interface_repository_id (void) const -{ - return "IDL:omg.org/CORBA_Policy:1.0"; -} - -CORBA_Policy* -POA_CORBA::Policy::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ()) - switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) - { - case TAO_ORB_Core::THRU_POA: - { - ::CORBA_Policy_ptr retval = 0; - ACE_NEW_RETURN ( - retval, - POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy (stub), - 0 - ); - return retval; - } - case TAO_ORB_Core::DIRECT: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - } - else - { - // stub->_incr_refcnt (); - CORBA::Object_ptr tmp = CORBA::Object::_nil (); - ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); - CORBA::Object_var obj = tmp; - return ::CORBA_Policy::_unchecked_narrow (obj.in ()); - } -} - -POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy::_tao_thru_poa_collocated_CORBA_Policy ( - TAO_Stub *stub -) - : CORBA_Object (stub, 0, 1) -{ -} - -CORBA::Boolean POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_is_a", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_CORBA::Policy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/CORBA_Policy:1.0" - ) - )->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -CORBA::Boolean POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "_non_existent", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_CORBA::Policy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/CORBA_Policy:1.0" - ) - )->_non_existent (ACE_TRY_ENV); -} - - -CORBA::PolicyType POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy::policy_type ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - CORBA::PolicyType _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "policy_type", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (_tao_retval); - return ACE_reinterpret_cast ( - POA_CORBA::Policy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/CORBA_Policy:1.0" - ) - )->policy_type ( - ACE_TRY_ENV - ); - -} - -CORBA_Policy_ptr POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy::copy ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - CORBA_Policy_var _tao_retval; - ACE_UNUSED_ARG (_tao_retval); - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "copy", - ACE_TRY_ENV - ); - ACE_CHECK_RETURN (0); - return ACE_reinterpret_cast ( - POA_CORBA::Policy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/CORBA_Policy:1.0" - ) - )->copy ( - ACE_TRY_ENV - ); - -} - -void POA_CORBA::_tao_thru_poa_collocated_CORBA_Policy::destroy ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) -{ - TAO_Object_Adapter::Servant_Upcall servant_upcall ( - *this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter () - ); - servant_upcall.prepare_for_upcall ( - this->_object_key (), - "destroy", - ACE_TRY_ENV - ); - ACE_CHECK; - ACE_reinterpret_cast ( - POA_CORBA::Policy_ptr, - servant_upcall.servant ()->_downcast ( - "IDL:omg.org/CORBA_Policy:1.0" - ) - )->destroy ( - ACE_TRY_ENV - ); - return; -} diff --git a/TAO/tao/PortableServer.pidl b/TAO/tao/PortableServer.pidl deleted file mode 100644 index 0075c2c9c56..00000000000 --- a/TAO/tao/PortableServer.pidl +++ /dev/null @@ -1,278 +0,0 @@ -// -// $Id$ -// -// ================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// PortableServer.pidl -// -// = DESCRIPTION -// -// This file was used to generate the code in PortableServerC.{h,i,cpp} -// -// The command used to generate code from this file is: -// -// tao_idl.exe \ -// -Ge 1 \ -// -Wb,export_macro=TAO_Export \ -// -Wb,export_include="tao/corbafwd.h" \ -// -Wb,pre_include="ace/pre.h" \ -// -Wb,post_include="ace/post.h" \ -// PortableServer.pidl -// -// After the file is generated a patch must be applied. The patch: -// -// - Disables parts of the code under certain configurations. -// - Eliminates cycles in the include dependencies. -// - Removes the extra environment option for (a) incarnate (b) -// etherealize (c) preinvoke and (d) postinvoke -// - Adds non-idl components of PortableServer to the namespace. -// This includes (a) Servant (b) ServantBase (c) RefCountServantBase -// (d) Cookie (e) ObjectId_to_string (f) string_to_ObjectId (g) -// ObjectId_to_wstring (h) wstring_to_ObjectId (i) ServantBase_var -// (j) DynamicImplementation (k) LocalServantBase -// -// -// ================================================================ - -#ifndef _PORTABLESERVER_IDL_ -#define _PORTABLESERVER_IDL_ - -#pragma prefix "omg.org" - -#include - -module PortableServer { -# pragma version PortableServer 2.3 - - local interface POA; // forward declaration - typedef sequence POAList; - native Servant; - typedef sequence ObjectId; - exception ForwardRequest { - Object forward_reference; - }; - - // Policy interfaces - const CORBA::PolicyType THREAD_POLICY_ID = 16; - const CORBA::PolicyType LIFESPAN_POLICY_ID = 17; - const CORBA::PolicyType ID_UNIQUENESS_POLICY_ID = 18; - const CORBA::PolicyType ID_ASSIGNMENT_POLICY_ID = 19; - const CORBA::PolicyType IMPLICIT_ACTIVATION_POLICY_ID = 20; - const CORBA::PolicyType SERVANT_RETENTION_POLICY_ID = 21; - const CORBA::PolicyType REQUEST_PROCESSING_POLICY_ID = 22; - - enum ThreadPolicyValue { - ORB_CTRL_MODEL, - SINGLE_THREAD_MODEL - }; - local interface ThreadPolicy : CORBA::Policy { - readonly attribute ThreadPolicyValue value; - }; - - enum LifespanPolicyValue { - TRANSIENT, - PERSISTENT - }; - local interface LifespanPolicy : CORBA::Policy { - readonly attribute LifespanPolicyValue value; - }; - - enum IdUniquenessPolicyValue { - UNIQUE_ID, - MULTIPLE_ID - }; - local interface IdUniquenessPolicy : CORBA::Policy { - readonly attribute IdUniquenessPolicyValue value; - }; - - enum IdAssignmentPolicyValue { - USER_ID, - SYSTEM_ID - }; - local interface IdAssignmentPolicy : CORBA::Policy { - readonly attribute IdAssignmentPolicyValue value; - }; - - enum ImplicitActivationPolicyValue { - IMPLICIT_ACTIVATION, - NO_IMPLICIT_ACTIVATION - }; - local interface ImplicitActivationPolicy : CORBA::Policy { - readonly attribute ImplicitActivationPolicyValue value; - }; - - enum ServantRetentionPolicyValue { - RETAIN, - NON_RETAIN - }; - local interface ServantRetentionPolicy : CORBA::Policy { - readonly attribute ServantRetentionPolicyValue value; - }; - - enum RequestProcessingPolicyValue { - USE_ACTIVE_OBJECT_MAP_ONLY, - USE_DEFAULT_SERVANT, - USE_SERVANT_MANAGER - }; - local interface RequestProcessingPolicy : CORBA::Policy { - readonly attribute RequestProcessingPolicyValue value; - }; - - // POAManager interface - local interface POAManager { - exception AdapterInactive{}; - enum State {HOLDING, ACTIVE, DISCARDING, INACTIVE}; - void activate() raises(AdapterInactive); - void hold_requests( in boolean wait_for_completion) - raises(AdapterInactive); - void discard_requests( in boolean wait_for_completion) - raises(AdapterInactive); - void deactivate( in boolean etherealize_objects, - in boolean wait_for_completion) - raises(AdapterInactive); - State get_state(); - }; - - // AdapterActivator interface - local interface AdapterActivator { -# pragma version AdapterActivator 2.3 - boolean unknown_adapter(in POA parent, - in string name); - }; - - // ServantManager interface - local interface ServantManager{ }; - - local interface ServantActivator : ServantManager { -# pragma version ServantActivator 2.3 - Servant incarnate ( in ObjectId oid, - in POA adapter) - raises (ForwardRequest); - void etherealize ( in ObjectId oid, - in POA adapter, - in Servant serv, - in boolean cleanup_in_progress, - in boolean remaining_activations); - }; - - local interface ServantLocator : ServantManager { -# pragma version ServantLocator 2.3 - native Cookie; - Servant preinvoke( in ObjectId oid, - in POA adapter, - in CORBA::Identifier - operation, - out Cookie the_cookie) - raises (ForwardRequest); - void postinvoke( in ObjectId oid, - in POA adapter, - in CORBA::Identifier - operation, - in Cookie the_cookie, - in Servant the_servant ); - }; - - local interface POA { -# pragma version POA 2.3 - exception AdapterAlreadyExists {}; - exception AdapterNonExistent {}; - exception InvalidPolicy {unsigned short index;}; - exception NoServant {}; - exception ObjectAlreadyActive {}; - exception ObjectNotActive {}; - exception ServantAlreadyActive {}; - exception ServantNotActive {}; - exception WrongAdapter {}; - exception WrongPolicy {}; - - // POA creation and destruction - POA create_POA( in string adapter_name, - in POAManager a_POAManager, - in CORBA::PolicyList policies) - raises (AdapterAlreadyExists, InvalidPolicy); - POA find_POA( in string adapter_name, - in boolean activate_it) - raises (AdapterNonExistent); - void destroy( in boolean etherealize_objects, - in boolean wait_for_completion); - - // Factories for Policy objects - ThreadPolicy create_thread_policy(in ThreadPolicyValue value); - LifespanPolicy - create_lifespan_policy(in LifespanPolicyValue value); - IdUniquenessPolicy create_id_uniqueness_policy( - in IdUniquenessPolicyValue value); - IdAssignmentPolicy create_id_assignment_policy( - in IdAssignmentPolicyValue value); - ImplicitActivationPolicy create_implicit_activation_policy( - in ImplicitActivationPolicyValue value); - ServantRetentionPolicy create_servant_retention_policy( - in ServantRetentionPolicyValue value); - RequestProcessingPolicy create_request_processing_policy( - in RequestProcessingPolicyValue value); - - // POA attributes - readonly attribute string the_name; - readonly attribute POA the_parent; - readonly attribute POAList the_children; - readonly attribute POAManager the_POAManager; - attribute AdapterActivator the_activator; - - // Servant Manager registration: - ServantManager get_servant_manager() - raises (WrongPolicy); - void set_servant_manager(in ServantManager imgr) - raises (WrongPolicy); - - // operations for the USE_DEFAULT_SERVANT policy - Servant get_servant() raises (NoServant, WrongPolicy); - void set_servant( in Servant p_servant) - raises (WrongPolicy); - - // object activation and deactivation - ObjectId activate_object(in Servant p_servant) - raises (ServantAlreadyActive, WrongPolicy); - void activate_object_with_id(in ObjectId id, - in Servant p_servant) - raises (ServantAlreadyActive, - ObjectAlreadyActive, - WrongPolicy); - void deactivate_object( in ObjectId oid) - raises (ObjectNotActive, WrongPolicy); - - // reference creation operations - Object create_reference ( in CORBA::RepositoryId intf) - raises (WrongPolicy); - Object create_reference_with_id ( - in ObjectId oid, - in CORBA::RepositoryId intf) - raises (WrongPolicy); - - // Identity mapping operations: - ObjectId servant_to_id( in Servant p_servant) - raises (ServantNotActive, WrongPolicy); - Object servant_to_reference(in Servant p_servant) - raises (ServantNotActive, WrongPolicy); - Servant reference_to_servant(in Object reference) - raises(ObjectNotActive, WrongPolicy); - ObjectId reference_to_id( in Object reference) - raises (WrongAdapter, WrongPolicy); - Servant id_to_servant( in ObjectId oid) - raises (ObjectNotActive, WrongPolicy); - Object id_to_reference( in ObjectId oid) - raises (ObjectNotActive, WrongPolicy); - }; - - // Current interface - local interface Current : CORBA::Current { -# pragma version Current 2.3 - exception NoContext { }; - POA get_POA() raises (NoContext); - ObjectId get_object_id() raises (NoContext); - }; -}; -#endif // _PORTABLESERVER_IDL_ diff --git a/TAO/tao/PortableServerC.cpp b/TAO/tao/PortableServerC.cpp deleted file mode 100644 index daf9be00022..00000000000 --- a/TAO/tao/PortableServerC.cpp +++ /dev/null @@ -1,2977 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#include "PortableServerC.h" -#include "tao/ORB.h" -#include "tao/POA.h" - -#if !defined (__ACE_INLINE__) -#include "PortableServerC.i" -#endif /* !defined INLINE */ - - -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - -#if !defined (__TAO_UNBOUNDED_OBJECT_SEQUENCE_PORTABLESERVER_POALIST_CS_) -#define __TAO_UNBOUNDED_OBJECT_SEQUENCE_PORTABLESERVER_POALIST_CS_ - - // The Base_Sequence functions, please see tao/Sequence.h - void - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::_allocate_buffer (CORBA::ULong length) - { - PortableServer::POA **tmp = 0; - tmp = _TAO_Unbounded_Object_Sequence_PortableServer_POAList::allocbuf (length); - - if (this->buffer_ != 0) - { - PortableServer::POA **old = ACE_reinterpret_cast (PortableServer::POA**, this->buffer_); - for (CORBA::ULong i = 0; i < this->length_; ++i) - if (!this->release_) - tmp[i] = PortableServer::POA::_duplicate (old[i]); - else - tmp[i] = old[i]; - - if (this->release_) - delete[] old; - - } - this->buffer_ = tmp; - } - - void - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::_deallocate_buffer (void) - { - if (this->buffer_ == 0 || this->release_ == 0) - return; - PortableServer::POA **tmp = ACE_reinterpret_cast (PortableServer::POA**, this->buffer_); - for (CORBA::ULong i = 0; i < this->length_; ++i) - { - CORBA::release (tmp[i]); - tmp[i] = PortableServer::POA::_nil (); - } - _TAO_Unbounded_Object_Sequence_PortableServer_POAList::freebuf (tmp); - this->buffer_ = 0; - } - - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::~_TAO_Unbounded_Object_Sequence_PortableServer_POAList (void) - { - this->_deallocate_buffer (); - } - - void - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::_shrink_buffer (CORBA::ULong nl, CORBA::ULong ol) - { - PortableServer::POA **tmp = ACE_reinterpret_cast (PortableServer::POA**, this->buffer_); - - for (CORBA::ULong i = nl; i < ol; ++i) - { - CORBA::release (tmp[i]); - tmp[i] = PortableServer::POA::_nil (); - } - } - void - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::_downcast ( - void* target, - CORBA_Object *src, - CORBA_Environment &ACE_TRY_ENV - ) - { - PortableServer::POA **tmp = ACE_static_cast (PortableServer::POA**, target); - *tmp = PortableServer::POA::_narrow (src, ACE_TRY_ENV); - } - - CORBA_Object* - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::_upcast (void *src) const - { - PortableServer::POA **tmp = ACE_static_cast (PortableServer::POA**, src); - return *tmp; - } - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_PORTABLESERVER_POALIST_CS_) -#define _PORTABLESERVER_POALIST_CS_ - -// ************************************************************* -// PortableServer::POAList -// ************************************************************* - -PortableServer::POAList::POAList (void) -{} -PortableServer::POAList::POAList (CORBA::ULong max) // uses max size - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Object_Sequence_PortableServer_POAList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Object_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max) -{} -PortableServer::POAList::POAList (CORBA::ULong max, CORBA::ULong length, PortableServer::POA_ptr *buffer, CORBA::Boolean release) - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Object_Sequence_PortableServer_POAList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Object_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max, length, buffer, release) -{} -PortableServer::POAList::POAList (const POAList &seq) // copy ctor - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Object_Sequence_PortableServer_POAList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Object_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (seq) -{} -PortableServer::POAList::~POAList (void) // dtor -{} -void PortableServer::POAList::_tao_any_destructor (void *x) -{ - POAList *tmp = ACE_static_cast (POAList*,x); - delete tmp; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_OBJECTID_CS_) -#define _PORTABLESERVER_OBJECTID_CS_ - -// ************************************************************* -// PortableServer::ObjectId -// ************************************************************* - -PortableServer::ObjectId::ObjectId (void) -{} -PortableServer::ObjectId::ObjectId (CORBA::ULong max) // uses max size - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_Sequence -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max) -{} -PortableServer::ObjectId::ObjectId (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, CORBA::Boolean release) - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_Sequence -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max, length, buffer, release) -{} -PortableServer::ObjectId::ObjectId (const ObjectId &seq) // copy ctor - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_Sequence -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (seq) -{} -PortableServer::ObjectId::~ObjectId (void) // dtor -{} -void PortableServer::ObjectId::_tao_any_destructor (void *x) -{ - ObjectId *tmp = ACE_static_cast (ObjectId*,x); - delete tmp; -} - - -#endif /* end #if !defined */ - -static const CORBA::Long _oc_PortableServer_ObjectId[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 32, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x53657276), ACE_NTOHL (0x65722f4f), ACE_NTOHL (0x626a6563), ACE_NTOHL (0x7449643a), ACE_NTOHL (0x312e3000), // repository ID = IDL:PortableServer/ObjectId:1.0 - 9, ACE_NTOHL (0x4f626a65), ACE_NTOHL (0x63744964), ACE_NTOHL (0x0), // name = ObjectId - CORBA::tk_sequence, // typecode kind - 12, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_octet, - - 0U, - -}; -static CORBA::TypeCode _tc_TAO_tc_PortableServer_ObjectId (CORBA::tk_alias, sizeof (_oc_PortableServer_ObjectId), (char *) &_oc_PortableServer_ObjectId, 0, sizeof (PortableServer::ObjectId)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ObjectId, &_tc_TAO_tc_PortableServer_ObjectId) -TAO_NAMESPACE_END - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -// default constructor -PortableServer::ForwardRequest::ForwardRequest (void) - : CORBA_UserException ("IDL:PortableServer/ForwardRequest:1.0") -{ -} - -// destructor - all members are of self managing types -PortableServer::ForwardRequest::~ForwardRequest (void) -{ -} - -void PortableServer::ForwardRequest::_tao_any_destructor (void *x) -{ - ForwardRequest *tmp = ACE_static_cast (ForwardRequest*,x); - delete tmp; -} - -// copy constructor -PortableServer::ForwardRequest::ForwardRequest (const ::PortableServer::ForwardRequest &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ - this->forward_reference = CORBA::Object::_duplicate (_tao_excp.forward_reference.in ()); -} - -// assignment operator -PortableServer::ForwardRequest& -PortableServer::ForwardRequest::operator= (const ::PortableServer::ForwardRequest &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - this->forward_reference = CORBA::Object::_duplicate (_tao_excp.forward_reference.in ()); - return *this; -} - -// narrow -PortableServer::ForwardRequest * -PortableServer::ForwardRequest::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/ForwardRequest:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (ForwardRequest *, exc); - else - return 0; -} - - -void PortableServer::ForwardRequest::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::ForwardRequest::_tao_encode ( - TAO_OutputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) const -{ - if (cdr << *this) - return; - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::ForwardRequest::_tao_decode ( - TAO_InputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) -{ - if (cdr >> *this) - return; - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::ForwardRequest::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::ForwardRequest, 0); - return retval; -} - -PortableServer::ForwardRequest::ForwardRequest ( - const CORBA::Object_ptr _tao_forward_reference -) - : CORBA_UserException (CORBA::string_dup ("IDL:PortableServer/ForwardRequest:1.0")) -{ - this->forward_reference = CORBA::Object::_duplicate (_tao_forward_reference); -} - -static const CORBA::Long _oc_PortableServer_ForwardRequest[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 38, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x53657276), ACE_NTOHL (0x65722f46), ACE_NTOHL (0x6f727761), ACE_NTOHL (0x72645265), ACE_NTOHL (0x71756573), ACE_NTOHL (0x743a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:PortableServer/ForwardRequest:1.0 - 15, ACE_NTOHL (0x466f7277), ACE_NTOHL (0x61726452), ACE_NTOHL (0x65717565), ACE_NTOHL (0x73740000), // name = ForwardRequest - 1, // member count - 18, ACE_NTOHL (0x666f7277), ACE_NTOHL (0x6172645f), ACE_NTOHL (0x72656665), ACE_NTOHL (0x72656e63), ACE_NTOHL (0x65000000), // name = forward_reference - CORBA::tk_objref, - 52, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 29, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f4f62), ACE_NTOHL (0x6a656374), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:omg.org/CORBA/Object:1.0 - 7, ACE_NTOHL (0x4f626a65), ACE_NTOHL (0x63740000), // name = Object - -}; -static CORBA::TypeCode _tc_TAO_tc_PortableServer_ForwardRequest (CORBA::tk_except, sizeof (_oc_PortableServer_ForwardRequest), (char *) &_oc_PortableServer_ForwardRequest, 0, sizeof (PortableServer::ForwardRequest)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ForwardRequest, &_tc_TAO_tc_PortableServer_ForwardRequest) -TAO_NAMESPACE_END - -CORBA::TypeCode_ptr -PortableServer::ForwardRequest::_type (void) const -{ - return _tc_ForwardRequest; -} - -#endif /* TAO_HAS_MINIMUM_CORBA == 0 */ - -TAO_NAMESPACE_TYPE (const CORBA::ULong) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (const CORBA::ULong, THREAD_POLICY_ID, 16U) -TAO_NAMESPACE_END -TAO_NAMESPACE_TYPE (const CORBA::ULong) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (const CORBA::ULong, LIFESPAN_POLICY_ID, 17U) -TAO_NAMESPACE_END -TAO_NAMESPACE_TYPE (const CORBA::ULong) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (const CORBA::ULong, ID_UNIQUENESS_POLICY_ID, 18U) -TAO_NAMESPACE_END -TAO_NAMESPACE_TYPE (const CORBA::ULong) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (const CORBA::ULong, ID_ASSIGNMENT_POLICY_ID, 19U) -TAO_NAMESPACE_END -TAO_NAMESPACE_TYPE (const CORBA::ULong) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (const CORBA::ULong, IMPLICIT_ACTIVATION_POLICY_ID, 20U) -TAO_NAMESPACE_END -TAO_NAMESPACE_TYPE (const CORBA::ULong) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (const CORBA::ULong, SERVANT_RETENTION_POLICY_ID, 21U) -TAO_NAMESPACE_END -TAO_NAMESPACE_TYPE (const CORBA::ULong) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (const CORBA::ULong, REQUEST_PROCESSING_POLICY_ID, 22U) -TAO_NAMESPACE_END - -#if (TAO_HAS_MINIMUM_POA == 0) - -static const CORBA::Long _oc_PortableServer_ThreadPolicyValue[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 41, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x53657276), ACE_NTOHL (0x65722f54), ACE_NTOHL (0x68726561), ACE_NTOHL (0x64506f6c), ACE_NTOHL (0x69637956), ACE_NTOHL (0x616c7565), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:PortableServer/ThreadPolicyValue:1.0 - 18, ACE_NTOHL (0x54687265), ACE_NTOHL (0x6164506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x56616c75), ACE_NTOHL (0x65000000), // name = ThreadPolicyValue - 2, // member count - 15, ACE_NTOHL (0x4f52425f), ACE_NTOHL (0x4354524c), ACE_NTOHL (0x5f4d4f44), ACE_NTOHL (0x454c0000), // name = ORB_CTRL_MODEL - 20, ACE_NTOHL (0x53494e47), ACE_NTOHL (0x4c455f54), ACE_NTOHL (0x48524541), ACE_NTOHL (0x445f4d4f), ACE_NTOHL (0x44454c00), // name = SINGLE_THREAD_MODEL -}; -static CORBA::TypeCode _tc_TAO_tc_PortableServer_ThreadPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_ThreadPolicyValue), (char *) &_oc_PortableServer_ThreadPolicyValue, 0, sizeof (PortableServer::ThreadPolicyValue)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ThreadPolicyValue, &_tc_TAO_tc_PortableServer_ThreadPolicyValue) -TAO_NAMESPACE_END - -// default constructor -PortableServer::ThreadPolicy::ThreadPolicy (void) -{} - -// destructor -PortableServer::ThreadPolicy::~ThreadPolicy (void) -{} - -PortableServer::ThreadPolicy_ptr PortableServer::ThreadPolicy::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return ThreadPolicy::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::ThreadPolicy_ptr PortableServer::ThreadPolicy::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return ThreadPolicy::_nil (); - return - ACE_reinterpret_cast - ( - ThreadPolicy_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &ThreadPolicy::_narrow - ) - ) - ); -} - -PortableServer::ThreadPolicy_ptr -PortableServer::ThreadPolicy::_duplicate (ThreadPolicy_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::ThreadPolicy::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, ThreadPolicy)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &::CORBA::Policy::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - CORBA::Policy_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::ThreadPolicy::_interface_repository_id (void) const -{ - return "IDL:PortableServer/ThreadPolicy:1.0"; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -static const CORBA::Long _oc_PortableServer_LifespanPolicyValue[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 43, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x53657276), ACE_NTOHL (0x65722f4c), ACE_NTOHL (0x69666573), ACE_NTOHL (0x70616e50), ACE_NTOHL (0x6f6c6963), ACE_NTOHL (0x7956616c), ACE_NTOHL (0x75653a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:PortableServer/LifespanPolicyValue:1.0 - 20, ACE_NTOHL (0x4c696665), ACE_NTOHL (0x7370616e), ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63795661), ACE_NTOHL (0x6c756500), // name = LifespanPolicyValue - 2, // member count - 10, ACE_NTOHL (0x5452414e), ACE_NTOHL (0x5349454e), ACE_NTOHL (0x54000000), // name = TRANSIENT - 11, ACE_NTOHL (0x50455253), ACE_NTOHL (0x49535445), ACE_NTOHL (0x4e540000), // name = PERSISTENT -}; -static CORBA::TypeCode _tc_TAO_tc_PortableServer_LifespanPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_LifespanPolicyValue), (char *) &_oc_PortableServer_LifespanPolicyValue, 0, sizeof (PortableServer::LifespanPolicyValue)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_LifespanPolicyValue, &_tc_TAO_tc_PortableServer_LifespanPolicyValue) -TAO_NAMESPACE_END - -// default constructor -PortableServer::LifespanPolicy::LifespanPolicy (void) -{} - -// destructor -PortableServer::LifespanPolicy::~LifespanPolicy (void) -{} - -PortableServer::LifespanPolicy_ptr PortableServer::LifespanPolicy::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return LifespanPolicy::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::LifespanPolicy_ptr PortableServer::LifespanPolicy::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return LifespanPolicy::_nil (); - return - ACE_reinterpret_cast - ( - LifespanPolicy_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &LifespanPolicy::_narrow - ) - ) - ); -} - -PortableServer::LifespanPolicy_ptr -PortableServer::LifespanPolicy::_duplicate (LifespanPolicy_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::LifespanPolicy::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, LifespanPolicy)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &::CORBA::Policy::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - CORBA::Policy_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::LifespanPolicy::_interface_repository_id (void) const -{ - return "IDL:PortableServer/LifespanPolicy:1.0"; -} - -static const CORBA::Long _oc_PortableServer_IdUniquenessPolicyValue[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 47, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x53657276), ACE_NTOHL (0x65722f49), ACE_NTOHL (0x64556e69), ACE_NTOHL (0x7175656e), ACE_NTOHL (0x65737350), ACE_NTOHL (0x6f6c6963), ACE_NTOHL (0x7956616c), ACE_NTOHL (0x75653a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:PortableServer/IdUniquenessPolicyValue:1.0 - 24, ACE_NTOHL (0x4964556e), ACE_NTOHL (0x69717565), ACE_NTOHL (0x6e657373), ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63795661), ACE_NTOHL (0x6c756500), // name = IdUniquenessPolicyValue - 2, // member count - 10, ACE_NTOHL (0x554e4951), ACE_NTOHL (0x55455f49), ACE_NTOHL (0x44000000), // name = UNIQUE_ID - 12, ACE_NTOHL (0x4d554c54), ACE_NTOHL (0x49504c45), ACE_NTOHL (0x5f494400), // name = MULTIPLE_ID -}; -static CORBA::TypeCode _tc_TAO_tc_PortableServer_IdUniquenessPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_IdUniquenessPolicyValue), (char *) &_oc_PortableServer_IdUniquenessPolicyValue, 0, sizeof (PortableServer::IdUniquenessPolicyValue)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_IdUniquenessPolicyValue, &_tc_TAO_tc_PortableServer_IdUniquenessPolicyValue) -TAO_NAMESPACE_END - -// default constructor -PortableServer::IdUniquenessPolicy::IdUniquenessPolicy (void) -{} - -// destructor -PortableServer::IdUniquenessPolicy::~IdUniquenessPolicy (void) -{} - -PortableServer::IdUniquenessPolicy_ptr PortableServer::IdUniquenessPolicy::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return IdUniquenessPolicy::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::IdUniquenessPolicy_ptr PortableServer::IdUniquenessPolicy::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return IdUniquenessPolicy::_nil (); - return - ACE_reinterpret_cast - ( - IdUniquenessPolicy_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &IdUniquenessPolicy::_narrow - ) - ) - ); -} - -PortableServer::IdUniquenessPolicy_ptr -PortableServer::IdUniquenessPolicy::_duplicate (IdUniquenessPolicy_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::IdUniquenessPolicy::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, IdUniquenessPolicy)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &::CORBA::Policy::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - CORBA::Policy_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::IdUniquenessPolicy::_interface_repository_id (void) const -{ - return "IDL:PortableServer/IdUniquenessPolicy:1.0"; -} - -static const CORBA::Long _oc_PortableServer_IdAssignmentPolicyValue[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 47, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x53657276), ACE_NTOHL (0x65722f49), ACE_NTOHL (0x64417373), ACE_NTOHL (0x69676e6d), ACE_NTOHL (0x656e7450), ACE_NTOHL (0x6f6c6963), ACE_NTOHL (0x7956616c), ACE_NTOHL (0x75653a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:PortableServer/IdAssignmentPolicyValue:1.0 - 24, ACE_NTOHL (0x49644173), ACE_NTOHL (0x7369676e), ACE_NTOHL (0x6d656e74), ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63795661), ACE_NTOHL (0x6c756500), // name = IdAssignmentPolicyValue - 2, // member count - 8, ACE_NTOHL (0x55534552), ACE_NTOHL (0x5f494400), // name = USER_ID - 10, ACE_NTOHL (0x53595354), ACE_NTOHL (0x454d5f49), ACE_NTOHL (0x44000000), // name = SYSTEM_ID -}; -static CORBA::TypeCode _tc_TAO_tc_PortableServer_IdAssignmentPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_IdAssignmentPolicyValue), (char *) &_oc_PortableServer_IdAssignmentPolicyValue, 0, sizeof (PortableServer::IdAssignmentPolicyValue)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_IdAssignmentPolicyValue, &_tc_TAO_tc_PortableServer_IdAssignmentPolicyValue) -TAO_NAMESPACE_END - -// default constructor -PortableServer::IdAssignmentPolicy::IdAssignmentPolicy (void) -{} - -// destructor -PortableServer::IdAssignmentPolicy::~IdAssignmentPolicy (void) -{} - -PortableServer::IdAssignmentPolicy_ptr PortableServer::IdAssignmentPolicy::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return IdAssignmentPolicy::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::IdAssignmentPolicy_ptr PortableServer::IdAssignmentPolicy::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return IdAssignmentPolicy::_nil (); - return - ACE_reinterpret_cast - ( - IdAssignmentPolicy_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &IdAssignmentPolicy::_narrow - ) - ) - ); -} - -PortableServer::IdAssignmentPolicy_ptr -PortableServer::IdAssignmentPolicy::_duplicate (IdAssignmentPolicy_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::IdAssignmentPolicy::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, IdAssignmentPolicy)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &::CORBA::Policy::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - CORBA::Policy_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::IdAssignmentPolicy::_interface_repository_id (void) const -{ - return "IDL:PortableServer/IdAssignmentPolicy:1.0"; -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -static const CORBA::Long _oc_PortableServer_ImplicitActivationPolicyValue[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 53, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x53657276), ACE_NTOHL (0x65722f49), ACE_NTOHL (0x6d706c69), ACE_NTOHL (0x63697441), ACE_NTOHL (0x63746976), ACE_NTOHL (0x6174696f), ACE_NTOHL (0x6e506f6c), ACE_NTOHL (0x69637956), ACE_NTOHL (0x616c7565), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:PortableServer/ImplicitActivationPolicyValue:1.0 - 30, ACE_NTOHL (0x496d706c), ACE_NTOHL (0x69636974), ACE_NTOHL (0x41637469), ACE_NTOHL (0x76617469), ACE_NTOHL (0x6f6e506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x56616c75), ACE_NTOHL (0x65000000), // name = ImplicitActivationPolicyValue - 2, // member count - 20, ACE_NTOHL (0x494d504c), ACE_NTOHL (0x49434954), ACE_NTOHL (0x5f414354), ACE_NTOHL (0x49564154), ACE_NTOHL (0x494f4e00), // name = IMPLICIT_ACTIVATION - 23, ACE_NTOHL (0x4e4f5f49), ACE_NTOHL (0x4d504c49), ACE_NTOHL (0x4349545f), ACE_NTOHL (0x41435449), ACE_NTOHL (0x56415449), ACE_NTOHL (0x4f4e0000), // name = NO_IMPLICIT_ACTIVATION -}; -static CORBA::TypeCode _tc_TAO_tc_PortableServer_ImplicitActivationPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_ImplicitActivationPolicyValue), (char *) &_oc_PortableServer_ImplicitActivationPolicyValue, 0, sizeof (PortableServer::ImplicitActivationPolicyValue)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ImplicitActivationPolicyValue, &_tc_TAO_tc_PortableServer_ImplicitActivationPolicyValue) -TAO_NAMESPACE_END - -// default constructor -PortableServer::ImplicitActivationPolicy::ImplicitActivationPolicy (void) -{} - -// destructor -PortableServer::ImplicitActivationPolicy::~ImplicitActivationPolicy (void) -{} - -PortableServer::ImplicitActivationPolicy_ptr PortableServer::ImplicitActivationPolicy::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return ImplicitActivationPolicy::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::ImplicitActivationPolicy_ptr PortableServer::ImplicitActivationPolicy::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return ImplicitActivationPolicy::_nil (); - return - ACE_reinterpret_cast - ( - ImplicitActivationPolicy_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &ImplicitActivationPolicy::_narrow - ) - ) - ); -} - -PortableServer::ImplicitActivationPolicy_ptr -PortableServer::ImplicitActivationPolicy::_duplicate (ImplicitActivationPolicy_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::ImplicitActivationPolicy::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, ImplicitActivationPolicy)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &::CORBA::Policy::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - CORBA::Policy_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::ImplicitActivationPolicy::_interface_repository_id (void) const -{ - return "IDL:PortableServer/ImplicitActivationPolicy:1.0"; -} - -static const CORBA::Long _oc_PortableServer_ServantRetentionPolicyValue[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 51, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x53657276), ACE_NTOHL (0x65722f53), ACE_NTOHL (0x65727661), ACE_NTOHL (0x6e745265), ACE_NTOHL (0x74656e74), ACE_NTOHL (0x696f6e50), ACE_NTOHL (0x6f6c6963), ACE_NTOHL (0x7956616c), ACE_NTOHL (0x75653a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:PortableServer/ServantRetentionPolicyValue:1.0 - 28, ACE_NTOHL (0x53657276), ACE_NTOHL (0x616e7452), ACE_NTOHL (0x6574656e), ACE_NTOHL (0x74696f6e), ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63795661), ACE_NTOHL (0x6c756500), // name = ServantRetentionPolicyValue - 2, // member count - 7, ACE_NTOHL (0x52455441), ACE_NTOHL (0x494e0000), // name = RETAIN - 11, ACE_NTOHL (0x4e4f4e5f), ACE_NTOHL (0x52455441), ACE_NTOHL (0x494e0000), // name = NON_RETAIN -}; -static CORBA::TypeCode _tc_TAO_tc_PortableServer_ServantRetentionPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_ServantRetentionPolicyValue), (char *) &_oc_PortableServer_ServantRetentionPolicyValue, 0, sizeof (PortableServer::ServantRetentionPolicyValue)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ServantRetentionPolicyValue, &_tc_TAO_tc_PortableServer_ServantRetentionPolicyValue) -TAO_NAMESPACE_END - -// default constructor -PortableServer::ServantRetentionPolicy::ServantRetentionPolicy (void) -{} - -// destructor -PortableServer::ServantRetentionPolicy::~ServantRetentionPolicy (void) -{} - -PortableServer::ServantRetentionPolicy_ptr PortableServer::ServantRetentionPolicy::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return ServantRetentionPolicy::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::ServantRetentionPolicy_ptr PortableServer::ServantRetentionPolicy::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return ServantRetentionPolicy::_nil (); - return - ACE_reinterpret_cast - ( - ServantRetentionPolicy_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &ServantRetentionPolicy::_narrow - ) - ) - ); -} - -PortableServer::ServantRetentionPolicy_ptr -PortableServer::ServantRetentionPolicy::_duplicate (ServantRetentionPolicy_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::ServantRetentionPolicy::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, ServantRetentionPolicy)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &::CORBA::Policy::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - CORBA::Policy_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::ServantRetentionPolicy::_interface_repository_id (void) const -{ - return "IDL:PortableServer/ServantRetentionPolicy:1.0"; -} - -static const CORBA::Long _oc_PortableServer_RequestProcessingPolicyValue[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 52, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x53657276), ACE_NTOHL (0x65722f52), ACE_NTOHL (0x65717565), ACE_NTOHL (0x73745072), ACE_NTOHL (0x6f636573), ACE_NTOHL (0x73696e67), ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63795661), ACE_NTOHL (0x6c75653a), ACE_NTOHL (0x312e3000), // repository ID = IDL:PortableServer/RequestProcessingPolicyValue:1.0 - 29, ACE_NTOHL (0x52657175), ACE_NTOHL (0x65737450), ACE_NTOHL (0x726f6365), ACE_NTOHL (0x7373696e), ACE_NTOHL (0x67506f6c), ACE_NTOHL (0x69637956), ACE_NTOHL (0x616c7565), ACE_NTOHL (0x0), // name = RequestProcessingPolicyValue - 3, // member count - 27, ACE_NTOHL (0x5553455f), ACE_NTOHL (0x41435449), ACE_NTOHL (0x56455f4f), ACE_NTOHL (0x424a4543), ACE_NTOHL (0x545f4d41), ACE_NTOHL (0x505f4f4e), ACE_NTOHL (0x4c590000), // name = USE_ACTIVE_OBJECT_MAP_ONLY - 20, ACE_NTOHL (0x5553455f), ACE_NTOHL (0x44454641), ACE_NTOHL (0x554c545f), ACE_NTOHL (0x53455256), ACE_NTOHL (0x414e5400), // name = USE_DEFAULT_SERVANT - 20, ACE_NTOHL (0x5553455f), ACE_NTOHL (0x53455256), ACE_NTOHL (0x414e545f), ACE_NTOHL (0x4d414e41), ACE_NTOHL (0x47455200), // name = USE_SERVANT_MANAGER -}; -static CORBA::TypeCode _tc_TAO_tc_PortableServer_RequestProcessingPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_RequestProcessingPolicyValue), (char *) &_oc_PortableServer_RequestProcessingPolicyValue, 0, sizeof (PortableServer::RequestProcessingPolicyValue)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableServer) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_RequestProcessingPolicyValue, &_tc_TAO_tc_PortableServer_RequestProcessingPolicyValue) -TAO_NAMESPACE_END - -// default constructor -PortableServer::RequestProcessingPolicy::RequestProcessingPolicy (void) -{} - -// destructor -PortableServer::RequestProcessingPolicy::~RequestProcessingPolicy (void) -{} - -PortableServer::RequestProcessingPolicy_ptr PortableServer::RequestProcessingPolicy::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return RequestProcessingPolicy::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::RequestProcessingPolicy_ptr PortableServer::RequestProcessingPolicy::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return RequestProcessingPolicy::_nil (); - return - ACE_reinterpret_cast - ( - RequestProcessingPolicy_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &RequestProcessingPolicy::_narrow - ) - ) - ); -} - -PortableServer::RequestProcessingPolicy_ptr -PortableServer::RequestProcessingPolicy::_duplicate (RequestProcessingPolicy_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::RequestProcessingPolicy::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, RequestProcessingPolicy)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &::CORBA::Policy::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - CORBA::Policy_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::RequestProcessingPolicy::_interface_repository_id (void) const -{ - return "IDL:PortableServer/RequestProcessingPolicy:1.0"; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -// default constructor -PortableServer::POAManager::POAManager (void) -{} - -// destructor -PortableServer::POAManager::~POAManager (void) -{} - -PortableServer::POAManager_ptr PortableServer::POAManager::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return POAManager::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::POAManager_ptr PortableServer::POAManager::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return POAManager::_nil (); - return - ACE_reinterpret_cast - ( - POAManager_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &POAManager::_narrow - ) - ) - ); -} - -PortableServer::POAManager_ptr -PortableServer::POAManager::_duplicate (POAManager_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::POAManager::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, POAManager)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - - -const char* PortableServer::POAManager::_interface_repository_id (void) const -{ - return "IDL:PortableServer/POAManager:1.0"; -} - -// default constructor -PortableServer::POAManager::AdapterInactive::AdapterInactive (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POAManager::AdapterInactive::~AdapterInactive (void) -{ -} - -void PortableServer::POAManager::AdapterInactive::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POAManager::AdapterInactive::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -void PortableServer::POAManager::AdapterInactive::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -#if (TAO_HAS_MINIMUM_POA == 0) - -// copy constructor -PortableServer::POAManager::AdapterInactive::AdapterInactive (const ::PortableServer::POAManager::AdapterInactive &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POAManager::AdapterInactive& -PortableServer::POAManager::AdapterInactive::operator= (const ::PortableServer::POAManager::AdapterInactive &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POAManager::AdapterInactive * -PortableServer::POAManager::AdapterInactive::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POAManager/AdapterInactive:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (AdapterInactive *, exc); - else - return 0; -} - - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POAManager::AdapterInactive::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POAManager::AdapterInactive, 0); - return retval; -} - -// default constructor -PortableServer::AdapterActivator::AdapterActivator (void) -{} - -// destructor -PortableServer::AdapterActivator::~AdapterActivator (void) -{} - -PortableServer::AdapterActivator_ptr PortableServer::AdapterActivator::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return AdapterActivator::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::AdapterActivator_ptr PortableServer::AdapterActivator::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return AdapterActivator::_nil (); - return - ACE_reinterpret_cast - ( - AdapterActivator_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &AdapterActivator::_narrow - ) - ) - ); -} - -PortableServer::AdapterActivator_ptr -PortableServer::AdapterActivator::_duplicate (AdapterActivator_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::AdapterActivator::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, AdapterActivator)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::AdapterActivator::_interface_repository_id (void) const -{ - return "IDL:PortableServer/AdapterActivator:1.0"; -} - - -// default constructor -PortableServer::ServantManager::ServantManager (void) -{} - -// destructor -PortableServer::ServantManager::~ServantManager (void) -{} - -PortableServer::ServantManager_ptr PortableServer::ServantManager::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return ServantManager::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::ServantManager_ptr PortableServer::ServantManager::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return ServantManager::_nil (); - return - ACE_reinterpret_cast - ( - ServantManager_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &ServantManager::_narrow - ) - ) - ); -} - -PortableServer::ServantManager_ptr -PortableServer::ServantManager::_duplicate (ServantManager_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::ServantManager::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, ServantManager)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::ServantManager::_interface_repository_id (void) const -{ - return "IDL:PortableServer/ServantManager:1.0"; -} - - -// default constructor -PortableServer::ServantActivator::ServantActivator (void) -{} - -// destructor -PortableServer::ServantActivator::~ServantActivator (void) -{} - -PortableServer::ServantActivator_ptr PortableServer::ServantActivator::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return ServantActivator::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::ServantActivator_ptr PortableServer::ServantActivator::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return ServantActivator::_nil (); - return - ACE_reinterpret_cast - ( - ServantActivator_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &ServantActivator::_narrow - ) - ) - ); -} - -PortableServer::ServantActivator_ptr -PortableServer::ServantActivator::_duplicate (ServantActivator_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::ServantActivator::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, ServantActivator)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, ServantManager)::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - PortableServer::ServantManager_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::ServantActivator::_interface_repository_id (void) const -{ - return "IDL:PortableServer/ServantActivator:1.0"; -} - - -// default constructor -PortableServer::ServantLocator::ServantLocator (void) -{} - -// destructor -PortableServer::ServantLocator::~ServantLocator (void) -{} - -PortableServer::ServantLocator_ptr PortableServer::ServantLocator::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return ServantLocator::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::ServantLocator_ptr PortableServer::ServantLocator::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return ServantLocator::_nil (); - return - ACE_reinterpret_cast - ( - ServantLocator_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &ServantLocator::_narrow - ) - ) - ); -} - -PortableServer::ServantLocator_ptr -PortableServer::ServantLocator::_duplicate (ServantLocator_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -void *PortableServer::ServantLocator::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, ServantLocator)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, ServantManager)::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - PortableServer::ServantManager_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::ServantLocator::_interface_repository_id (void) const -{ - return "IDL:PortableServer/ServantLocator:1.0"; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -// default constructor -PortableServer::POA::POA (void) -{} - -// destructor -PortableServer::POA::~POA (void) -{} - -PortableServer::POA_ptr PortableServer::POA::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return POA::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::POA_ptr PortableServer::POA::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return POA::_nil (); - return - ACE_reinterpret_cast - ( - POA_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &POA::_narrow - ) - ) - ); -} - -PortableServer::POA_ptr -PortableServer::POA::_duplicate (POA_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -// default constructor -PortableServer::POA::AdapterAlreadyExists::AdapterAlreadyExists (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::AdapterAlreadyExists::~AdapterAlreadyExists (void) -{ -} - -// copy constructor -PortableServer::POA::AdapterAlreadyExists::AdapterAlreadyExists (const ::PortableServer::POA::AdapterAlreadyExists &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POA::AdapterAlreadyExists& -PortableServer::POA::AdapterAlreadyExists::operator= (const ::PortableServer::POA::AdapterAlreadyExists &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POA::AdapterAlreadyExists * -PortableServer::POA::AdapterAlreadyExists::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/AdapterAlreadyExists:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (AdapterAlreadyExists *, exc); - else - return 0; -} - - -void PortableServer::POA::AdapterAlreadyExists::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::AdapterAlreadyExists::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::AdapterAlreadyExists::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::AdapterAlreadyExists::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::AdapterAlreadyExists, 0); - return retval; -} - -// default constructor -PortableServer::POA::AdapterNonExistent::AdapterNonExistent (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::AdapterNonExistent::~AdapterNonExistent (void) -{ -} - -// copy constructor -PortableServer::POA::AdapterNonExistent::AdapterNonExistent (const ::PortableServer::POA::AdapterNonExistent &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POA::AdapterNonExistent& -PortableServer::POA::AdapterNonExistent::operator= (const ::PortableServer::POA::AdapterNonExistent &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POA::AdapterNonExistent * -PortableServer::POA::AdapterNonExistent::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/AdapterNonExistent:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (AdapterNonExistent *, exc); - else - return 0; -} - - -void PortableServer::POA::AdapterNonExistent::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::AdapterNonExistent::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::AdapterNonExistent::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::AdapterNonExistent::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::AdapterNonExistent, 0); - return retval; -} - -// default constructor -PortableServer::POA::InvalidPolicy::InvalidPolicy (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::InvalidPolicy::~InvalidPolicy (void) -{ -} - -// copy constructor -PortableServer::POA::InvalidPolicy::InvalidPolicy (const ::PortableServer::POA::InvalidPolicy &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ - this->index = _tao_excp.index; -} - -// assignment operator -PortableServer::POA::InvalidPolicy& -PortableServer::POA::InvalidPolicy::operator= (const ::PortableServer::POA::InvalidPolicy &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - this->index = _tao_excp.index; - return *this; -} - -// narrow -PortableServer::POA::InvalidPolicy * -PortableServer::POA::InvalidPolicy::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/InvalidPolicy:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (InvalidPolicy *, exc); - else - return 0; -} - - -void PortableServer::POA::InvalidPolicy::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::InvalidPolicy::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::InvalidPolicy::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::InvalidPolicy::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::InvalidPolicy, 0); - return retval; -} - -PortableServer::POA::InvalidPolicy::InvalidPolicy ( - CORBA::UShort _tao_index -) -{ - this->index = _tao_index; -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -// default constructor -PortableServer::POA::NoServant::NoServant (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::NoServant::~NoServant (void) -{ -} - -// copy constructor -PortableServer::POA::NoServant::NoServant (const ::PortableServer::POA::NoServant &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POA::NoServant& -PortableServer::POA::NoServant::operator= (const ::PortableServer::POA::NoServant &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POA::NoServant * -PortableServer::POA::NoServant::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/NoServant:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (NoServant *, exc); - else - return 0; -} - - -void PortableServer::POA::NoServant::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::NoServant::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::NoServant::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::NoServant::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::NoServant, 0); - return retval; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -// default constructor -PortableServer::POA::ObjectAlreadyActive::ObjectAlreadyActive (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::ObjectAlreadyActive::~ObjectAlreadyActive (void) -{ -} - -// copy constructor -PortableServer::POA::ObjectAlreadyActive::ObjectAlreadyActive (const ::PortableServer::POA::ObjectAlreadyActive &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POA::ObjectAlreadyActive& -PortableServer::POA::ObjectAlreadyActive::operator= (const ::PortableServer::POA::ObjectAlreadyActive &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POA::ObjectAlreadyActive * -PortableServer::POA::ObjectAlreadyActive::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/ObjectAlreadyActive:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (ObjectAlreadyActive *, exc); - else - return 0; -} - - -void PortableServer::POA::ObjectAlreadyActive::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::ObjectAlreadyActive::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::ObjectAlreadyActive::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::ObjectAlreadyActive::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::ObjectAlreadyActive, 0); - return retval; -} - -// default constructor -PortableServer::POA::ObjectNotActive::ObjectNotActive (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::ObjectNotActive::~ObjectNotActive (void) -{ -} - -// copy constructor -PortableServer::POA::ObjectNotActive::ObjectNotActive (const ::PortableServer::POA::ObjectNotActive &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POA::ObjectNotActive& -PortableServer::POA::ObjectNotActive::operator= (const ::PortableServer::POA::ObjectNotActive &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POA::ObjectNotActive * -PortableServer::POA::ObjectNotActive::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/ObjectNotActive:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (ObjectNotActive *, exc); - else - return 0; -} - - -void PortableServer::POA::ObjectNotActive::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::ObjectNotActive::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::ObjectNotActive::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::ObjectNotActive::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::ObjectNotActive, 0); - return retval; -} - -// default constructor -PortableServer::POA::ServantAlreadyActive::ServantAlreadyActive (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::ServantAlreadyActive::~ServantAlreadyActive (void) -{ -} - -// copy constructor -PortableServer::POA::ServantAlreadyActive::ServantAlreadyActive (const ::PortableServer::POA::ServantAlreadyActive &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POA::ServantAlreadyActive& -PortableServer::POA::ServantAlreadyActive::operator= (const ::PortableServer::POA::ServantAlreadyActive &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POA::ServantAlreadyActive * -PortableServer::POA::ServantAlreadyActive::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/ServantAlreadyActive:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (ServantAlreadyActive *, exc); - else - return 0; -} - - -void PortableServer::POA::ServantAlreadyActive::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::ServantAlreadyActive::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::ServantAlreadyActive::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::ServantAlreadyActive::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::ServantAlreadyActive, 0); - return retval; -} - -// default constructor -PortableServer::POA::ServantNotActive::ServantNotActive (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::ServantNotActive::~ServantNotActive (void) -{ -} - -// copy constructor -PortableServer::POA::ServantNotActive::ServantNotActive (const ::PortableServer::POA::ServantNotActive &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POA::ServantNotActive& -PortableServer::POA::ServantNotActive::operator= (const ::PortableServer::POA::ServantNotActive &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POA::ServantNotActive * -PortableServer::POA::ServantNotActive::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/ServantNotActive:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (ServantNotActive *, exc); - else - return 0; -} - - -void PortableServer::POA::ServantNotActive::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::ServantNotActive::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::ServantNotActive::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::ServantNotActive::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::ServantNotActive, 0); - return retval; -} - -// default constructor -PortableServer::POA::WrongAdapter::WrongAdapter (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::WrongAdapter::~WrongAdapter (void) -{ -} - -// copy constructor -PortableServer::POA::WrongAdapter::WrongAdapter (const ::PortableServer::POA::WrongAdapter &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POA::WrongAdapter& -PortableServer::POA::WrongAdapter::operator= (const ::PortableServer::POA::WrongAdapter &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POA::WrongAdapter * -PortableServer::POA::WrongAdapter::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/WrongAdapter:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (WrongAdapter *, exc); - else - return 0; -} - - -void PortableServer::POA::WrongAdapter::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::WrongAdapter::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::WrongAdapter::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::WrongAdapter::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::WrongAdapter, 0); - return retval; -} - -// default constructor -PortableServer::POA::WrongPolicy::WrongPolicy (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::POA::WrongPolicy::~WrongPolicy (void) -{ -} - -// copy constructor -PortableServer::POA::WrongPolicy::WrongPolicy (const ::PortableServer::POA::WrongPolicy &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::POA::WrongPolicy& -PortableServer::POA::WrongPolicy::operator= (const ::PortableServer::POA::WrongPolicy &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::POA::WrongPolicy * -PortableServer::POA::WrongPolicy::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/POA/WrongPolicy:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (WrongPolicy *, exc); - else - return 0; -} - - -void PortableServer::POA::WrongPolicy::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::POA::WrongPolicy::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::POA::WrongPolicy::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::POA::WrongPolicy::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::POA::WrongPolicy, 0); - return retval; -} - -void *PortableServer::POA::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, POA)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::POA::_interface_repository_id (void) const -{ - return "IDL:PortableServer/POA:1.0"; -} - - -// default constructor -PortableServer::Current::Current (void) -{} - -// destructor -PortableServer::Current::~Current (void) -{} - -PortableServer::Current_ptr PortableServer::Current::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return Current::_unchecked_narrow (obj, ACE_TRY_ENV); -} - -PortableServer::Current_ptr PortableServer::Current::_unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment & - ) -{ - if (CORBA::is_nil (obj)) - return Current::_nil (); - return - ACE_reinterpret_cast - ( - Current_ptr, - obj->_tao_QueryInterface - ( - ACE_reinterpret_cast - ( - ptr_arith_t, - &Current::_narrow - ) - ) - ); -} - -PortableServer::Current_ptr -PortableServer::Current::_duplicate (Current_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_add_ref (); - return obj; -} - -// default constructor -PortableServer::Current::NoContext::NoContext (void) -{ -} - -// destructor - all members are of self managing types -PortableServer::Current::NoContext::~NoContext (void) -{ -} - -// copy constructor -PortableServer::Current::NoContext::NoContext (const ::PortableServer::Current::NoContext &_tao_excp) - : CORBA_UserException (_tao_excp._id ()) -{ -} - -// assignment operator -PortableServer::Current::NoContext& -PortableServer::Current::NoContext::operator= (const ::PortableServer::Current::NoContext &_tao_excp) -{ - - this->CORBA_UserException::operator= (_tao_excp); - return *this; -} - -// narrow -PortableServer::Current::NoContext * -PortableServer::Current::NoContext::_downcast (CORBA::Exception *exc) -{ - if (!ACE_OS::strcmp ("IDL:PortableServer/Current/NoContext:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (NoContext *, exc); - else - return 0; -} - - -void PortableServer::Current::NoContext::_raise () -{ - TAO_RAISE(*this); -} - - -void PortableServer::Current::NoContext::_tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &ACE_TRY_ENV) const -{ - ACE_THROW (CORBA::MARSHAL ()); -} - - -void PortableServer::Current::NoContext::_tao_decode ( - TAO_InputCDR &, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::MARSHAL ()); -} - -// TAO extension - the _alloc method -CORBA::Exception *PortableServer::Current::NoContext::_alloc (void) -{ - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::PortableServer::Current::NoContext, 0); - return retval; -} - -void *PortableServer::Current::_tao_QueryInterface (ptr_arith_t type) -{ - void *retv = 0; - if (type == ACE_reinterpret_cast - (ptr_arith_t, - &ACE_NESTED_CLASS (::PortableServer, Current)::_narrow)) - retv = ACE_reinterpret_cast (void*, this); - else if (type == ACE_reinterpret_cast - (ptr_arith_t, - &::CORBA::Current::_narrow)) - retv = ACE_reinterpret_cast - ( - void *, - ACE_static_cast - ( - CORBA::Current_ptr, - this - ) - ); - else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) - retv = ACE_reinterpret_cast (void *, - ACE_static_cast (CORBA::Object_ptr, this)); - - if (retv) - this->_add_ref (); - return retv; -} - -const char* PortableServer::Current::_interface_repository_id (void) const -{ - return "IDL:PortableServer/Current:1.0"; -} - -char * -PortableServer::ObjectId_to_string (const PortableServer::ObjectId &id) -{ - return TAO_POA::ObjectId_to_string (id); -} - -CORBA::WChar * -PortableServer::ObjectId_to_wstring (const PortableServer::ObjectId &id) -{ - return TAO_POA::ObjectId_to_wstring (id); -} - -PortableServer::ObjectId * -PortableServer::string_to_ObjectId (const char *id) -{ - return TAO_POA::string_to_ObjectId (id); -} - -PortableServer::ObjectId * -PortableServer::wstring_to_ObjectId (const CORBA::WChar *id) -{ - return TAO_POA::wstring_to_ObjectId (id); -} - -void operator<<= ( - CORBA::Any &_tao_any, - const PortableServer::ObjectId &_tao_elem - ) // copying -{ - TAO_OutputCDR stream; - if (stream << _tao_elem) - { - _tao_any._tao_replace ( - PortableServer::_tc_ObjectId, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); - } -} - -void operator<<= (CORBA::Any &_tao_any, PortableServer::ObjectId *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_ObjectId, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - PortableServer::ObjectId::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ObjectId *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast( - const PortableServer::ObjectId*&, - _tao_elem - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::ObjectId *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::_tc_ObjectId, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = ACE_static_cast( - const PortableServer::ObjectId*, - _tao_any.value () - ); - return 1; - } - else - { - PortableServer::ObjectId *tmp; - ACE_NEW_RETURN (tmp, PortableServer::ObjectId, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::_tc_ObjectId, - 1, - ACE_static_cast (void *, tmp), - PortableServer::ObjectId::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -void operator<<= (CORBA::Any &_tao_any, const PortableServer::ForwardRequest &_tao_elem) // copying -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_ForwardRequest, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -void operator<<= (CORBA::Any &_tao_any, PortableServer::ForwardRequest *_tao_elem) // non copying -{ - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_ForwardRequest, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - PortableServer::ForwardRequest::_tao_any_destructor - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ForwardRequest *&_tao_elem) -{ - return _tao_any >>= ACE_const_cast( - const PortableServer::ForwardRequest*&, - _tao_elem - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::ForwardRequest *&_tao_elem) -{ - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::_tc_ForwardRequest, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (PortableServer::ForwardRequest *)_tao_any.value (); - return 1; - } - else - { - PortableServer::ForwardRequest *tmp; - ACE_NEW_RETURN (tmp, PortableServer::ForwardRequest, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - CORBA::String_var interface_repository_id; - if (!(stream >> interface_repository_id.out ())) - return 0; - if (ACE_OS::strcmp ( - interface_repository_id.in (), - "IDL:PortableServer/ForwardRequest:1.0")) - return 0; - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::_tc_ForwardRequest, - 1, - tmp, - PortableServer::ForwardRequest::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; -} - -#endif /* TAO_HAS_MINIMUM_CORBA == 0 */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -void operator<<= (CORBA::Any &_tao_any, PortableServer::ThreadPolicyValue _tao_elem) -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_ThreadPolicyValue, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ThreadPolicyValue &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::_tc_ThreadPolicyValue, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - return 1; - } - } - ACE_CATCHANY - { - return 0; - } - ACE_ENDTRY; - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -void operator<<= (CORBA::Any &_tao_any, PortableServer::LifespanPolicyValue _tao_elem) -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_LifespanPolicyValue, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::LifespanPolicyValue &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::_tc_LifespanPolicyValue, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - return 1; - } - } - ACE_CATCHANY - { - return 0; - } - ACE_ENDTRY; - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -void operator<<= (CORBA::Any &_tao_any, PortableServer::IdUniquenessPolicyValue _tao_elem) -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_IdUniquenessPolicyValue, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdUniquenessPolicyValue &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::_tc_IdUniquenessPolicyValue, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - return 1; - } - } - ACE_CATCHANY - { - return 0; - } - ACE_ENDTRY; - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -void operator<<= (CORBA::Any &_tao_any, PortableServer::IdAssignmentPolicyValue _tao_elem) -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_IdAssignmentPolicyValue, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdAssignmentPolicyValue &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::_tc_IdAssignmentPolicyValue, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - return 1; - } - } - ACE_CATCHANY - { - return 0; - } - ACE_ENDTRY; - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -void operator<<= (CORBA::Any &_tao_any, PortableServer::ImplicitActivationPolicyValue _tao_elem) -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_ImplicitActivationPolicyValue, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ImplicitActivationPolicyValue &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::_tc_ImplicitActivationPolicyValue, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - return 1; - } - } - ACE_CATCHANY - { - return 0; - } - ACE_ENDTRY; - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -void operator<<= (CORBA::Any &_tao_any, PortableServer::ServantRetentionPolicyValue _tao_elem) -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_ServantRetentionPolicyValue, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantRetentionPolicyValue &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::_tc_ServantRetentionPolicyValue, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - return 1; - } - } - ACE_CATCHANY - { - return 0; - } - ACE_ENDTRY; - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -void operator<<= (CORBA::Any &_tao_any, PortableServer::RequestProcessingPolicyValue _tao_elem) -{ - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - PortableServer::_tc_RequestProcessingPolicyValue, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::RequestProcessingPolicyValue &_tao_elem) -{ - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::_tc_RequestProcessingPolicyValue, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> _tao_elem) - { - return 1; - } - } - ACE_CATCHANY - { - return 0; - } - ACE_ENDTRY; - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO_Object_Manager; - #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - # pragma instantiate TAO_Object_Manager -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -CORBA::Boolean operator<< ( - TAO_OutputCDR &strm, - const PortableServer::ObjectId &_tao_sequence - ) -{ - if (strm << _tao_sequence.length ()) - { - // encode all elements - -#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - { - TAO_Unbounded_Sequence *oseq = - ACE_static_cast (TAO_Unbounded_Sequence*, (PortableServer::ObjectId *)&_tao_sequence); - if (oseq->mb ()) - return strm.write_octet_array_mb (oseq->mb ()); - else - return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - } - -#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ - return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - -#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ - } - return 0; // error -} - -CORBA::Boolean operator>> ( - TAO_InputCDR &strm, - PortableServer::ObjectId &_tao_sequence - ) -{ - CORBA::ULong _tao_seq_len; - if (strm >> _tao_seq_len) - { - // set the length of the sequence - _tao_sequence.length (_tao_seq_len); - // If length is 0 we return true. - if (0 >= _tao_seq_len) - return 1; - // retrieve all the elements - -#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - if (ACE_BIT_DISABLED (strm.start ()->flags (),ACE_Message_Block::DONT_DELETE)) - { - TAO_Unbounded_Sequence *oseq = - ACE_static_cast(TAO_Unbounded_Sequence*, &_tao_sequence); - oseq->replace (_tao_seq_len, strm.start ()); - oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len); - strm.skip_bytes (_tao_seq_len); - return 1; - } - else - return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len); - -#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ - return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - -#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ - } - return 0; // error -} - diff --git a/TAO/tao/PortableServerC.h b/TAO/tao/PortableServerC.h deleted file mode 100644 index ed279190d9d..00000000000 --- a/TAO/tao/PortableServerC.h +++ /dev/null @@ -1,3185 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#ifndef _TAO_IDL_PORTABLESERVERC_H_ -#define _TAO_IDL_PORTABLESERVERC_H_ - -#include "ace/pre.h" -#include "tao/corbafwd.h" - -#if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) -#include "ace/streams.h" -#endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */ - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/CurrentC.h" -#include "tao/PolicyC.h" -#include "tao/Typecode.h" -#include "tao/Any.h" - -#if defined (TAO_EXPORT_MACRO) -#undef TAO_EXPORT_MACRO -#endif -#define TAO_EXPORT_MACRO TAO_Export - -#if defined (TAO_EXPORT_NESTED_CLASSES) -# if defined (TAO_EXPORT_NESTED_MACRO) -# undef TAO_EXPORT_NESTED_MACRO -# endif /* defined (TAO_EXPORT_NESTED_MACRO) */ -# define TAO_EXPORT_NESTED_MACRO TAO_Export -#endif /* TAO_EXPORT_NESTED_CLASSES */ - -#if defined(_MSC_VER) -#if (_MSC_VER >= 1200) -#pragma warning(push) -#endif /* _MSC_VER >= 1200 */ -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -class TAO_ServantBase; -class TAO_ServantBase_var; -class TAO_RefCountServantBase; -class TAO_Local_ServantBase; -class TAO_DynamicImplementation; - -TAO_NAMESPACE PortableServer -{ - typedef TAO_ServantBase ServantBase; - typedef TAO_ServantBase_var ServantBase_var; - typedef TAO_RefCountServantBase RefCountServantBase; - typedef ServantBase *Servant; - - typedef TAO_Local_ServantBase LocalServantBase; - typedef TAO_DynamicImplementation DynamicImplementation; - - class POA; - -#if !defined (_PORTABLESERVER_POA___PTR_CH_) -#define _PORTABLESERVER_POA___PTR_CH_ - -typedef POA *POA_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA___VAR_CH_) -#define _PORTABLESERVER_POA___VAR_CH_ - - class TAO_Export POA_var : public TAO_Base_var - { - public: - POA_var (void); // default constructor - POA_var (POA_ptr p) : ptr_ (p) {} - POA_var (const POA_var &); // copy constructor - ~POA_var (void); // destructor - - POA_var &operator= (POA_ptr); - POA_var &operator= (const POA_var &); - POA_ptr operator-> (void) const; - - operator const POA_ptr &() const; - operator POA_ptr &(); - // in, inout, out, _retn - POA_ptr in (void) const; - POA_ptr &inout (void); - POA_ptr &out (void); - POA_ptr _retn (void); - POA_ptr ptr (void) const; - - private: - POA_ptr ptr_; - // Unimplemented - prevents widening assignment. - POA_var (const TAO_Base_var &rhs); - POA_var &operator= (const TAO_Base_var &rhs); - }; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA___OUT_CH_) -#define _PORTABLESERVER_POA___OUT_CH_ - - class TAO_Export POA_out - { - public: - POA_out (POA_ptr &); - POA_out (POA_var &); - POA_out (const POA_out &); - POA_out &operator= (const POA_out &); - POA_out &operator= (const POA_var &); - POA_out &operator= (POA_ptr); - operator POA_ptr &(); - POA_ptr &ptr (void); - POA_ptr operator-> (void); - - private: - POA_ptr &ptr_; - }; - - -#endif /* end #if !defined */ - - -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - -#if !defined (__TAO_UNBOUNDED_OBJECT_SEQUENCE_PORTABLESERVER_POALIST_CH_) -#define __TAO_UNBOUNDED_OBJECT_SEQUENCE_PORTABLESERVER_POALIST_CH_ - - class _TAO_Unbounded_Object_Sequence_PortableServer_POAList : public TAO_Unbounded_Base_Sequence - { - public: - // = Initialization and termination methods. - - _TAO_Unbounded_Object_Sequence_PortableServer_POAList (void); - _TAO_Unbounded_Object_Sequence_PortableServer_POAList (CORBA::ULong maximum); - _TAO_Unbounded_Object_Sequence_PortableServer_POAList (CORBA::ULong maximum, - CORBA::ULong length, - POA* *value, - CORBA::Boolean release = 0); - _TAO_Unbounded_Object_Sequence_PortableServer_POAList(const _TAO_Unbounded_Object_Sequence_PortableServer_POAList &rhs); - virtual ~_TAO_Unbounded_Object_Sequence_PortableServer_POAList (void); - _TAO_Unbounded_Object_Sequence_PortableServer_POAList &operator= (const _TAO_Unbounded_Object_Sequence_PortableServer_POAList &rhs); - TAO_Object_Manager operator[] (CORBA::ULong index) const; - static POA **allocbuf (CORBA::ULong nelems); - static void freebuf (POA **buffer); - // The Base_Sequence functions, please see tao/Sequence.h - virtual void _allocate_buffer (CORBA::ULong length); - virtual void _deallocate_buffer (void); - POA* *get_buffer (CORBA::Boolean orphan = 0); - const POA* *get_buffer (void) const; - virtual void _shrink_buffer (CORBA::ULong nl, CORBA::ULong ol); - virtual void _downcast ( - void* target, - CORBA_Object *src, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - virtual CORBA_Object* _upcast (void *src) const; - - }; - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_PORTABLESERVER_POALIST_CH_) -#define _PORTABLESERVER_POALIST_CH_ - - class POAList; - class POAList_var; - - // ************************************************************* - // POAList - // ************************************************************* - - class TAO_Export POAList : public -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - _TAO_Unbounded_Object_Sequence_PortableServer_POAList -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Object_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - { - public: - POAList (void); // default ctor - POAList (CORBA::ULong max); // uses max size - POAList ( - CORBA::ULong max, - CORBA::ULong length, - POA_ptr *buffer, - CORBA::Boolean release=0 - ); - POAList (const POAList &); // copy ctor - ~POAList (void); - static void _tao_any_destructor (void*); - -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef POAList_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - }; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POALIST___VAR_CH_) -#define _PORTABLESERVER_POALIST___VAR_CH_ - - // ************************************************************* - // class PortableServer::POAList_var - // ************************************************************* - - class TAO_Export POAList_var - { - public: - POAList_var (void); // default constructor - POAList_var (POAList *); - POAList_var (const POAList_var &); // copy constructor - ~POAList_var (void); // destructor - - POAList_var &operator= (POAList *); - POAList_var &operator= (const POAList_var &); - POAList *operator-> (void); - const POAList *operator-> (void) const; - - operator const POAList &() const; - operator POAList &(); - operator POAList &() const; - operator POAList *&(); // variable-size base types only - - TAO_Object_Manager operator[] (CORBA::ULong index); - // in, inout, out, _retn - const POAList &in (void) const; - POAList &inout (void); - POAList *&out (void); - POAList *_retn (void); - POAList *ptr (void) const; - - private: - POAList *ptr_; - }; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POALIST___OUT_CH_) -#define _PORTABLESERVER_POALIST___OUT_CH_ - - class TAO_Export POAList_out - { - public: - POAList_out (POAList *&); - POAList_out (POAList_var &); - POAList_out (const POAList_out &); - POAList_out &operator= (const POAList_out &); - POAList_out &operator= (POAList *); - operator POAList *&(); - POAList *&ptr (void); - POAList *operator-> (void); - TAO_Object_Manager operator[] (CORBA::ULong index); - - private: - POAList *&ptr_; - // assignment from T_var not allowed - void operator= (const POAList_var &); - }; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_OBJECTID_CH_) -#define _PORTABLESERVER_OBJECTID_CH_ - - class ObjectId; - class ObjectId_var; - - // ************************************************************* - // ObjectId - // ************************************************************* - - class TAO_Export ObjectId : public -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_Sequence -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - { - public: - ObjectId (void); // default ctor - ObjectId (CORBA::ULong max); // uses max size - ObjectId ( - CORBA::ULong max, - CORBA::ULong length, - CORBA::Octet *buffer, - CORBA::Boolean release=0 - ); - ObjectId (const ObjectId &); // copy ctor - ~ObjectId (void); - static void _tao_any_destructor (void*); - -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ObjectId_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - -#if defined(TAO_NO_COPY_OCTET_SEQUENCES) - ObjectId ( - CORBA::ULong length, - const ACE_Message_Block* mb - ) - : TAO_Unbounded_Sequence (length, mb) {} -#endif /* TAO_NO_COPY_OCTET_SEQUENCE */ - - }; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_OBJECTID___VAR_CH_) -#define _PORTABLESERVER_OBJECTID___VAR_CH_ - - // ************************************************************* - // class PortableServer::ObjectId_var - // ************************************************************* - - class TAO_Export ObjectId_var - { - public: - ObjectId_var (void); // default constructor - ObjectId_var (ObjectId *); - ObjectId_var (const ObjectId_var &); // copy constructor - ObjectId_var (const ObjectId &); // fixed-size base types only - ~ObjectId_var (void); // destructor - - ObjectId_var &operator= (ObjectId *); - ObjectId_var &operator= (const ObjectId_var &); - ObjectId_var &operator= (const ObjectId &); // fixed-size base types only - ObjectId *operator-> (void); - const ObjectId *operator-> (void) const; - - operator const ObjectId &() const; - operator ObjectId &(); - operator ObjectId &() const; - - CORBA::Octet &operator[] (CORBA::ULong index); - // in, inout, out, _retn - const ObjectId &in (void) const; - ObjectId &inout (void); - ObjectId *&out (void); - ObjectId *_retn (void); - ObjectId *ptr (void) const; - - private: - ObjectId *ptr_; - }; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_OBJECTID___OUT_CH_) -#define _PORTABLESERVER_OBJECTID___OUT_CH_ - - class TAO_Export ObjectId_out - { - public: - ObjectId_out (ObjectId *&); - ObjectId_out (ObjectId_var &); - ObjectId_out (const ObjectId_out &); - ObjectId_out &operator= (const ObjectId_out &); - ObjectId_out &operator= (ObjectId *); - operator ObjectId *&(); - ObjectId *&ptr (void); - ObjectId *operator-> (void); - CORBA::Octet &operator[] (CORBA::ULong index); - - private: - ObjectId *&ptr_; - // assignment from T_var not allowed - void operator= (const ObjectId_var &); - }; - - -#endif /* end #if !defined */ - - TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ObjectId; - - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -#if !defined (_PORTABLESERVER_FORWARDREQUEST_CH_) -#define _PORTABLESERVER_FORWARDREQUEST_CH_ - - class TAO_Export ForwardRequest : public CORBA::UserException - { - public: - - CORBA::Object_var forward_reference; - - ForwardRequest (void); // default ctor - ForwardRequest (const ForwardRequest &); // copy ctor - ~ForwardRequest (void); - static void _tao_any_destructor (void*); - ForwardRequest &operator= (const ForwardRequest &); - - - virtual void _raise (void); - - virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; - virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - - static ForwardRequest *_downcast (CORBA::Exception *); - - ForwardRequest ( - const CORBA::Object_ptr _tao_forward_reference - ); - - // = TAO extension - static CORBA::Exception *_alloc (void); - virtual CORBA::TypeCode_ptr _type (void) const; - -}; // exception PortableServer::ForwardRequest - -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ForwardRequest; - - -#endif /* end #if !defined */ - -#endif /* TAO_HAS_MINIMUM_CORBA == 0 */ - -TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong THREAD_POLICY_ID; - -TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong LIFESPAN_POLICY_ID; - -TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong ID_UNIQUENESS_POLICY_ID; - -TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong ID_ASSIGNMENT_POLICY_ID; - -TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong IMPLICIT_ACTIVATION_POLICY_ID; - -TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong SERVANT_RETENTION_POLICY_ID; - -TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong REQUEST_PROCESSING_POLICY_ID; - -enum ThreadPolicyValue -{ - ORB_CTRL_MODEL, - SINGLE_THREAD_MODEL, - ThreadPolicyValue_TAO_ENUM_32BIT_ENFORCER = 0x7FFFFFFF -}; - -#if (TAO_HAS_MINIMUM_POA == 0) - -typedef ThreadPolicyValue &ThreadPolicyValue_out; -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ThreadPolicyValue; - - -#if !defined (_PORTABLESERVER_THREADPOLICY___PTR_CH_) -#define _PORTABLESERVER_THREADPOLICY___PTR_CH_ - -class ThreadPolicy; -typedef ThreadPolicy *ThreadPolicy_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_THREADPOLICY___VAR_CH_) -#define _PORTABLESERVER_THREADPOLICY___VAR_CH_ - -class TAO_Export ThreadPolicy_var : public TAO_Base_var -{ -public: - ThreadPolicy_var (void); // default constructor - ThreadPolicy_var (ThreadPolicy_ptr p) : ptr_ (p) {} - ThreadPolicy_var (const ThreadPolicy_var &); // copy constructor - ~ThreadPolicy_var (void); // destructor - - ThreadPolicy_var &operator= (ThreadPolicy_ptr); - ThreadPolicy_var &operator= (const ThreadPolicy_var &); - ThreadPolicy_ptr operator-> (void) const; - - operator const ThreadPolicy_ptr &() const; - operator ThreadPolicy_ptr &(); - // in, inout, out, _retn - ThreadPolicy_ptr in (void) const; - ThreadPolicy_ptr &inout (void); - ThreadPolicy_ptr &out (void); - ThreadPolicy_ptr _retn (void); - ThreadPolicy_ptr ptr (void) const; - -private: - ThreadPolicy_ptr ptr_; - // Unimplemented - prevents widening assignment. - ThreadPolicy_var (const TAO_Base_var &rhs); - ThreadPolicy_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_THREADPOLICY___OUT_CH_) -#define _PORTABLESERVER_THREADPOLICY___OUT_CH_ - -class TAO_Export ThreadPolicy_out -{ -public: - ThreadPolicy_out (ThreadPolicy_ptr &); - ThreadPolicy_out (ThreadPolicy_var &); - ThreadPolicy_out (const ThreadPolicy_out &); - ThreadPolicy_out &operator= (const ThreadPolicy_out &); - ThreadPolicy_out &operator= (const ThreadPolicy_var &); - ThreadPolicy_out &operator= (ThreadPolicy_ptr); - operator ThreadPolicy_ptr &(); - ThreadPolicy_ptr &ptr (void); - ThreadPolicy_ptr operator-> (void); - -private: - ThreadPolicy_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_THREADPOLICY_CH_) -#define _PORTABLESERVER_THREADPOLICY_CH_ - -class TAO_Export ThreadPolicy: public virtual CORBA::Policy -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ThreadPolicy_ptr _ptr_type; - typedef ThreadPolicy_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static ThreadPolicy_ptr _duplicate (ThreadPolicy_ptr obj); - static ThreadPolicy_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ThreadPolicy_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ThreadPolicy_ptr _nil (void) - { - return (ThreadPolicy_ptr)0; - } - - virtual PortableServer::ThreadPolicyValue value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - ThreadPolicy (void); - virtual ~ThreadPolicy (void); -private: - ThreadPolicy (const ThreadPolicy &); - void operator= (const ThreadPolicy &); -}; - - -#endif /* end #if !defined */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -enum LifespanPolicyValue -{ - TRANSIENT, - PERSISTENT, - LifespanPolicyValue_TAO_ENUM_32BIT_ENFORCER = 0x7FFFFFFF -}; -typedef LifespanPolicyValue &LifespanPolicyValue_out; -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_LifespanPolicyValue; - - -#if !defined (_PORTABLESERVER_LIFESPANPOLICY___PTR_CH_) -#define _PORTABLESERVER_LIFESPANPOLICY___PTR_CH_ - -class LifespanPolicy; -typedef LifespanPolicy *LifespanPolicy_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_LIFESPANPOLICY___VAR_CH_) -#define _PORTABLESERVER_LIFESPANPOLICY___VAR_CH_ - -class TAO_Export LifespanPolicy_var : public TAO_Base_var -{ -public: - LifespanPolicy_var (void); // default constructor - LifespanPolicy_var (LifespanPolicy_ptr p) : ptr_ (p) {} - LifespanPolicy_var (const LifespanPolicy_var &); // copy constructor - ~LifespanPolicy_var (void); // destructor - - LifespanPolicy_var &operator= (LifespanPolicy_ptr); - LifespanPolicy_var &operator= (const LifespanPolicy_var &); - LifespanPolicy_ptr operator-> (void) const; - - operator const LifespanPolicy_ptr &() const; - operator LifespanPolicy_ptr &(); - // in, inout, out, _retn - LifespanPolicy_ptr in (void) const; - LifespanPolicy_ptr &inout (void); - LifespanPolicy_ptr &out (void); - LifespanPolicy_ptr _retn (void); - LifespanPolicy_ptr ptr (void) const; - -private: - LifespanPolicy_ptr ptr_; - // Unimplemented - prevents widening assignment. - LifespanPolicy_var (const TAO_Base_var &rhs); - LifespanPolicy_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_LIFESPANPOLICY___OUT_CH_) -#define _PORTABLESERVER_LIFESPANPOLICY___OUT_CH_ - -class TAO_Export LifespanPolicy_out -{ -public: - LifespanPolicy_out (LifespanPolicy_ptr &); - LifespanPolicy_out (LifespanPolicy_var &); - LifespanPolicy_out (const LifespanPolicy_out &); - LifespanPolicy_out &operator= (const LifespanPolicy_out &); - LifespanPolicy_out &operator= (const LifespanPolicy_var &); - LifespanPolicy_out &operator= (LifespanPolicy_ptr); - operator LifespanPolicy_ptr &(); - LifespanPolicy_ptr &ptr (void); - LifespanPolicy_ptr operator-> (void); - -private: - LifespanPolicy_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_LIFESPANPOLICY_CH_) -#define _PORTABLESERVER_LIFESPANPOLICY_CH_ - -class TAO_Export LifespanPolicy: public virtual CORBA::Policy -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef LifespanPolicy_ptr _ptr_type; - typedef LifespanPolicy_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static LifespanPolicy_ptr _duplicate (LifespanPolicy_ptr obj); - static LifespanPolicy_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static LifespanPolicy_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static LifespanPolicy_ptr _nil (void) - { - return (LifespanPolicy_ptr)0; - } - - virtual PortableServer::LifespanPolicyValue value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - LifespanPolicy (void); - virtual ~LifespanPolicy (void); -private: - LifespanPolicy (const LifespanPolicy &); - void operator= (const LifespanPolicy &); -}; - - -#endif /* end #if !defined */ - -enum IdUniquenessPolicyValue -{ - UNIQUE_ID, - MULTIPLE_ID, - IdUniquenessPolicyValue_TAO_ENUM_32BIT_ENFORCER = 0x7FFFFFFF -}; -typedef IdUniquenessPolicyValue &IdUniquenessPolicyValue_out; -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_IdUniquenessPolicyValue; - - -#if !defined (_PORTABLESERVER_IDUNIQUENESSPOLICY___PTR_CH_) -#define _PORTABLESERVER_IDUNIQUENESSPOLICY___PTR_CH_ - -class IdUniquenessPolicy; -typedef IdUniquenessPolicy *IdUniquenessPolicy_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDUNIQUENESSPOLICY___VAR_CH_) -#define _PORTABLESERVER_IDUNIQUENESSPOLICY___VAR_CH_ - -class TAO_Export IdUniquenessPolicy_var : public TAO_Base_var -{ -public: - IdUniquenessPolicy_var (void); // default constructor - IdUniquenessPolicy_var (IdUniquenessPolicy_ptr p) : ptr_ (p) {} - IdUniquenessPolicy_var (const IdUniquenessPolicy_var &); // copy constructor - ~IdUniquenessPolicy_var (void); // destructor - - IdUniquenessPolicy_var &operator= (IdUniquenessPolicy_ptr); - IdUniquenessPolicy_var &operator= (const IdUniquenessPolicy_var &); - IdUniquenessPolicy_ptr operator-> (void) const; - - operator const IdUniquenessPolicy_ptr &() const; - operator IdUniquenessPolicy_ptr &(); - // in, inout, out, _retn - IdUniquenessPolicy_ptr in (void) const; - IdUniquenessPolicy_ptr &inout (void); - IdUniquenessPolicy_ptr &out (void); - IdUniquenessPolicy_ptr _retn (void); - IdUniquenessPolicy_ptr ptr (void) const; - -private: - IdUniquenessPolicy_ptr ptr_; - // Unimplemented - prevents widening assignment. - IdUniquenessPolicy_var (const TAO_Base_var &rhs); - IdUniquenessPolicy_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDUNIQUENESSPOLICY___OUT_CH_) -#define _PORTABLESERVER_IDUNIQUENESSPOLICY___OUT_CH_ - -class TAO_Export IdUniquenessPolicy_out -{ -public: - IdUniquenessPolicy_out (IdUniquenessPolicy_ptr &); - IdUniquenessPolicy_out (IdUniquenessPolicy_var &); - IdUniquenessPolicy_out (const IdUniquenessPolicy_out &); - IdUniquenessPolicy_out &operator= (const IdUniquenessPolicy_out &); - IdUniquenessPolicy_out &operator= (const IdUniquenessPolicy_var &); - IdUniquenessPolicy_out &operator= (IdUniquenessPolicy_ptr); - operator IdUniquenessPolicy_ptr &(); - IdUniquenessPolicy_ptr &ptr (void); - IdUniquenessPolicy_ptr operator-> (void); - -private: - IdUniquenessPolicy_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDUNIQUENESSPOLICY_CH_) -#define _PORTABLESERVER_IDUNIQUENESSPOLICY_CH_ - -class TAO_Export IdUniquenessPolicy: public virtual CORBA::Policy -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef IdUniquenessPolicy_ptr _ptr_type; - typedef IdUniquenessPolicy_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static IdUniquenessPolicy_ptr _duplicate (IdUniquenessPolicy_ptr obj); - static IdUniquenessPolicy_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static IdUniquenessPolicy_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static IdUniquenessPolicy_ptr _nil (void) - { - return (IdUniquenessPolicy_ptr)0; - } - - virtual PortableServer::IdUniquenessPolicyValue value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - IdUniquenessPolicy (void); - virtual ~IdUniquenessPolicy (void); -private: - IdUniquenessPolicy (const IdUniquenessPolicy &); - void operator= (const IdUniquenessPolicy &); -}; - - -#endif /* end #if !defined */ - -enum IdAssignmentPolicyValue -{ - USER_ID, - SYSTEM_ID, - IdAssignmentPolicyValue_TAO_ENUM_32BIT_ENFORCER = 0x7FFFFFFF -}; -typedef IdAssignmentPolicyValue &IdAssignmentPolicyValue_out; -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_IdAssignmentPolicyValue; - - -#if !defined (_PORTABLESERVER_IDASSIGNMENTPOLICY___PTR_CH_) -#define _PORTABLESERVER_IDASSIGNMENTPOLICY___PTR_CH_ - -class IdAssignmentPolicy; -typedef IdAssignmentPolicy *IdAssignmentPolicy_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDASSIGNMENTPOLICY___VAR_CH_) -#define _PORTABLESERVER_IDASSIGNMENTPOLICY___VAR_CH_ - -class TAO_Export IdAssignmentPolicy_var : public TAO_Base_var -{ -public: - IdAssignmentPolicy_var (void); // default constructor - IdAssignmentPolicy_var (IdAssignmentPolicy_ptr p) : ptr_ (p) {} - IdAssignmentPolicy_var (const IdAssignmentPolicy_var &); // copy constructor - ~IdAssignmentPolicy_var (void); // destructor - - IdAssignmentPolicy_var &operator= (IdAssignmentPolicy_ptr); - IdAssignmentPolicy_var &operator= (const IdAssignmentPolicy_var &); - IdAssignmentPolicy_ptr operator-> (void) const; - - operator const IdAssignmentPolicy_ptr &() const; - operator IdAssignmentPolicy_ptr &(); - // in, inout, out, _retn - IdAssignmentPolicy_ptr in (void) const; - IdAssignmentPolicy_ptr &inout (void); - IdAssignmentPolicy_ptr &out (void); - IdAssignmentPolicy_ptr _retn (void); - IdAssignmentPolicy_ptr ptr (void) const; - -private: - IdAssignmentPolicy_ptr ptr_; - // Unimplemented - prevents widening assignment. - IdAssignmentPolicy_var (const TAO_Base_var &rhs); - IdAssignmentPolicy_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDASSIGNMENTPOLICY___OUT_CH_) -#define _PORTABLESERVER_IDASSIGNMENTPOLICY___OUT_CH_ - -class TAO_Export IdAssignmentPolicy_out -{ -public: - IdAssignmentPolicy_out (IdAssignmentPolicy_ptr &); - IdAssignmentPolicy_out (IdAssignmentPolicy_var &); - IdAssignmentPolicy_out (const IdAssignmentPolicy_out &); - IdAssignmentPolicy_out &operator= (const IdAssignmentPolicy_out &); - IdAssignmentPolicy_out &operator= (const IdAssignmentPolicy_var &); - IdAssignmentPolicy_out &operator= (IdAssignmentPolicy_ptr); - operator IdAssignmentPolicy_ptr &(); - IdAssignmentPolicy_ptr &ptr (void); - IdAssignmentPolicy_ptr operator-> (void); - -private: - IdAssignmentPolicy_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDASSIGNMENTPOLICY_CH_) -#define _PORTABLESERVER_IDASSIGNMENTPOLICY_CH_ - -class TAO_Export IdAssignmentPolicy: public virtual CORBA::Policy -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef IdAssignmentPolicy_ptr _ptr_type; - typedef IdAssignmentPolicy_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static IdAssignmentPolicy_ptr _duplicate (IdAssignmentPolicy_ptr obj); - static IdAssignmentPolicy_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static IdAssignmentPolicy_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static IdAssignmentPolicy_ptr _nil (void) - { - return (IdAssignmentPolicy_ptr)0; - } - - virtual PortableServer::IdAssignmentPolicyValue value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - IdAssignmentPolicy (void); - virtual ~IdAssignmentPolicy (void); -private: - IdAssignmentPolicy (const IdAssignmentPolicy &); - void operator= (const IdAssignmentPolicy &); -}; - - -#endif /* end #if !defined */ - -enum ImplicitActivationPolicyValue -{ - IMPLICIT_ACTIVATION, - NO_IMPLICIT_ACTIVATION, - ImplicitActivationPolicyValue_TAO_ENUM_32BIT_ENFORCER = 0x7FFFFFFF -}; - -#if (TAO_HAS_MINIMUM_POA == 0) - -typedef ImplicitActivationPolicyValue &ImplicitActivationPolicyValue_out; -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ImplicitActivationPolicyValue; - - -#if !defined (_PORTABLESERVER_IMPLICITACTIVATIONPOLICY___PTR_CH_) -#define _PORTABLESERVER_IMPLICITACTIVATIONPOLICY___PTR_CH_ - -class ImplicitActivationPolicy; -typedef ImplicitActivationPolicy *ImplicitActivationPolicy_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IMPLICITACTIVATIONPOLICY___VAR_CH_) -#define _PORTABLESERVER_IMPLICITACTIVATIONPOLICY___VAR_CH_ - -class TAO_Export ImplicitActivationPolicy_var : public TAO_Base_var -{ -public: - ImplicitActivationPolicy_var (void); // default constructor - ImplicitActivationPolicy_var (ImplicitActivationPolicy_ptr p) : ptr_ (p) {} - ImplicitActivationPolicy_var (const ImplicitActivationPolicy_var &); // copy constructor - ~ImplicitActivationPolicy_var (void); // destructor - - ImplicitActivationPolicy_var &operator= (ImplicitActivationPolicy_ptr); - ImplicitActivationPolicy_var &operator= (const ImplicitActivationPolicy_var &); - ImplicitActivationPolicy_ptr operator-> (void) const; - - operator const ImplicitActivationPolicy_ptr &() const; - operator ImplicitActivationPolicy_ptr &(); - // in, inout, out, _retn - ImplicitActivationPolicy_ptr in (void) const; - ImplicitActivationPolicy_ptr &inout (void); - ImplicitActivationPolicy_ptr &out (void); - ImplicitActivationPolicy_ptr _retn (void); - ImplicitActivationPolicy_ptr ptr (void) const; - -private: - ImplicitActivationPolicy_ptr ptr_; - // Unimplemented - prevents widening assignment. - ImplicitActivationPolicy_var (const TAO_Base_var &rhs); - ImplicitActivationPolicy_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IMPLICITACTIVATIONPOLICY___OUT_CH_) -#define _PORTABLESERVER_IMPLICITACTIVATIONPOLICY___OUT_CH_ - -class TAO_Export ImplicitActivationPolicy_out -{ -public: - ImplicitActivationPolicy_out (ImplicitActivationPolicy_ptr &); - ImplicitActivationPolicy_out (ImplicitActivationPolicy_var &); - ImplicitActivationPolicy_out (const ImplicitActivationPolicy_out &); - ImplicitActivationPolicy_out &operator= (const ImplicitActivationPolicy_out &); - ImplicitActivationPolicy_out &operator= (const ImplicitActivationPolicy_var &); - ImplicitActivationPolicy_out &operator= (ImplicitActivationPolicy_ptr); - operator ImplicitActivationPolicy_ptr &(); - ImplicitActivationPolicy_ptr &ptr (void); - ImplicitActivationPolicy_ptr operator-> (void); - -private: - ImplicitActivationPolicy_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IMPLICITACTIVATIONPOLICY_CH_) -#define _PORTABLESERVER_IMPLICITACTIVATIONPOLICY_CH_ - -class TAO_Export ImplicitActivationPolicy: public virtual CORBA::Policy -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ImplicitActivationPolicy_ptr _ptr_type; - typedef ImplicitActivationPolicy_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static ImplicitActivationPolicy_ptr _duplicate (ImplicitActivationPolicy_ptr obj); - static ImplicitActivationPolicy_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ImplicitActivationPolicy_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ImplicitActivationPolicy_ptr _nil (void) - { - return (ImplicitActivationPolicy_ptr)0; - } - - virtual PortableServer::ImplicitActivationPolicyValue value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - ImplicitActivationPolicy (void); - virtual ~ImplicitActivationPolicy (void); -private: - ImplicitActivationPolicy (const ImplicitActivationPolicy &); - void operator= (const ImplicitActivationPolicy &); -}; - - -#endif /* end #if !defined */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -enum ServantRetentionPolicyValue -{ - RETAIN, - NON_RETAIN, - ServantRetentionPolicyValue_TAO_ENUM_32BIT_ENFORCER = 0x7FFFFFFF -}; - -#if (TAO_HAS_MINIMUM_POA == 0) - -typedef ServantRetentionPolicyValue &ServantRetentionPolicyValue_out; -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ServantRetentionPolicyValue; - - -#if !defined (_PORTABLESERVER_SERVANTRETENTIONPOLICY___PTR_CH_) -#define _PORTABLESERVER_SERVANTRETENTIONPOLICY___PTR_CH_ - -class ServantRetentionPolicy; -typedef ServantRetentionPolicy *ServantRetentionPolicy_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTRETENTIONPOLICY___VAR_CH_) -#define _PORTABLESERVER_SERVANTRETENTIONPOLICY___VAR_CH_ - -class TAO_Export ServantRetentionPolicy_var : public TAO_Base_var -{ -public: - ServantRetentionPolicy_var (void); // default constructor - ServantRetentionPolicy_var (ServantRetentionPolicy_ptr p) : ptr_ (p) {} - ServantRetentionPolicy_var (const ServantRetentionPolicy_var &); // copy constructor - ~ServantRetentionPolicy_var (void); // destructor - - ServantRetentionPolicy_var &operator= (ServantRetentionPolicy_ptr); - ServantRetentionPolicy_var &operator= (const ServantRetentionPolicy_var &); - ServantRetentionPolicy_ptr operator-> (void) const; - - operator const ServantRetentionPolicy_ptr &() const; - operator ServantRetentionPolicy_ptr &(); - // in, inout, out, _retn - ServantRetentionPolicy_ptr in (void) const; - ServantRetentionPolicy_ptr &inout (void); - ServantRetentionPolicy_ptr &out (void); - ServantRetentionPolicy_ptr _retn (void); - ServantRetentionPolicy_ptr ptr (void) const; - -private: - ServantRetentionPolicy_ptr ptr_; - // Unimplemented - prevents widening assignment. - ServantRetentionPolicy_var (const TAO_Base_var &rhs); - ServantRetentionPolicy_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTRETENTIONPOLICY___OUT_CH_) -#define _PORTABLESERVER_SERVANTRETENTIONPOLICY___OUT_CH_ - -class TAO_Export ServantRetentionPolicy_out -{ -public: - ServantRetentionPolicy_out (ServantRetentionPolicy_ptr &); - ServantRetentionPolicy_out (ServantRetentionPolicy_var &); - ServantRetentionPolicy_out (const ServantRetentionPolicy_out &); - ServantRetentionPolicy_out &operator= (const ServantRetentionPolicy_out &); - ServantRetentionPolicy_out &operator= (const ServantRetentionPolicy_var &); - ServantRetentionPolicy_out &operator= (ServantRetentionPolicy_ptr); - operator ServantRetentionPolicy_ptr &(); - ServantRetentionPolicy_ptr &ptr (void); - ServantRetentionPolicy_ptr operator-> (void); - -private: - ServantRetentionPolicy_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTRETENTIONPOLICY_CH_) -#define _PORTABLESERVER_SERVANTRETENTIONPOLICY_CH_ - -class TAO_Export ServantRetentionPolicy: public virtual CORBA::Policy -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ServantRetentionPolicy_ptr _ptr_type; - typedef ServantRetentionPolicy_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static ServantRetentionPolicy_ptr _duplicate (ServantRetentionPolicy_ptr obj); - static ServantRetentionPolicy_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ServantRetentionPolicy_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ServantRetentionPolicy_ptr _nil (void) - { - return (ServantRetentionPolicy_ptr)0; - } - - virtual PortableServer::ServantRetentionPolicyValue value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - ServantRetentionPolicy (void); - virtual ~ServantRetentionPolicy (void); -private: - ServantRetentionPolicy (const ServantRetentionPolicy &); - void operator= (const ServantRetentionPolicy &); -}; - - -#endif /* end #if !defined */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -enum RequestProcessingPolicyValue -{ - USE_ACTIVE_OBJECT_MAP_ONLY, - USE_DEFAULT_SERVANT, - USE_SERVANT_MANAGER, - RequestProcessingPolicyValue_TAO_ENUM_32BIT_ENFORCER = 0x7FFFFFFF -}; - -#if (TAO_HAS_MINIMUM_POA == 0) - -typedef RequestProcessingPolicyValue &RequestProcessingPolicyValue_out; -TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_RequestProcessingPolicyValue; - - -#if !defined (_PORTABLESERVER_REQUESTPROCESSINGPOLICY___PTR_CH_) -#define _PORTABLESERVER_REQUESTPROCESSINGPOLICY___PTR_CH_ - -class RequestProcessingPolicy; -typedef RequestProcessingPolicy *RequestProcessingPolicy_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_REQUESTPROCESSINGPOLICY___VAR_CH_) -#define _PORTABLESERVER_REQUESTPROCESSINGPOLICY___VAR_CH_ - -class TAO_Export RequestProcessingPolicy_var : public TAO_Base_var -{ -public: - RequestProcessingPolicy_var (void); // default constructor - RequestProcessingPolicy_var (RequestProcessingPolicy_ptr p) : ptr_ (p) {} - RequestProcessingPolicy_var (const RequestProcessingPolicy_var &); // copy constructor - ~RequestProcessingPolicy_var (void); // destructor - - RequestProcessingPolicy_var &operator= (RequestProcessingPolicy_ptr); - RequestProcessingPolicy_var &operator= (const RequestProcessingPolicy_var &); - RequestProcessingPolicy_ptr operator-> (void) const; - - operator const RequestProcessingPolicy_ptr &() const; - operator RequestProcessingPolicy_ptr &(); - // in, inout, out, _retn - RequestProcessingPolicy_ptr in (void) const; - RequestProcessingPolicy_ptr &inout (void); - RequestProcessingPolicy_ptr &out (void); - RequestProcessingPolicy_ptr _retn (void); - RequestProcessingPolicy_ptr ptr (void) const; - -private: - RequestProcessingPolicy_ptr ptr_; - // Unimplemented - prevents widening assignment. - RequestProcessingPolicy_var (const TAO_Base_var &rhs); - RequestProcessingPolicy_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_REQUESTPROCESSINGPOLICY___OUT_CH_) -#define _PORTABLESERVER_REQUESTPROCESSINGPOLICY___OUT_CH_ - -class TAO_Export RequestProcessingPolicy_out -{ -public: - RequestProcessingPolicy_out (RequestProcessingPolicy_ptr &); - RequestProcessingPolicy_out (RequestProcessingPolicy_var &); - RequestProcessingPolicy_out (const RequestProcessingPolicy_out &); - RequestProcessingPolicy_out &operator= (const RequestProcessingPolicy_out &); - RequestProcessingPolicy_out &operator= (const RequestProcessingPolicy_var &); - RequestProcessingPolicy_out &operator= (RequestProcessingPolicy_ptr); - operator RequestProcessingPolicy_ptr &(); - RequestProcessingPolicy_ptr &ptr (void); - RequestProcessingPolicy_ptr operator-> (void); - -private: - RequestProcessingPolicy_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_REQUESTPROCESSINGPOLICY_CH_) -#define _PORTABLESERVER_REQUESTPROCESSINGPOLICY_CH_ - -class TAO_Export RequestProcessingPolicy: public virtual CORBA::Policy -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef RequestProcessingPolicy_ptr _ptr_type; - typedef RequestProcessingPolicy_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static RequestProcessingPolicy_ptr _duplicate (RequestProcessingPolicy_ptr obj); - static RequestProcessingPolicy_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static RequestProcessingPolicy_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static RequestProcessingPolicy_ptr _nil (void) - { - return (RequestProcessingPolicy_ptr)0; - } - - virtual PortableServer::RequestProcessingPolicyValue value ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - RequestProcessingPolicy (void); - virtual ~RequestProcessingPolicy (void); -private: - RequestProcessingPolicy (const RequestProcessingPolicy &); - void operator= (const RequestProcessingPolicy &); -}; - - -#endif /* end #if !defined */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if !defined (_PORTABLESERVER_POAMANAGER___PTR_CH_) -#define _PORTABLESERVER_POAMANAGER___PTR_CH_ - -class POAManager; -typedef POAManager *POAManager_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POAMANAGER___VAR_CH_) -#define _PORTABLESERVER_POAMANAGER___VAR_CH_ - -class TAO_Export POAManager_var : public TAO_Base_var -{ -public: - POAManager_var (void); // default constructor - POAManager_var (POAManager_ptr p) : ptr_ (p) {} - POAManager_var (const POAManager_var &); // copy constructor - ~POAManager_var (void); // destructor - - POAManager_var &operator= (POAManager_ptr); - POAManager_var &operator= (const POAManager_var &); - POAManager_ptr operator-> (void) const; - - operator const POAManager_ptr &() const; - operator POAManager_ptr &(); - // in, inout, out, _retn - POAManager_ptr in (void) const; - POAManager_ptr &inout (void); - POAManager_ptr &out (void); - POAManager_ptr _retn (void); - POAManager_ptr ptr (void) const; - -private: - POAManager_ptr ptr_; - // Unimplemented - prevents widening assignment. - POAManager_var (const TAO_Base_var &rhs); - POAManager_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POAMANAGER___OUT_CH_) -#define _PORTABLESERVER_POAMANAGER___OUT_CH_ - -class TAO_Export POAManager_out -{ -public: - POAManager_out (POAManager_ptr &); - POAManager_out (POAManager_var &); - POAManager_out (const POAManager_out &); - POAManager_out &operator= (const POAManager_out &); - POAManager_out &operator= (const POAManager_var &); - POAManager_out &operator= (POAManager_ptr); - operator POAManager_ptr &(); - POAManager_ptr &ptr (void); - POAManager_ptr operator-> (void); - -private: - POAManager_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POAMANAGER_CH_) -#define _PORTABLESERVER_POAMANAGER_CH_ - -class TAO_Export POAManager : public virtual CORBA_Object -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef POAManager_ptr _ptr_type; - typedef POAManager_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static POAManager_ptr _duplicate (POAManager_ptr obj); - static POAManager_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static POAManager_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static POAManager_ptr _nil (void) - { - return (POAManager_ptr)0; - } - - -#if !defined (_PORTABLESERVER_POAMANAGER_ADAPTERINACTIVE_CH_) -#define _PORTABLESERVER_POAMANAGER_ADAPTERINACTIVE_CH_ - - class TAO_Export AdapterInactive : public CORBA::UserException - { - public: - - - AdapterInactive (void); // default ctor - AdapterInactive (const AdapterInactive &); // copy ctor - ~AdapterInactive (void); - AdapterInactive &operator= (const AdapterInactive &); - - - virtual void _raise (void); - - virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; - virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - - static AdapterInactive *_downcast (CORBA::Exception *); - - - // = TAO extension - static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POAManager::AdapterInactive - - -#endif /* end #if !defined */ - -enum State -{ - HOLDING, - ACTIVE, - DISCARDING, - INACTIVE, - State_TAO_ENUM_32BIT_ENFORCER = 0x7FFFFFFF -}; -typedef State &State_out; -virtual void activate ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POAManager::AdapterInactive - )) = 0; - -#if (TAO_HAS_MINIMUM_POA == 0) - -virtual void hold_requests ( - CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POAManager::AdapterInactive - )) = 0; - -virtual void discard_requests ( - CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POAManager::AdapterInactive - )) = 0; - -virtual void deactivate ( - CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POAManager::AdapterInactive - )) = 0; - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -virtual PortableServer::POAManager::State get_state ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual void *_tao_QueryInterface (ptr_arith_t type); - -virtual const char* _interface_repository_id (void) const; - -protected: - POAManager (void); - virtual ~POAManager (void); -private: - POAManager (const POAManager &); - void operator= (const POAManager &); -}; - - -#endif /* end #if !defined */ - - -#if (TAO_HAS_MINIMUM_POA == 0) - -#if !defined (_PORTABLESERVER_ADAPTERACTIVATOR___PTR_CH_) -#define _PORTABLESERVER_ADAPTERACTIVATOR___PTR_CH_ - -class AdapterActivator; -typedef AdapterActivator *AdapterActivator_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_ADAPTERACTIVATOR___VAR_CH_) -#define _PORTABLESERVER_ADAPTERACTIVATOR___VAR_CH_ - -class TAO_Export AdapterActivator_var : public TAO_Base_var -{ -public: - AdapterActivator_var (void); // default constructor - AdapterActivator_var (AdapterActivator_ptr p) : ptr_ (p) {} - AdapterActivator_var (const AdapterActivator_var &); // copy constructor - ~AdapterActivator_var (void); // destructor - - AdapterActivator_var &operator= (AdapterActivator_ptr); - AdapterActivator_var &operator= (const AdapterActivator_var &); - AdapterActivator_ptr operator-> (void) const; - - operator const AdapterActivator_ptr &() const; - operator AdapterActivator_ptr &(); - // in, inout, out, _retn - AdapterActivator_ptr in (void) const; - AdapterActivator_ptr &inout (void); - AdapterActivator_ptr &out (void); - AdapterActivator_ptr _retn (void); - AdapterActivator_ptr ptr (void) const; - -private: - AdapterActivator_ptr ptr_; - // Unimplemented - prevents widening assignment. - AdapterActivator_var (const TAO_Base_var &rhs); - AdapterActivator_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_ADAPTERACTIVATOR___OUT_CH_) -#define _PORTABLESERVER_ADAPTERACTIVATOR___OUT_CH_ - -class TAO_Export AdapterActivator_out -{ -public: - AdapterActivator_out (AdapterActivator_ptr &); - AdapterActivator_out (AdapterActivator_var &); - AdapterActivator_out (const AdapterActivator_out &); - AdapterActivator_out &operator= (const AdapterActivator_out &); - AdapterActivator_out &operator= (const AdapterActivator_var &); - AdapterActivator_out &operator= (AdapterActivator_ptr); - operator AdapterActivator_ptr &(); - AdapterActivator_ptr &ptr (void); - AdapterActivator_ptr operator-> (void); - -private: - AdapterActivator_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_ADAPTERACTIVATOR_CH_) -#define _PORTABLESERVER_ADAPTERACTIVATOR_CH_ - -class TAO_Export AdapterActivator : public virtual CORBA_Object -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef AdapterActivator_ptr _ptr_type; - typedef AdapterActivator_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static AdapterActivator_ptr _duplicate (AdapterActivator_ptr obj); - static AdapterActivator_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static AdapterActivator_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static AdapterActivator_ptr _nil (void) - { - return (AdapterActivator_ptr)0; - } - - virtual CORBA::Boolean unknown_adapter ( - PortableServer::POA_ptr parent, - const char * name, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - AdapterActivator (void); - virtual ~AdapterActivator (void); -private: - AdapterActivator (const AdapterActivator &); - void operator= (const AdapterActivator &); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTMANAGER___PTR_CH_) -#define _PORTABLESERVER_SERVANTMANAGER___PTR_CH_ - -class ServantManager; -typedef ServantManager *ServantManager_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTMANAGER___VAR_CH_) -#define _PORTABLESERVER_SERVANTMANAGER___VAR_CH_ - -class TAO_Export ServantManager_var : public TAO_Base_var -{ -public: - ServantManager_var (void); // default constructor - ServantManager_var (ServantManager_ptr p) : ptr_ (p) {} - ServantManager_var (const ServantManager_var &); // copy constructor - ~ServantManager_var (void); // destructor - - ServantManager_var &operator= (ServantManager_ptr); - ServantManager_var &operator= (const ServantManager_var &); - ServantManager_ptr operator-> (void) const; - - operator const ServantManager_ptr &() const; - operator ServantManager_ptr &(); - // in, inout, out, _retn - ServantManager_ptr in (void) const; - ServantManager_ptr &inout (void); - ServantManager_ptr &out (void); - ServantManager_ptr _retn (void); - ServantManager_ptr ptr (void) const; - -private: - ServantManager_ptr ptr_; - // Unimplemented - prevents widening assignment. - ServantManager_var (const TAO_Base_var &rhs); - ServantManager_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTMANAGER___OUT_CH_) -#define _PORTABLESERVER_SERVANTMANAGER___OUT_CH_ - -class TAO_Export ServantManager_out -{ -public: - ServantManager_out (ServantManager_ptr &); - ServantManager_out (ServantManager_var &); - ServantManager_out (const ServantManager_out &); - ServantManager_out &operator= (const ServantManager_out &); - ServantManager_out &operator= (const ServantManager_var &); - ServantManager_out &operator= (ServantManager_ptr); - operator ServantManager_ptr &(); - ServantManager_ptr &ptr (void); - ServantManager_ptr operator-> (void); - -private: - ServantManager_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTMANAGER_CH_) -#define _PORTABLESERVER_SERVANTMANAGER_CH_ - -class TAO_Export ServantManager : public virtual CORBA_Object -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ServantManager_ptr _ptr_type; - typedef ServantManager_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static ServantManager_ptr _duplicate (ServantManager_ptr obj); - static ServantManager_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ServantManager_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ServantManager_ptr _nil (void) - { - return (ServantManager_ptr)0; - } - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - ServantManager (void); - virtual ~ServantManager (void); -private: - ServantManager (const ServantManager &); - void operator= (const ServantManager &); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTACTIVATOR___PTR_CH_) -#define _PORTABLESERVER_SERVANTACTIVATOR___PTR_CH_ - -class ServantActivator; -typedef ServantActivator *ServantActivator_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTACTIVATOR___VAR_CH_) -#define _PORTABLESERVER_SERVANTACTIVATOR___VAR_CH_ - -class TAO_Export ServantActivator_var : public TAO_Base_var -{ -public: - ServantActivator_var (void); // default constructor - ServantActivator_var (ServantActivator_ptr p) : ptr_ (p) {} - ServantActivator_var (const ServantActivator_var &); // copy constructor - ~ServantActivator_var (void); // destructor - - ServantActivator_var &operator= (ServantActivator_ptr); - ServantActivator_var &operator= (const ServantActivator_var &); - ServantActivator_ptr operator-> (void) const; - - operator const ServantActivator_ptr &() const; - operator ServantActivator_ptr &(); - // in, inout, out, _retn - ServantActivator_ptr in (void) const; - ServantActivator_ptr &inout (void); - ServantActivator_ptr &out (void); - ServantActivator_ptr _retn (void); - ServantActivator_ptr ptr (void) const; - -private: - ServantActivator_ptr ptr_; - // Unimplemented - prevents widening assignment. - ServantActivator_var (const TAO_Base_var &rhs); - ServantActivator_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTACTIVATOR___OUT_CH_) -#define _PORTABLESERVER_SERVANTACTIVATOR___OUT_CH_ - -class TAO_Export ServantActivator_out -{ -public: - ServantActivator_out (ServantActivator_ptr &); - ServantActivator_out (ServantActivator_var &); - ServantActivator_out (const ServantActivator_out &); - ServantActivator_out &operator= (const ServantActivator_out &); - ServantActivator_out &operator= (const ServantActivator_var &); - ServantActivator_out &operator= (ServantActivator_ptr); - operator ServantActivator_ptr &(); - ServantActivator_ptr &ptr (void); - ServantActivator_ptr operator-> (void); - -private: - ServantActivator_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTACTIVATOR_CH_) -#define _PORTABLESERVER_SERVANTACTIVATOR_CH_ - -class TAO_Export ServantActivator: public virtual ServantManager -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ServantActivator_ptr _ptr_type; - typedef ServantActivator_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static ServantActivator_ptr _duplicate (ServantActivator_ptr obj); - static ServantActivator_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ServantActivator_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ServantActivator_ptr _nil (void) - { - return (ServantActivator_ptr)0; - } - - virtual PortableServer::Servant incarnate ( - const PortableServer::ObjectId & oid, - PortableServer::POA_ptr adapter - TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) -#if (TAO_HAS_MINIMUM_CORBA == 0) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::ForwardRequest - )) = 0; -#else - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; -#endif /* TAO_HAS_MINIMUM_CORBA == 0 */ - - virtual void etherealize ( - const PortableServer::ObjectId & oid, - PortableServer::POA_ptr adapter, - PortableServer::Servant serv, - CORBA::Boolean cleanup_in_progress, - CORBA::Boolean remaining_activations - TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - ServantActivator (void); - virtual ~ServantActivator (void); -private: - ServantActivator (const ServantActivator &); - void operator= (const ServantActivator &); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTLOCATOR___PTR_CH_) -#define _PORTABLESERVER_SERVANTLOCATOR___PTR_CH_ - -class ServantLocator; -typedef ServantLocator *ServantLocator_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTLOCATOR___VAR_CH_) -#define _PORTABLESERVER_SERVANTLOCATOR___VAR_CH_ - -class TAO_Export ServantLocator_var : public TAO_Base_var -{ -public: - ServantLocator_var (void); // default constructor - ServantLocator_var (ServantLocator_ptr p) : ptr_ (p) {} - ServantLocator_var (const ServantLocator_var &); // copy constructor - ~ServantLocator_var (void); // destructor - - ServantLocator_var &operator= (ServantLocator_ptr); - ServantLocator_var &operator= (const ServantLocator_var &); - ServantLocator_ptr operator-> (void) const; - - operator const ServantLocator_ptr &() const; - operator ServantLocator_ptr &(); - // in, inout, out, _retn - ServantLocator_ptr in (void) const; - ServantLocator_ptr &inout (void); - ServantLocator_ptr &out (void); - ServantLocator_ptr _retn (void); - ServantLocator_ptr ptr (void) const; - -private: - ServantLocator_ptr ptr_; - // Unimplemented - prevents widening assignment. - ServantLocator_var (const TAO_Base_var &rhs); - ServantLocator_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTLOCATOR___OUT_CH_) -#define _PORTABLESERVER_SERVANTLOCATOR___OUT_CH_ - -class TAO_Export ServantLocator_out -{ -public: - ServantLocator_out (ServantLocator_ptr &); - ServantLocator_out (ServantLocator_var &); - ServantLocator_out (const ServantLocator_out &); - ServantLocator_out &operator= (const ServantLocator_out &); - ServantLocator_out &operator= (const ServantLocator_var &); - ServantLocator_out &operator= (ServantLocator_ptr); - operator ServantLocator_ptr &(); - ServantLocator_ptr &ptr (void); - ServantLocator_ptr operator-> (void); - -private: - ServantLocator_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTLOCATOR_CH_) -#define _PORTABLESERVER_SERVANTLOCATOR_CH_ - -class TAO_Export ServantLocator: public virtual ServantManager -{ -public: - - typedef void *Cookie; - -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ServantLocator_ptr _ptr_type; - typedef ServantLocator_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static ServantLocator_ptr _duplicate (ServantLocator_ptr obj); - static ServantLocator_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ServantLocator_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static ServantLocator_ptr _nil (void) - { - return (ServantLocator_ptr)0; - } - - virtual PortableServer::Servant preinvoke ( - const PortableServer::ObjectId & oid, - PortableServer::POA_ptr adapter, - const char * operation, - PortableServer::ServantLocator::Cookie & the_cookie - TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) -#if (TAO_HAS_MINIMUM_CORBA == 0) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::ForwardRequest - )) = 0; -#else - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; -#endif /* TAO_HAS_MINIMUM_CORBA == 0 */ - - virtual void postinvoke ( - const PortableServer::ObjectId & oid, - PortableServer::POA_ptr adapter, - const char * operation, - PortableServer::ServantLocator::Cookie the_cookie, - PortableServer::Servant the_servant - TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - - virtual void *_tao_QueryInterface (ptr_arith_t type); - - virtual const char* _interface_repository_id (void) const; - -protected: - ServantLocator (void); - virtual ~ServantLocator (void); -private: - ServantLocator (const ServantLocator &); - void operator= (const ServantLocator &); -}; - - -#endif /* end #if !defined */ - - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if !defined (_PORTABLESERVER_POA___PTR_CH_) -#define _PORTABLESERVER_POA___PTR_CH_ - -class POA; -typedef POA *POA_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA___VAR_CH_) -#define _PORTABLESERVER_POA___VAR_CH_ - -class TAO_Export POA_var : public TAO_Base_var -{ -public: - POA_var (void); // default constructor - POA_var (POA_ptr p) : ptr_ (p) {} - POA_var (const POA_var &); // copy constructor - ~POA_var (void); // destructor - - POA_var &operator= (POA_ptr); - POA_var &operator= (const POA_var &); - POA_ptr operator-> (void) const; - - operator const POA_ptr &() const; - operator POA_ptr &(); - // in, inout, out, _retn - POA_ptr in (void) const; - POA_ptr &inout (void); - POA_ptr &out (void); - POA_ptr _retn (void); - POA_ptr ptr (void) const; - -private: - POA_ptr ptr_; - // Unimplemented - prevents widening assignment. - POA_var (const TAO_Base_var &rhs); - POA_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA___OUT_CH_) -#define _PORTABLESERVER_POA___OUT_CH_ - -class TAO_Export POA_out -{ -public: - POA_out (POA_ptr &); - POA_out (POA_var &); - POA_out (const POA_out &); - POA_out &operator= (const POA_out &); - POA_out &operator= (const POA_var &); - POA_out &operator= (POA_ptr); - operator POA_ptr &(); - POA_ptr &ptr (void); - POA_ptr operator-> (void); - -private: - POA_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA_CH_) -#define _PORTABLESERVER_POA_CH_ - -class TAO_Export POA : public virtual CORBA_Object -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef POA_ptr _ptr_type; - typedef POA_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static POA_ptr _duplicate (POA_ptr obj); - static POA_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static POA_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static POA_ptr _nil (void) - { - return (POA_ptr)0; - } - - -#if !defined (_PORTABLESERVER_POA_ADAPTERALREADYEXISTS_CH_) -#define _PORTABLESERVER_POA_ADAPTERALREADYEXISTS_CH_ - - class TAO_Export AdapterAlreadyExists : public CORBA::UserException - { - public: - - - AdapterAlreadyExists (void); // default ctor - AdapterAlreadyExists (const AdapterAlreadyExists &); // copy ctor - ~AdapterAlreadyExists (void); - AdapterAlreadyExists &operator= (const AdapterAlreadyExists &); - - - virtual void _raise (void); - - virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; - virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - - static AdapterAlreadyExists *_downcast (CORBA::Exception *); - - - // = TAO extension - static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::AdapterAlreadyExists - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA_ADAPTERNONEXISTENT_CH_) -#define _PORTABLESERVER_POA_ADAPTERNONEXISTENT_CH_ - -class TAO_Export AdapterNonExistent : public CORBA::UserException -{ -public: - - -AdapterNonExistent (void); // default ctor -AdapterNonExistent (const AdapterNonExistent &); // copy ctor -~AdapterNonExistent (void); -AdapterNonExistent &operator= (const AdapterNonExistent &); - - -virtual void _raise (void); - -virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; -virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - -static AdapterNonExistent *_downcast (CORBA::Exception *); - - -// = TAO extension -static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::AdapterNonExistent - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA_INVALIDPOLICY_CH_) -#define _PORTABLESERVER_POA_INVALIDPOLICY_CH_ - -class TAO_Export InvalidPolicy : public CORBA::UserException -{ -public: - -CORBA::UShort index; - -InvalidPolicy (void); // default ctor -InvalidPolicy (const InvalidPolicy &); // copy ctor -~InvalidPolicy (void); -InvalidPolicy &operator= (const InvalidPolicy &); - - -virtual void _raise (void); - -virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; -virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - -static InvalidPolicy *_downcast (CORBA::Exception *); - -InvalidPolicy ( - CORBA::UShort _tao_index -); - -// = TAO extension -static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::InvalidPolicy - - -#endif /* end #if !defined */ - - -#if (TAO_HAS_MINIMUM_POA == 0) - -#if !defined (_PORTABLESERVER_POA_NOSERVANT_CH_) -#define _PORTABLESERVER_POA_NOSERVANT_CH_ - -class TAO_Export NoServant : public CORBA::UserException -{ -public: - - -NoServant (void); // default ctor -NoServant (const NoServant &); // copy ctor -~NoServant (void); -NoServant &operator= (const NoServant &); - - -virtual void _raise (void); - -virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; -virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - -static NoServant *_downcast (CORBA::Exception *); - - -// = TAO extension -static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::NoServant - - -#endif /* end #if !defined */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if !defined (_PORTABLESERVER_POA_OBJECTALREADYACTIVE_CH_) -#define _PORTABLESERVER_POA_OBJECTALREADYACTIVE_CH_ - -class TAO_Export ObjectAlreadyActive : public CORBA::UserException -{ -public: - - -ObjectAlreadyActive (void); // default ctor -ObjectAlreadyActive (const ObjectAlreadyActive &); // copy ctor -~ObjectAlreadyActive (void); -ObjectAlreadyActive &operator= (const ObjectAlreadyActive &); - - -virtual void _raise (void); - -virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; -virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - -static ObjectAlreadyActive *_downcast (CORBA::Exception *); - - -// = TAO extension -static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::ObjectAlreadyActive - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA_OBJECTNOTACTIVE_CH_) -#define _PORTABLESERVER_POA_OBJECTNOTACTIVE_CH_ - -class TAO_Export ObjectNotActive : public CORBA::UserException -{ -public: - - -ObjectNotActive (void); // default ctor -ObjectNotActive (const ObjectNotActive &); // copy ctor -~ObjectNotActive (void); -ObjectNotActive &operator= (const ObjectNotActive &); - - -virtual void _raise (void); - -virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; -virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - -static ObjectNotActive *_downcast (CORBA::Exception *); - - -// = TAO extension -static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::ObjectNotActive - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA_SERVANTALREADYACTIVE_CH_) -#define _PORTABLESERVER_POA_SERVANTALREADYACTIVE_CH_ - -class TAO_Export ServantAlreadyActive : public CORBA::UserException -{ -public: - - -ServantAlreadyActive (void); // default ctor -ServantAlreadyActive (const ServantAlreadyActive &); // copy ctor -~ServantAlreadyActive (void); -ServantAlreadyActive &operator= (const ServantAlreadyActive &); - - -virtual void _raise (void); - -virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; -virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - -static ServantAlreadyActive *_downcast (CORBA::Exception *); - - -// = TAO extension -static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::ServantAlreadyActive - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA_SERVANTNOTACTIVE_CH_) -#define _PORTABLESERVER_POA_SERVANTNOTACTIVE_CH_ - -class TAO_Export ServantNotActive : public CORBA::UserException -{ -public: - - -ServantNotActive (void); // default ctor -ServantNotActive (const ServantNotActive &); // copy ctor -~ServantNotActive (void); -ServantNotActive &operator= (const ServantNotActive &); - - -virtual void _raise (void); - -virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; -virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - -static ServantNotActive *_downcast (CORBA::Exception *); - - -// = TAO extension -static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::ServantNotActive - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA_WRONGADAPTER_CH_) -#define _PORTABLESERVER_POA_WRONGADAPTER_CH_ - -class TAO_Export WrongAdapter : public CORBA::UserException -{ -public: - - -WrongAdapter (void); // default ctor -WrongAdapter (const WrongAdapter &); // copy ctor -~WrongAdapter (void); -WrongAdapter &operator= (const WrongAdapter &); - - -virtual void _raise (void); - -virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; -virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - -static WrongAdapter *_downcast (CORBA::Exception *); - - -// = TAO extension -static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::WrongAdapter - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA_WRONGPOLICY_CH_) -#define _PORTABLESERVER_POA_WRONGPOLICY_CH_ - -class TAO_Export WrongPolicy : public CORBA::UserException -{ -public: - - -WrongPolicy (void); // default ctor -WrongPolicy (const WrongPolicy &); // copy ctor -~WrongPolicy (void); -WrongPolicy &operator= (const WrongPolicy &); - - -virtual void _raise (void); - -virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; -virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - -static WrongPolicy *_downcast (CORBA::Exception *); - - -// = TAO extension -static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::POA::WrongPolicy - - -#endif /* end #if !defined */ - -virtual PortableServer::POA_ptr create_POA ( - const char * adapter_name, - PortableServer::POAManager_ptr a_POAManager, - const CORBA::PolicyList & policies, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::AdapterAlreadyExists, - PortableServer::POA::InvalidPolicy - )) = 0; - -virtual PortableServer::POA_ptr find_POA ( - const char * adapter_name, - CORBA::Boolean activate_it, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::AdapterNonExistent - )) = 0; - -virtual void destroy ( - CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -#if (TAO_HAS_MINIMUM_POA == 0) - -virtual PortableServer::ThreadPolicy_ptr create_thread_policy ( - PortableServer::ThreadPolicyValue value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -virtual PortableServer::LifespanPolicy_ptr create_lifespan_policy ( - PortableServer::LifespanPolicyValue value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy ( - PortableServer::IdUniquenessPolicyValue value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy ( - PortableServer::IdAssignmentPolicyValue value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -#if (TAO_HAS_MINIMUM_POA == 0) - -virtual PortableServer::ImplicitActivationPolicy_ptr create_implicit_activation_policy ( - PortableServer::ImplicitActivationPolicyValue value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual PortableServer::ServantRetentionPolicy_ptr create_servant_retention_policy ( - PortableServer::ServantRetentionPolicyValue value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual PortableServer::RequestProcessingPolicy_ptr create_request_processing_policy ( - PortableServer::RequestProcessingPolicyValue value, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -virtual char * the_name ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual PortableServer::POA_ptr the_parent ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual PortableServer::POAList * the_children ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual PortableServer::POAManager_ptr the_POAManager ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -#if (TAO_HAS_MINIMUM_POA == 0) - -virtual PortableServer::AdapterActivator_ptr the_activator ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual void the_activator ( - PortableServer::AdapterActivator_ptr the_activator, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; - -virtual PortableServer::ServantManager_ptr get_servant_manager ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual void set_servant_manager ( - PortableServer::ServantManager_ptr imgr, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual PortableServer::Servant get_servant ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::NoServant, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual void set_servant ( - PortableServer::Servant p_servant, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::WrongPolicy - )) = 0; - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -virtual PortableServer::ObjectId * activate_object ( - PortableServer::Servant p_servant, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual void activate_object_with_id ( - const PortableServer::ObjectId & id, - PortableServer::Servant p_servant, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::ServantAlreadyActive, - PortableServer::POA::ObjectAlreadyActive, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual void deactivate_object ( - const PortableServer::ObjectId & oid, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual CORBA::Object_ptr create_reference ( - const char * intf, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual CORBA::Object_ptr create_reference_with_id ( - const PortableServer::ObjectId & oid, - const char * intf, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual PortableServer::ObjectId * servant_to_id ( - PortableServer::Servant p_servant, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual CORBA::Object_ptr servant_to_reference ( - PortableServer::Servant p_servant, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::ServantNotActive, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual PortableServer::Servant reference_to_servant ( - CORBA::Object_ptr reference, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual PortableServer::ObjectId * reference_to_id ( - CORBA::Object_ptr reference, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::WrongAdapter, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual PortableServer::Servant id_to_servant ( - const PortableServer::ObjectId & oid, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual CORBA::Object_ptr id_to_reference ( - const PortableServer::ObjectId & oid, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::POA::ObjectNotActive, - PortableServer::POA::WrongPolicy - )) = 0; - -virtual void *_tao_QueryInterface (ptr_arith_t type); - -virtual const char* _interface_repository_id (void) const; - -protected: - POA (void); - virtual ~POA (void); -private: - POA (const POA &); - void operator= (const POA &); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_CURRENT___PTR_CH_) -#define _PORTABLESERVER_CURRENT___PTR_CH_ - -class Current; -typedef Current *Current_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_CURRENT___VAR_CH_) -#define _PORTABLESERVER_CURRENT___VAR_CH_ - -class TAO_Export Current_var : public TAO_Base_var -{ -public: - Current_var (void); // default constructor - Current_var (Current_ptr p) : ptr_ (p) {} - Current_var (const Current_var &); // copy constructor - ~Current_var (void); // destructor - - Current_var &operator= (Current_ptr); - Current_var &operator= (const Current_var &); - Current_ptr operator-> (void) const; - - operator const Current_ptr &() const; - operator Current_ptr &(); - // in, inout, out, _retn - Current_ptr in (void) const; - Current_ptr &inout (void); - Current_ptr &out (void); - Current_ptr _retn (void); - Current_ptr ptr (void) const; - -private: - Current_ptr ptr_; - // Unimplemented - prevents widening assignment. - Current_var (const TAO_Base_var &rhs); - Current_var &operator= (const TAO_Base_var &rhs); -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_CURRENT___OUT_CH_) -#define _PORTABLESERVER_CURRENT___OUT_CH_ - -class TAO_Export Current_out -{ -public: - Current_out (Current_ptr &); - Current_out (Current_var &); - Current_out (const Current_out &); - Current_out &operator= (const Current_out &); - Current_out &operator= (const Current_var &); - Current_out &operator= (Current_ptr); - operator Current_ptr &(); - Current_ptr &ptr (void); - Current_ptr operator-> (void); - -private: - Current_ptr &ptr_; -}; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_CURRENT_CH_) -#define _PORTABLESERVER_CURRENT_CH_ - -class TAO_Export Current: public virtual CORBA::Current -{ -public: -#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef Current_ptr _ptr_type; - typedef Current_var _var_type; -#endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static Current_ptr _duplicate (Current_ptr obj); - static Current_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static Current_ptr _unchecked_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - static Current_ptr _nil (void) - { - return (Current_ptr)0; - } - - -#if !defined (_PORTABLESERVER_CURRENT_NOCONTEXT_CH_) -#define _PORTABLESERVER_CURRENT_NOCONTEXT_CH_ - - class TAO_Export NoContext : public CORBA::UserException - { - public: - - - NoContext (void); // default ctor - NoContext (const NoContext &); // copy ctor - ~NoContext (void); - NoContext &operator= (const NoContext &); - - - virtual void _raise (void); - - virtual void _tao_encode ( - TAO_OutputCDR &, - CORBA::Environment &) const; - virtual void _tao_decode ( - TAO_InputCDR &, - CORBA::Environment &); - - static NoContext *_downcast (CORBA::Exception *); - - - // = TAO extension - static CORBA::Exception *_alloc (void); - -}; // exception PortableServer::Current::NoContext - - -#endif /* end #if !defined */ - -virtual PortableServer::POA_ptr get_POA ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::Current::NoContext - )) = 0; - -virtual PortableServer::ObjectId * get_object_id ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) - ACE_THROW_SPEC (( - CORBA::SystemException, - PortableServer::Current::NoContext - )) = 0; - -virtual void *_tao_QueryInterface (ptr_arith_t type); - -virtual const char* _interface_repository_id (void) const; - -protected: - Current (void); - virtual ~Current (void); -private: - Current (const Current &); - void operator= (const Current &); -}; - - -#endif /* end #if !defined */ - - TAO_NAMESPACE_STORAGE_CLASS char *ObjectId_to_string (const PortableServer::ObjectId &id); - TAO_NAMESPACE_STORAGE_CLASS CORBA::WChar *ObjectId_to_wstring (const PortableServer::ObjectId &id); - TAO_NAMESPACE_STORAGE_CLASS PortableServer::ObjectId *string_to_ObjectId (const char *id); - TAO_NAMESPACE_STORAGE_CLASS PortableServer::ObjectId *wstring_to_ObjectId (const CORBA::WChar *id); - -} -TAO_NAMESPACE_CLOSE // module PortableServer - -TAO_Export void operator<<= (CORBA::Any &, const PortableServer::ObjectId &); // copying version -TAO_Export void operator<<= (CORBA::Any &, PortableServer::ObjectId*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableServer::ObjectId *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const PortableServer::ObjectId *&); - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -TAO_Export void operator<<= (CORBA::Any &, const PortableServer::ForwardRequest &); // copying version -TAO_Export void operator<<= (CORBA::Any &, PortableServer::ForwardRequest*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableServer::ForwardRequest *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const PortableServer::ForwardRequest *&); - -#endif /* TAO_HAS_MINIMUM_CORBA == 0 */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -TAO_Export void operator<<= (CORBA::Any &, PortableServer::ThreadPolicyValue); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableServer::ThreadPolicyValue &); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -TAO_Export void operator<<= (CORBA::Any &, PortableServer::LifespanPolicyValue); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableServer::LifespanPolicyValue &); -TAO_Export void operator<<= (CORBA::Any &, PortableServer::IdUniquenessPolicyValue); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableServer::IdUniquenessPolicyValue &); -TAO_Export void operator<<= (CORBA::Any &, PortableServer::IdAssignmentPolicyValue); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableServer::IdAssignmentPolicyValue &); - -#if (TAO_HAS_MINIMUM_POA == 0) - -TAO_Export void operator<<= (CORBA::Any &, PortableServer::ImplicitActivationPolicyValue); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableServer::ImplicitActivationPolicyValue &); -TAO_Export void operator<<= (CORBA::Any &, PortableServer::ServantRetentionPolicyValue); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableServer::ServantRetentionPolicyValue &); -TAO_Export void operator<<= (CORBA::Any &, PortableServer::RequestProcessingPolicyValue); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableServer::RequestProcessingPolicyValue &); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#ifndef __ACE_INLINE__ - - -#if !defined _TAO_CDR_OP_PortableServer_ObjectId_H_ -#define _TAO_CDR_OP_PortableServer_ObjectId_H_ - -TAO_Export CORBA::Boolean operator<< ( - TAO_OutputCDR &, - const PortableServer::ObjectId & - ); -TAO_Export CORBA::Boolean operator>> ( - TAO_InputCDR &, - PortableServer::ObjectId & - ); - -#endif /* _TAO_CDR_OP_PortableServer_ObjectId_H_ */ - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::ForwardRequest &); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::ForwardRequest &); - -#endif /* TAO_HAS_MINIMUM_CORBA == 0 */ - -# if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -TAO_Export ostream& operator<< (ostream &, const PortableServer::ForwardRequest &); - -#endif /* TAO_HAS_MINIMUM_CORBA == 0 */ - -# endif /* ACE_LACKS_IOSTREAM_TOTALLY */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::ThreadPolicyValue &); // -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::ThreadPolicyValue &); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::LifespanPolicyValue &); // -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::LifespanPolicyValue &); -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::IdUniquenessPolicyValue &); // -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::IdUniquenessPolicyValue &); -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::IdAssignmentPolicyValue &); // -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::IdAssignmentPolicyValue &); - -#if (TAO_HAS_MINIMUM_POA == 0) - -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::ImplicitActivationPolicyValue &); // -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::ImplicitActivationPolicyValue &); -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::ServantRetentionPolicyValue &); // -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::ServantRetentionPolicyValue &); -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::RequestProcessingPolicyValue &); // -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::RequestProcessingPolicyValue &); - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#endif /* __ACE_INLINE__ */ - - -#if defined (__ACE_INLINE__) -#include "PortableServerC.i" -#endif /* defined INLINE */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#include "ace/post.h" -#endif /* ifndef */ diff --git a/TAO/tao/PortableServerC.i b/TAO/tao/PortableServerC.i deleted file mode 100644 index df518014776..00000000000 --- a/TAO/tao/PortableServerC.i +++ /dev/null @@ -1,3211 +0,0 @@ -/* -*- C++ -*- $Id$ */ - -// ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* -// TAO and the TAO IDL Compiler have been developed by the Center for -// Distributed Object Computing at Washington University, St. Louis. -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - - -#if !defined (_PORTABLESERVER_POA___VAR_CI_) -#define _PORTABLESERVER_POA___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::POA_var -// ************************************************************* - -ACE_INLINE -PortableServer::POA_var::POA_var (void) // default constructor - : ptr_ (PortableServer::POA::_nil ()) -{} - -ACE_INLINE PortableServer::POA_ptr -PortableServer::POA_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::POA_var::POA_var (const PortableServer::POA_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (POA::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::POA_var::~POA_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::POA_var & -PortableServer::POA_var::operator= (PortableServer::POA_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::POA_var & -PortableServer::POA_var::operator= (const PortableServer::POA_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = PortableServer::POA::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::POA_var::operator const PortableServer::POA_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::POA_var::operator PortableServer::POA_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE PortableServer::POA_ptr -PortableServer::POA_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE PortableServer::POA_ptr -PortableServer::POA_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE PortableServer::POA_ptr & -PortableServer::POA_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE PortableServer::POA_ptr & -PortableServer::POA_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = PortableServer::POA::_nil (); - return this->ptr_; -} - -ACE_INLINE PortableServer::POA_ptr -PortableServer::POA_var::_retn (void) -{ - // yield ownership of managed obj reference - PortableServer::POA_ptr val = this->ptr_; - this->ptr_ = PortableServer::POA::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POA___OUT_CI_) -#define _PORTABLESERVER_POA___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::POA_out -// ************************************************************* - -ACE_INLINE -PortableServer::POA_out::POA_out (PortableServer::POA_ptr &p) - : ptr_ (p) -{ - this->ptr_ = PortableServer::POA::_nil (); -} - -ACE_INLINE -PortableServer::POA_out::POA_out (PortableServer::POA_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = PortableServer::POA::_nil (); -} - -ACE_INLINE -PortableServer::POA_out::POA_out (const PortableServer::POA_out &p) // copy constructor - : ptr_ (ACE_const_cast (PortableServer::POA_out&,p).ptr_) -{} - -ACE_INLINE PortableServer::POA_out & -PortableServer::POA_out::operator= (const PortableServer::POA_out &p) -{ - this->ptr_ = ACE_const_cast (PortableServer::POA_out&,p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::POA_out & -PortableServer::POA_out::operator= (const PortableServer::POA_var &p) -{ - this->ptr_ = PortableServer::POA::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::POA_out & -PortableServer::POA_out::operator= (PortableServer::POA_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::POA_out::operator PortableServer::POA_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE PortableServer::POA_ptr & -PortableServer::POA_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE PortableServer::POA_ptr -PortableServer::POA_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - - -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - -#if !defined (__TAO_UNBOUNDED_OBJECT_SEQUENCE_PORTABLESERVER_POALIST_CI_) -#define __TAO_UNBOUNDED_OBJECT_SEQUENCE_PORTABLESERVER_POALIST_CI_ - - ACE_INLINE PortableServer::POA ** - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::allocbuf (CORBA::ULong nelems) - { - PortableServer::POA **buf = 0; - - ACE_NEW_RETURN (buf, PortableServer::POA*[nelems], 0); - - for (CORBA::ULong i = 0; i < nelems; i++) - buf[i] = PortableServer::POA::_nil (); - - return buf; - } - - ACE_INLINE void - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::freebuf (PortableServer::POA **buffer) - { - if (buffer == 0) - return; - delete[] buffer; - } - - ACE_INLINE - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::_TAO_Unbounded_Object_Sequence_PortableServer_POAList (void) - { - } - - ACE_INLINE - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::_TAO_Unbounded_Object_Sequence_PortableServer_POAList (CORBA::ULong maximum) - : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Object_Sequence_PortableServer_POAList::allocbuf (maximum)) - { - } - - ACE_INLINE - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::_TAO_Unbounded_Object_Sequence_PortableServer_POAList (CORBA::ULong maximum, - CORBA::ULong length, - PortableServer::POA* *value, - CORBA::Boolean release) - : TAO_Unbounded_Base_Sequence (maximum, length, value, release) - { - } - - ACE_INLINE - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::_TAO_Unbounded_Object_Sequence_PortableServer_POAList(const _TAO_Unbounded_Object_Sequence_PortableServer_POAList &rhs) - : TAO_Unbounded_Base_Sequence (rhs) - { - if (rhs.buffer_ != 0) - { - PortableServer::POA **tmp1 = _TAO_Unbounded_Object_Sequence_PortableServer_POAList::allocbuf (this->maximum_); - PortableServer::POA ** const tmp2 = ACE_reinterpret_cast (PortableServer::POA ** ACE_CAST_CONST, rhs.buffer_); - - for (CORBA::ULong i = 0; i < rhs.length_; ++i) - tmp1[i] = PortableServer::POA::_duplicate (tmp2[i]); - - this->buffer_ = tmp1; - } - else - { - this->buffer_ = 0; - } - } - - ACE_INLINE PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList & - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::operator= (const _TAO_Unbounded_Object_Sequence_PortableServer_POAList &rhs) - { - if (this == &rhs) - return *this; - - if (this->release_) - { - PortableServer::POA **tmp = ACE_reinterpret_cast (PortableServer::POA **, this->buffer_); - - for (CORBA::ULong i = 0; i < this->length_; ++i) - { - CORBA::release (tmp[i]); - tmp[i] = PortableServer::POA::_nil (); - } - if (this->maximum_ < rhs.maximum_) - { - _TAO_Unbounded_Object_Sequence_PortableServer_POAList::freebuf (tmp); - this->buffer_ = _TAO_Unbounded_Object_Sequence_PortableServer_POAList::allocbuf (rhs.maximum_); - } - } - else - this->buffer_ = _TAO_Unbounded_Object_Sequence_PortableServer_POAList::allocbuf (rhs.maximum_); - - TAO_Unbounded_Base_Sequence::operator= (rhs); - - PortableServer::POA **tmp1 = ACE_reinterpret_cast (PortableServer::POA **, this->buffer_); - PortableServer::POA ** const tmp2 = ACE_reinterpret_cast (PortableServer::POA ** ACE_CAST_CONST, rhs.buffer_); - - for (CORBA::ULong i = 0; i < rhs.length_; ++i) - tmp1[i] = PortableServer::POA::_duplicate (tmp2[i]); - - return *this; - } - - ACE_INLINE TAO_Object_Manager - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::operator[] (CORBA::ULong index) const - // read-write accessor - { - ACE_ASSERT (index < this->maximum_); - PortableServer::POA ** const tmp = ACE_reinterpret_cast (PortableServer::POA ** ACE_CAST_CONST, this->buffer_); - return TAO_Object_Manager (tmp + index, this->release_); - } - - ACE_INLINE PortableServer::POA* * - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::get_buffer (CORBA::Boolean orphan) - { - PortableServer::POA **result = 0; - if (orphan == 0) - { - // We retain ownership. - if (this->buffer_ == 0) - { - result = _TAO_Unbounded_Object_Sequence_PortableServer_POAList::allocbuf (this->maximum_); - this->buffer_ = result; - this->release_ = 1; - } - else - { - result = ACE_reinterpret_cast (PortableServer::POA**, this->buffer_); - } - } - else // if (orphan == 1) - { - if (this->release_ != 0) - { - // We set the state back to default and relinquish - // ownership. - result = ACE_reinterpret_cast(PortableServer::POA**,this->buffer_); - this->maximum_ = 0; - this->length_ = 0; - this->buffer_ = 0; - this->release_ = 0; - } - } - return result; - } - - ACE_INLINE const PortableServer::POA* * - PortableServer::_TAO_Unbounded_Object_Sequence_PortableServer_POAList::get_buffer (void) const - { - return ACE_reinterpret_cast(const PortableServer::POA ** ACE_CAST_CONST, this->buffer_); - } - - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_PORTABLESERVER_POALIST_CI_) -#define _PORTABLESERVER_POALIST_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::POAList_var -// ************************************************************* - -ACE_INLINE -PortableServer::POAList_var::POAList_var (void) // default constructor - : ptr_ (0) -{} - -ACE_INLINE -PortableServer::POAList_var::POAList_var (POAList *p) - : ptr_ (p) -{} - -ACE_INLINE -PortableServer::POAList_var::POAList_var (const ::PortableServer::POAList_var &p) // copy constructor -{ - if (p.ptr_) - ACE_NEW (this->ptr_, ::PortableServer::POAList (*p.ptr_)); - else - this->ptr_ = 0; -} - -ACE_INLINE -PortableServer::POAList_var::~POAList_var (void) // destructor -{ - delete this->ptr_; -} - -ACE_INLINE PortableServer::POAList_var & -PortableServer::POAList_var::operator= (POAList *p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::POAList_var & -PortableServer::POAList_var::operator= (const ::PortableServer::POAList_var &p) // deep copy -{ - if (this != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::PortableServer::POAList (*p.ptr_), *this); - } - return *this; -} - -ACE_INLINE const ::PortableServer::POAList * -PortableServer::POAList_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAList * -PortableServer::POAList_var::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::POAList_var::operator const ::PortableServer::POAList &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE -PortableServer::POAList_var::operator ::PortableServer::POAList &() // cast -{ - return *this->ptr_; -} - -ACE_INLINE -PortableServer::POAList_var::operator ::PortableServer::POAList &() const // cast -{ - return *this->ptr_; -} - -// variable-size types only -ACE_INLINE -PortableServer::POAList_var::operator ::PortableServer::POAList *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE TAO_Object_Manager -PortableServer::POAList_var::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - -ACE_INLINE const ::PortableServer::POAList & -PortableServer::POAList_var::in (void) const -{ - return *this->ptr_; -} - -ACE_INLINE ::PortableServer::POAList & -PortableServer::POAList_var::inout (void) -{ - return *this->ptr_; -} - -// mapping for variable size -ACE_INLINE ::PortableServer::POAList *& -PortableServer::POAList_var::out (void) -{ - delete this->ptr_; - this->ptr_ = 0; - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAList * -PortableServer::POAList_var::_retn (void) -{ - ::PortableServer::POAList *tmp = this->ptr_; - this->ptr_ = 0; - return tmp; -} - -ACE_INLINE ::PortableServer::POAList * -PortableServer::POAList_var::ptr (void) const -{ - return this->ptr_; -} - -// ************************************************************* -// Inline operations for class PortableServer::POAList_out -// ************************************************************* - -ACE_INLINE -PortableServer::POAList_out::POAList_out (POAList *&p) - : ptr_ (p) -{ - this->ptr_ = 0; -} - -ACE_INLINE -PortableServer::POAList_out::POAList_out (POAList_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - delete this->ptr_; - this->ptr_ = 0; -} - -ACE_INLINE -PortableServer::POAList_out::POAList_out (const ::PortableServer::POAList_out &p) // copy constructor - : ptr_ (ACE_const_cast (POAList_out&, p).ptr_) -{} - -ACE_INLINE ::PortableServer::POAList_out & -PortableServer::POAList_out::operator= (const ::PortableServer::POAList_out &p) -{ - this->ptr_ = ACE_const_cast (POAList_out&, p).ptr_; - return *this; -} - -ACE_INLINE ::PortableServer::POAList_out & -PortableServer::POAList_out::operator= (POAList *p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::POAList_out::operator ::PortableServer::POAList *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAList *& -PortableServer::POAList_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAList * -PortableServer::POAList_out::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE TAO_Object_Manager -PortableServer::POAList_out::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_OBJECTID_CI_) -#define _PORTABLESERVER_OBJECTID_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ObjectId_var -// ************************************************************* - -ACE_INLINE -PortableServer::ObjectId_var::ObjectId_var (void) // default constructor - : ptr_ (0) -{} - -ACE_INLINE -PortableServer::ObjectId_var::ObjectId_var (ObjectId *p) - : ptr_ (p) -{} - -ACE_INLINE -PortableServer::ObjectId_var::ObjectId_var (const ::PortableServer::ObjectId_var &p) // copy constructor -{ - if (p.ptr_) - ACE_NEW (this->ptr_, ::PortableServer::ObjectId (*p.ptr_)); - else - this->ptr_ = 0; -} - -// fixed-size base types only -ACE_INLINE -PortableServer::ObjectId_var::ObjectId_var (const ::PortableServer::ObjectId &p) -{ - ACE_NEW (this->ptr_, ::PortableServer::ObjectId (p)); -} - -ACE_INLINE -PortableServer::ObjectId_var::~ObjectId_var (void) // destructor -{ - delete this->ptr_; -} - -ACE_INLINE PortableServer::ObjectId_var & -PortableServer::ObjectId_var::operator= (ObjectId *p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::ObjectId_var & -PortableServer::ObjectId_var::operator= (const ::PortableServer::ObjectId_var &p) // deep copy -{ - if (this != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::PortableServer::ObjectId (*p.ptr_), *this); - } - return *this; -} - -// fixed-size types only -ACE_INLINE ::PortableServer::ObjectId_var & -PortableServer::ObjectId_var::operator= (const ::PortableServer::ObjectId &p) -{ - if (this->ptr_ != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::PortableServer::ObjectId (p), *this); - } - return *this; -} - -ACE_INLINE const ::PortableServer::ObjectId * -PortableServer::ObjectId_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ObjectId * -PortableServer::ObjectId_var::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ObjectId_var::operator const ::PortableServer::ObjectId &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE -PortableServer::ObjectId_var::operator ::PortableServer::ObjectId &() // cast -{ - return *this->ptr_; -} - -ACE_INLINE -PortableServer::ObjectId_var::operator ::PortableServer::ObjectId &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE CORBA::Octet & -PortableServer::ObjectId_var::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - -ACE_INLINE const ::PortableServer::ObjectId & -PortableServer::ObjectId_var::in (void) const -{ - return *this->ptr_; -} - -ACE_INLINE ::PortableServer::ObjectId & -PortableServer::ObjectId_var::inout (void) -{ - return *this->ptr_; -} - -// mapping for variable size -ACE_INLINE ::PortableServer::ObjectId *& -PortableServer::ObjectId_var::out (void) -{ - delete this->ptr_; - this->ptr_ = 0; - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ObjectId * -PortableServer::ObjectId_var::_retn (void) -{ - ::PortableServer::ObjectId *tmp = this->ptr_; - this->ptr_ = 0; - return tmp; -} - -ACE_INLINE ::PortableServer::ObjectId * -PortableServer::ObjectId_var::ptr (void) const -{ - return this->ptr_; -} - -// ************************************************************* -// Inline operations for class PortableServer::ObjectId_out -// ************************************************************* - -ACE_INLINE -PortableServer::ObjectId_out::ObjectId_out (ObjectId *&p) - : ptr_ (p) -{ - this->ptr_ = 0; -} - -ACE_INLINE -PortableServer::ObjectId_out::ObjectId_out (ObjectId_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - delete this->ptr_; - this->ptr_ = 0; -} - -ACE_INLINE -PortableServer::ObjectId_out::ObjectId_out (const ::PortableServer::ObjectId_out &p) // copy constructor - : ptr_ (ACE_const_cast (ObjectId_out&, p).ptr_) -{} - -ACE_INLINE ::PortableServer::ObjectId_out & -PortableServer::ObjectId_out::operator= (const ::PortableServer::ObjectId_out &p) -{ - this->ptr_ = ACE_const_cast (ObjectId_out&, p).ptr_; - return *this; -} - -ACE_INLINE ::PortableServer::ObjectId_out & -PortableServer::ObjectId_out::operator= (ObjectId *p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::ObjectId_out::operator ::PortableServer::ObjectId *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ObjectId *& -PortableServer::ObjectId_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ObjectId * -PortableServer::ObjectId_out::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE CORBA::Octet & -PortableServer::ObjectId_out::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - - -#endif /* end #if !defined */ - -// ************************************************************* -// Inline operations for exception PortableServer::ForwardRequest -// ************************************************************* - - -#if (TAO_HAS_MINIMUM_POA == 0) - -#if !defined (_PORTABLESERVER_THREADPOLICY___VAR_CI_) -#define _PORTABLESERVER_THREADPOLICY___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ThreadPolicy_var -// ************************************************************* - -ACE_INLINE -PortableServer::ThreadPolicy_var::ThreadPolicy_var (void) // default constructor - : ptr_ (ThreadPolicy::_nil ()) -{} - -ACE_INLINE ::PortableServer::ThreadPolicy_ptr -PortableServer::ThreadPolicy_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ThreadPolicy_var::ThreadPolicy_var (const ::PortableServer::ThreadPolicy_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (ThreadPolicy::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::ThreadPolicy_var::~ThreadPolicy_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::ThreadPolicy_var & -PortableServer::ThreadPolicy_var::operator= (ThreadPolicy_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::ThreadPolicy_var & -PortableServer::ThreadPolicy_var::operator= (const ::PortableServer::ThreadPolicy_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ThreadPolicy::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::ThreadPolicy_var::operator const ::PortableServer::ThreadPolicy_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ThreadPolicy_var::operator ::PortableServer::ThreadPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ThreadPolicy_ptr -PortableServer::ThreadPolicy_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ThreadPolicy_ptr -PortableServer::ThreadPolicy_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ThreadPolicy_ptr & -PortableServer::ThreadPolicy_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ThreadPolicy_ptr & -PortableServer::ThreadPolicy_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ThreadPolicy::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ThreadPolicy_ptr -PortableServer::ThreadPolicy_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::ThreadPolicy_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::ThreadPolicy::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_THREADPOLICY___OUT_CI_) -#define _PORTABLESERVER_THREADPOLICY___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ThreadPolicy_out -// ************************************************************* - -ACE_INLINE -PortableServer::ThreadPolicy_out::ThreadPolicy_out (ThreadPolicy_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::ThreadPolicy::_nil (); -} - -ACE_INLINE -PortableServer::ThreadPolicy_out::ThreadPolicy_out (ThreadPolicy_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ThreadPolicy::_nil (); -} - -ACE_INLINE -PortableServer::ThreadPolicy_out::ThreadPolicy_out (const ::PortableServer::ThreadPolicy_out &p) // copy constructor - : ptr_ (ACE_const_cast (ThreadPolicy_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::ThreadPolicy_out & -PortableServer::ThreadPolicy_out::operator= (const ::PortableServer::ThreadPolicy_out &p) -{ - this->ptr_ = ACE_const_cast (ThreadPolicy_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::ThreadPolicy_out & -PortableServer::ThreadPolicy_out::operator= (const ::PortableServer::ThreadPolicy_var &p) -{ - this->ptr_ = ::PortableServer::ThreadPolicy::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::ThreadPolicy_out & -PortableServer::ThreadPolicy_out::operator= (ThreadPolicy_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::ThreadPolicy_out::operator ::PortableServer::ThreadPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ThreadPolicy_ptr & -PortableServer::ThreadPolicy_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ThreadPolicy_ptr -PortableServer::ThreadPolicy_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -#if !defined (_PORTABLESERVER_LIFESPANPOLICY___VAR_CI_) -#define _PORTABLESERVER_LIFESPANPOLICY___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::LifespanPolicy_var -// ************************************************************* - -ACE_INLINE -PortableServer::LifespanPolicy_var::LifespanPolicy_var (void) // default constructor - : ptr_ (LifespanPolicy::_nil ()) -{} - -ACE_INLINE ::PortableServer::LifespanPolicy_ptr -PortableServer::LifespanPolicy_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::LifespanPolicy_var::LifespanPolicy_var (const ::PortableServer::LifespanPolicy_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (LifespanPolicy::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::LifespanPolicy_var::~LifespanPolicy_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::LifespanPolicy_var & -PortableServer::LifespanPolicy_var::operator= (LifespanPolicy_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::LifespanPolicy_var & -PortableServer::LifespanPolicy_var::operator= (const ::PortableServer::LifespanPolicy_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::LifespanPolicy::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::LifespanPolicy_var::operator const ::PortableServer::LifespanPolicy_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::LifespanPolicy_var::operator ::PortableServer::LifespanPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::LifespanPolicy_ptr -PortableServer::LifespanPolicy_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::LifespanPolicy_ptr -PortableServer::LifespanPolicy_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::LifespanPolicy_ptr & -PortableServer::LifespanPolicy_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::LifespanPolicy_ptr & -PortableServer::LifespanPolicy_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::LifespanPolicy::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::LifespanPolicy_ptr -PortableServer::LifespanPolicy_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::LifespanPolicy_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::LifespanPolicy::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_LIFESPANPOLICY___OUT_CI_) -#define _PORTABLESERVER_LIFESPANPOLICY___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::LifespanPolicy_out -// ************************************************************* - -ACE_INLINE -PortableServer::LifespanPolicy_out::LifespanPolicy_out (LifespanPolicy_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::LifespanPolicy::_nil (); -} - -ACE_INLINE -PortableServer::LifespanPolicy_out::LifespanPolicy_out (LifespanPolicy_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::LifespanPolicy::_nil (); -} - -ACE_INLINE -PortableServer::LifespanPolicy_out::LifespanPolicy_out (const ::PortableServer::LifespanPolicy_out &p) // copy constructor - : ptr_ (ACE_const_cast (LifespanPolicy_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::LifespanPolicy_out & -PortableServer::LifespanPolicy_out::operator= (const ::PortableServer::LifespanPolicy_out &p) -{ - this->ptr_ = ACE_const_cast (LifespanPolicy_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::LifespanPolicy_out & -PortableServer::LifespanPolicy_out::operator= (const ::PortableServer::LifespanPolicy_var &p) -{ - this->ptr_ = ::PortableServer::LifespanPolicy::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::LifespanPolicy_out & -PortableServer::LifespanPolicy_out::operator= (LifespanPolicy_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::LifespanPolicy_out::operator ::PortableServer::LifespanPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::LifespanPolicy_ptr & -PortableServer::LifespanPolicy_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::LifespanPolicy_ptr -PortableServer::LifespanPolicy_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDUNIQUENESSPOLICY___VAR_CI_) -#define _PORTABLESERVER_IDUNIQUENESSPOLICY___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::IdUniquenessPolicy_var -// ************************************************************* - -ACE_INLINE -PortableServer::IdUniquenessPolicy_var::IdUniquenessPolicy_var (void) // default constructor - : ptr_ (IdUniquenessPolicy::_nil ()) -{} - -ACE_INLINE ::PortableServer::IdUniquenessPolicy_ptr -PortableServer::IdUniquenessPolicy_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::IdUniquenessPolicy_var::IdUniquenessPolicy_var (const ::PortableServer::IdUniquenessPolicy_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (IdUniquenessPolicy::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::IdUniquenessPolicy_var::~IdUniquenessPolicy_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::IdUniquenessPolicy_var & -PortableServer::IdUniquenessPolicy_var::operator= (IdUniquenessPolicy_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::IdUniquenessPolicy_var & -PortableServer::IdUniquenessPolicy_var::operator= (const ::PortableServer::IdUniquenessPolicy_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::IdUniquenessPolicy::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::IdUniquenessPolicy_var::operator const ::PortableServer::IdUniquenessPolicy_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::IdUniquenessPolicy_var::operator ::PortableServer::IdUniquenessPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdUniquenessPolicy_ptr -PortableServer::IdUniquenessPolicy_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdUniquenessPolicy_ptr -PortableServer::IdUniquenessPolicy_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdUniquenessPolicy_ptr & -PortableServer::IdUniquenessPolicy_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdUniquenessPolicy_ptr & -PortableServer::IdUniquenessPolicy_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::IdUniquenessPolicy::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdUniquenessPolicy_ptr -PortableServer::IdUniquenessPolicy_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::IdUniquenessPolicy_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::IdUniquenessPolicy::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDUNIQUENESSPOLICY___OUT_CI_) -#define _PORTABLESERVER_IDUNIQUENESSPOLICY___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::IdUniquenessPolicy_out -// ************************************************************* - -ACE_INLINE -PortableServer::IdUniquenessPolicy_out::IdUniquenessPolicy_out (IdUniquenessPolicy_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::IdUniquenessPolicy::_nil (); -} - -ACE_INLINE -PortableServer::IdUniquenessPolicy_out::IdUniquenessPolicy_out (IdUniquenessPolicy_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::IdUniquenessPolicy::_nil (); -} - -ACE_INLINE -PortableServer::IdUniquenessPolicy_out::IdUniquenessPolicy_out (const ::PortableServer::IdUniquenessPolicy_out &p) // copy constructor - : ptr_ (ACE_const_cast (IdUniquenessPolicy_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::IdUniquenessPolicy_out & -PortableServer::IdUniquenessPolicy_out::operator= (const ::PortableServer::IdUniquenessPolicy_out &p) -{ - this->ptr_ = ACE_const_cast (IdUniquenessPolicy_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::IdUniquenessPolicy_out & -PortableServer::IdUniquenessPolicy_out::operator= (const ::PortableServer::IdUniquenessPolicy_var &p) -{ - this->ptr_ = ::PortableServer::IdUniquenessPolicy::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::IdUniquenessPolicy_out & -PortableServer::IdUniquenessPolicy_out::operator= (IdUniquenessPolicy_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::IdUniquenessPolicy_out::operator ::PortableServer::IdUniquenessPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdUniquenessPolicy_ptr & -PortableServer::IdUniquenessPolicy_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdUniquenessPolicy_ptr -PortableServer::IdUniquenessPolicy_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDASSIGNMENTPOLICY___VAR_CI_) -#define _PORTABLESERVER_IDASSIGNMENTPOLICY___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::IdAssignmentPolicy_var -// ************************************************************* - -ACE_INLINE -PortableServer::IdAssignmentPolicy_var::IdAssignmentPolicy_var (void) // default constructor - : ptr_ (IdAssignmentPolicy::_nil ()) -{} - -ACE_INLINE ::PortableServer::IdAssignmentPolicy_ptr -PortableServer::IdAssignmentPolicy_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::IdAssignmentPolicy_var::IdAssignmentPolicy_var (const ::PortableServer::IdAssignmentPolicy_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (IdAssignmentPolicy::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::IdAssignmentPolicy_var::~IdAssignmentPolicy_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::IdAssignmentPolicy_var & -PortableServer::IdAssignmentPolicy_var::operator= (IdAssignmentPolicy_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::IdAssignmentPolicy_var & -PortableServer::IdAssignmentPolicy_var::operator= (const ::PortableServer::IdAssignmentPolicy_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::IdAssignmentPolicy::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::IdAssignmentPolicy_var::operator const ::PortableServer::IdAssignmentPolicy_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::IdAssignmentPolicy_var::operator ::PortableServer::IdAssignmentPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdAssignmentPolicy_ptr -PortableServer::IdAssignmentPolicy_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdAssignmentPolicy_ptr -PortableServer::IdAssignmentPolicy_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdAssignmentPolicy_ptr & -PortableServer::IdAssignmentPolicy_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdAssignmentPolicy_ptr & -PortableServer::IdAssignmentPolicy_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::IdAssignmentPolicy::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdAssignmentPolicy_ptr -PortableServer::IdAssignmentPolicy_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::IdAssignmentPolicy_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::IdAssignmentPolicy::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IDASSIGNMENTPOLICY___OUT_CI_) -#define _PORTABLESERVER_IDASSIGNMENTPOLICY___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::IdAssignmentPolicy_out -// ************************************************************* - -ACE_INLINE -PortableServer::IdAssignmentPolicy_out::IdAssignmentPolicy_out (IdAssignmentPolicy_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::IdAssignmentPolicy::_nil (); -} - -ACE_INLINE -PortableServer::IdAssignmentPolicy_out::IdAssignmentPolicy_out (IdAssignmentPolicy_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::IdAssignmentPolicy::_nil (); -} - -ACE_INLINE -PortableServer::IdAssignmentPolicy_out::IdAssignmentPolicy_out (const ::PortableServer::IdAssignmentPolicy_out &p) // copy constructor - : ptr_ (ACE_const_cast (IdAssignmentPolicy_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::IdAssignmentPolicy_out & -PortableServer::IdAssignmentPolicy_out::operator= (const ::PortableServer::IdAssignmentPolicy_out &p) -{ - this->ptr_ = ACE_const_cast (IdAssignmentPolicy_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::IdAssignmentPolicy_out & -PortableServer::IdAssignmentPolicy_out::operator= (const ::PortableServer::IdAssignmentPolicy_var &p) -{ - this->ptr_ = ::PortableServer::IdAssignmentPolicy::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::IdAssignmentPolicy_out & -PortableServer::IdAssignmentPolicy_out::operator= (IdAssignmentPolicy_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::IdAssignmentPolicy_out::operator ::PortableServer::IdAssignmentPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdAssignmentPolicy_ptr & -PortableServer::IdAssignmentPolicy_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::IdAssignmentPolicy_ptr -PortableServer::IdAssignmentPolicy_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -#if !defined (_PORTABLESERVER_IMPLICITACTIVATIONPOLICY___VAR_CI_) -#define _PORTABLESERVER_IMPLICITACTIVATIONPOLICY___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ImplicitActivationPolicy_var -// ************************************************************* - -ACE_INLINE -PortableServer::ImplicitActivationPolicy_var::ImplicitActivationPolicy_var (void) // default constructor - : ptr_ (ImplicitActivationPolicy::_nil ()) -{} - -ACE_INLINE ::PortableServer::ImplicitActivationPolicy_ptr -PortableServer::ImplicitActivationPolicy_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ImplicitActivationPolicy_var::ImplicitActivationPolicy_var (const ::PortableServer::ImplicitActivationPolicy_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (ImplicitActivationPolicy::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::ImplicitActivationPolicy_var::~ImplicitActivationPolicy_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::ImplicitActivationPolicy_var & -PortableServer::ImplicitActivationPolicy_var::operator= (ImplicitActivationPolicy_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::ImplicitActivationPolicy_var & -PortableServer::ImplicitActivationPolicy_var::operator= (const ::PortableServer::ImplicitActivationPolicy_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ImplicitActivationPolicy::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::ImplicitActivationPolicy_var::operator const ::PortableServer::ImplicitActivationPolicy_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ImplicitActivationPolicy_var::operator ::PortableServer::ImplicitActivationPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ImplicitActivationPolicy_ptr -PortableServer::ImplicitActivationPolicy_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ImplicitActivationPolicy_ptr -PortableServer::ImplicitActivationPolicy_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ImplicitActivationPolicy_ptr & -PortableServer::ImplicitActivationPolicy_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ImplicitActivationPolicy_ptr & -PortableServer::ImplicitActivationPolicy_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ImplicitActivationPolicy::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ImplicitActivationPolicy_ptr -PortableServer::ImplicitActivationPolicy_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::ImplicitActivationPolicy_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::ImplicitActivationPolicy::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_IMPLICITACTIVATIONPOLICY___OUT_CI_) -#define _PORTABLESERVER_IMPLICITACTIVATIONPOLICY___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ImplicitActivationPolicy_out -// ************************************************************* - -ACE_INLINE -PortableServer::ImplicitActivationPolicy_out::ImplicitActivationPolicy_out (ImplicitActivationPolicy_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::ImplicitActivationPolicy::_nil (); -} - -ACE_INLINE -PortableServer::ImplicitActivationPolicy_out::ImplicitActivationPolicy_out (ImplicitActivationPolicy_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ImplicitActivationPolicy::_nil (); -} - -ACE_INLINE -PortableServer::ImplicitActivationPolicy_out::ImplicitActivationPolicy_out (const ::PortableServer::ImplicitActivationPolicy_out &p) // copy constructor - : ptr_ (ACE_const_cast (ImplicitActivationPolicy_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::ImplicitActivationPolicy_out & -PortableServer::ImplicitActivationPolicy_out::operator= (const ::PortableServer::ImplicitActivationPolicy_out &p) -{ - this->ptr_ = ACE_const_cast (ImplicitActivationPolicy_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::ImplicitActivationPolicy_out & -PortableServer::ImplicitActivationPolicy_out::operator= (const ::PortableServer::ImplicitActivationPolicy_var &p) -{ - this->ptr_ = ::PortableServer::ImplicitActivationPolicy::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::ImplicitActivationPolicy_out & -PortableServer::ImplicitActivationPolicy_out::operator= (ImplicitActivationPolicy_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::ImplicitActivationPolicy_out::operator ::PortableServer::ImplicitActivationPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ImplicitActivationPolicy_ptr & -PortableServer::ImplicitActivationPolicy_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ImplicitActivationPolicy_ptr -PortableServer::ImplicitActivationPolicy_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTRETENTIONPOLICY___VAR_CI_) -#define _PORTABLESERVER_SERVANTRETENTIONPOLICY___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ServantRetentionPolicy_var -// ************************************************************* - -ACE_INLINE -PortableServer::ServantRetentionPolicy_var::ServantRetentionPolicy_var (void) // default constructor - : ptr_ (ServantRetentionPolicy::_nil ()) -{} - -ACE_INLINE ::PortableServer::ServantRetentionPolicy_ptr -PortableServer::ServantRetentionPolicy_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ServantRetentionPolicy_var::ServantRetentionPolicy_var (const ::PortableServer::ServantRetentionPolicy_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (ServantRetentionPolicy::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::ServantRetentionPolicy_var::~ServantRetentionPolicy_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::ServantRetentionPolicy_var & -PortableServer::ServantRetentionPolicy_var::operator= (ServantRetentionPolicy_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::ServantRetentionPolicy_var & -PortableServer::ServantRetentionPolicy_var::operator= (const ::PortableServer::ServantRetentionPolicy_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantRetentionPolicy::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::ServantRetentionPolicy_var::operator const ::PortableServer::ServantRetentionPolicy_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ServantRetentionPolicy_var::operator ::PortableServer::ServantRetentionPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantRetentionPolicy_ptr -PortableServer::ServantRetentionPolicy_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantRetentionPolicy_ptr -PortableServer::ServantRetentionPolicy_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantRetentionPolicy_ptr & -PortableServer::ServantRetentionPolicy_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantRetentionPolicy_ptr & -PortableServer::ServantRetentionPolicy_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantRetentionPolicy::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantRetentionPolicy_ptr -PortableServer::ServantRetentionPolicy_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::ServantRetentionPolicy_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::ServantRetentionPolicy::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTRETENTIONPOLICY___OUT_CI_) -#define _PORTABLESERVER_SERVANTRETENTIONPOLICY___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ServantRetentionPolicy_out -// ************************************************************* - -ACE_INLINE -PortableServer::ServantRetentionPolicy_out::ServantRetentionPolicy_out (ServantRetentionPolicy_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::ServantRetentionPolicy::_nil (); -} - -ACE_INLINE -PortableServer::ServantRetentionPolicy_out::ServantRetentionPolicy_out (ServantRetentionPolicy_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantRetentionPolicy::_nil (); -} - -ACE_INLINE -PortableServer::ServantRetentionPolicy_out::ServantRetentionPolicy_out (const ::PortableServer::ServantRetentionPolicy_out &p) // copy constructor - : ptr_ (ACE_const_cast (ServantRetentionPolicy_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::ServantRetentionPolicy_out & -PortableServer::ServantRetentionPolicy_out::operator= (const ::PortableServer::ServantRetentionPolicy_out &p) -{ - this->ptr_ = ACE_const_cast (ServantRetentionPolicy_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::ServantRetentionPolicy_out & -PortableServer::ServantRetentionPolicy_out::operator= (const ::PortableServer::ServantRetentionPolicy_var &p) -{ - this->ptr_ = ::PortableServer::ServantRetentionPolicy::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::ServantRetentionPolicy_out & -PortableServer::ServantRetentionPolicy_out::operator= (ServantRetentionPolicy_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::ServantRetentionPolicy_out::operator ::PortableServer::ServantRetentionPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantRetentionPolicy_ptr & -PortableServer::ServantRetentionPolicy_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantRetentionPolicy_ptr -PortableServer::ServantRetentionPolicy_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_REQUESTPROCESSINGPOLICY___VAR_CI_) -#define _PORTABLESERVER_REQUESTPROCESSINGPOLICY___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::RequestProcessingPolicy_var -// ************************************************************* - -ACE_INLINE -PortableServer::RequestProcessingPolicy_var::RequestProcessingPolicy_var (void) // default constructor - : ptr_ (RequestProcessingPolicy::_nil ()) -{} - -ACE_INLINE ::PortableServer::RequestProcessingPolicy_ptr -PortableServer::RequestProcessingPolicy_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::RequestProcessingPolicy_var::RequestProcessingPolicy_var (const ::PortableServer::RequestProcessingPolicy_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (RequestProcessingPolicy::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::RequestProcessingPolicy_var::~RequestProcessingPolicy_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::RequestProcessingPolicy_var & -PortableServer::RequestProcessingPolicy_var::operator= (RequestProcessingPolicy_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::RequestProcessingPolicy_var & -PortableServer::RequestProcessingPolicy_var::operator= (const ::PortableServer::RequestProcessingPolicy_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::RequestProcessingPolicy::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::RequestProcessingPolicy_var::operator const ::PortableServer::RequestProcessingPolicy_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::RequestProcessingPolicy_var::operator ::PortableServer::RequestProcessingPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::RequestProcessingPolicy_ptr -PortableServer::RequestProcessingPolicy_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::RequestProcessingPolicy_ptr -PortableServer::RequestProcessingPolicy_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::RequestProcessingPolicy_ptr & -PortableServer::RequestProcessingPolicy_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::RequestProcessingPolicy_ptr & -PortableServer::RequestProcessingPolicy_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::RequestProcessingPolicy::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::RequestProcessingPolicy_ptr -PortableServer::RequestProcessingPolicy_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::RequestProcessingPolicy_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::RequestProcessingPolicy::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_REQUESTPROCESSINGPOLICY___OUT_CI_) -#define _PORTABLESERVER_REQUESTPROCESSINGPOLICY___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::RequestProcessingPolicy_out -// ************************************************************* - -ACE_INLINE -PortableServer::RequestProcessingPolicy_out::RequestProcessingPolicy_out (RequestProcessingPolicy_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::RequestProcessingPolicy::_nil (); -} - -ACE_INLINE -PortableServer::RequestProcessingPolicy_out::RequestProcessingPolicy_out (RequestProcessingPolicy_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::RequestProcessingPolicy::_nil (); -} - -ACE_INLINE -PortableServer::RequestProcessingPolicy_out::RequestProcessingPolicy_out (const ::PortableServer::RequestProcessingPolicy_out &p) // copy constructor - : ptr_ (ACE_const_cast (RequestProcessingPolicy_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::RequestProcessingPolicy_out & -PortableServer::RequestProcessingPolicy_out::operator= (const ::PortableServer::RequestProcessingPolicy_out &p) -{ - this->ptr_ = ACE_const_cast (RequestProcessingPolicy_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::RequestProcessingPolicy_out & -PortableServer::RequestProcessingPolicy_out::operator= (const ::PortableServer::RequestProcessingPolicy_var &p) -{ - this->ptr_ = ::PortableServer::RequestProcessingPolicy::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::RequestProcessingPolicy_out & -PortableServer::RequestProcessingPolicy_out::operator= (RequestProcessingPolicy_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::RequestProcessingPolicy_out::operator ::PortableServer::RequestProcessingPolicy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::RequestProcessingPolicy_ptr & -PortableServer::RequestProcessingPolicy_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::RequestProcessingPolicy_ptr -PortableServer::RequestProcessingPolicy_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -// ************************************************************* -// Inline operations for exception PortableServer::POAManager::AdapterInactive -// ************************************************************* - - -#if !defined (_PORTABLESERVER_POAMANAGER___VAR_CI_) -#define _PORTABLESERVER_POAMANAGER___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::POAManager_var -// ************************************************************* - -ACE_INLINE -PortableServer::POAManager_var::POAManager_var (void) // default constructor - : ptr_ (POAManager::_nil ()) -{} - -ACE_INLINE ::PortableServer::POAManager_ptr -PortableServer::POAManager_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::POAManager_var::POAManager_var (const ::PortableServer::POAManager_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (POAManager::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::POAManager_var::~POAManager_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::POAManager_var & -PortableServer::POAManager_var::operator= (POAManager_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::POAManager_var & -PortableServer::POAManager_var::operator= (const ::PortableServer::POAManager_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::POAManager::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::POAManager_var::operator const ::PortableServer::POAManager_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::POAManager_var::operator ::PortableServer::POAManager_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAManager_ptr -PortableServer::POAManager_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAManager_ptr -PortableServer::POAManager_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAManager_ptr & -PortableServer::POAManager_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAManager_ptr & -PortableServer::POAManager_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::POAManager::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAManager_ptr -PortableServer::POAManager_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::POAManager_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::POAManager::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_POAMANAGER___OUT_CI_) -#define _PORTABLESERVER_POAMANAGER___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::POAManager_out -// ************************************************************* - -ACE_INLINE -PortableServer::POAManager_out::POAManager_out (POAManager_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::POAManager::_nil (); -} - -ACE_INLINE -PortableServer::POAManager_out::POAManager_out (POAManager_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::POAManager::_nil (); -} - -ACE_INLINE -PortableServer::POAManager_out::POAManager_out (const ::PortableServer::POAManager_out &p) // copy constructor - : ptr_ (ACE_const_cast (POAManager_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::POAManager_out & -PortableServer::POAManager_out::operator= (const ::PortableServer::POAManager_out &p) -{ - this->ptr_ = ACE_const_cast (POAManager_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::POAManager_out & -PortableServer::POAManager_out::operator= (const ::PortableServer::POAManager_var &p) -{ - this->ptr_ = ::PortableServer::POAManager::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::POAManager_out & -PortableServer::POAManager_out::operator= (POAManager_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::POAManager_out::operator ::PortableServer::POAManager_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAManager_ptr & -PortableServer::POAManager_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::POAManager_ptr -PortableServer::POAManager_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -#if !defined (_PORTABLESERVER_ADAPTERACTIVATOR___VAR_CI_) -#define _PORTABLESERVER_ADAPTERACTIVATOR___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::AdapterActivator_var -// ************************************************************* - -ACE_INLINE -PortableServer::AdapterActivator_var::AdapterActivator_var (void) // default constructor - : ptr_ (AdapterActivator::_nil ()) -{} - -ACE_INLINE ::PortableServer::AdapterActivator_ptr -PortableServer::AdapterActivator_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::AdapterActivator_var::AdapterActivator_var (const ::PortableServer::AdapterActivator_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (AdapterActivator::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::AdapterActivator_var::~AdapterActivator_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::AdapterActivator_var & -PortableServer::AdapterActivator_var::operator= (AdapterActivator_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::AdapterActivator_var & -PortableServer::AdapterActivator_var::operator= (const ::PortableServer::AdapterActivator_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::AdapterActivator::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::AdapterActivator_var::operator const ::PortableServer::AdapterActivator_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::AdapterActivator_var::operator ::PortableServer::AdapterActivator_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::AdapterActivator_ptr -PortableServer::AdapterActivator_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::AdapterActivator_ptr -PortableServer::AdapterActivator_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::AdapterActivator_ptr & -PortableServer::AdapterActivator_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::AdapterActivator_ptr & -PortableServer::AdapterActivator_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::AdapterActivator::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::AdapterActivator_ptr -PortableServer::AdapterActivator_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::AdapterActivator_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::AdapterActivator::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_ADAPTERACTIVATOR___OUT_CI_) -#define _PORTABLESERVER_ADAPTERACTIVATOR___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::AdapterActivator_out -// ************************************************************* - -ACE_INLINE -PortableServer::AdapterActivator_out::AdapterActivator_out (AdapterActivator_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::AdapterActivator::_nil (); -} - -ACE_INLINE -PortableServer::AdapterActivator_out::AdapterActivator_out (AdapterActivator_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::AdapterActivator::_nil (); -} - -ACE_INLINE -PortableServer::AdapterActivator_out::AdapterActivator_out (const ::PortableServer::AdapterActivator_out &p) // copy constructor - : ptr_ (ACE_const_cast (AdapterActivator_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::AdapterActivator_out & -PortableServer::AdapterActivator_out::operator= (const ::PortableServer::AdapterActivator_out &p) -{ - this->ptr_ = ACE_const_cast (AdapterActivator_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::AdapterActivator_out & -PortableServer::AdapterActivator_out::operator= (const ::PortableServer::AdapterActivator_var &p) -{ - this->ptr_ = ::PortableServer::AdapterActivator::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::AdapterActivator_out & -PortableServer::AdapterActivator_out::operator= (AdapterActivator_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::AdapterActivator_out::operator ::PortableServer::AdapterActivator_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::AdapterActivator_ptr & -PortableServer::AdapterActivator_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::AdapterActivator_ptr -PortableServer::AdapterActivator_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTMANAGER___VAR_CI_) -#define _PORTABLESERVER_SERVANTMANAGER___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ServantManager_var -// ************************************************************* - -ACE_INLINE -PortableServer::ServantManager_var::ServantManager_var (void) // default constructor - : ptr_ (ServantManager::_nil ()) -{} - -ACE_INLINE ::PortableServer::ServantManager_ptr -PortableServer::ServantManager_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ServantManager_var::ServantManager_var (const ::PortableServer::ServantManager_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (ServantManager::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::ServantManager_var::~ServantManager_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::ServantManager_var & -PortableServer::ServantManager_var::operator= (ServantManager_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::ServantManager_var & -PortableServer::ServantManager_var::operator= (const ::PortableServer::ServantManager_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantManager::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::ServantManager_var::operator const ::PortableServer::ServantManager_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ServantManager_var::operator ::PortableServer::ServantManager_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantManager_ptr -PortableServer::ServantManager_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantManager_ptr -PortableServer::ServantManager_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantManager_ptr & -PortableServer::ServantManager_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantManager_ptr & -PortableServer::ServantManager_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantManager::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantManager_ptr -PortableServer::ServantManager_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::ServantManager_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::ServantManager::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTMANAGER___OUT_CI_) -#define _PORTABLESERVER_SERVANTMANAGER___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ServantManager_out -// ************************************************************* - -ACE_INLINE -PortableServer::ServantManager_out::ServantManager_out (ServantManager_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::ServantManager::_nil (); -} - -ACE_INLINE -PortableServer::ServantManager_out::ServantManager_out (ServantManager_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantManager::_nil (); -} - -ACE_INLINE -PortableServer::ServantManager_out::ServantManager_out (const ::PortableServer::ServantManager_out &p) // copy constructor - : ptr_ (ACE_const_cast (ServantManager_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::ServantManager_out & -PortableServer::ServantManager_out::operator= (const ::PortableServer::ServantManager_out &p) -{ - this->ptr_ = ACE_const_cast (ServantManager_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::ServantManager_out & -PortableServer::ServantManager_out::operator= (const ::PortableServer::ServantManager_var &p) -{ - this->ptr_ = ::PortableServer::ServantManager::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::ServantManager_out & -PortableServer::ServantManager_out::operator= (ServantManager_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::ServantManager_out::operator ::PortableServer::ServantManager_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantManager_ptr & -PortableServer::ServantManager_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantManager_ptr -PortableServer::ServantManager_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTACTIVATOR___VAR_CI_) -#define _PORTABLESERVER_SERVANTACTIVATOR___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ServantActivator_var -// ************************************************************* - -ACE_INLINE -PortableServer::ServantActivator_var::ServantActivator_var (void) // default constructor - : ptr_ (ServantActivator::_nil ()) -{} - -ACE_INLINE ::PortableServer::ServantActivator_ptr -PortableServer::ServantActivator_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ServantActivator_var::ServantActivator_var (const ::PortableServer::ServantActivator_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (ServantActivator::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::ServantActivator_var::~ServantActivator_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::ServantActivator_var & -PortableServer::ServantActivator_var::operator= (ServantActivator_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::ServantActivator_var & -PortableServer::ServantActivator_var::operator= (const ::PortableServer::ServantActivator_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantActivator::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::ServantActivator_var::operator const ::PortableServer::ServantActivator_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ServantActivator_var::operator ::PortableServer::ServantActivator_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantActivator_ptr -PortableServer::ServantActivator_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantActivator_ptr -PortableServer::ServantActivator_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantActivator_ptr & -PortableServer::ServantActivator_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantActivator_ptr & -PortableServer::ServantActivator_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantActivator::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantActivator_ptr -PortableServer::ServantActivator_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::ServantActivator_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::ServantActivator::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTACTIVATOR___OUT_CI_) -#define _PORTABLESERVER_SERVANTACTIVATOR___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ServantActivator_out -// ************************************************************* - -ACE_INLINE -PortableServer::ServantActivator_out::ServantActivator_out (ServantActivator_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::ServantActivator::_nil (); -} - -ACE_INLINE -PortableServer::ServantActivator_out::ServantActivator_out (ServantActivator_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantActivator::_nil (); -} - -ACE_INLINE -PortableServer::ServantActivator_out::ServantActivator_out (const ::PortableServer::ServantActivator_out &p) // copy constructor - : ptr_ (ACE_const_cast (ServantActivator_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::ServantActivator_out & -PortableServer::ServantActivator_out::operator= (const ::PortableServer::ServantActivator_out &p) -{ - this->ptr_ = ACE_const_cast (ServantActivator_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::ServantActivator_out & -PortableServer::ServantActivator_out::operator= (const ::PortableServer::ServantActivator_var &p) -{ - this->ptr_ = ::PortableServer::ServantActivator::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::ServantActivator_out & -PortableServer::ServantActivator_out::operator= (ServantActivator_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::ServantActivator_out::operator ::PortableServer::ServantActivator_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantActivator_ptr & -PortableServer::ServantActivator_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantActivator_ptr -PortableServer::ServantActivator_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTLOCATOR___VAR_CI_) -#define _PORTABLESERVER_SERVANTLOCATOR___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ServantLocator_var -// ************************************************************* - -ACE_INLINE -PortableServer::ServantLocator_var::ServantLocator_var (void) // default constructor - : ptr_ (ServantLocator::_nil ()) -{} - -ACE_INLINE ::PortableServer::ServantLocator_ptr -PortableServer::ServantLocator_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ServantLocator_var::ServantLocator_var (const ::PortableServer::ServantLocator_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (ServantLocator::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::ServantLocator_var::~ServantLocator_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::ServantLocator_var & -PortableServer::ServantLocator_var::operator= (ServantLocator_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::ServantLocator_var & -PortableServer::ServantLocator_var::operator= (const ::PortableServer::ServantLocator_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantLocator::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::ServantLocator_var::operator const ::PortableServer::ServantLocator_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::ServantLocator_var::operator ::PortableServer::ServantLocator_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantLocator_ptr -PortableServer::ServantLocator_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantLocator_ptr -PortableServer::ServantLocator_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantLocator_ptr & -PortableServer::ServantLocator_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantLocator_ptr & -PortableServer::ServantLocator_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantLocator::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantLocator_ptr -PortableServer::ServantLocator_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::ServantLocator_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::ServantLocator::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_SERVANTLOCATOR___OUT_CI_) -#define _PORTABLESERVER_SERVANTLOCATOR___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::ServantLocator_out -// ************************************************************* - -ACE_INLINE -PortableServer::ServantLocator_out::ServantLocator_out (ServantLocator_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::ServantLocator::_nil (); -} - -ACE_INLINE -PortableServer::ServantLocator_out::ServantLocator_out (ServantLocator_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::ServantLocator::_nil (); -} - -ACE_INLINE -PortableServer::ServantLocator_out::ServantLocator_out (const ::PortableServer::ServantLocator_out &p) // copy constructor - : ptr_ (ACE_const_cast (ServantLocator_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::ServantLocator_out & -PortableServer::ServantLocator_out::operator= (const ::PortableServer::ServantLocator_out &p) -{ - this->ptr_ = ACE_const_cast (ServantLocator_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::ServantLocator_out & -PortableServer::ServantLocator_out::operator= (const ::PortableServer::ServantLocator_var &p) -{ - this->ptr_ = ::PortableServer::ServantLocator::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::ServantLocator_out & -PortableServer::ServantLocator_out::operator= (ServantLocator_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::ServantLocator_out::operator ::PortableServer::ServantLocator_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantLocator_ptr & -PortableServer::ServantLocator_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::ServantLocator_ptr -PortableServer::ServantLocator_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -// ************************************************************* -// Inline operations for exception PortableServer::POA::AdapterAlreadyExists -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::POA::AdapterNonExistent -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::POA::InvalidPolicy -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::POA::NoServant -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::POA::ObjectAlreadyActive -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::POA::ObjectNotActive -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::POA::ServantAlreadyActive -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::POA::ServantNotActive -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::POA::WrongAdapter -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::POA::WrongPolicy -// ************************************************************* - -// ************************************************************* -// Inline operations for exception PortableServer::Current::NoContext -// ************************************************************* - - -#if !defined (_PORTABLESERVER_CURRENT___VAR_CI_) -#define _PORTABLESERVER_CURRENT___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::Current_var -// ************************************************************* - -ACE_INLINE -PortableServer::Current_var::Current_var (void) // default constructor - : ptr_ (Current::_nil ()) -{} - -ACE_INLINE ::PortableServer::Current_ptr -PortableServer::Current_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::Current_var::Current_var (const ::PortableServer::Current_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (Current::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableServer::Current_var::~Current_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableServer::Current_var & -PortableServer::Current_var::operator= (Current_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableServer::Current_var & -PortableServer::Current_var::operator= (const ::PortableServer::Current_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::Current::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableServer::Current_var::operator const ::PortableServer::Current_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableServer::Current_var::operator ::PortableServer::Current_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::Current_ptr -PortableServer::Current_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::Current_ptr -PortableServer::Current_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::Current_ptr & -PortableServer::Current_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::Current_ptr & -PortableServer::Current_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::Current::_nil (); - return this->ptr_; -} - -ACE_INLINE ::PortableServer::Current_ptr -PortableServer::Current_var::_retn (void) -{ - // yield ownership of managed obj reference - ::PortableServer::Current_ptr val = this->ptr_; - this->ptr_ = ::PortableServer::Current::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLESERVER_CURRENT___OUT_CI_) -#define _PORTABLESERVER_CURRENT___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableServer::Current_out -// ************************************************************* - -ACE_INLINE -PortableServer::Current_out::Current_out (Current_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::PortableServer::Current::_nil (); -} - -ACE_INLINE -PortableServer::Current_out::Current_out (Current_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::PortableServer::Current::_nil (); -} - -ACE_INLINE -PortableServer::Current_out::Current_out (const ::PortableServer::Current_out &p) // copy constructor - : ptr_ (ACE_const_cast (Current_out &, p).ptr_) -{} - -ACE_INLINE ::PortableServer::Current_out & -PortableServer::Current_out::operator= (const ::PortableServer::Current_out &p) -{ - this->ptr_ = ACE_const_cast (Current_out&, p).ptr_; - return *this; -} - -ACE_INLINE PortableServer::Current_out & -PortableServer::Current_out::operator= (const ::PortableServer::Current_var &p) -{ - this->ptr_ = ::PortableServer::Current::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableServer::Current_out & -PortableServer::Current_out::operator= (Current_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableServer::Current_out::operator ::PortableServer::Current_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::Current_ptr & -PortableServer::Current_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::PortableServer::Current_ptr -PortableServer::Current_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -ACE_INLINE CORBA::Boolean -operator<< ( - TAO_OutputCDR &, - const PortableServer::POA_ptr - ); -ACE_INLINE CORBA::Boolean -operator>> ( - TAO_InputCDR &, - PortableServer::POA_ptr & - ); - -#if !defined _TAO_CDR_OP_PortableServer_ObjectId_I_ -#define _TAO_CDR_OP_PortableServer_ObjectId_I_ - -CORBA::Boolean TAO_Export operator<< ( - TAO_OutputCDR &, - const PortableServer::ObjectId & - ); -CORBA::Boolean TAO_Export operator>> ( - TAO_InputCDR &, - PortableServer::ObjectId & - ); - -#endif /* _TAO_CDR_OP_PortableServer_ObjectId_I_ */ - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const PortableServer::ForwardRequest &_tao_aggregate) -{ - // first marshal the repository ID - if (strm << _tao_aggregate._id ()) - { - // now marshal the members (if any) - if ( - (strm << _tao_aggregate.forward_reference.in ()) - ) - return 1; - else - return 0; - } - else - return 0; -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm,PortableServer::ForwardRequest &_tao_aggregate) -{ - // now marshal the members - if ( - (strm >> _tao_aggregate.forward_reference.out ()) - ) - return 1; - else - return 0; -} - -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -ACE_INLINE -ostream & operator<< (ostream &os, const PortableServer::ForwardRequest &_tao_aggregate) -{ - CORBA::TypeCode_ptr tc = _tao_aggregate._type (); - if (tc) - { - os << tc->name () << " ("; - } - os << _tao_aggregate._id (); - if (tc) - { - os << ")"; - } - return os; -} - -#endif /* ACE_LACKS_IOSTREAM_TOTALLY */ - -#endif /* TAO_HAS_MINIMUM_CORBA == 0 */ - -#if (TAO_HAS_MINIMUM_POA == 0) - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const PortableServer::ThreadPolicyValue &_tao_enumval) -{ - return strm.write_ulong ((CORBA::ULong) _tao_enumval); -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, PortableServer::ThreadPolicyValue &_tao_enumval) -{ - CORBA::ULong _tao_temp; - if (strm.read_ulong (_tao_temp)) - { - ACE_OS::memcpy (&_tao_enumval, &_tao_temp, sizeof (CORBA::ULong)); - return 1; - } - else - return 0; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const PortableServer::LifespanPolicyValue &_tao_enumval) -{ - return strm.write_ulong ((CORBA::ULong) _tao_enumval); -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, PortableServer::LifespanPolicyValue &_tao_enumval) -{ - CORBA::ULong _tao_temp; - if (strm.read_ulong (_tao_temp)) - { - ACE_OS::memcpy (&_tao_enumval, &_tao_temp, sizeof (CORBA::ULong)); - return 1; - } - else - return 0; -} - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const PortableServer::IdUniquenessPolicyValue &_tao_enumval) -{ - return strm.write_ulong ((CORBA::ULong) _tao_enumval); -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, PortableServer::IdUniquenessPolicyValue &_tao_enumval) -{ - CORBA::ULong _tao_temp; - if (strm.read_ulong (_tao_temp)) - { - ACE_OS::memcpy (&_tao_enumval, &_tao_temp, sizeof (CORBA::ULong)); - return 1; - } - else - return 0; -} - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const PortableServer::IdAssignmentPolicyValue &_tao_enumval) -{ - return strm.write_ulong ((CORBA::ULong) _tao_enumval); -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, PortableServer::IdAssignmentPolicyValue &_tao_enumval) -{ - CORBA::ULong _tao_temp; - if (strm.read_ulong (_tao_temp)) - { - ACE_OS::memcpy (&_tao_enumval, &_tao_temp, sizeof (CORBA::ULong)); - return 1; - } - else - return 0; -} - -#if (TAO_HAS_MINIMUM_POA == 0) - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const PortableServer::ImplicitActivationPolicyValue &_tao_enumval) -{ - return strm.write_ulong ((CORBA::ULong) _tao_enumval); -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, PortableServer::ImplicitActivationPolicyValue &_tao_enumval) -{ - CORBA::ULong _tao_temp; - if (strm.read_ulong (_tao_temp)) - { - ACE_OS::memcpy (&_tao_enumval, &_tao_temp, sizeof (CORBA::ULong)); - return 1; - } - else - return 0; -} - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const PortableServer::ServantRetentionPolicyValue &_tao_enumval) -{ - return strm.write_ulong ((CORBA::ULong) _tao_enumval); -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, PortableServer::ServantRetentionPolicyValue &_tao_enumval) -{ - CORBA::ULong _tao_temp; - if (strm.read_ulong (_tao_temp)) - { - ACE_OS::memcpy (&_tao_enumval, &_tao_temp, sizeof (CORBA::ULong)); - return 1; - } - else - return 0; -} - -ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const PortableServer::RequestProcessingPolicyValue &_tao_enumval) -{ - return strm.write_ulong ((CORBA::ULong) _tao_enumval); -} - -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, PortableServer::RequestProcessingPolicyValue &_tao_enumval) -{ - CORBA::ULong _tao_temp; - if (strm.read_ulong (_tao_temp)) - { - ACE_OS::memcpy (&_tao_enumval, &_tao_temp, sizeof (CORBA::ULong)); - return 1; - } - else - return 0; -} - -#endif /* TAO_HAS_MINIMUM_POA == 0 */ diff --git a/TAO/tao/Servant_Base.cpp b/TAO/tao/Servant_Base.cpp deleted file mode 100644 index d40a97a33b0..00000000000 --- a/TAO/tao/Servant_Base.cpp +++ /dev/null @@ -1,499 +0,0 @@ -// $Id$ - -#include "tao/Servant_Base.h" -#include "tao/Timeprobe.h" -#include "tao/Operation_Table.h" -#include "tao/ORB_Core.h" -#include "tao/POA.h" -#include "tao/Stub.h" -#include "tao/Environment.h" -#include "tao/Server_Request.h" - -ACE_RCSID(tao, Servant_Base, "$Id$") - -#if !defined (__ACE_INLINE__) -# include "tao/Servant_Base.i" -#endif /* ! __ACE_INLINE__ */ - -#if defined (ACE_ENABLE_TIMEPROBES) - -static const char *TAO_Servant_Base_Timeprobe_Description[] = -{ - "Servant_Base::_find - start", - "Servant_Base::_find - end" -}; - -enum -{ - TAO_SERVANT_BASE_FIND_START = 700, - TAO_SERVANT_BASE_FIND_END -}; - -// Setup Timeprobes -ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Servant_Base_Timeprobe_Description, - TAO_SERVANT_BASE_FIND_START); - -#endif /* ACE_ENABLE_TIMEPROBES */ - -TAO_ServantBase::TAO_ServantBase (void) - : optable_ (0), - single_threaded_poa_lock_ (0), - single_threaded_poa_lock_count_ (0) -{ -} - -TAO_ServantBase::TAO_ServantBase (const TAO_ServantBase &rhs) - : optable_ (rhs.optable_), - single_threaded_poa_lock_ (0), - single_threaded_poa_lock_count_ (0) -{ -} - -TAO_ServantBase & -TAO_ServantBase::operator= (const TAO_ServantBase &rhs) -{ - this->optable_ = rhs.optable_; - return *this; -} - -TAO_ServantBase::~TAO_ServantBase (void) -{ -} - -PortableServer::POA_ptr -TAO_ServantBase::_default_POA (CORBA::Environment &ACE_TRY_ENV) -{ - return TAO_ORB_Core_instance ()->root_poa_reference (ACE_TRY_ENV); -} - -void -TAO_ServantBase::_add_ref (CORBA::Environment &) -{ -} - -void -TAO_ServantBase::_remove_ref (CORBA::Environment &) -{ -} - -CORBA::Boolean -TAO_ServantBase::_is_a (const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV) -{ - const char *id = CORBA::_tc_Object->id (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - if (ACE_OS::strcmp (logical_type_id, id) == 0) - { - return 1; - } - - return 0; -} - -CORBA::Boolean -TAO_ServantBase::_non_existent (CORBA::Environment &) -{ - return 0; -} - -int -TAO_ServantBase::_find (const char *opname, - TAO_Skeleton& skelfunc, - const unsigned int length) -{ - ACE_FUNCTION_TIMEPROBE (TAO_SERVANT_BASE_FIND_START); - return optable_->find (opname, skelfunc, length); -} - -int -TAO_ServantBase::_bind (const char *opname, - const TAO_Skeleton skel_ptr) -{ - return optable_->bind (opname, skel_ptr); -} - -TAO_Stub * -TAO_ServantBase::_create_stub (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = 0; - - TAO_POA_Current_Impl *poa_current_impl = - TAO_TSS_RESOURCES::instance ()->poa_current_impl_; - - CORBA::ORB_ptr servant_orb = 0; - - if (poa_current_impl != 0 && - this == poa_current_impl->servant ()) - { - servant_orb = poa_current_impl->orb_core ().orb () ; - - CORBA::PolicyList_var client_exposed_policies = - poa_current_impl->poa ()->client_exposed_policies (poa_current_impl->priority (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - stub = servant_orb->create_stub_object (poa_current_impl->object_key (), - this->_interface_repository_id (), - client_exposed_policies._retn (), - poa_current_impl->poa (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - } - else - { - PortableServer::POA_var poa = this->_default_POA (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::Object_var object = poa->servant_to_reference (this, ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - // Get the stub object - stub = object->_stubobj (); - - // Increment the reference count since will zap its - // stub object on deletion. - stub->_incr_refcnt (); - - servant_orb = stub->orb_core ()->orb (); - } - - stub->servant_orb (servant_orb); - return stub; -} - -ACE_SYNCH_MUTEX & -TAO_ServantBase::_single_threaded_poa_lock (void) -{ - return *this->single_threaded_poa_lock_; -} - -void -TAO_ServantBase::_increment_single_threaded_poa_lock_count (void) -{ - // Only one thread at a time through this code (guarantee provided - // by the POA). - u_long current_count = this->single_threaded_poa_lock_count_++; - if (current_count == 0) - { - ACE_NEW (this->single_threaded_poa_lock_, - ACE_SYNCH_MUTEX); - } -} - -void -TAO_ServantBase::_decrement_single_threaded_poa_lock_count (void) -{ - // Only one thread at a time through this code (guarantee provided - // by the POA). - u_long current_count = --this->single_threaded_poa_lock_count_; - if (current_count == 0) - { - delete this->single_threaded_poa_lock_; - this->single_threaded_poa_lock_ = 0; - } -} - -void TAO_ServantBase::synchronous_upcall_dispatch(CORBA::ServerRequest &req, - void *context, - void *derived_this, - CORBA::Environment &ACE_TRY_ENV) -{ - TAO_Skeleton skel; - const char *opname = req.operation(); - - // It seems that I might have missed s/g here. What if - // it is a one way that is SYNC_WITH_SERVER. - // Add the following line to handle this reply send as well. - - // Handle the one ways that are SYNC_WITH_SERVER - if (req.sync_with_server ()) - { - req.send_no_exception_reply (); - } - - // Fetch the skeleton for this operation - if (this->_find(opname,skel,req.operation_length()) == -1) - { - ACE_THROW (CORBA_BAD_OPERATION()); - } - - ACE_TRY - { - // Invoke the skeleton, it will demarshal the arguments, - // invoke the right operation on the skeleton class (). - // and marshal any results - skel (req, derived_this, context, ACE_TRY_ENV); - ACE_TRY_CHECK; - - // It is our job to send the already marshaled reply, but only - // send if it is expected and it has not already been sent - - // We send the reply only if it is NOT a SYNC_WITH_SERVER, a - // response is expected and if the reply is not deferred. - if ((!req.sync_with_server () && - req.response_expected () && - !req.deferred_reply ())) - { - req.tao_send_reply(); - } - - } - ACE_CATCH(CORBA::Exception,ex) - { - // If an exception was raised we should marshal it and send - // the appropriate reply to the client - req.tao_send_reply_exception(ex); - } - ACE_ENDTRY; - ACE_CHECK; - - return; -} - - -TAO_RefCountServantBase::~TAO_RefCountServantBase (void) -{ -} - -void -TAO_RefCountServantBase::_add_ref (CORBA::Environment &) -{ - ++this->ref_count_; -} - -void -TAO_RefCountServantBase::_remove_ref (CORBA::Environment &) -{ - CORBA::ULong new_count = --this->ref_count_; - if (new_count == 0) - { - delete this; - } -} - -TAO_RefCountServantBase::TAO_RefCountServantBase (void) - : ref_count_ (1) -{ -} - -TAO_RefCountServantBase::TAO_RefCountServantBase (const TAO_RefCountServantBase &) - : ref_count_ (1) -{ -} - -TAO_RefCountServantBase & -TAO_RefCountServantBase::operator= (const TAO_RefCountServantBase &) -{ - return *this; -} - -TAO_ServantBase_var::TAO_ServantBase_var (void) - : ptr_ (0) -{ -} - -TAO_ServantBase_var::TAO_ServantBase_var (TAO_ServantBase *p) - : ptr_ (p) -{ -} - -TAO_ServantBase_var::TAO_ServantBase_var (const TAO_ServantBase_var &b) - : ptr_ (b.ptr_) -{ - if (this->ptr_ != 0) - this->ptr_->_add_ref (); -} - -TAO_ServantBase_var::~TAO_ServantBase_var (void) -{ - if (this->ptr_ != 0) - this->ptr_->_remove_ref (); -} - -TAO_ServantBase_var & -TAO_ServantBase_var::operator= (TAO_ServantBase *p) -{ - if (this->ptr_ != 0) - this->ptr_->_remove_ref (); - - this->ptr_ = p; - - return *this; -} - -TAO_ServantBase_var & -TAO_ServantBase_var::operator= (const TAO_ServantBase_var &b) -{ - if (this->ptr_ != b.ptr_) - { - if (this->ptr_ != 0) - this->ptr_->_remove_ref (); - - if ((this->ptr_ = b.ptr_) != 0) - this->ptr_->_add_ref (); - } - - return *this; -} - -TAO_ServantBase * -TAO_ServantBase_var::operator->() const -{ - return this->ptr_; -} - -TAO_ServantBase * -TAO_ServantBase_var::in (void) const -{ - return this->ptr_; -} - -TAO_ServantBase *& -TAO_ServantBase_var::inout (void) -{ - return this->ptr_; -} - -TAO_ServantBase *& -TAO_ServantBase_var::out (void) -{ - if (this->ptr_ != 0) - this->ptr_->_remove_ref(); - - this->ptr_ = 0; - - return this->ptr_; -} - -TAO_ServantBase * -TAO_ServantBase_var::_retn (void) -{ - TAO_ServantBase *retval = this->ptr_; - this->ptr_ = 0; - return retval; -} - -void -TAO_Local_ServantBase::_dispatch (CORBA::ServerRequest &, - void *, - CORBA_Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA::BAD_OPERATION ()); -} - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -CORBA::Object_ptr -TAO_DynamicImplementation::_this (CORBA::Environment &ACE_TRY_ENV) -{ - // The _this() function returns a CORBA::Object_ptr for the target - // object. Unlike _this() for static skeletons, its return type is - // not interface-specific because a DSI servant may very well - // incarnate multiple CORBA objects of different types. - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - // Create a object - return new CORBA::Object (stub, this, 1); -} - -const char * -TAO_DynamicImplementation::_interface_repository_id (void) const -{ - // This should never be called - return 0; -} - -void * -TAO_DynamicImplementation::_downcast (const char *repository_id) -{ - ACE_UNUSED_ARG (repository_id); - - // Don't know enough to do better - return this; -} - -TAO_Stub * -TAO_DynamicImplementation::_create_stub (CORBA::Environment &ACE_TRY_ENV) -{ - // If DynamicImplementation::_this() is invoked outside of the - // context of a request invocation on a target object being served - // by the DSI servant, it raises the PortableServer::WrongPolicy - // exception. - TAO_POA_Current_Impl *poa_current_impl = - TAO_TSS_RESOURCES::instance ()->poa_current_impl_; - - if (poa_current_impl == 0 || - this != poa_current_impl->servant ()) - { - ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), - 0); - } - - PortableServer::POA_var poa = poa_current_impl->get_POA (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::RepositoryId interface = this->_primary_interface (poa_current_impl->object_id (), - poa.in (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::PolicyList_var client_exposed_policies = - poa_current_impl->poa ()->client_exposed_policies (poa_current_impl->priority (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - return poa_current_impl->poa ()->orb_core ().orb ()->create_stub_object (poa_current_impl->object_key (), - interface, - client_exposed_policies._retn (), - poa_current_impl->poa (), - ACE_TRY_ENV); -} - -void -TAO_DynamicImplementation::_dispatch (CORBA::ServerRequest &request, - void *context, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_UNUSED_ARG (context); - - // Delegate to user - this->invoke (&request, ACE_TRY_ENV); - ACE_CHECK; - - if (request.response_expected ()) - { - request.init_reply (ACE_TRY_ENV); - ACE_CHECK; - - request.dsi_marshal (ACE_TRY_ENV); - ACE_CHECK; - } - - ACE_TRY - { - if ((!request.sync_with_server() && request.response_expected())) - { - request.tao_send_reply(); - ACE_TRY_CHECK; - } - } - ACE_CATCH(CORBA::Exception,ex) - { - request.tao_send_reply_exception(ex); - } - ACE_ENDTRY; -} - -#endif /* TAO_HAS_MINIMUM_CORBA */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Atomic_Op; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Atomic_Op - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/Servant_Base.h b/TAO/tao/Servant_Base.h deleted file mode 100644 index 3d380313c1c..00000000000 --- a/TAO/tao/Servant_Base.h +++ /dev/null @@ -1,310 +0,0 @@ -// This may look like C, but it's really -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// Servant_Base.h -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#ifndef TAO_SERVANT_BASE_H -#define TAO_SERVANT_BASE_H -#include "ace/pre.h" - -#include "tao/corbafwd.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/PortableServerC.h" - -class TAO_Operation_Table; - -class TAO_Export TAO_ServantBase -{ - // = TITLE - // Base class for skeletons and servants. - // - // = DESCRIPTION - // The POA spec requires that all servants inherit from this - // class. -public: - friend class TAO_POA; - friend class TAO_Object_Adapter; - friend class CORBA_Object; - friend class TAO_Local_ServantBase; - - virtual ~TAO_ServantBase (void); - // Destructor. - - virtual PortableServer::POA_ptr _default_POA (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Returns the default POA for this servant. - - virtual CORBA::Boolean _is_a (const char* logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Local implementation of the CORBA::Object::_is_a method. - - virtual CORBA::Boolean _non_existent (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Default <_non_existent>: always returns false. - - // = Reference counting hooks: no-ops by default. - virtual void _add_ref (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - virtual void _remove_ref (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - - virtual void *_downcast (const char *repository_id) = 0; - // Get the correct vtable. - - virtual TAO_Stub *_create_stub (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // This is an auxiliar method for _this() and _narrow(). - -protected: - TAO_ServantBase (void); - // Default constructor, only derived classes can be created. - - TAO_ServantBase (const TAO_ServantBase &); - // Copy constructor, protected so no instances can be created. - - TAO_ServantBase &operator= (const TAO_ServantBase &); - // assignment operator. - - virtual void _dispatch (CORBA::ServerRequest &request, - void *context, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) = 0; - // Dispatches a request to the object: find the operation, cast the - // type to the most derived type, demarshall all the parameters from - // the request and finally invokes the operation, storing the - // results and out parameters (if any) or the exceptions thrown into - // . - - virtual void synchronous_upcall_dispatch (CORBA::ServerRequest &req, - void *context, - void *derived_this, - CORBA::Environment &ACE_TRY_ENV); - - virtual int _find (const char *opname, - TAO_Skeleton &skelfunc, - const unsigned int length = 0); - // Find an operation in the operation table. - - virtual int _bind (const char *opname, - const TAO_Skeleton skel_ptr); - // Register a CORBA IDL operation name. - - virtual const char *_interface_repository_id (void) const = 0; - // Get this interface's repository id (TAO specific). - - // = Should be protected/private, but a nested class needs it. -public: - ACE_SYNCH_MUTEX &_single_threaded_poa_lock (void); - // Access to the single threaded poa lock. - -protected: - void _increment_single_threaded_poa_lock_count (void); - // New single threaded POA wants to use this lock. - - void _decrement_single_threaded_poa_lock_count (void); - // Single threaded POA is no longer interested in this lock. - - TAO_Operation_Table *optable_; - // The operation table for this servant, it is initialized by the - // most derived class. - - ACE_SYNCH_MUTEX *single_threaded_poa_lock_; - // Lock for single threaded POAs. - - u_long single_threaded_poa_lock_count_; - // Reference count for lock. -}; - -class TAO_Export TAO_RefCountServantBase : public virtual TAO_ServantBase -{ - // = TITLE - // Reference counting mix-in class. - // - // = DESCRIPTION - // The RefCountServantBase mix-in class overrides the inherited - // _add_ref and _remove_ref functions it inherits from - // ServantBase, implementing them to provide true reference - // counting. An instance of a servant class derived from - // RefCountServantBase initially has a reference count of - // one. Invoking _add_ref on the servant instance increases its - // reference count by one. Invoking _remove_ref on the servant - // instance decreases its reference count by one; if the - // resulting reference count equals zero, _remove_ref invokes - // delete on its this pointer in order to destroy the - // servant. For ORBs that operate in multi-threaded - // environments, the implementations of _add_ref and _remove_ref - // that the RefCountServantBase class provides shall be - // thread-safe. - // - // Like ServantBase, RefCountServantBase supports copy - // construction and the default assignment operation. Copy - // construction always sets the reference count of the new - // servant instance to one. The default assignment - // implementation merely returns *this and does not affect the - // reference count. - -public: - - ~TAO_RefCountServantBase (void); - // Destructor. - - virtual void _add_ref (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Increase reference count by one. - - virtual void _remove_ref (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Decreases reference count by one; if the resulting reference - // count equals zero, _remove_ref invokes delete on its this pointer - // in order to destroy the servant. - -protected: - - TAO_RefCountServantBase (void); - // Constructor: initial reference count is one. - - TAO_RefCountServantBase (const TAO_RefCountServantBase &); - // Copy Constructor: Always sets the reference count of the new - // servant instance to one. - - TAO_RefCountServantBase &operator= (const TAO_RefCountServantBase &); - // The default assignment implementation merely returns *this and - // does not affect the reference count. - -private: - - ACE_Atomic_Op ref_count_; - // Reference counter. -}; - -class TAO_Export TAO_ServantBase_var -{ - // = TITLE - // Auto pointer for reference counting servants. - // - // = DESCRIPTION - // For the convenience of automatically managing servant - // reference counts, the PortableServer namespace also provides - // the ServantBase_var class. This class behaves similarly to - // _var classes for object references (see Section 20.3.1). - -public: - TAO_ServantBase_var (void); - - TAO_ServantBase_var (TAO_ServantBase *p); - - TAO_ServantBase_var (const TAO_ServantBase_var &b); - - ~TAO_ServantBase_var (void); - - TAO_ServantBase_var &operator= (TAO_ServantBase *p); - - TAO_ServantBase_var &operator= (const TAO_ServantBase_var &b); - - TAO_ServantBase *operator-> () const; - - TAO_ServantBase *in (void) const; - - TAO_ServantBase *&inout (void); - - TAO_ServantBase *&out (void); - - TAO_ServantBase *_retn (void); - -private: - - TAO_ServantBase *ptr_; -}; - -class TAO_Export TAO_Servant_Hash -{ -public: - u_long operator () (PortableServer::Servant servant) const; - // Returns hash value. -}; - -class TAO_Export TAO_Local_ServantBase : public virtual TAO_ServantBase -{ - // = TITLE - // Base class for local servants. - // - // = DESCRIPTION - // This servant does not register with the POA and does not - // produce a valid stub, i.e., object references of this servant - // cannot be exported. The (collocated) stubs of these servants - // will always be direct, i.e., call directly to the servant and - // don't call through the POA since this servant is not - // registered with the POA. - // -protected: - TAO_Stub *_create_stub (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // This is an auxiliar method for _this(). Make sure *not* to - // register with the default POA. - - void _dispatch (CORBA::ServerRequest &request, - void *context, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Throws CORBA::BAD_OPERATION exception. -}; - -#if (TAO_HAS_MINIMUM_CORBA == 0) - -class TAO_Export TAO_DynamicImplementation : public virtual TAO_ServantBase -{ - // = TITLE - // Base class for DSI. - // - // = DESCRIPTION - // It is expected that the and <_primary_interface> - // methods will be only invoked by the POA in the context of - // serving a CORBA request. Invoking this method in other - // circumstances may lead to unpredictable results. -public: - virtual void invoke (CORBA::ServerRequest_ptr request, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) = 0; - // The invoke() method receives requests issued to any CORBA object - // incarnated by the DSI servant and performs the processing - // necessary to execute the request. - - virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &oid, - PortableServer::POA_ptr poa, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) = 0; - // The _primary_interface() method receives an ObjectId value and a - // POA_ptr as input parameters and returns a valid RepositoryId - // representing the most-derived interface for that oid. - - CORBA::Object_ptr _this (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Returns a CORBA::Object_ptr for the target object. - -protected: - - virtual const char *_interface_repository_id (void) const; - // Return 0. Should never be used. - - virtual void *_downcast (const char *repository_id); - // Simply returns "this" - - virtual TAO_Stub *_create_stub (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // This is an auxiliar method for _this() and _narrow(). - - virtual void _dispatch (CORBA::ServerRequest &request, - void *context, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Turns around and calls invoke. -}; - -#endif /* TAO_HAS_MINIMUM_CORBA */ - -#if defined (__ACE_INLINE__) -# include "tao/Servant_Base.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_SERVANT_BASE_H */ diff --git a/TAO/tao/Servant_Base.i b/TAO/tao/Servant_Base.i deleted file mode 100644 index 3955c3d256a..00000000000 --- a/TAO/tao/Servant_Base.i +++ /dev/null @@ -1,35 +0,0 @@ -// $Id$ - -ACE_INLINE u_long -TAO_Servant_Hash::operator () (PortableServer::Servant servant) const -{ - return u_long (servant); -} - -ACE_INLINE TAO_Stub * -TAO_Local_ServantBase::_create_stub (CORBA_Environment &ACE_TRY_ENV) -{ -#if 0 - PortableServer::ObjectId_var invalid_oid = - PortableServer::string_to_ObjectId ("invalid"); - - TAO_ObjectKey tmp_key (invalid_oid->length (), - invalid_oid->length (), - invalid_oid->get_buffer (), - 0); - - // It is ok to use TAO_ORB_Core_instance here since the locality - // constrained servant does not really register with a POA or get - // exported remotely. - // - // The correct thing to do is to probably use ORB of the default - // POA. The unfortunate part is that calling default_POA() requires - // the creation of a local stub, hence causing a infinite loop. - return TAO_ORB_Core_instance ()->orb ()->create_stub_object (tmp_key, - this->_interface_repository_id (), - ACE_TRY_ENV); -#else - ACE_UNUSED_ARG (ACE_TRY_ENV); - return 0; -#endif -} diff --git a/TAO/tao/TAO.cpp b/TAO/tao/TAO.cpp deleted file mode 100644 index 634e339d8a8..00000000000 --- a/TAO/tao/TAO.cpp +++ /dev/null @@ -1,388 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tao -// -// = FILENAME -// TAO.cpp -// -// = AUTHOR -// Sumedh Mungee -// -// ============================================================================ - -#include "tao/TAO.h" -#include "tao/Environment.h" - -ACE_RCSID(tao, TAO, "$Id$") - -// constructor -TAO_ORB_Manager::TAO_ORB_Manager (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::POAManager_ptr poa_manager) - : orb_ (orb), - poa_ (poa), - poa_manager_ (poa_manager) -{ -} - -int -TAO_ORB_Manager::init (int &argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) -{ - return this->init (argc, - argv, - 0, - ACE_TRY_ENV); -} - -int -TAO_ORB_Manager::init (int &argc, - char **argv, - const char *orb_name, - CORBA::Environment &ACE_TRY_ENV) -{ - if (CORBA::is_nil (this->orb_.in ())) - { - this->orb_ = CORBA::ORB_init (argc, - argv, - orb_name, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - } - - if (CORBA::is_nil (this->poa_.in ())) - { - // Get the POA from the ORB. - CORBA::Object_var poa_object = - this->orb_->resolve_initial_references (TAO_OBJID_ROOTPOA, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT (" (%P|%t) Unable to initialize the POA.\n")), - -1); - - // Get the POA object. - this->poa_ = - PortableServer::POA::_narrow (poa_object.in (), - ACE_TRY_ENV); - - ACE_CHECK_RETURN (-1); - } - - if (CORBA::is_nil (this->poa_manager_.in ())) - { - // Get the POA_Manager. - this->poa_manager_ = - this->poa_->the_POAManager (ACE_TRY_ENV); - - ACE_CHECK_RETURN (-1); - } - - return 0; -} - -int -TAO_ORB_Manager::init_child_poa (int& argc, - char **argv, - const char *poa_name, - CORBA_Environment &ACE_TRY_ENV) -{ - return this->init_child_poa (argc, - argv, - poa_name, - 0, - ACE_TRY_ENV); -} - -int -TAO_ORB_Manager::init_child_poa (int& argc, - char **argv, - const char *poa_name, - const char *orb_name, - CORBA_Environment &ACE_TRY_ENV) -{ - int init_result; - - // check to see if root poa has to be created. - init_result = this->init (argc, - argv, - orb_name, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - if (init_result == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT (" (%P|%t) Error in init.\n")), - -1); - - // Create the default policies - user-supplied ID, and persistent - // objects. - CORBA::PolicyList policies (2); - policies.length (2); - - // Id Assignment policy - policies[0] = - this->poa_->create_id_assignment_policy (PortableServer::USER_ID, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // Lifespan policy - policies[1] = - this->poa_->create_lifespan_policy (PortableServer::PERSISTENT, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // We use a different POA, otherwise the user would have to change - // the object key each time it invokes the server. - - this->child_poa_ = - this->poa_->create_POA (poa_name, - this->poa_manager_.in (), - policies, - ACE_TRY_ENV); - // Warning! If create_POA fails, then the policies won't be - // destroyed and there will be hell to pay in memory leaks! - ACE_CHECK_RETURN (-1); - - // Creation of the new POAs over, so destroy the Policy_ptr's. - for (CORBA::ULong i = 0; - i < policies.length (); - ++i) - { - CORBA::Policy_ptr policy = policies[i]; - policy->destroy (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - } - - return 0; -} - -// Activate POA manager. - -int -TAO_ORB_Manager::activate_poa_manager (CORBA_Environment &ACE_TRY_ENV) -{ - this->poa_manager_->activate (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - return 0; -} - -// Activate servant in the POA. - -char * -TAO_ORB_Manager::activate (PortableServer::Servant servant, - CORBA_Environment &ACE_TRY_ENV) -{ - PortableServer::ObjectId_var id = - this->poa_->activate_object (servant, - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::Object_var obj = - this->poa_->id_to_reference (id.in (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::String_var str = - this->orb_->object_to_string (obj.in (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - return str._retn (); -} - -void -TAO_ORB_Manager::deactivate (const char *id, - CORBA_Environment &ACE_TRY_ENV) -{ - CORBA::Object_var object = - this->orb_->string_to_object (id, - ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::ObjectId_var object_id = - this->poa_->reference_to_id (object.in (), - ACE_TRY_ENV); - ACE_CHECK; - - this->poa_->deactivate_object (object_id.in (), - ACE_TRY_ENV); -} - -// Activate the object with the object_name under the child POA. - -char * -TAO_ORB_Manager::activate_under_child_poa (const char* object_name, - PortableServer::Servant servant, - CORBA_Environment& ACE_TRY_ENV) -{ - if (object_name == 0) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("\n(%P|%t) TAO_ORB_Manager::register: ") - ACE_TEXT ("object_name is null!")), - 0); - - PortableServer::ObjectId_var id = - PortableServer::string_to_ObjectId (object_name); - - this->child_poa_->activate_object_with_id (id.in (), - servant, - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::Object_var obj = - this->child_poa_->id_to_reference (id.in (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - char * str = - this->orb_->object_to_string (obj.in (), - ACE_TRY_ENV); - - ACE_CHECK_RETURN (0); - - return str; -} - -void -TAO_ORB_Manager::deactivate_under_child_poa (const char *id, - CORBA_Environment &ACE_TRY_ENV) -{ - CORBA::Object_var object = - this->orb_->string_to_object (id, - ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::ObjectId_var object_id = - this->child_poa_->reference_to_id (object.in (), - ACE_TRY_ENV); - ACE_CHECK; - - this->child_poa_->deactivate_object (object_id.in (), - ACE_TRY_ENV); -} - -// Enter the ORB event loop. - -int -TAO_ORB_Manager::run (CORBA_Environment &ACE_TRY_ENV, - ACE_Time_Value *tv) -{ - this->poa_manager_->activate (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - int status = this->orb_->run (tv, ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - if (status == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), - ACE_TEXT ("run")), - -1); - return 0; -} - -int -TAO_ORB_Manager::run (ACE_Time_Value &tv, - CORBA_Environment &ACE_TRY_ENV) -{ - this->poa_manager_->activate (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - int status = this->orb_->run (tv, ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - if (status == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), - ACE_TEXT ("run")), - -1); - return 0; -} - -int -TAO_ORB_Manager::fini (CORBA_Environment &ACE_TRY_ENV) -{ - this->poa_->destroy (1, 1, ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - this->poa_ = 0; - - this->orb_->destroy (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - this->orb_ = 0; - return 0; -} - -int -TAO_ORB_Manager::run (CORBA_Environment &ACE_TRY_ENV) -{ - this->poa_manager_->activate (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - int status = this->orb_->run (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - if (status == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), - ACE_TEXT ("run")), - -1); - return 0; -} - -// Return the corba orb reference. - -CORBA::ORB_ptr -TAO_ORB_Manager::orb (void) -{ - return CORBA_ORB::_duplicate (this->orb_.in ()); -} - -// Return the root POA reference -PortableServer::POA_ptr -TAO_ORB_Manager::root_poa (void) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} - -// Return the child POA reference -PortableServer::POA_ptr -TAO_ORB_Manager::child_poa (void) -{ - return PortableServer::POA::_duplicate (this->child_poa_.in ()); -} - -PortableServer::POAManager_ptr -TAO_ORB_Manager::poa_manager (void) -{ - return PortableServer::POAManager::_duplicate (this->poa_manager_.in ()); -} - -// Destructor. - -TAO_ORB_Manager::~TAO_ORB_Manager (void) -{ - ACE_TRY_NEW_ENV - { - if (!CORBA::is_nil (this->poa_.in ())) - { - this->poa_->destroy (1, - 1, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - } - ACE_CATCHANY - { - // ignore any exceptions.. - } - ACE_ENDTRY; -} diff --git a/TAO/tao/TAO.h b/TAO/tao/TAO.h deleted file mode 100644 index 173e02c7689..00000000000 --- a/TAO/tao/TAO.h +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tao -// -// = FILENAME -// TAO.h -// -// = DESCRIPTION -// Externally visible TAO extensions. -// -// = AUTHOR -// Chris Cleeland -// -// ============================================================================ - -#ifndef TAO_H -#define TAO_H -#include "ace/pre.h" - -#include "tao/corbafwd.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/PortableServerC.h" -#include "tao/ORB.h" - -class TAO_Export TAO_ORB_Manager -{ - // = TITLE - // Helper class for simple ORB/POA initialization and - // registering servants with the POA. - // - // = DESCRIPTION - // This class is a TAO extension that makes it easier to write - // CORBA applications. It's just a wrapper and doesn't do - // anything special within the ORB itself. -public: - // = Initialization and termination methods. - TAO_ORB_Manager (CORBA::ORB_ptr orb = 0, - PortableServer::POA_ptr poa = 0, - PortableServer::POAManager_ptr poa_manager = 0); - // Constructor. - - int init (int &argc, - char *argv[], - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Initialize the ORB/root POA, using the supplied command line - // arguments or the default ORB components. Returns -1 on failure. - - int init (int &argc, - char *argv[], - const char *orb_name, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Initialize the ORB/root POA, using the supplied command line - // arguments or the default ORB components. Returns -1 on failure. - - int init_child_poa (int &argc, - char *argv[], - const char *poa_name, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - // Creates a child poa under the root poa with PERSISTENT and - // USER_ID policies. Call this if you want a with the - // above policies, otherwise call init. Returns -1 on failure. - - int init_child_poa (int &argc, - char *argv[], - const char *poa_name, - const char *orb_name, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - // Creates a child poa under the root poa with PERSISTENT and - // USER_ID policies. Call this if you want a with the - // above policies, otherwise call init. Returns -1 on failure. - - int fini (CORBA_Environment &ACE_TRY_ENV); - // Shut down the . - - ~TAO_ORB_Manager (void); - // Destructor. - - // = Accessor methods. - - int activate_poa_manager (CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - // Put POA manager into the state, so that incoming corba - // requests are processed. This method is useful for clients, - // which are not going to enter "orb->run" loop, yet may want to - // service incoming requests while waiting for a result of CORBA - // call on a server. Returns -1 on failure. - - char *activate (PortableServer::Servant servant, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - // Activate , using the POA call. Users - // can call this method multiple times to activate multiple objects. - // Returns 0 on failure. - - void deactivate (const char *id, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - // Deactivate object in RootPOA. - - char *activate_under_child_poa (const char *servant_name, - PortableServer::Servant servant, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - // Precondition: init_child_poa has been called. Activate - // using the POA created from the string - // servant_name. Users should call this to activate objects under - // the child_poa. - - void deactivate_under_child_poa (const char *id, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - // Deactivate object in child POA. - - int run (CORBA_Environment &ACE_TRY_ENV, - ACE_Time_Value *tv); - int run (ACE_Time_Value &tv, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - int run (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); - // Run the ORB event loop with the specified time value Returns - // -1 on failure. - - CORBA::ORB_ptr orb (void); - // Accessor which returns the ORB pointer. Following the normal - // CORBA memory management rules of return values from functions, - // this function duplicates the orb return value before returning - // it. - - PortableServer::POA_ptr root_poa (void); - // Accessor which returns the root poa. Following the normal CORBA - // memory management rules of return values from functions, this - // function duplicates the poa return value before returning it. - - PortableServer::POA_ptr child_poa (void); - // Accessor which returns the child poa. Following the normal CORBA - // memory management rules of return values from functions, this - // function duplicates the poa return value before returning it. - - PortableServer::POAManager_ptr poa_manager (void); - // Accessor which returns the poa manager. Following the normal - // CORBA memory management rules of return values from functions, - // this function duplicates the poa manager return value before - // returning it. - -protected: - CORBA::ORB_var orb_; - // The ORB. - - PortableServer::POA_var poa_; - // The POA for this ORB. - - PortableServer::POA_var child_poa_; - // Child poa under the root POA. - - PortableServer::POAManager_var poa_manager_; - // The POA manager of poa_. -}; - - -#include "ace/post.h" -#endif /* TAO_H */ diff --git a/TAO/tao/factories.h b/TAO/tao/factories.h deleted file mode 100644 index 5e9d5a0001f..00000000000 --- a/TAO/tao/factories.h +++ /dev/null @@ -1,146 +0,0 @@ -// This may look like C, but it's really -*- C++ -*- - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// factories.h -// -// = AUTHOR -// Chris Cleeland -// -// = VERSION -// $Id$ -// ============================================================================ - -#ifndef TAO_FACTORIES_H -# define TAO_FACTORIES_H - -#if 0 -# include "ace/SOCK_Acceptor.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -# include "ace/SOCK_Connector.h" -# include "ace/Strategies_T.h" -# include "ace/Connector.h" -# include "ace/Synch.h" - -# include "tao/params.h" -# include "tao/connect.h" -# include "tao/objtable.h" -#endif - -class TAO_Client_Connection_Handler : public ACE_Svc_Handler - // = TITLE - // used on the client side and returned - // by the . -{ -public: - TAO_Client_Connection_Handler (ACE_Thread_Manager* = 0); - // Do-nothing constructor - - virtual int open (void*); - // Initialization hook - - void in_use (CORBA::Boolean); - // Set the in-use flag. - - CORBA::Boolean in_use (void); - // Return state of the in-use flag. - -private: - CORBA::Boolean in_use_; - // True value indicates that something is using this handler. -}; - -class TAO_Client_Factory - // = TITLE - // Abstract factory used by the client to turn out various - // strategies used on the client side. -{ -public: - typedef ACE_Strategy_Connector - CONNECTOR; - typedef ACE_NOOP_Creation_Strategy - NULL_CREATION_STRATEGY; - typedef ACE_Cached_Connect_Strategy - CACHED_CONNECT_STRATEGY; - -#if defined (TAO_HAS_CLIENT_CONCURRENCY) - CONCURRENCY_STRATEGY *concurrency_strategy (void); -#endif - - CONNECTOR *connector (void); - // Return a pointer to a connector using appropriate strategies. - - TAO_Client_Factory (void); - ~TAO_Client_Factory (void); - -private: -#if defined (TAO_HAS_CLIENT_CONCURRENCY) - CONCURRENCY_STRATEGY *concurrency_strategy_; -#endif - CONNECTOR connector_; - NULL_CREATION_STRATEGY null_creation_strategy_; - CACHED_CONNECT_STRATEGY caching_connect_strategy_; -}; - -class TAO_Server_Factory - // = TITLE - // Abstract factory used by the server side to turn out various - // strategies of special utility to it. -{ -public: - // = SERVER-SIDE - typedef ACE_Creation_Strategy CREATION_STRATEGY; - typedef ACE_Accept_Strategy ACCEPT_STRATEGY; - typedef ACE_Concurrency_Strategy CONCURRENCY_STRATEGY; - typedef ACE_Scheduling_Strategy SCHEDULING_STRATEGY; - - CREATION_STRATEGY *creation_strategy (void); - // return concrete creation strategy - - ACCEPT_STRATEGY *accept_strategy (void); - // return concrete acceptor strategy - - CONCURRENCY_STRATEGY *concurrency_strategy (void); - // return the concurrency strategy used - - SCHEDULING_STRATEGY *scheduling_strategy (void); - // return the scheduling strategy used - - TAO_Object_Table *object_lookup_strategy (void); - // return the concrete object lookup strategy - - TAO_Server_Factory (void); - // constructor - -private: - // = COMMON - ACE_Thread_Strategy threaded_strategy_; - // The threaded strategy used for passively establishing connections. - ACE_Reactive_Strategy reactive_strategy_; - // A strategy for passively establishing connections which utilizes the Reactor. - - // = SERVER - CONCURRENCY_STRATEGY *concurrency_strategy_; - // concrete concurrency strategy - - TAO_Object_Table *objtable_; - // instance of object table -#if 0 - // Someday we'll need these! - CREATION_STRATEGY *creation_strategy_; - ACCEPT_STRATEGY *accept_strategy_; - SCHEDULING_STRATEGY *scheduling_strategy_; -#endif -}; - -#endif /* TAO_FACTORIES_H */ diff --git a/TAO/tao/poa_macros.h b/TAO/tao/poa_macros.h deleted file mode 100644 index 0f2b325646e..00000000000 --- a/TAO/tao/poa_macros.h +++ /dev/null @@ -1,38 +0,0 @@ -// $Id$ - -#ifndef TAO_POA_MACROS_H -#define TAO_POA_MACROS_H -#include "ace/pre.h" - -#include "tao/try_macros.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#define TAO_OBJECT_ADAPTER_GUARD \ - ACE_GUARD_THROW_EX (ACE_Lock, \ - monitor, \ - this->lock (), \ - CORBA::OBJ_ADAPTER ()); \ - ACE_CHECK - -#define TAO_OBJECT_ADAPTER_GUARD_RETURN(RETURN) \ - ACE_GUARD_THROW_EX (ACE_Lock, \ - monitor, \ - this->lock (), \ - CORBA::OBJ_ADAPTER ()); \ - ACE_CHECK_RETURN (RETURN) - -#define TAO_POA_GUARD \ - TAO_POA_Guard poa_guard (*this, ACE_TRY_ENV); \ - ACE_UNUSED_ARG (poa_guard); \ - ACE_CHECK - -#define TAO_POA_GUARD_RETURN(RETURN) \ - TAO_POA_Guard poa_guard (*this, ACE_TRY_ENV); \ - ACE_UNUSED_ARG (poa_guard); \ - ACE_CHECK_RETURN (RETURN) - -#include "ace/post.h" -#endif /* TAO_POA_MACROS_H */ diff --git a/ace/Timer_Queue.i b/ace/Timer_Queue.i deleted file mode 100644 index 41e4324e61e..00000000000 --- a/ace/Timer_Queue.i +++ /dev/null @@ -1,22 +0,0 @@ -/* -*- C++ -*- */ - -template ACE_INLINE void -ACE_Timer_Queue_T::timer_skew (const ACE_Time_Value &skew) -{ - timer_skew_ = skew; -} - -template ACE_INLINE const ACE_Time_Value & -ACE_Timer_Queue_T::timer_skew (void) const -{ - return timer_skew_; -} - -template ACE_INLINE int -ACE_Timer_Queue_T::expire (void) -{ - if (!this->is_empty ()) - return this->expire (this->gettimeofday () + timer_skew_); - else - return 0; -} diff --git a/apps/Gateway/Gateway/Concurrency_Strategies.h b/apps/Gateway/Gateway/Concurrency_Strategies.h deleted file mode 100644 index 28e59a4b2e6..00000000000 --- a/apps/Gateway/Gateway/Concurrency_Strategies.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// apps -// -// = FILENAME -// Concurrency_strategies.h -// -// = AUTHOR -// Doug Schmidt -// -// ============================================================================ - -#if !defined (_CONCURRENCY_STRATEGIES) -#define _CONCURRENCY_STRATEGIES - -#include "ace/Synch.h" - -// The following typedefs are used in order to parameterize the -// synchronization policies without changing the source code! - -// If we don't have threads then use the single-threaded synchronization. -#if !defined (ACE_HAS_THREADS) -#define SYNCH_STRATEGY ACE_NULL_SYNCH -typedef ACE_Null_Mutex MAP_MUTEX; -#else /* ACE_HAS_THREADS */ - -// Note that we only need to make the ACE_Task thread-safe if we are -// using the multi-threaded Thr_Consumer_Proxy... -#if defined (USE_OUTPUT_MT) -#define SYNCH_STRATEGY ACE_MT_SYNCH -#else -#define SYNCH_STRATEGY ACE_NULL_SYNCH -#endif /* USE_OUTPUT_MT || USE_INPUT_MT */ - -// Note that we only need to make the ACE_Map_Manager thread-safe if -// we are using the multi-threaded Thr_Supplier_Proxy. In this -// case, we use an RW_Mutex since we'll lookup Consumers far more -// often than we'll update them. -#if defined (USE_INPUT_MT) -typedef ACE_RW_Mutex MAP_MUTEX; -#else -typedef ACE_Null_Mutex MAP_MUTEX; -#endif /* USE_INPUT_MT */ -#endif /* ACE_HAS_THREADS */ - -// = Forward decls -class Thr_Consumer_Proxy; -class Thr_Supplier_Proxy; -class Consumer_Proxy; -class Supplier_Proxy; - -#if defined (ACE_HAS_THREADS) && (defined (USE_OUTPUT_MT) || defined (USE_INPUT_MT)) -#if defined (USE_OUTPUT_MT) -typedef Thr_Consumer_Proxy CONSUMER_PROXY; -#else -typedef Consumer_Proxy CONSUMER_PROXY; -#endif /* USE_OUTPUT_MT */ - -#if defined (USE_INPUT_MT) -typedef Thr_Supplier_Proxy SUPPLIER_PROXY; -#else -typedef Supplier_Proxy SUPPLIER_PROXY; -#endif /* USE_INPUT_MT */ -#else -// Instantiate a non-multi-threaded Gateway. -typedef Supplier_Proxy SUPPLIER_PROXY; -typedef Consumer_Proxy CONSUMER_PROXY; -#endif /* ACE_HAS_THREADS */ - -#endif /* _CONCURRENCY_STRATEGIES */ diff --git a/apps/Gateway/Gateway/Peer_Message.h b/apps/Gateway/Gateway/Peer_Message.h deleted file mode 100644 index d9e65650095..00000000000 --- a/apps/Gateway/Gateway/Peer_Message.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -// ============================================================================ -// -// = LIBRARY -// apps -// -// = FILENAME -// Peer_Message.h -// -// = AUTHOR -// Doug Schmidt -// -// ============================================================================ - -#if !defined (PEER_MESSAGE) -#define PEER_MESSAGE - -// This is the unique connection identifier that denotes a particular -// Channel in the Gateway. -typedef short CONN_ID; - -class Peer_Addr - // = TITLE - // Peer address is used to identify the source/destination of a - // routing message. -{ -public: - Peer_Addr (CONN_ID cid = -1, u_char lid = 0, u_char pay = 0) - : conn_id_ (cid), logical_id_ (lid), payload_ (pay) {} - - int operator== (const Peer_Addr &pa) const - { - return this->conn_id_ == pa.conn_id_ - && this->logical_id_ == pa.logical_id_ - && this->payload_ == pa.payload_; - } - - CONN_ID conn_id_; - // Unique connection identifier that denotes a particular Channel. - - u_char logical_id_; - // Logical ID. - - u_char payload_; - // Payload type. -}; - - -class Peer_Header - // = TITLE - // Fixed sized header. -{ -public: - typedef u_short ROUTING_ID; - // Type used to route messages from gatewayd. - - enum - { - INVALID_ID = -1 // No peer can validly use this number. - }; - - ROUTING_ID routing_id_; - // Source ID. - - size_t len_; - // Length of the message in bytes. -}; - -class Peer_Message - // = TITLE - // Variable-sized message (buf_ may be variable-sized between - // 0 and MAX_PAYLOAD_SIZE). -{ -public: - enum { MAX_PAYLOAD_SIZE = 1024 }; - // The maximum size of an Peer message (see Peer protocol specs for - // exact #). - - Peer_Header header_; - // Message header. - - char buf_[MAX_PAYLOAD_SIZE]; - // Message payload. -}; - -#endif /* PEER_MESSAGE */ diff --git a/examples/Reactor/Misc/signal_tester.cpp b/examples/Reactor/Misc/signal_tester.cpp deleted file mode 100644 index 37613f14f38..00000000000 --- a/examples/Reactor/Misc/signal_tester.cpp +++ /dev/null @@ -1,221 +0,0 @@ -// Perform an extensive test of the ACE_Reactor's event dispatching -// $Id$ - -// mechanisms. These mechanisms illustrate how signals, I/O, and -// timeout events can all be handled within the same framework. In -// addition, this example illustrates how to use the ACE_Reactor for -// devices that perform I/O via signals (such as SVR4 message queues). - - -#include "ace/Service_Config.h" - -// Used to shut down the event loop. -static sig_atomic_t done = 0; - -// This class illustrates how to handle signal-driven I/O using the -// ACE_Reactor framework. Note that signals may be caught and -// processed without requiring the use of global signal handler -// functions or global signal handler data. - -class Sig_Handler : public ACE_Event_Handler -{ -public: - Sig_Handler (void); - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE); - virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask); - virtual int handle_signal (ACE_HANDLE signum, siginfo_t * = 0, - ucontext_t * = 0); - -private: - ACE_HANDLE handle_; -}; - -// A dummy_handle is required to reserve a slot in the ACE_Reactor's -// descriptor table. - -Sig_Handler::Sig_Handler (void) -{ - // Assign the Sig_Handler a dummy I/O descriptor. Note that even - // though we open this file "Write Only" we still need to use the - // ACE_Event_Handler::NULL_MASK when registering this with the - // ACE_Reactor (see below). - this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); - ACE_ASSERT (this->handle_ != -1); - - // Register signal handler object. Note that NULL_MASK is used to - // keep the ACE_Reactor from calling us back on the "/dev/null" - // descriptor. - if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::NULL_MASK) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); - - // Create a sigset_t corresponding to the signals we want to catch. - ACE_Sig_Set sig_set; - - sig_set.sig_add (SIGINT); - sig_set.sig_add (SIGQUIT); - sig_set.sig_add (SIGALRM); - - // Register the signal handler object to catch the signals. - if (ACE_Service_Config::reactor ()->register_handler (sig_set, this) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); -} - -// Called by the ACE_Reactor to extract the fd. - -ACE_HANDLE -Sig_Handler::get_handle (void) const -{ - return this->handle_; -} - -// In a real application, this method would be where the read on the -// signal-driven I/O device would occur asynchronously. For now we'll -// just print a greeting to let you know that everything is working -// properly! - -int -Sig_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "handling asynchonrous input...\n")); - return 0; -} - -// In a real application, this method would do any cleanup activities -// required when shutting down the I/O device. - -int -Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "closing down Sig_Handler...\n")); - return 0; -} - -// This method handles all the signals that are being caught by this -// object. In our simple example, we are simply catching SIGALRM, -// SIGINT, and SIGQUIT. Anything else is logged and ignored. -// -// There are several advantages to using this approach. First, -// the behavior triggered by the signal is handled in the main event -// loop, rather than in the signal handler. Second, the ACE_Reactor's -// signal handling mechanism eliminates the need to use global signal -// handler functions and data. - -int -Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - ACE_DEBUG ((LM_DEBUG, "received signal %S\n", signum)); - - switch (signum) - { - case SIGALRM: - // Rearm the alarm. - ACE_OS::alarm (4); - break; - case SIGINT: - // Tell the ACE_Reactor to enable the ready bit for - // this->handle_. The ACE_Reactor will subsequently call the - // Sig_Handler::handle_input method from within its event loop. - return ACE_Service_Config::reactor ()->ready_ops - (this->handle_, ACE_Event_Handler::READ_MASK, ACE_Reactor::ADD_MASK); - case SIGQUIT: - ACE_DEBUG ((LM_DEBUG, "%S: shutting down signal tester\n", signum)); - ACE_Service_Config::end_reactor_event_loop (); - break; - default: - ACE_DEBUG ((LM_DEBUG, - "%S: not handled, returning to program\n", signum)); - break; - } - return 0; -} - -// This class illustrates that the ACE_Reactor can handle signals, -// STDIO, and timeouts using the same mechanisms. - -class STDIN_Handler : public ACE_Event_Handler -{ -public: - STDIN_Handler (void); - virtual int handle_input (ACE_HANDLE); - virtual int handle_timeout (const ACE_Time_Value &, - const void *arg); -}; - -STDIN_Handler::STDIN_Handler (void) -{ - if (ACE::register_stdin_handler (this, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_stdin_handler")); - - // Register the STDIN_Handler to be dispatched once every second. - else if (ACE_Service_Config::reactor ()->schedule_timer - (this, 0, ACE_Time_Value (1), ACE_Time_Value (1)) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "schedule_timer", 1)); -} - -int -STDIN_Handler::handle_timeout (const ACE_Time_Value &tv, - const void *) -{ - ACE_DEBUG ((LM_DEBUG, "timeout occurred at %d sec, %d usec\n", - tv.sec (), tv.usec ())); - return 0; -} - -// Read from input descriptor and write to stdout descriptor. - -int -STDIN_Handler::handle_input (ACE_HANDLE handle) -{ - ssize_t n; - char buf[BUFSIZ]; - - switch (n = ACE_OS::read (handle, buf, sizeof buf)) - { - case -1: - if (errno == EINTR) - return 0; - /* NOTREACHED */ - else - ACE_ERROR ((LM_ERROR, "%p\n", "read")); - /* FALLTHROUGH */ - case 0: - ACE_Service_Config::end_reactor_event_loop (); - break; - default: - { - ssize_t result = ACE::write_n (ACE_STDOUT, buf, n); - - if (result != n) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "write"), - result == -1 && errno == EINTR ? 0 : -1); - } - } - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv [0]); - - // Signal handler. - Sig_Handler sh; - - // Define an I/O handler object. - STDIN_Handler ioh; - - // Optionally start the alarm. - if (argc > 1) - ACE_OS::alarm (4); - - // Loop handling signals and I/O events until SIGQUIT occurs. - - while (daemon.reactor_event_loop_done () == 0) - daemon.run_reactor_event_loop (); - - return 0; -} diff --git a/examples/Reactor/Misc/test_signals.cpp b/examples/Reactor/Misc/test_signals.cpp deleted file mode 100644 index 6493667de12..00000000000 --- a/examples/Reactor/Misc/test_signals.cpp +++ /dev/null @@ -1,226 +0,0 @@ -// Test the ability of the Reactor/Signal_Handler to register multiple -// $Id$ - -// handler per-signal. - -/* This test works as follows: - - 1. To test the "original" semantics of ACE (i.e., only one - ACE_Event_Handler can be registered per signal), you don't - need to do anything special. Existing programs work the - same since giving the Reactor's constructor a 0 value - (which is the default argument, BTW) instructs it to behave - as before. When a 0 is given, the ACE_Reactor's - constructor/open method creates an instance of - ACE_Sig_Handler and assigns this to an internal pointer. - This pointer is then used to dispatch all signal-related - methods within the Reactor. The default ACE_Sig_Handler - only allows *one* ACE_Event_Handler to be registered - per-signal. - - To run this version of the test do the following: - - % ./test-signal - ./test_signals - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in Sig_Handler_2 (fruity, 0, 0) with count = 1 - waiting for SIGINT or SIGQUIT - ^\ - signal Quit occurred in Sig_Handler_2 (fruity, 0, 0) with count = 2 - shutting down SIGQUIT in Sig_Handler_2 (fruity, 0, 0) - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in Sig_Handler_2 (fruity, 0, 0) with count = 3 - waiting for SIGINT or SIGQUIT - ^\Quit (core dumped) - - Note that in this test only one handler (the last one -- - "Sig_Handler_2 (fruity)") is actually registered. BTW, the - core dump is the expected behavior since the default - disposition is restored when there are no more handlers - (see the code below). - - 2. To test the "multiple handlers per-signal semantics", you - need to pass the constructor/open method of the ACE_Reactor - a pointer to a an instance of ACE_Sig_Handlers (note the - plural "s"). ACE_Sig_Handlers is a class that derives from - ACE_Sig_Handler. The difference between these two classes - is that (1) ACE_Sig_Handlers::register_signal allows - multiple ACE_Event_Handlers to be registered per-signal and - (2) it enables SA_RESTART by default. This class also - implements Detlef Becker's algorithm for integrating ACE - signal handling with 3rd party libraries. - - To run this version of the test do the following: - - % ./test_signals 1 - - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in external handler! - signal Interrupt occurred in Sig_Handler_1 (howdy, 3, 1) with count = 1 - shutting down SIGINT in Sig_Handler_1 (howdy, 3, 1) - signal Interrupt occurred in Sig_Handler_1 (doody, 5, 4) with count = 1 - shutting down SIGINT in Sig_Handler_1 (doody, 5, 4) - signal Interrupt occurred in Sig_Handler_2 (tutty, 7, 6) with count = 1 - signal Interrupt occurred in Sig_Handler_2 (fruity, 9, 8) with count = 1 - waiting for SIGINT or SIGQUIT - ^\ - signal Quit occurred in Sig_Handler_1 (howdy, 3, 1) with count = 2 - shutting down SIGQUIT in Sig_Handler_1 (howdy, 3, 1) - signal Quit occurred in Sig_Handler_1 (doody, 5, 4) with count = 2 - shutting down SIGQUIT in Sig_Handler_1 (doody, 5, 4) - signal Quit occurred in Sig_Handler_2 (tutty, 7, 6) with count = 2 - shutting down SIGQUIT in Sig_Handler_2 (tutty, 7, 6) - signal Quit occurred in Sig_Handler_2 (fruity, 9, 8) with count = 2 - shutting down SIGQUIT in Sig_Handler_2 (fruity, 9, 8) - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in external handler! - signal Interrupt occurred in Sig_Handler_2 (tutty, 7, 6) with count = 3 - signal Interrupt occurred in Sig_Handler_2 (fruity, 9, 8) with count = 3 - waiting for SIGINT or SIGQUIT - ^\Quit (core dumped) - - When this test begins all four handlers are registered and - dispatched when a SIGINT or SIGQUIT occurs. After the - first SIGINT, the handle_signal method of the Sig_Handler_1 - objects unregister themselves. At that point there are 4 - SIGQUIT handlers left, but only 2 of our SIGINT handlers - left (and the 1 external handler). After the first - SIGQUIT, there are no SIGQUIT handlers left since they all - deregister themselves (which restores the "SIG_DFL" - disposition). On the second SIGINT there are only 3 - handlers left (2 of ours and 1 external). Finally, on the - second SIGQUIT we exit and dump core since that's what - happens with the default disposition for SIGQUIT. */ - -#include "ace/Log_Msg.h" -#include "ace/Reactor.h" - -class Sig_Handler_1 : public ACE_Event_Handler -{ -public: - Sig_Handler_1 (ACE_Reactor &reactor, char *msg) - : msg_ (msg), - count_ (0), - reactor_ (reactor) - { - // Register the signal handlers. - this->quit_sigkey_ = reactor.register_handler (SIGQUIT, this); - this->int_sigkey_ = reactor.register_handler (SIGINT, this); - - if (this->quit_sigkey_ == -1 || this->int_sigkey_ == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_handler")); - } - - virtual int handle_signal (int signum, siginfo_t *, ucontext_t *) - { - this->count_++; - ACE_DEBUG ((LM_DEBUG, - "\nsignal %S occurred in Sig_Handler_1 (%s, %d, %d) with count = %d", - signum, this->msg_, this->int_sigkey_, this->quit_sigkey_, this->count_)); - if (this->count_ != 1 && signum == SIGQUIT) - { - if (this->reactor_.remove_handler (SIGQUIT, 0, 0, - this->quit_sigkey_) == -1) - ACE_ERROR ((LM_ERROR, "\n%p", "remove_handler")); - else - ACE_DEBUG ((LM_DEBUG, "\nshutting down SIGQUIT in Sig_Handler_1 (%s, %d, %d)", - this->msg_, this->int_sigkey_, this->quit_sigkey_)); - } - else if (this->count_ != 2 && signum == SIGINT) - { - if (this->reactor_.remove_handler (SIGINT, 0, 0, - this->int_sigkey_) == -1) - ACE_ERROR ((LM_ERROR, "\n%p", "remove_handler")); - else - ACE_DEBUG ((LM_DEBUG, "\nshutting down SIGINT in Sig_Handler_1 (%s, %d, %d)", - this->msg_, this->int_sigkey_, this->quit_sigkey_)); - } - return 0; - } - -protected: - char *msg_; - int count_; - int int_sigkey_; - int quit_sigkey_; - ACE_Reactor &reactor_; -}; - -class Sig_Handler_2 : public Sig_Handler_1 -{ -public: - Sig_Handler_2 (ACE_Reactor &reactor, char *msg) - : Sig_Handler_1 (reactor, msg) - { - } - - virtual int handle_signal (int signum, siginfo_t *, ucontext_t *) - { - this->count_++; - ACE_DEBUG ((LM_DEBUG, - "\nsignal %S occurred in Sig_Handler_2 (%s, %d, %d) with count = %d", - signum, this->msg_, this->int_sigkey_, this->quit_sigkey_, this->count_)); - if (this->count_ != 0 && signum == SIGQUIT) - { - if (this->reactor_.remove_handler (SIGQUIT, 0, 0, - this->quit_sigkey_) == -1) - ACE_ERROR ((LM_ERROR, "\n%p", "remove_handler")); - else - ACE_DEBUG ((LM_DEBUG, "\nshutting down SIGQUIT in Sig_Handler_2 (%s, %d, %d)", - this->msg_, this->int_sigkey_, this->quit_sigkey_)); - } - else - return 0; - } -}; - -static void -external_handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "\nsignal %S occurred in external handler!", signum)); -} - -#if !defined (HPUX) -int -main (int argc, char *argv) -{ - // If argc > 1 then allow multiple handlers per-signal, else just - // allow 1 handler per-signal. - ACE_Sig_Handlers multi_handlers; - - ACE_Reactor reactor (argc > 1 ? &multi_handlers: 0); - - if (argc > 1) - { - // Register an "external" signal handler so that the - // ACE_Sig_Handlers code will have something to incorporate! - ACE_SignalHandler eh = ACE_SignalHandler (external_handler); - ACE_Sig_Action sa (eh); - - sa.register_action (SIGINT); - } - - // Create a bevy of handlers. - Sig_Handler_1 h1 (reactor, "howdy"), h2 (reactor, "doody"); - Sig_Handler_2 h3 (reactor, "tutty"), h4 (reactor, "fruity"); - - // Wait for user to type SIGINT and SIGQUIT. - - for (;;) - { - ACE_DEBUG ((LM_DEBUG, "\nwaiting for SIGINT or SIGQUIT\n")); - reactor.handle_events (); - } - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "The HP C++ compiler is too lame to support this feature\n"), -1); -} -#endif /* HPUX */ diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphore_Client.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphore_Client.cpp deleted file mode 100644 index b7fe34725e7..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphore_Client.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "Semaphore_Test.h" -// $Id$ - -#include "ace/SV_Shared_Memory.h" -#include "ace/SV_Semaphore_Simple.h" - -int -main (void) -{ - ACE_SV_Shared_Memory shm_client (SHM_KEY, - SHMSZ, - ACE_SV_Shared_Memory::ACE_OPEN); - ACE_SV_Semaphore_Simple sem (SEM_KEY_1, - ACE_SV_Semaphore_Simple::ACE_OPEN, 0, 2); - - char *s = (char *) shm_client.get_segment_ptr (); - - if (sem.acquire (0) < 0) - ACE_OS::perror ("client sem.acquire"), ACE_OS::exit (1); - - while (*s != '\0') - putchar (*s++); - - putchar ('\n'); - - if (sem.release (1) < 0) - ACE_OS::perror ("client sem.release"), ACE_OS::exit (1); - - return 0; -} - diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphore_Server.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphore_Server.cpp deleted file mode 100644 index f9931705c26..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphore_Server.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// $Id$ - - -#include "ace/SV_Shared_Memory.h" -#include "ace/SV_Semaphore_Simple.h" -#include "ace/Signal.h" -#include "Semaphore_Test.h" - -static ACE_SV_Shared_Memory shm_server (SHM_KEY, SHMSZ, ACE_SV_Shared_Memory::ACE_CREATE); -static ACE_SV_Semaphore_Simple sem (SEM_KEY_1, ACE_SV_Semaphore_Simple::ACE_CREATE, 0, 2); - -extern "C" void -cleanup (int) -{ - if (shm_server.remove () < 0 || sem.remove () < 0) - ACE_ERROR ((LM_ERROR, "%p\n%a", "remove", 1)); - ACE_OS::exit (0); -} - -int -main (void) -{ - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) cleanup, SIGINT); - - char *s = (char *) shm_server.get_segment_ptr (); - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - if (sem.release (0) < 0) - ESD ("server sem.release", done); - - if (sem.acquire (1) < 0) - ESD ("server sem.acquire", done); - -done: - cleanup (); - return 0; -} diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphore_Test.h b/examples/System_V_IPC/SV_Semaphores/Semaphore_Test.h deleted file mode 100644 index 72aab815ff8..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphore_Test.h +++ /dev/null @@ -1,11 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/Log_Msg.h" - -#define SHMSZ 27 -#define SEM_KEY_1 2345 -#define SEM_KEY_2 4321 -#define SHM_KEY 5678 - -#define ESD(MSG,LABEL) do { ACE_ERROR ((LM_ERROR, MSG)); goto LABEL; } while (0) diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphores.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphores.cpp deleted file mode 100644 index c5e96ed0416..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphores.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// Illustrates the use of the Semaphore_Complex class. Note that it -// $Id$ - -// doesn't matter whether the parent or the child creates the -// semaphore since Semaphore_Complex will correctly serialize the -// intialization of the mutex and synch objects. -#include "ace/Malloc.h" -#include "ace/SV_Semaphore_Complex.h" -#include "Semaphore_Test.h" - -ACE_Malloc allocator; -ACE_SV_Semaphore_Complex *mutex = 0; -ACE_SV_Semaphore_Complex *synch = 0; - -/* Pointer to memory shared by both the client and server. */ -static char *shm; - -static int -do_parent (void) -{ - char *s = shm; - - mutex = new ACE_SV_Semaphore_Complex (SEM_KEY_1, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - synch = new ACE_SV_Semaphore_Complex (SEM_KEY_2, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - if (mutex->release () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "server mutex.release"), 1); - - if (synch->acquire () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "server synch.acquire"), 1); - return 0; -} - -static int -do_child (void) -{ - mutex = new ACE_SV_Semaphore_Complex (SEM_KEY_1, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - synch = new ACE_SV_Semaphore_Complex (SEM_KEY_2, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - - while (mutex->tryacquire () == -1) - if (errno == EAGAIN) - ACE_DEBUG ((LM_DEBUG, "spinning in client!\n")); - else - ACE_ERROR_RETURN ((LM_ERROR, "client mutex.tryacquire"), 1); - - for (char *s = (char *) shm; *s != '\0'; s++) - putchar (*s); - - putchar ('\n'); - - if (synch->release () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "client synch.release"), 1); - return 0; -} - -int -main (void) -{ - shm = (char *) allocator.malloc (27); - - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "fork failed\n"), -1); - /* NOTREACHED */ - case 0: - return do_child (); - default: - { - int result = do_parent (); - - if (wait (0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "wait"), -1); - - allocator.remove (); - - if (mutex->remove () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "mutex.remove"), -1); - else if (synch->remove () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "synch.remove"), -1); - return result; - } - } -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Malloc; -template class ACE_Malloc_T; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Threads/test_auto_event.cpp b/examples/Threads/test_auto_event.cpp deleted file mode 100644 index 4f83d50db71..00000000000 --- a/examples/Threads/test_auto_event.cpp +++ /dev/null @@ -1,113 +0,0 @@ -// $Id$ - -// This test shows the use of an ACE_Auto_Event as a signaling -// mechanism. Two threads are created (one a reader, the other a -// writer). The reader waits till the writer has completed -// calculations. Upon waking up the reader prints the data calculated -// by the writer. The writer thread calculates the value and signals -// the reader when the calculation completes. - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Singleton.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) -// Shared event between reader and writer. The ACE_Thread_Mutex is -// necessary to make sure that only one ACE_Auto_Event is created. -// The default constructor for ACE_Auto_Event sets it initially into -// the non-signaled state. - -typedef ACE_Singleton EVENT; - -// work time for writer -static int work_time; - -// Reader thread. -static void * -reader (void *arg) -{ - // Shared data via a reference. - int& data = *(int *) arg; - - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - // Wait for writer to complete. - - ACE_DEBUG ((LM_DEBUG, "(%t) reader: waiting...... \n")); - - if (EVENT::instance ()->wait () == -1) - { - ACE_ERROR ((LM_ERROR, "thread wait failed")); - ACE_OS::exit (0); - } - - // Read shared data. - ACE_DEBUG ((LM_DEBUG, "(%t) reader: value of data is: %d \n", data)); - - return 0; -} - -// Writer thread. -static void * -writer (void *arg) -{ - int& data = *(int *) arg; - - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - // Calculate (work). - ACE_DEBUG ((LM_DEBUG, "(%t) writer: working for %d secs\n", work_time)); - ACE_OS::sleep (work_time); - - // Write shared data. - data = 42; - - // Wake up reader. - ACE_DEBUG ((LM_DEBUG, "(%t) writer: calculation complete, waking reader\n")); - - if (EVENT::instance ()->signal () == -1) - { - ACE_ERROR ((LM_ERROR, "thread wait failed")); - ACE_OS::exit (0); - } - - return 0; -} - -int -main (int argc, char **argv) -{ - // Shared data: set by writer, read by reader. - int data; - - // Work time for writer. - work_time = argc == 2 ? atoi (argv[1]) : 5; - - // threads manager - ACE_Thread_Manager& tm = *ACE_Service_Config::thr_mgr (); - - // Create reader thread. - if (tm.spawn (reader, (void *) &data) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread create for reader failed"), -1); - - // Create writer thread. - if (tm.spawn (writer, (void *) &data) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread create for writer failed"), -1); - - // Wait for both. - if (tm.wait () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread wait failed"), -1); - else - ACE_DEBUG ((LM_ERROR, "graceful exit\n")); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_barrier1.cpp b/examples/Threads/test_barrier1.cpp deleted file mode 100644 index 6b213819ca0..00000000000 --- a/examples/Threads/test_barrier1.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// This test program illustrates how the ACE barrier synchronization -// $Id$ - -// mechanisms work. - - -#include "ace/Synch.h" -#include "ace/Thread_Manager.h" -#include "ace/Service_Config.h" - -#if defined (ACE_HAS_THREADS) - -struct Tester_Args - // = TITLE - // These arguments are passed into each test thread. -{ - Tester_Args (ACE_Barrier &tb, int i) - : tester_barrier_ (tb), - n_iterations_ (i) {} - - ACE_Barrier &tester_barrier_; - // Reference to the tester barrier. This controls each miteration of - // the tester function running in every thread. - - int n_iterations_; - // Number of iterations to run. -}; - -// Iterate time printing off a message and "waiting" -// for all other threads to complete this iteration. - -static void * -tester (Tester_Args *args) -{ - // Keeps track of thread exit. - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - for (int iterations = 1; - iterations <= args->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d\n", iterations)); - - // Block until all other threads have waited, then continue. - args->tester_barrier_.wait (); - } - - return 0; -} - -// Default number of threads to spawn. -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv[0]); - - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - ACE_Barrier tester_barrier (n_threads); - - Tester_Args args (tester_barrier, n_iterations); - - if (ACE_Service_Config::thr_mgr ()->spawn_n - (n_threads, ACE_THR_FUNC (tester), - (void *) &args, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); - - // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_barrier2.cpp b/examples/Threads/test_barrier2.cpp deleted file mode 100644 index 30190ace443..00000000000 --- a/examples/Threads/test_barrier2.cpp +++ /dev/null @@ -1,269 +0,0 @@ -// $Id$ - -// generic_worker_task.cpp -// -// This test program illustrates how the ACE task workers/barrier -// synchronization mechanisms work in conjunction with the ACE_Task -// and the ACE_Thread_Manager. The manual flag not set simulates -// user input, if set input comes from stdin until RETURN only is -// entered which stops all workers via a message block of length -// 0. This is an alernative shutdown of workers compared to queue -// deactivate. The delay_put flag simulates a delay between the -// shutdown puts. All should work with this flag disabled! The -// BARRIER_TYPE is supposed to enable/disable barrier sync on each svc -// a worker has done. - -#include -#include "ace/Task.h" -#include "ace/Service_Config.h" - -#if defined (ACE_HAS_THREADS) - -#define BARRIER_TYPE ACE_Null_Barrier -//#define BARRIER_TYPE ACE_Barrier -//#ifdef delay_put -//#define manual - -template -class Worker_Task : public ACE_Task -{ -public: - - Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int inp_serialize = 1); - - virtual int Producer (void); - // produce input for workers - - virtual int input (ACE_Message_Block *mb); - // Fill one message block via a certain input strategy. - - virtual int output (ACE_Message_Block *mb); - // Forward one message block via a certain output strategy to the - // next task if any. - - virtual int service (ACE_Message_Block *mb, int iter); - // Perform one message block dependant service. - -private: - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv=0); - - virtual int svc (void); - // Iterate time printing off a message and "waiting" - // for all other threads to complete this iteration. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) {ACE_DEBUG ((LM_DEBUG,"(%t) in close of worker\n")); return 0; } - - int nt_; - // Number of worker threads to run. - int inp_serialize_; - - BARRIER barrier_; -}; - -template -Worker_Task::Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int inp_serialize) - : ACE_Task (thr_mgr), - barrier_ (n_threads) -{ - nt_ = n_threads; - // Create worker threads. - inp_serialize_ = inp_serialize; - - // Use the task's message queue for serialization (default) or run - // service in the context of the caller thread. - - if (nt_ > 0 && inp_serialize == 1) - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Simply enqueue the Message_Block into the end of the queue. - -template int -Worker_Task::put (ACE_Message_Block *mb, ACE_Time_Value *tv) -{ - int result; - if (this->inp_serialize_) - result = this->putq (mb, tv); - else - { - static int iter = 0; - result = this->service (mb, iter++); - - if (this->output (mb) < 0) - ACE_DEBUG ((LM_DEBUG, "(%t) output not connected!\n")); - - delete mb; - } - return result; -} - -template int -Worker_Task::service (ACE_Message_Block *mb, int iter) -{ - int length = mb->length (); - - if (length > 0) - { - ACE_DEBUG ((LM_DEBUG,"(%t) in iteration %d len=%d text got:\n",iter,length)); - ACE_OS::write (ACE_STDOUT, mb->rd_ptr (), length); - ACE_DEBUG ((LM_DEBUG,"\n")); - } - return 0; -} - -// Iterate time printing off a message and "waiting" -// for all other threads to complete this iteration. - -template int -Worker_Task::svc (void) -{ - // Note that the ACE_Task::svc_run () method automatically adds us - // to the Thread_Manager when the thread begins. - - // Keep looping, reading a message out of the queue, until we get a - // message with a length == 0, which signals us to quit. - - for (int iter = 1; ;iter++) - { - ACE_Message_Block *mb = 0; - - int result = this->getq (mb); - - if (result == -1) - { - ACE_ERROR ((LM_ERROR, - "(%t) in iteration %d\n", "error waiting for message in iteration", iter)); - break; - } - - int length = mb->length (); - this->service (mb,iter); - - if (length == 0) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d got quit, exit!\n", iter)); - delete mb; - break; - } - - this->barrier_.wait (); - this->output (mb); - - delete mb; - } - - // Note that the ACE_Task::svc_run () method automatically removes - // us from the Thread_Manager when the thread exits. - - return 0; -} - -template int -Worker_Task::Producer (void) -{ - // Keep reading stdin, until we reach EOF. - - for (;;) - { - // Allocate a new message. - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - - if (this->input (mb) == -1) - return -1; - } - - return 0; -} - -template int -Worker_Task::output (ACE_Message_Block *mb) -{ - return this->put_next (mb); -} - -template int -Worker_Task::input (ACE_Message_Block *mb) -{ - ACE_Message_Block *mb1; - -#ifndef manual - static int l= 0; - char str[]="kalle"; - strcpy (mb->rd_ptr (),str); - int n=strlen (str); - if (l==1000) - n=1; - l++; - if (l==0 || (l%100 == 0)) ACE_OS::sleep (5); - if (n <= 1) -#else - ACE_DEBUG ((LM_DEBUG,"(%t) press chars and enter to put a new message into task queue ...\n")); - if ((n = read (0, mb->rd_ptr (), mb->size ())) <= 1) -#endif // manual - { - // Send a shutdown message to the waiting threads and exit. - // cout << "\nvor loop, dump of task msg queue:\n" << endl; - // this->msg_queue ()->dump (); - for (int i=0;ilength (0); - if (this->put (mb1) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put")); -#ifdef delay_put - ACE_OS::sleep (1); // this sleep helps to shutdown correctly -> was an error! -#endif /* delay_put */ - } - // cout << "\nnach loop, dump of task msg queue:\n" << endl; - // this->msg_queue ()->dump (); - return (-1); - } - else - { - // Send a normal message to the waiting threads and continue producing. - mb->wr_ptr (n); - if (this->put (mb) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put")); - } - return 0; -} - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - - ACE_DEBUG ((LM_DEBUG,"(%t) worker threads running=%d\n",n_threads)); - - - Worker_Task *worker_task = - new Worker_Task (ACE_Service_Config::thr_mgr (), - /*n_threads*/ 0,0); - - worker_task->Producer (); - - // Wait for all the threads to reach their exit point. - ACE_DEBUG ((LM_DEBUG,"(%t) waiting with thread manager ...\n")); - ACE_Service_Config::thr_mgr ()->wait (); - ACE_DEBUG ((LM_DEBUG,"(%t) delete worker task ...\n")); - - delete worker_task; - ACE_DEBUG ((LM_DEBUG,"(%t) done correct!\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_cancel.cpp b/examples/Threads/test_cancel.cpp deleted file mode 100644 index a9d12bea579..00000000000 --- a/examples/Threads/test_cancel.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// Test out the cooperative thread cancellation mechanisms provided by -// $Id$ - -// the ACE_Thread_Manager. - -#include "ace/Service_Config.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) - -static void * -worker (int iterations) -{ - for (int i = 0; i < iterations; i++) - { - if ((i % 10) == 0 - && (ACE_Service_Config::thr_mgr ()->testcancel (ACE_Thread::self ()) != 0)) - { - ACE_DEBUG ((LM_DEBUG, "(%t) has been cancelled before iteration!\n", i)); - break; - } - } - - return 0; -} - -static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS; -static const int DEFAULT_ITERATIONS = 100000; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - daemon.open (argv[0]); - - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); - - int grp_id = thr_mgr->spawn_n (n_threads, ACE_THR_FUNC (worker), - (void *) n_iterations, - THR_NEW_LWP | THR_DETACHED); - - // Wait for 2 seconds and then suspend every thread in the group. - ACE_OS::sleep (2); - thr_mgr->suspend_grp (grp_id); - - // Wait for 2 more seconds and then resume every thread in the - // group. - ACE_OS::sleep (ACE_Time_Value (2)); - thr_mgr->resume_grp (grp_id); - - // Wait for 2 more seconds and then send a SIGINT to every thread in - // the group. - ACE_OS::sleep (ACE_Time_Value (2)); - thr_mgr->kill_grp (grp_id, SIGINT); - - // Wait for 2 more seconds and then exit (which should kill all the - // threads)! - ACE_OS::sleep (ACE_Time_Value (2)); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_future1.cpp b/examples/Threads/test_future1.cpp deleted file mode 100644 index 79cf0a42b36..00000000000 --- a/examples/Threads/test_future1.cpp +++ /dev/null @@ -1,420 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Test_Future.cpp -// -// = DESCRIPTION -// This example tests the ACE Future. -// -// = AUTHOR -// Andres Kruse and Douglas C. Schmidt -// -// -// ============================================================================ - -#include -#include "ace/Task.h" - -#include "ace/Synch.h" -#include "ace/Message_Queue.h" -#include "ace/Future.h" -#include "ace/Method_Object.h" -#include "ace/Activation_Queue.h" -#include "ace/Auto_Ptr.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Atomic_Op ATOMIC_INT; - -// a counter for the tasks.. -static ATOMIC_INT task_count (0); - -// a counter for the futures.. -static ATOMIC_INT future_count (0); -static ATOMIC_INT future_no (0); - -// a counter for the capsules.. -static ATOMIC_INT capsule_count (0); -static ATOMIC_INT capsule_no (0); - -// a counter for the method objects... -static ATOMIC_INT methodobject_count (0); -static ATOMIC_INT methodobject_no (0); - -class Scheduler : public ACE_Task - // = TITLE - // Active Object Scheduler. -{ - friend class Method_ObjectWork; -public: - Scheduler (const char *, Scheduler * = 0); - ~Scheduler (void); - - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0); - virtual int svc (void); - - ACE_Future work (float param, int count); - ACE_Future name (void); - void end (void); - - float work_i (float, int); - const char *name_i (void); - -private: - char *name_; - ACE_Activation_Queue activation_queue_; - Scheduler *scheduler_; - -}; - -class Method_Object_work : public ACE_Method_Object - // = TITLE - // Reification of the method. -{ -public: - Method_Object_work (Scheduler *, float, int, ACE_Future &); - ~Method_Object_work (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - float param_; - int count_; - ACE_Future future_result_; -}; - -Method_Object_work::Method_Object_work (Scheduler* new_Scheduler, - float new_param, - int new_count, - ACE_Future &new_result) - : scheduler_ (new_Scheduler), - param_ (new_param), - count_ (new_count), - future_result_ (new_result) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) Method_Object_work created\n")); -} - -Method_Object_work::~Method_Object_work (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Method_Object_work will be deleted.\n")); -} - - -int -Method_Object_work::call (void) -{ - return this->future_result_.set (this->scheduler_->work_i (this->param_, this->count_)); -} - -class Method_Object_name : public ACE_Method_Object - // = TITLE - // Reification of the method. -{ -public: - Method_Object_name (Scheduler *, ACE_Future &); - ~Method_Object_name (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - ACE_Future future_result_; -}; - -Method_Object_name::Method_Object_name (Scheduler *new_scheduler, - ACE_Future &new_result) - : scheduler_ (new_scheduler), - future_result_ (new_result) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) Method_Object_name created\n")); -}; - -Method_Object_name::~Method_Object_name (void) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) Method_Object_name will be deleted.\n")); -} - -int -Method_Object_name::call (void) -{ - return future_result_.set (scheduler_->name_i ()); -} - -class Method_Object_end : public ACE_Method_Object - // = TITLE - // Reification of the method. -{ -public: - Method_Object_end (Scheduler *new_Scheduler): scheduler_ (new_Scheduler) {} - ~Method_Object_end (void) {} - virtual int call (void) { this->scheduler_->close (); return -1; } - -private: - Scheduler *scheduler_; -}; - -// constructor -Scheduler::Scheduler (const char *newname, Scheduler *new_Scheduler) -{ - ACE_NEW (this->name_, char[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy ((char *) this->name_, newname); - this->scheduler_ = new_Scheduler; - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s created\n", this->name_)); -} - -// Destructor -Scheduler::~Scheduler (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s will be destroyed\n", this->name_)); -} - -// open -int -Scheduler::open (void *) -{ - task_count++; - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s open\n", this->name_)); - return this->activate (THR_BOUND); -} - -// close -int -Scheduler::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s close\n", this->name_)); - task_count--; - return 0; -} - -// put... ?? -int -Scheduler::put (ACE_Message_Block *, ACE_Time_Value *) -{ - return 0; -} - -// service.. -int -Scheduler::svc (void) -{ - for (;;) - { - // Dequeue the next method object (we use an auto pointer in - // case an exception is thrown in the ). - ACE_Auto_Ptr mo (this->activation_queue_.dequeue ()); - - ACE_DEBUG ((LM_DEBUG, "(%t) calling method object\n")); - // Call it. - if (mo->call () == -1) - break; - // Destructor automatically deletes it. - } - - /* NOTREACHED */ - return 0; -} - -void -Scheduler::end (void) -{ - this->activation_queue_.enqueue (new Method_Object_end (this)); -} - - -// Here's where the Work takes place. -float -Scheduler::work_i (float param, - int count) -{ - float x = 0, y = 0; - - // @@ We should probably do something fun here, like compute the - // Fibonacci sequence or something. - - for (int j = 0; j < count; j++) - { - x = x + param; - y = y + ::sin (x); - } - - return y; -} - -const char * -Scheduler::name_i (void) -{ - char *the_name; - - the_name = new char[ACE_OS::strlen (this->name_) + 1]; - ACE_OS::strcpy (the_name, this->name_); - - return the_name; -} - -ACE_Future -Scheduler::name (void) -{ - if (this->scheduler_) - // Delegate to the Scheduler. - return this->scheduler_->name (); - else - { - ACE_Future new_future; - - // @@ What happens if new fails here? - this->activation_queue_.enqueue - (new Method_Object_name (this, new_future)); - - return new_future; - } -} - -ACE_Future -Scheduler::work (float newparam, int newcount) -{ - if (this->scheduler_) { - return this->scheduler_->work (newparam, newcount); - } - else { - ACE_Future new_future; - - this->activation_queue_.enqueue - (new Method_Object_work (this, newparam, newcount, new_future)); - return new_future; - } -} - -// @@ These values should be set by the command line options! - -// Total number of iterations to -static int n_iterations = 50000; - -// Total number of loops. -static int n_loops = 100; - -int -main (int, char *[]) -{ - Scheduler *andres, *peter, *helmut, *matias; - - // Create active objects.. - // @@ Should "open" be subsumed within the constructor of - // Scheduler()? - andres = new Scheduler ("andres"); - andres->open (); - peter = new Scheduler ("peter"); - peter->open (); - helmut = new Scheduler ("helmut"); - helmut->open (); - - // Matias passes all asynchronous method calls on to Andres... - matias = new Scheduler ("matias", andres); - matias->open (); - - for (int i = 0; i < n_loops; i++) - { - { - ACE_Future fresulta, fresultb, fresultc, fresultd, fresulte; - ACE_Future fname; - - ACE_DEBUG ((LM_DEBUG, "(%t) going to do a non-blocking call\n")); - - fresulta = andres->work (0.01, 100 + (n_iterations * (i % 2))); - fresultb = peter->work (0.01, 100 + (n_iterations * (i % 2))); - fresultc = helmut->work (0.01, 100 + (n_iterations * (i % 2))); - fresultd = matias->work (0.02, 100 + (n_iterations * (i % 2))); - fname = andres->name (); - - // see if the result is available... - if (fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG, "(%t) wow.. work is ready.....\n")); - - ACE_DEBUG ((LM_DEBUG, "(%t) non-blocking call done... now blocking...\n")); - - // Save the result of fresulta. - - fresulte = fresulta; - - if (i % 3 == 0) - { - // Every 3rd time... disconnect the futures... - // but "fresulte" should still contain the result... - fresulta.cancel (10.0); - fresultb.cancel (20.0); - fresultc.cancel (30.0); - fresultd.cancel (40.0); - } - - float resulta = 0, resultb = 0, resultc = 0, resultd = 0, resulte = 0; - - fresulta.get (resulta); - fresultb.get (resultb); - fresultc.get (resultc); - fresultd.get (resultd); - fresulte.get (resulte); - - ACE_DEBUG ((LM_DEBUG, "(%t) result a %f\n", resulte)); - ACE_DEBUG ((LM_DEBUG, "(%t) result b %f\n", resulta)); - ACE_DEBUG ((LM_DEBUG, "(%t) result c %f\n", resultb)); - ACE_DEBUG ((LM_DEBUG, "(%t) result d %f\n", resultc)); - ACE_DEBUG ((LM_DEBUG, "(%t) result e %f\n", resultd)); - - const char *name; - - fname.get (name); - - ACE_DEBUG ((LM_DEBUG, "(%t) name %s\n", name)); - - } - - ACE_DEBUG ((LM_DEBUG, - "(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n", - (u_long) task_count, - (u_long) future_count, - (u_long) capsule_count, - (u_long) methodobject_count)); - } - - // Close things down. - andres->end (); - peter->end (); - helmut->end (); - matias->end (); - - ACE_OS::sleep (2); - - ACE_DEBUG ((LM_DEBUG, - "(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n", - (u_long) task_count, - (u_long) future_count, - (u_long) capsule_count, - (u_long) methodobject_count)); - - ACE_DEBUG ((LM_DEBUG,"(%t) th' that's all folks!\n")); - - ACE_OS::sleep (5); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_future2.cpp b/examples/Threads/test_future2.cpp deleted file mode 100644 index 19431072202..00000000000 --- a/examples/Threads/test_future2.cpp +++ /dev/null @@ -1,524 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Test_Future.cpp -// -// = DESCRIPTION -// This example tests the ACE Future. -// -// = AUTHOR -// Andres Kruse and Douglas C. Schmidt -// -// -// Modification History -// Aug. 96; A.Kruse; dev. -// Aug. 96; D.Schmidt; complete workover -// 08/27/96; A.Kruse; - the friends of Scheduler are "Method_Object_name" -// and "Method_Object_work". -// - make the methods "work_i" and "name_i" private -// 09/2/96; D.Schmidt; Integrate with new ACE_Future API and rearrange -// the tests so they are more modular. -// ============================================================================ - -#include -#include "ace/Task.h" - -#include "ace/Synch.h" -#include "ace/Message_Queue.h" -#include "ace/Future.h" -#include "ace/Method_Object.h" -#include "ace/Activation_Queue.h" -#include "ace/Auto_Ptr.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Atomic_Op ATOMIC_INT; - -// a counter for the tasks.. -static ATOMIC_INT scheduler_open_count (0); - -// forward declarations -class Method_Object_work; -class Method_Object_name; - -class Scheduler : public ACE_Task - // = TITLE - // Active Object Scheduler. -{ - // Every method object has to be able to access the private methods. - - friend class Method_Object_work; - friend class Method_Object_name; - friend class Method_Object_end; -public: - - Scheduler (const char *, Scheduler * = 0); - ~Scheduler (void); - - virtual int open (void *args = 0); - // The method that is used to start the active object. - - // = Here are the methods exported by the class. They return an - // . - ACE_Future work (float param, int count); - ACE_Future name (void); - void end (void); - -private: - virtual int close (u_long flags = 0); - // Should not be accessible from outside... (use end () instead). - - virtual int put (ACE_Message_Block *, ACE_Time_Value * = 0) - { return 0; }; - // Doesn't have any use for this example. - - virtual int svc (void); - // Here the actual servicing of all requests is happening.. - - // = Implementation methods. - float work_i (float, int); - char *name_i (void); - - char *name_; - ACE_Activation_Queue activation_queue_; - Scheduler *scheduler_; -}; - -class Method_Object_work : public ACE_Method_Object - // = TITLE - // Reification of the method. -{ -public: - Method_Object_work (Scheduler *, float, int, ACE_Future &); - ~Method_Object_work (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - float param_; - int count_; - ACE_Future future_result_; -}; - -Method_Object_work::Method_Object_work (Scheduler* new_Scheduler, - float new_param, - int new_count, - ACE_Future &new_result) - : scheduler_ (new_Scheduler), - param_ (new_param), - count_ (new_count), - future_result_ (new_result) -{ -} - -Method_Object_work::~Method_Object_work (void) -{ -} - -int -Method_Object_work::call (void) -{ - return this->future_result_.set (this->scheduler_->work_i (this->param_, this->count_)); -} - -class Method_Object_name : public ACE_Method_Object - // = TITLE - // Reification of the method. -{ -public: - Method_Object_name (Scheduler *, ACE_Future &); - ~Method_Object_name (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - ACE_Future future_result_; -}; - - -Method_Object_name::Method_Object_name (Scheduler *new_scheduler, - ACE_Future &new_result) - : scheduler_ (new_scheduler), - future_result_ (new_result) -{ - ACE_DEBUG ((LM_DEBUG, - " (%t) Method_Object_name created\n")); -}; - -Method_Object_name::~Method_Object_name (void) -{ - ACE_DEBUG ((LM_DEBUG, - " (%t) Method_Object_name will be deleted.\n")); -} - -int -Method_Object_name::call (void) -{ - return future_result_.set (scheduler_->name_i ()); -} - -class Method_Object_end : public ACE_Method_Object - // = TITLE - // Reification of the method. -{ -public: - Method_Object_end (Scheduler *new_Scheduler): scheduler_ (new_Scheduler) {} - ~Method_Object_end (void) {} - virtual int call (void) { this->scheduler_->close (); return -1; } - -private: - Scheduler *scheduler_; -}; - -// constructor -Scheduler::Scheduler (const char *newname, Scheduler *new_Scheduler) -{ - ACE_NEW (this->name_, char[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy ((char *) this->name_, newname); - this->scheduler_ = new_Scheduler; - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s created\n", this->name_)); -} - -// Destructor -Scheduler::~Scheduler (void) -{ - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s will be destroyed\n", this->name_)); -} - -int -Scheduler::open (void *) -{ - scheduler_open_count++; - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s open\n", this->name_)); - return this->activate (THR_BOUND); -} - -int -Scheduler::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s close\n", this->name_)); - scheduler_open_count--; - return 0; -} - -int -Scheduler::svc (void) -{ - // Main event loop for this active object. - for (;;) - { - // Dequeue the next method object (we use an auto pointer in - // case an exception is thrown in the ). - ACE_Auto_Ptr mo (this->activation_queue_.dequeue ()); - - ACE_DEBUG ((LM_DEBUG, " (%t) calling method object\n")); - // Call it. - if (mo->call () == -1) - break; - // Smart pointer destructor automatically deletes mo. - } - - /* NOTREACHED */ - return 0; -} - -void -Scheduler::end (void) -{ - this->activation_queue_.enqueue (new Method_Object_end (this)); -} - -// Here's where the Work takes place. -float -Scheduler::work_i (float param, - int count) -{ - float x = 0, y = 0; - - for (int j = 0; j < count; j++) - { - x = x + param; - y = y + ::sin (x); - } - - return y; -} - -char * -Scheduler::name_i (void) -{ - char *the_name; - - the_name = new char[ACE_OS::strlen (this->name_) + 1]; - ACE_OS::strcpy (the_name, this->name_); - - return the_name; -} - -ACE_Future -Scheduler::name (void) -{ - if (this->scheduler_) - // Delegate to the other scheduler - return this->scheduler_->name (); - else - { - ACE_Future new_future; - - if (this->thr_count () == 0) - { - // This scheduler is inactive... so we execute the user - // request right away... - - ACE_Auto_Ptr mo (new Method_Object_name (this, new_future)); - - mo->call (); - // Smart pointer destructor automatically deletes mo. - } - else - // @@ What happens if new fails here? - this->activation_queue_.enqueue - (new Method_Object_name (this, new_future)); - - return new_future; - } -} - -ACE_Future -Scheduler::work (float newparam, int newcount) -{ - if (this->scheduler_) - return this->scheduler_->work (newparam, newcount); - else - { - ACE_Future new_future; - - if (this->thr_count () == 0) - { - ACE_Auto_Ptr mo - (new Method_Object_work (this, newparam, newcount, new_future)); - mo->call (); - // Smart pointer destructor automatically deletes it. - } - else - this->activation_queue_.enqueue - (new Method_Object_work (this, newparam, newcount, new_future)); - - return new_future; - } -} - -static int -determine_iterations (void) -{ - int n_iterations; - - ACE_DEBUG ((LM_DEBUG," (%t) determining the number of iterations...\n")); - Scheduler *worker_a = new Scheduler ("worker A"); - - ACE_Time_Value tstart (ACE_OS::gettimeofday ()); - ACE_Time_Value tend (ACE_OS::gettimeofday ()); - - // Determine the number of iterations... we want so many that the - // work () takes about 1 second... - - for (n_iterations = 1; - (tend.sec () - tstart.sec ()) < 1; - n_iterations *= 2) - { - tstart = ACE_OS::gettimeofday (); - - worker_a->work (0.1, n_iterations); - - tend = ACE_OS::gettimeofday (); - } - - ACE_DEBUG ((LM_DEBUG," (%t) n_iterations %d\n", - (u_long) n_iterations)); - - worker_a->end (); - // @@ Can we safely delete worker_a here? - return n_iterations; -} - -static void -test_active_object (int n_iterations) -{ - ACE_DEBUG ((LM_DEBUG," (%t) testing active object pattern...\n")); - // A simple example for the use of the active object pattern and - // futures to return values from an active object. - - Scheduler *worker_a = new Scheduler ("worker A"); - Scheduler *worker_b = new Scheduler ("worker B"); - - // Have worker_c delegate his work to worker_a. - Scheduler *worker_c = new Scheduler ("worker C", worker_a); - - // loop 0: - // test the Schedulers when they are not active. - // now the method objects will be created but since - // there is no active thread they will also be - // immediately executed, in the "main" thread. - // loop 1: - // do the same test but with the schedulers - // activated - for (int i = 0; i < 2; i++) - { - if (i == 1) - { - worker_a->open (); - worker_b->open (); - worker_c->open (); - } - - ACE_Future fresulta = worker_a->work (0.01, n_iterations); - ACE_Future fresultb = worker_b->work (0.02, n_iterations); - ACE_Future fresultc = worker_c->work (0.03, n_iterations); - - if (i == 0) - { - if (!fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: worker A is should be ready!!!\n")); - if (!fresultb.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: worker B is should be ready!!!\n")); - if (!fresultc.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: worker C is should be ready!!!\n")); - } - - // When the workers are active we will block here until the - // results are available. - - float resulta = fresulta; - float resultb = fresultb; - float resultc = fresultc; - - ACE_Future fnamea = worker_a->name (); - ACE_Future fnameb = worker_b->name (); - ACE_Future fnamec = worker_c->name (); - - char *namea = fnamea; - char *nameb = fnameb; - char *namec = fnamec; - - ACE_DEBUG ((LM_DEBUG, " (%t) result from %s %f\n", - namea, resulta)); - ACE_DEBUG ((LM_DEBUG, " (%t) result from %s %f\n", - nameb, resultb)); - ACE_DEBUG ((LM_DEBUG, " (%t) result from %s %f\n", - namec, resultc)); - } - - ACE_DEBUG ((LM_DEBUG, " (%t) scheduler_open_count %d before end ()\n", - (u_long) scheduler_open_count)); - - worker_a->end (); - worker_b->end (); - worker_c->end (); - - ACE_DEBUG ((LM_DEBUG, " (%t) scheduler_open_count %d immediately after end ()\n", - (u_long) scheduler_open_count)); - - ACE_OS::sleep (2); - - ACE_DEBUG ((LM_DEBUG, " (%t) scheduler_open_count %d after waiting\n", - (u_long) scheduler_open_count)); - // @@ Can we safely delete worker_a, worker_b, and worker_c? -} - -static void -test_cancellation (int n_iterations) -{ - ACE_DEBUG ((LM_DEBUG," (%t) testing cancellation of a future...\n")); - - // Now test the cancelling a future. - - Scheduler *worker_a = new Scheduler ("worker A"); - worker_a->open (); - - ACE_Future fresulta = worker_a->work (0.01, n_iterations); - - // save the result by copying the future - ACE_Future fresultb = fresulta; - - // now we cancel the first future.. but the - // calculation will still go on... - fresulta.cancel (10.0); - - if (!fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: future A is should be ready!!!\n")); - - float resulta = fresulta; - - ACE_DEBUG ((LM_DEBUG, " (%t) cancelled result %f\n", resulta)); - - if (resulta != 10.0) - ACE_DEBUG ((LM_DEBUG, " (%t) cancelled result should be 10.0!!\n", resulta)); - - resulta = fresultb; - - ACE_DEBUG ((LM_DEBUG, " (%t) true result %f\n", resulta)); - - worker_a->end (); - // @@ Can we safely delete worker_a here? -} - -static void -test_timeout (int n_iterations) -{ - ACE_DEBUG ((LM_DEBUG," (%t) testing timeout on waiting for the result...\n")); - Scheduler *worker_a = new Scheduler ("worker A"); - worker_a->open (); - - ACE_Future fresulta = worker_a->work (0.01, 2 * n_iterations); - - // Should immediately return... and we should see an error... - ACE_Time_Value *delay = new ACE_Time_Value (1); - - float resulta; - fresulta.get (resulta, delay); - - if (fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: future A is should not be ready!!!\n")); - else - ACE_DEBUG ((LM_DEBUG," (%t) timed out on future A\n")); - - // now we wait until we are done... - fresulta.get (resulta); - ACE_DEBUG ((LM_DEBUG, " (%t) result %f\n", resulta)); - - worker_a->end (); - // @@ Can we safely delete worker_a here? -} - -int -main (int, char *[]) -{ - int n_iterations = determine_iterations (); - - test_active_object (n_iterations); - test_cancellation (n_iterations); - test_timeout (n_iterations); - - ACE_DEBUG ((LM_DEBUG," (%t) that's all folks!\n")); - - ACE_OS::sleep (5); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_manual_event.cpp b/examples/Threads/test_manual_event.cpp deleted file mode 100644 index 26d477fabc0..00000000000 --- a/examples/Threads/test_manual_event.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// The test shows the use of an ACE_Manual_Event to create a -// $Id$ - -// Pseudo_Barrier. Multiple threads are created which do the -// following: -// -// 1. work -// 2. synch with other threads -// 3. more work -// -// ACE_Manual_Event is use to synch with other -// threads. ACE_Manual_Event::signal() is used for broadcasting. - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) -static ACE_Atomic_Op amount_of_work = (u_long) 0; - -class Pseudo_Barrier - // = TITLE - // A barrier class using ACE manual-reset events. - // - // = DESCRIPTION - // This is *not* a real barrier. - // Pseudo_Barrier is more like a ``one shot'' barrier. - // All waiters after the Nth waiter are allowed to go. - // The barrier does not reset after the Nth waiter. - // For an example of a real barrier, please see class ACE_Barrier. -{ -public: - Pseudo_Barrier (u_long count); - - int wait (void); - -private: - ACE_Atomic_Op counter_; - ACE_Manual_Event event_; -}; - -Pseudo_Barrier::Pseudo_Barrier (u_long count) - : counter_ (count) -{ -} - -int -Pseudo_Barrier::wait (void) -{ - if (--this->counter_ == 0) - return this->event_.signal (); - else - return this->event_.wait (); -} - -static void * -worker (void *arg) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - Pseudo_Barrier &barrier = *(Pseudo_Barrier *) arg; - - // work - ACE_DEBUG ((LM_DEBUG, "(%t) working (%d secs)\n", ++::amount_of_work)); - ACE_OS::sleep (::amount_of_work); - - // synch with everybody else - ACE_DEBUG ((LM_DEBUG, "(%t) waiting to synch with others \n")); - barrier.wait (); - - // more work - ACE_DEBUG ((LM_DEBUG, "(%t) more work (%d secs)\n", ++::amount_of_work)); - ACE_OS::sleep (amount_of_work); - - ACE_DEBUG ((LM_DEBUG, "(%t) dying \n")); - - return 0; -} - -int -main (int argc, char **argv) -{ - int n_threads = argc == 2 ? atoi (argv[1]) : 5; - - ACE_Thread_Manager &tm = *ACE_Service_Config::thr_mgr (); - - // synch object shared by all threads - Pseudo_Barrier barrier (n_threads); - - // create workers - if (tm.spawn_n (n_threads, worker, &barrier) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread creates for worker failed"), -1); - - // wait for all workers to exit - if (tm.wait () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread wait failed"), -1); - else - ACE_DEBUG ((LM_ERROR, "graceful exit\n")); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_process_mutex.cpp b/examples/Threads/test_process_mutex.cpp deleted file mode 100644 index fb23c8b73be..00000000000 --- a/examples/Threads/test_process_mutex.cpp +++ /dev/null @@ -1,68 +0,0 @@ -// $Id$ - -// This program tests ACE_Process_Mutexes. To run it, open 3 or 4 -// windows and run this program in each window... - -#include "ace/Synch.h" -#include "ace/Signal.h" - -#if defined (ACE_HAS_THREADS) - -static sig_atomic_t done; - -extern "C" void -handler (int) -{ - done = 1; -} - -int -main (int argc, char *argv[]) -{ - char *name = argc > 1 ? argv[1] : "hello"; - int iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 100; - - ACE_Process_Mutex pm (name); - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - - for (int i = 0; i < iterations && !done; i++) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquiring\n")); - if (pm.acquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "acquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquired\n")); - - ACE_OS::sleep (3); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - - if (pm.tryacquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "tryacquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = tryacquire\n")); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - } - - if (argc > 2) - pm.remove (); - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support threads on this platform (yet)\n"), - -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_process_semaphore.cpp b/examples/Threads/test_process_semaphore.cpp deleted file mode 100644 index d7933897f8e..00000000000 --- a/examples/Threads/test_process_semaphore.cpp +++ /dev/null @@ -1,56 +0,0 @@ -// $Id$ - -// This program tests ACE_Process_Semaphore. To run it, open 3 or 4 -// windows and run this program in each window... - -#include "ace/Synch.h" -#include "ace/Signal.h" - -static sig_atomic_t done; - -extern "C" void -handler (int) -{ - done = 1; -} - -int -main (int argc, char *argv[]) -{ - char *name = argc == 1 ? "hello" : argv[1]; - - ACE_Process_Semaphore pm (1, name); - - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - - for (int i = 0; i < 100 && !done; i++) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquiring\n")); - if (pm.acquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "acquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquired\n")); - - ACE_OS::sleep (3); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - - if (pm.tryacquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "tryacquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = tryacquire\n")); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - } - - if (argc > 2) - pm.remove (); - return 0; -} - diff --git a/examples/Threads/test_reader_writer.cpp b/examples/Threads/test_reader_writer.cpp deleted file mode 100644 index ef888133d83..00000000000 --- a/examples/Threads/test_reader_writer.cpp +++ /dev/null @@ -1,187 +0,0 @@ -// This test program verifies the functionality of the ACE_OS -// $Id$ - -// implementation of readers/writer locks on Win32 and Posix pthreads. - - -#include "ace/Synch.h" -#include "ace/Thread.h" -#include "ace/Thread_Manager.h" -#include "ace/Get_Opt.h" - -#if defined (ACE_HAS_THREADS) - -// Default number of iterations. -static size_t n_iterations = 1000; - -// Default number of loops. -static size_t n_loops = 100; - -// Default number of readers. -static size_t n_readers = 6; - -// Default number of writers. -static size_t n_writers = 2; - -// Thread id of last writer. -volatile static int shared_data; - -// Lock for shared_data. -static ACE_RW_Mutex rw_mutex; - -// Count of the number of readers and writers. -ACE_Atomic_Op current_readers, current_writers; - -// Thread manager -static ACE_Thread_Manager thr_mgr; - -// Explain usage and exit. -static void -print_usage_and_die (void) -{ - ACE_DEBUG ((LM_DEBUG, - "usage: %n [-r n_readers] [-w n_writers] [-n iteration_count]\n")); - ACE_OS::exit (1); -} - -// Parse the command-line arguments and set options. -static void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "r:w:n:l:"); - - int c; - - while ((c = get_opt ()) != -1) - switch (c) - { - case 'r': - n_readers = ACE_OS::atoi (get_opt.optarg); - break; - case 'w': - n_writers = ACE_OS::atoi (get_opt.optarg); - break; - case 'n': - n_iterations = ACE_OS::atoi (get_opt.optarg); - break; - case 'l': - n_loops = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -// Iterate each time checking that nobody modifies the data -// while we have a read lock. - -static void * -reader (void *) -{ - ACE_Thread_Control tc (&thr_mgr); - ACE_DEBUG ((LM_DEBUG, "(%t) reader starting\n")); - - for (int iterations = 1; iterations <= n_iterations; iterations++) - { - ACE_Read_Guard g(rw_mutex); - int n = ++current_readers; - //ACE_DEBUG ((LM_DEBUG, "(%t) I'm reader number %d\n", n)); - - if (current_writers > 0) - ACE_DEBUG ((LM_DEBUG, "(%t) writers found!!!\n")); - - int data = shared_data; - - for (int loop = 1; loop <= n_loops; loop++) - { - ACE_Thread::yield(); - if (shared_data != data) - ACE_DEBUG ((LM_DEBUG, - "(%t) somebody changed %d to %d\n", - data, shared_data)); - } - - --current_readers; - //ACE_DEBUG ((LM_DEBUG, "(%t) done with reading guarded data\n")); - - ACE_Thread::yield (); - } - return 0; -} - -// Iterate each time modifying the global data -// and checking that nobody steps on it while we can write it. - -static void * -writer (void *) -{ - ACE_Thread_Control tc (&thr_mgr); - ACE_DEBUG ((LM_DEBUG, "(%t) writer starting\n")); - - for (int iterations = 1; iterations <= n_iterations; iterations++) - { - ACE_Write_Guard g(rw_mutex); - - ++current_writers; - //ACE_DEBUG ((LM_DEBUG, "(%t) writing to guarded data\n")); - - if (current_writers > 1) - ACE_DEBUG ((LM_DEBUG, "(%t) other writers found!!!\n")); - - if (current_readers > 0) - ACE_DEBUG ((LM_DEBUG, "(%t) readers found!!!\n")); - - int self = (int) ACE_Thread::self (); - shared_data = self; - - for (int loop = 1; loop <= n_loops; loop++) - { - ACE_Thread::yield(); - if (shared_data != self) - ACE_DEBUG ((LM_DEBUG, "(%t) somebody wrote on my data %d\n", shared_data)); - } - - --current_writers; - - //ACE_DEBUG ((LM_DEBUG, "(%t) done with guarded data\n")); - ACE_Thread::yield (); - } - return 0; -} - -// Spawn off threads. - -int main (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - parse_args (argc, argv); - - current_readers = 0; // Possibly already done - current_writers = 0; // Possibly already done - - ACE_DEBUG ((LM_DEBUG, "(%t) main thread starting\n")); - - if (thr_mgr.spawn_n (n_readers, reader, 0, THR_NEW_LWP) == -1 || - thr_mgr.spawn_n (n_writers, writer, 0, THR_NEW_LWP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); - - thr_mgr.wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) exiting main thread\n")); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ - diff --git a/examples/Threads/test_recursive_mutex.cpp b/examples/Threads/test_recursive_mutex.cpp deleted file mode 100644 index 1cc2892b2a8..00000000000 --- a/examples/Threads/test_recursive_mutex.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// $Id$ - -// This test program verifies the functionality of the ACE_OS -// implementation of recursive mutexes on Win32 and Posix pthreads. - -#include "ace/Service_Config.h" -#include "ace/Get_Opt.h" -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -// Total number of iterations. -static size_t n_iterations = 1000; -static size_t n_threads = 4; - -// Explain usage and exit. -static void -print_usage_and_die (void) -{ - ACE_DEBUG ((LM_DEBUG, - "usage: %n [-t n_threads] [-n iteration_count]\n")); - ACE_OS::exit (1); -} - -// Parse the command-line arguments and set options. - -static void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "n:t:"); - - int c; - - while ((c = get_opt ()) != -1) - switch (c) - { - case 'n': - n_iterations = ACE_OS::atoi (get_opt.optarg); - break; - case 't': - n_threads = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -static void -recursive_worker (size_t nesting_level, - ACE_Recursive_Thread_Mutex *rm) -{ - if (nesting_level < n_iterations) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) = trying to acquire, nesting = %d, thread id = %u\n", - rm->get_nesting_level (), rm->get_thread_id ())); - { - // This illustrates the use of the ACE_Guard with an - // ACE_Recursive_Thread_Mutex. - ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, *rm); - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) = acquired, nesting = %d, thread id = %u\n", - rm->get_nesting_level (), rm->get_thread_id ())); - - recursive_worker (nesting_level + 1, rm); - } - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) = released, nesting = %d, thread id = %u\n", - rm->get_nesting_level (), rm->get_thread_id ())); - } -} - -static void * -worker (void *arg) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - ACE_Recursive_Thread_Mutex *rm = (ACE_Recursive_Thread_Mutex *) arg; - - recursive_worker (0, rm); - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv[0]); - - parse_args (argc, argv); - ACE_Recursive_Thread_Mutex rm; - - ACE_Service_Config::thr_mgr ()->spawn_n (n_threads, - ACE_THR_FUNC (worker), - (void *) &rm); - - ACE_Service_Config::thr_mgr ()->wait (); - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support process mutexes on this platform (yet)\n"), - -1); -} -#endif /* ACE_WIN32 */ diff --git a/examples/Threads/test_task.cpp b/examples/Threads/test_task.cpp deleted file mode 100644 index 7cd7976d2bb..00000000000 --- a/examples/Threads/test_task.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// This test program illustrates how the ACE barrier synchronization -// $Id$ - -// mechanisms work in conjunction with the ACE_Task and the -// ACE_Thread_Manager. It is instructive to compare this with the -// test_barrier.cpp test to see how they differ. - -#include "ace/Task.h" -#include "ace/Service_Config.h" -#include "ace/Log_Msg.h" - -#if defined (ACE_HAS_THREADS) - -#include "ace/Task.h" - -class Barrier_Task : public ACE_Task -{ -public: - Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations); - - virtual int svc (void); - // Iterate time printing off a message and "waiting" - // for all other threads to complete this iteration. - -private: - ACE_Barrier barrier_; - // Reference to the tester barrier. This controls each - // iteration of the tester function running in every thread. - - int n_iterations_; - // Number of iterations to run. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } -}; - -Barrier_Task::Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations) - : ACE_Task (thr_mgr), - barrier_ (n_threads), - n_iterations_ (n_iterations) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Iterate time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Barrier_Task::svc (void) -{ - // Note that the ACE_Task::svc_run() method automatically adds us to - // the Thread_Manager when the thread begins. - - for (int iterations = 1; - iterations <= this->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d\n", iterations)); - - // Block until all other threads have waited, then continue. - this->barrier_.wait (); - } - - // Note that the ACE_Task::svc_run() method automatically removes us - // from the Thread_Manager when the thread exits. - - return 0; -} - -// Default number of threads to spawn. -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - Barrier_Task barrier_task (ACE_Service_Config::thr_mgr (), - n_threads, - n_iterations); - - // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_task_four.cpp b/examples/Threads/test_task_four.cpp deleted file mode 100644 index 64209cb3430..00000000000 --- a/examples/Threads/test_task_four.cpp +++ /dev/null @@ -1,248 +0,0 @@ -// $Id$ - -// The following test was written by Hamutal Yanay & Ari Erev's -// (Ari_Erev@comverse.com). -// -// This test program test enhancements to the thread_manager and task -// classes. The purpose of these enhancements was to allow the -// thread_manager to recognize the concept of an ACE_Task and to be -// able to group ACE_Tasks in groups. -// -// There are two main ACE_Tasks in this sample: -// -// Invoker_Task - is run from main (). It's purpose is to run a number of -// ACE_Tasks of type Worker_Task. The number can be specified -// on the command line. -// After starting the tasks, the Invoker_Task groups all the tasks -// in one group and then uses the -// num_tasks_in_group () to find out if the real number of tasks -// that are now running (should be the same as the number of tasks -// started). -// It also, suspends and resumes all the threads in the group to -// test the suspend_grp () and resume_grp () methods. -// Then it waits for all the tasks to end. -// Worker_Task - ACE_Tasks that are started by the Invoker_Task. -// Each Worker_Task can start a number of threads. -// The Worker_Task threads perform some work (iteration). The number -// of the iterations can be specified on the command line. -// -// The command line syntax is: -// -// test_task [num_tasks] [num_threads] [num_iterations] - -#include "ace/Task.h" -#include "ace/Service_Config.h" - - -#if defined (ACE_HAS_THREADS) - -#include "ace/Task.h" - -class Invoker_Task : public ACE_Task -{ -public: - Invoker_Task (ACE_Thread_Manager *thr_mgr, - int n_tasks, - int n_threads, - int n_iterations); - virtual int svc (void); - // creats and wait for them to finish - -private: - int n_tasks_; - // Number of tasks to start. - int n_threads_; - // Number of threads per task. - int n_iterations_; - // Number of iterations per thread. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } -}; - -class Worker_Task : public ACE_Task -{ -public: - Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations); - virtual int svc (void); - // Does a small work... - virtual int open (void * = NULL); -private: - static int workers_count_; - int index_; - int n_threads_; - int n_iterations_; - - // = Not needed for this test. - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } -}; - -int Worker_Task::workers_count_ = 1; - -Worker_Task::Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations) - : n_threads_ (n_threads), - n_iterations_ (n_iterations), - ACE_Task (thr_mgr) -{ - index_ = workers_count_++; -} - -int -Worker_Task::open (void *) -{ - // Create worker threads. - int rc = this->activate (THR_NEW_LWP, n_threads_, 0, 0, -1, this); - - if (rc == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); - - return rc; -} - -int -Worker_Task::svc (void) -{ - ACE_DEBUG ((LM_DEBUG, " (%t) in worker %d\n", index_)); - - for (int iterations = 1; - iterations <= this->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, " (%t) in iteration %d\n", iterations)); - ACE_OS::sleep (0); - } - - ACE_DEBUG ((LM_DEBUG, " (%t) worker %d ends\n", index_)); - - return 0; -} - -Invoker_Task::Invoker_Task (ACE_Thread_Manager *thr_mgr, - int n_tasks, - int n_threads, - int n_iterations) - : n_tasks_ (n_tasks), - n_threads_ (n_threads), - n_iterations_ (n_iterations), - ACE_Task (thr_mgr) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, 1, 0, 0, -1, this) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Iterate time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Invoker_Task::svc (void) -{ - // Note that the ACE_Task::svc_run () method automatically adds us to - // the Thread_Manager when the thread begins. - - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); - Worker_Task **pTask = new Worker_Task* [n_tasks_]; - - for (int task = 0; - task < this->n_tasks_; - task++) - { - ACE_DEBUG ((LM_DEBUG, " (%t) in task %d\n", task+1)); - pTask[task] = new Worker_Task (thr_mgr, n_threads_, n_iterations_); - pTask[task]->open (); - } - - // Set all tasks to be one group - ACE_DEBUG ((LM_DEBUG, " (%t) setting tasks group id\n")); - for (task = 0; - task < this->n_tasks_; - task++) - if (thr_mgr->set_grp (pTask[task], 1) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "set_grp")); - - int nTasks = thr_mgr->num_tasks_in_group (1); - cout << "Number of tasks in group 1: " << nTasks << endl; - - // Wait for 1 second and then suspend every thread in the group. - ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, " (%t) suspending group\n")); - if (thr_mgr->suspend_grp (1) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "suspend_grp")); - - // Wait for 5 more second and then resume every thread in the - // group. - ACE_OS::sleep (ACE_Time_Value (5)); - - // @QTSK This ACE_DEBUG statement blows us away! can't understand why - ACE_DEBUG ((LM_DEBUG, " (%t) resuming group\n")); - if (thr_mgr->resume_grp (1) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "resume_grp")); - - - // Wait for all the tasks to reach their exit point. - thr_mgr->wait (); - - // Note that the ACE_Task::svc_run () method automatically removes us - // from the Thread_Manager when the thread exits. - - return 0; -} - -// Default number of tasks and iterations. -static const int DEFAULT_TASKS = 4; -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - int n_tasks = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_TASKS; - int n_threads = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 3 ? ACE_OS::atoi (argv[3]) : DEFAULT_ITERATIONS; - - // Since ACE_Thread_Manager can only wait for all threads, we'll have - // special manager for the Invoker_Task. - ACE_Thread_Manager invoker_manager; - - Invoker_Task invoker (&invoker_manager, - n_tasks, - n_threads, - n_iterations); - - // Wait for 1 second and then suspend the invoker task - ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, " (%t) suspending invoker task\n")); - - if (invoker_manager.suspend_task (&invoker) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "suspend_task")); - - // Wait for 5 more second and then resume the invoker task. - ACE_OS::sleep (ACE_Time_Value (5)); - - // @QTSK This ACE_DEBUG statement blows us away! can't understand why - ACE_DEBUG ((LM_DEBUG, " (%t) resuming invoker task\n")); - if (invoker_manager.resume_task (&invoker) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "resume_task")); - - - // Wait for all the threads to reach their exit point. - invoker_manager.wait (); - - // @QTSK This ACE_DEBUG statement blows us away! can't understand why - ACE_DEBUG ((LM_DEBUG, " (%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_task_one.cpp b/examples/Threads/test_task_one.cpp deleted file mode 100644 index d0a8a12e6c4..00000000000 --- a/examples/Threads/test_task_one.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// This test program illustrates how the ACE barrier synchronization -// $Id$ - -// mechanisms work in conjunction with the ACE_Task and the -// ACE_Thread_Manager. It is instructive to compare this with the -// test_barrier.cpp test to see how they differ. - -#include "ace/Task.h" -#include "ace/Service_Config.h" - - -#if defined (ACE_HAS_THREADS) - -#include "ace/Task.h" - -class Barrier_Task : public ACE_Task -{ -public: - Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations); - - virtual int svc (void); - // Iterate time printing off a message and "waiting" - // for all other threads to complete this iteration. - -private: - ACE_Barrier barrier_; - // Reference to the tester barrier. This controls each - // iteration of the tester function running in every thread. - - int n_iterations_; - // Number of iterations to run. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } -}; - -Barrier_Task::Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations) - : ACE_Task (thr_mgr), - barrier_ (n_threads), - n_iterations_ (n_iterations) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Iterate time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Barrier_Task::svc (void) -{ - // Note that the ACE_Task::svc_run() method automatically adds us to - // the Thread_Manager when the thread begins. - - for (int iterations = 1; - iterations <= this->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d\n", iterations)); - - // Block until all other threads have waited, then continue. - this->barrier_.wait (); - } - - // Note that the ACE_Task::svc_run() method automatically removes us - // from the Thread_Manager when the thread exits. - - return 0; -} - -// Default number of threads to spawn. -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - Barrier_Task barrier_task (ACE_Service_Config::thr_mgr (), - n_threads, - n_iterations); - - // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_task_three.cpp b/examples/Threads/test_task_three.cpp deleted file mode 100644 index c6ad69511b5..00000000000 --- a/examples/Threads/test_task_three.cpp +++ /dev/null @@ -1,230 +0,0 @@ -// $Id$ - -// Exercise more tests for the ACE Tasks. This also shows off some -// Interesting uses of the ACE Log_Msg's ability to print to ostreams. -// BTW, make sure that you set the out_stream in *every* thread that -// you want to have write to the output file, i.e.: -// -// -// if (out_stream) -// { -// ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); -// ACE_LOG_MSG->msg_ostream (out_stream); -// } - -#include -#include "ace/Reactor.h" -#include "ace/Service_Config.h" -#include "ace/Task.h" - - -#if defined (ACE_HAS_THREADS) - -static ofstream *out_stream = 0; - -static const int NUM_INVOCATIONS = 100; -static const int TASK_COUNT = 130; - -class Test_Task : public ACE_Task -{ -public: - Test_Task (void); - ~Test_Task (void); - - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); - virtual int svc (void); - - virtual int handle_input (ACE_HANDLE fd); - - ACE_Reactor *r_; - int handled_; - static int current_count_; - static int done_cnt_; -}; - -int Test_Task::current_count_ = 0; -int Test_Task::done_cnt_ = 0; - -static ACE_Thread_Mutex lock_; - -Test_Task::Test_Task (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - this->handled_ = 0; - Test_Task::current_count_++; - ACE_DEBUG ((LM_DEBUG, - "Test_Task constructed, current_count_ = %d\n", - Test_Task::current_count_)); -} - -Test_Task::~Test_Task (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - ACE_DEBUG ((LM_DEBUG, "Test_Task destroyed, current_count_ = %d\n", - Test_Task::current_count_)); -} - -int -Test_Task::open (void *args) -{ - r_ = (ACE_Reactor *) args; - return ACE_Task::activate (THR_NEW_LWP); -} - -int -Test_Task::close (u_long) -{ - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1); - - Test_Task::current_count_--; - ACE_DEBUG ((LM_DEBUG, "Test_Task::close () current_count_ = %d.\n", - Test_Task::current_count_)); - return 0; -} - -int -Test_Task::put (ACE_Message_Block *, ACE_Time_Value *) -{ - return 0; -} - -Test_Task::svc (void) -{ - // Every thread must register the same stream to write to file. - if (out_stream) - { - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (out_stream); - } - - for (int index = 0; index < NUM_INVOCATIONS; index++) - { - ACE_OS::thr_yield (); - - if (r_->notify (this, ACE_Event_Handler::READ_MASK)) - { - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1); - - ACE_DEBUG ((LM_DEBUG, "Test_Task: error notifying reactor!\n")); - } - } - - ACE_DEBUG ((LM_DEBUG, " (%t) returning from svc ()\n")); - return 0; -} - -int -Test_Task::handle_input (ACE_HANDLE) -{ - this->handled_++; - - if (this->handled_ == NUM_INVOCATIONS) - { - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1); - Test_Task::done_cnt_++; - ACE_DEBUG ((LM_DEBUG, - " (%t) Test_Task: handle_input! done_cnt_ = %d.\n", - Test_Task::done_cnt_)); - } - - ACE_OS::thr_yield (); - return -1; -} - -static void * -dispatch (void *arg) -{ - // every thread must register the same stream to write to file - if (out_stream) - { - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (out_stream); - } - - ACE_DEBUG ((LM_DEBUG, " (%t) Dispatcher Thread started!\n")); - ACE_Reactor *r = (ACE_Reactor *) arg; - int result; - - r->owner (ACE_OS::thr_self ()); - - while (1) - { - result = r->handle_events (); - if (result <= 0) - ACE_DEBUG ((LM_DEBUG, "Dispatch: handle_events (): %d", result)); - } - - return 0; -} - -extern "C" void -handler (int) -{ - *out_stream << flush; - out_stream->close (); - ACE_OS::exit (42); -} - -int -main (int argc, char **argv) -{ - if (argc > 1) - { - // Send output to file. - out_stream = new ofstream ("test_task_three.out", ios::trunc|ios::out); - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (out_stream); - } - - // Register a signal handler. - ACE_Sig_Action sa (ACE_SignalHandler (handler), SIGINT); - - ACE_Reactor *reactor1 = ACE_Service_Config::reactor (); - ACE_Reactor *reactor2 = new ACE_Reactor (); - - Test_Task t1[TASK_COUNT]; - Test_Task t2[TASK_COUNT]; - - ACE_Thread::spawn (ACE_THR_FUNC (dispatch), reactor2); - - reactor1->owner (ACE_OS::thr_self ()); - - for (int index = 0; index < TASK_COUNT; index++) - { - t1[index].open (reactor1); - t2[index].open (reactor2); - } - - ACE_OS::sleep (3); - - for (;;) - { - ACE_Time_Value timeout (2); - - if (reactor1->handle_events (timeout) <= 0) - { - if (errno == ETIME) - { - ACE_DEBUG ((LM_DEBUG, "no activity within 2 seconds, shutting down\n")); - break; - } - else - ACE_ERROR ((LM_ERROR, "%p error handling events\n", "main")); - } - } - - return 0; -} - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_task_two.cpp b/examples/Threads/test_task_two.cpp deleted file mode 100644 index 9f25962c795..00000000000 --- a/examples/Threads/test_task_two.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// $Id$ - -// Exercise more tests for the ACE Tasks. This test can spawn off -// zillions of tasks and then wait for them using both polling and the -// ACE Thread Manager. - -#include "ace/Task.h" - -#include "ace/Service_Config.h" -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Atomic_Op ATOMIC_INT; - -static u_long zero = 0; -static ATOMIC_INT task_count (zero); -static ATOMIC_INT max_count (zero); -static ATOMIC_INT wait_count (zero); - -static u_long n_threads = 0; - -// Default number of tasks. -static const int default_threads = ACE_DEFAULT_THREADS; - -// Default number of times to run the test. -static const int default_iterations = 1000; - -class Task_Test : public ACE_Task -{ -public: - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); - virtual int svc (void); - -private: - static ACE_Thread_Mutex lock_; -}; - -ACE_Thread_Mutex Task_Test::lock_; - -int -Task_Test::open (void *) -{ - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Task_Test::lock_, -1); - - task_count++; - ACE_DEBUG ((LM_DEBUG, "(%t) creating Task_Test, task count = %d\n", - (u_long) task_count)); - - return this->activate (THR_BOUND); -} - -int -Task_Test::close (u_long) -{ - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Task_Test::lock_, -1); - - task_count--; - ACE_DEBUG ((LM_DEBUG, "(%t) destroying Task_Test, task count = %d\n", - (u_long) task_count)); - wait_count--; -// delete this; - return 0; -} - -int -Task_Test::put (ACE_Message_Block *, - ACE_Time_Value *) -{ - return 0; -} - -int -Task_Test::svc (void) -{ - wait_count++; - max_count++; - - ACE_DEBUG ((LM_DEBUG, "(%t) svc: waiting\n")); - - for (;;) - if (max_count >= n_threads) - break; - else - ACE_Thread::yield (); - - ACE_DEBUG ((LM_DEBUG, "(%t) svc: finished waiting\n")); - return 0; -} - -int -main (int argc, char *argv[]) -{ - n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : default_threads; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : default_iterations; - - Task_Test **task_array = new Task_Test *[n_threads]; - - for (int i = 1; i <= n_iterations; i++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) iteration = %d, max_count %d\n", - i, (u_long) max_count)); - max_count = 0; - - ACE_DEBUG ((LM_DEBUG, "(%t) starting %d task%s\n", - n_threads, n_threads == 1 ? "" : "s")); - - // Launch the new tasks. - for (int j = 0; j < n_threads; j++) - { - task_array[j] = new Task_Test; - // Activate the task, i.e., make it an active object. - task_array[j]->open (); - } - - // Wait for initialization to kick in. - while (max_count == 0) - ACE_Thread::yield (); - - ACE_DEBUG ((LM_DEBUG, "(%t) waiting for threads to finish\n")); - - // Wait for the threads to finish this iteration. - while (max_count != n_threads && wait_count != 0) - ACE_Thread::yield (); - - ACE_DEBUG ((LM_DEBUG, "(%t) iteration %d finished, max_count %d, wait_count %d, waiting for tasks to exit\n", - i, (u_long) max_count, (u_long) wait_count)); - - // Wait for all the tasks to exit. - ACE_Service_Config::thr_mgr ()->wait (); - - // Delete the existing tasks. - for (int k = 0; k < n_threads; k++) - delete task_array[k]; - } - - delete [] task_array; - - ACE_DEBUG ((LM_DEBUG, "(%t) shutting down the test\n")); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_thread_manager.cpp b/examples/Threads/test_thread_manager.cpp deleted file mode 100644 index 73029d70d88..00000000000 --- a/examples/Threads/test_thread_manager.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// $Id$ - -// Test out the group management mechanisms provided by the -// ACE_Thread_Manager, including the group signal handling, group -// suspension and resumption, and cooperative thread cancellation -// mechanisms. - -#include "ace/Service_Config.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) - -extern "C" void -handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) received signal %d\n", signum)); -} - -static void * -worker (int iterations) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - for (int i = 0; i < iterations; i++) - { - if ((i % 1000) == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) checking cancellation before iteration %d!\n", - i)); - - if (ACE_Service_Config::thr_mgr ()->testcancel (ACE_Thread::self ()) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) has been cancelled before iteration %d!\n", - i)); - break; - } - } - } - - // Destructor removes thread from Thread_Manager. - return 0; -} - -static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS; -static const int DEFAULT_ITERATIONS = 100000; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - daemon.open (argv[0]); - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); - - int grp_id = thr_mgr->spawn_n (n_threads, ACE_THR_FUNC (worker), - (void *) n_iterations, - THR_NEW_LWP | THR_DETACHED); - - // Wait for 1 second and then suspend every thread in the group. - ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, "(%t) suspending group\n")); - if (thr_mgr->suspend_grp (grp_id) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "suspend_grp")); - - // Wait for 1 more second and then resume every thread in the - // group. - ACE_OS::sleep (ACE_Time_Value (1)); - ACE_DEBUG ((LM_DEBUG, "(%t) resuming group\n")); - if (thr_mgr->resume_grp (grp_id) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "resume_grp")); - - // Wait for 1 more second and then send a SIGINT to every thread in - // the group. - ACE_OS::sleep (ACE_Time_Value (1)); - ACE_DEBUG ((LM_DEBUG, "(%t) signaling group\n")); - if (thr_mgr->kill_grp (grp_id, SIGINT) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "kill_grp")); - - // Wait for 1 more second and then cancel all the threads. - ACE_OS::sleep (ACE_Time_Value (1)); - ACE_DEBUG ((LM_DEBUG, "(%t) cancelling group\n")); - if (thr_mgr->cancel_grp (grp_id) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "cancel_grp")); - - // Perform a barrier wait until all the threads have shut down. - thr_mgr->wait (); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_thread_pool.cpp b/examples/Threads/test_thread_pool.cpp deleted file mode 100644 index 68741156b83..00000000000 --- a/examples/Threads/test_thread_pool.cpp +++ /dev/null @@ -1,214 +0,0 @@ -// This test program illustrates how the ACE task synchronization -// $Id$ - -// mechanisms work in conjunction with the ACE_Task and the -// ACE_Thread_Manager. If the manual flag is not set input comes from -// stdin until the user enters a return only. This stops all workers -// via a message block of length 0. This is an alternative shutdown of -// workers compared to queue deactivate. -// -// This code is original based on a test program written by Karlheinz -// Dorn. It was modified to utilize more "ACE" features by Doug Schmidt. - -#include "ace/Task.h" -#include "ace/Service_Config.h" - -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -// Number of iterations to run the test. -static size_t n_iterations = 100; - -class Thread_Pool : public ACE_Task -{ -public: - Thread_Pool (ACE_Thread_Manager *thr_mgr, int n_threads); - - virtual int svc (void); - // Iterate time printing off a message and "waiting" - // for all other threads to complete this iteration. - - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv=0); - // This allows the producer to pass messages to the . - -private: - virtual int close (u_long); - - // = Not needed for this test. - virtual int open (void *) { return 0; } -}; - -int -Thread_Pool::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) close of worker\n")); - return 0; -} - -Thread_Pool::Thread_Pool (ACE_Thread_Manager *thr_mgr, - int n_threads) - : ACE_Task (thr_mgr) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Simply enqueue the Message_Block into the end of the queue. - -int -Thread_Pool::put (ACE_Message_Block *mb, ACE_Time_Value *tv) -{ - return this->putq (mb, tv); -} - -// Iterate time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Thread_Pool::svc (void) -{ - // Note that the ACE_Task::svc_run () method automatically adds us to - // the Thread_Manager when the thread begins. - - int result = 0; - int count = 1; - - // Keep looping, reading a message out of the queue, until we get a - // message with a length == 0, which signals us to quit. - - for (;; count++) - { - ACE_Message_Block *mb; - - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d before getq ()\n", count)); - - if (this->getq (mb) == -1) - { - ACE_ERROR ((LM_ERROR, - "(%t) in iteration %d, got result -1, exiting\n", count)); - break; - } - - int length = mb->length (); - - if (length > 0) - ACE_DEBUG ((LM_DEBUG, - "(%t) in iteration %d, length = %d, text = \"%*s\"\n", - count, length, length - 1, mb->rd_ptr ())); - - // We're responsible for deallocating this. - delete mb; - - if (length == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) in iteration %d, got NULL message, exiting\n", - count)); - break; - } - } - - // Note that the ACE_Task::svc_run () method automatically removes - // us from the Thread_Manager when the thread exits. - return 0; -} - -static void -produce (Thread_Pool &thread_pool) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) producer start, dumping the Thread_Pool\n")); - thread_pool.dump (); - - for (int n;;) - { - // Allocate a new message. - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - -#if defined (manual) - ACE_DEBUG ((LM_DEBUG, - "(%t) press chars and enter to put a new message into task queue...")); - n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); -#else // Automatically generate messages. - static int count = 0; - - ACE_OS::sprintf (mb->rd_ptr (), "%d\n", count); - - n = ACE_OS::strlen (mb->rd_ptr ()); - - if (count == n_iterations) - n = 1; // Indicate that we need to shut down. - else - count++; - - if (count == 0 || (count % 20 == 0)) - ACE_OS::sleep (1); -#endif /* manual */ - if (n > 1) - { - // Send a normal message to the waiting threads and continue - // producing. - mb->wr_ptr (n); - - // Pass the message to the Thread_Pool. - if (thread_pool.put (mb) == -1) - ACE_ERROR ((LM_ERROR, " (%t) %p\n", "put")); - } - else - { - // Send a shutdown message to the waiting threads and exit. - ACE_DEBUG ((LM_DEBUG, "\n(%t) start loop, dump of task:\n")); - thread_pool.dump (); - - for (int i = thread_pool.thr_count (); i > 0; i--) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) EOF, enqueueing NULL block for thread = %d\n", - i)); - - // Enqueue a NULL message to flag each consumer to - // shutdown. - if (thread_pool.put (new ACE_Message_Block) == -1) - ACE_ERROR ((LM_ERROR, " (%t) %p\n", "put")); - } - - ACE_DEBUG ((LM_DEBUG, "\n(%t) end loop, dump of task:\n")); - thread_pool.dump (); - break; - } - } -} - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : n_iterations; - - ACE_DEBUG ((LM_DEBUG, "(%t) argc = %d, threads = %d\n", - argc, n_threads)); - - // Create the worker tasks. - Thread_Pool thread_pool (ACE_Service_Config::thr_mgr (), - n_threads); - - // Create work for the worker tasks to process in their own threads. - produce (thread_pool); - - // Wait for all the threads to reach their exit point. - - ACE_DEBUG ((LM_DEBUG, "(%t) waiting with thread manager...\n")); - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) destroying worker tasks and exiting...\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_thread_specific.cpp b/examples/Threads/test_thread_specific.cpp deleted file mode 100644 index f7a4f6dccf3..00000000000 --- a/examples/Threads/test_thread_specific.cpp +++ /dev/null @@ -1,219 +0,0 @@ -#include "ace/Service_Config.h" -// $Id$ - -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -// Define a class that will be stored in thread-specific data. Note -// that as far as this class is concerned it's just a regular C++ -// class. The ACE_TSS wrapper transparently ensures that -// objects of this class will be placed in thread-specific storage. -// All calls on ACE_TSS::operator->() are delegated to the -// appropriate method in the Errno class. - -class Errno -{ -public: - int error (void) { return this->errno_; } - void error (int i) { this->errno_ = i; } - - int line (void) { return this->lineno_; } - void line (int l) { this->lineno_ = l; } - - // Errno::flags_ is a static variable, so we've got to protect it - // with a mutex since it isn't kept in thread-specific storage. - int flags (void) - { - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1); - - return Errno::flags_; - } - - void flags (int f) - { - ACE_GUARD (ACE_Thread_Mutex, ace_mon, Errno::lock_); - - Errno::flags_ = f; - } - -private: - // = errno_ and lineno_ will be thread-specific data so they don't - // need a lock. - int errno_; - int lineno_; - - static int flags_; -#if defined (ACE_HAS_THREADS) - // flags_ needs a lock. - static ACE_Thread_Mutex lock_; -#endif /* ACE_HAS_THREADS */ -}; - -// Static variables. -ACE_MT (ACE_Thread_Mutex Errno::lock_); -int Errno::flags_; - -// This is our thread-specific error handler... -static ACE_TSS TSS_Error; - -#if defined (ACE_HAS_THREADS) -// Serializes output via cout. -static ACE_Thread_Mutex lock; - -typedef ACE_TSS_Guard GUARD; -#else -// Serializes output via cout. -static ACE_Null_Mutex lock; - -typedef ACE_Guard GUARD; -#endif /* ACE_HAS_THREADS */ - -static void -cleanup (void *ptr) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) in cleanup, ptr = %x\n", ptr)); - - delete ptr; -} - -// This worker function is the entry point for each thread. - -static void * -worker (void *c) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - int count = int (c); - - ACE_thread_key_t key = 0; - int *ip = 0; - - // Make one key that will be available when the thread exits so that - // we'll have something to cleanup! - - if (ACE_OS::thr_keycreate (&key, cleanup) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keycreate")); - - ip = new int; - - if (ACE_OS::thr_setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - for (int i = 0; i < count; i++) - { - if (ACE_OS::thr_keycreate (&key, cleanup) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keycreate")); - - ip = new int; - - ACE_DEBUG ((LM_DEBUG, "(%t) in worker 1, key = %d, ip = %x\n", key, ip)); - - if (ACE_OS::thr_setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - delete ip; - - if (ACE_OS::thr_keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keyfree")); - - // Cause an error. - ACE_OS::read (ACE_INVALID_HANDLE, 0, 0); - - // The following two lines set the thread-specific state. - TSS_Error->error (errno); - TSS_Error->line (__LINE__); - - // This sets the static state (note how C++ makes it easy to do - // both). - TSS_Error->flags (count); - - { - // Use the guard to serialize access to cout... - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock, 0); - - cout << "(" << ACE_Thread::self () - << ") errno = " << TSS_Error->error () - << ", lineno = " << TSS_Error->line () - << ", flags = " << TSS_Error->flags () - << endl; - } - key = 0; - - if (ACE_OS::thr_keycreate (&key, cleanup) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keycreate")); - - ip = new int; - - ACE_DEBUG ((LM_DEBUG, "(%t) in worker 2, key = %d, ip = %x\n", key, ip)); - - if (ACE_OS::thr_setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - delete ip; - - if (ACE_OS::thr_keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keyfree")); - } - - ACE_DEBUG ((LM_DEBUG, "(%t) exiting\n")); - return 0; -} - -extern "C" void -handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "signal = %S\n", signum)); - ACE_Service_Config::thr_mgr ()->exit (0); -} - -int -main (int argc, char *argv[]) -{ - // The Service_Config must be the first object defined in main... - ACE_Service_Config daemon (argv[0]); - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - int threads = argc > 1 ? ACE_OS::atoi (argv[1]) : 4; - int count = argc > 2 ? ACE_OS::atoi (argv[2]) : 10000; - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) (handler), SIGINT); - -#if defined (ACE_HAS_THREADS) - if (ACE_Service_Config::thr_mgr ()->spawn_n (threads, - ACE_THR_FUNC (&worker), - (void *) count, - THR_BOUND | THR_DETACHED) == -1) - ACE_OS::perror ("ACE_Thread_Manager::spawn_n"); - - ACE_Service_Config::thr_mgr ()->wait (); -#else - worker ((void *) count); -#endif /* ACE_HAS_THREADS */ - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_TSS; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support threads on this platform (yet)\n"), - -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_token.cpp b/examples/Threads/test_token.cpp deleted file mode 100644 index 5a51496d011..00000000000 --- a/examples/Threads/test_token.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// Test out the ACE Token class. -// $Id$ - -#include "ace/Token.h" -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -class My_Task : public ACE_Task -{ -public: - My_Task (int n); - virtual int open (void *) { return 0; } - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } - virtual int svc (void); - - static void sleep_hook (void *); - -private: - ACE_Token token_; -}; - -My_Task::My_Task (int n) -{ - // Make this Task into an Active Object. - this->activate (THR_BOUND | THR_DETACHED, n); - - // Wait for all the threads to exit. - this->thr_mgr ()->wait (); -} - -void -My_Task::sleep_hook (void *) -{ - cerr << '(' << ACE_Thread::self () << ')' - << " blocking, My_Task::sleep_hook () called" << endl; -} - -// Test out the behavior of the ACE_Token class. - -int -My_Task::svc (void) -{ - for (int i = 0; i < 10000; i++) - { - // Wait for up to 1 millisecond past the current time to get the token. - ACE_Time_Value timeout (ACE_OS::time (0), 1000); - - if (this->token_.acquire (&My_Task::sleep_hook, 0, &timeout) == 1) - { - this->token_.acquire (); - this->token_.renew (); - this->token_.release (); - this->token_.release (); - } - else - ACE_Thread::yield (); - } - return 0; -} - -int -main (int argc, char *argv[]) -{ - My_Task tasks (argc > 1 ? atoi (argv[1]) : 4); - - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform doesn't support threads\n"), -1); -} -#endif /* */ diff --git a/examples/Threads/test_tss.cpp b/examples/Threads/test_tss.cpp deleted file mode 100644 index c81ca41c429..00000000000 --- a/examples/Threads/test_tss.cpp +++ /dev/null @@ -1,235 +0,0 @@ -// Torture test ACE thread-specific storage... -// $Id$ - - -#include "ace/Task.h" -#include "ace/Token.h" - -#if defined (ACE_HAS_THREADS) - -class TSS_Obj -{ -public: - - TSS_Obj (void); - ~TSS_Obj (void); - -private: - static int count_; - static ACE_Thread_Mutex lock_; -}; - -int TSS_Obj::count_ = 0; -ACE_Thread_Mutex TSS_Obj::lock_; - -TSS_Obj::TSS_Obj (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - count_++; - cout << "TO+ : " << count_ << endl; -} - -TSS_Obj::~TSS_Obj (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - count_--; - cout << "TO- : " << count_ << endl; -} - -class Test_Task -{ -public: - - Test_Task (void); - ~Test_Task (void); - - int open (void *arg); - - static void* svc (void *arg); - - static int wait_count_; - static int max_count_; - -private: - static int count_; -}; - -int Test_Task::count_ = 0; -int Test_Task::wait_count_ = 0; -int Test_Task::max_count_ = 0; -int num_threads_ = 0; - -ACE_Token token; - -Test_Task::Test_Task (void) -{ - ACE_GUARD (ACE_Token, ace_mon, token); - - count_++; - cout << "Test_Task+ : " - << count_ << " (" - << ACE_OS::thr_self () - << ")" << endl; -} - -Test_Task::~Test_Task (void) -{ - ACE_GUARD (ACE_Token, ace_mon, token); - - count_--; - cout << "Test_Task- : " - << count_ << " (" - << ACE_OS::thr_self () - << ")" << endl; - - wait_count_--; -} - -int Test_Task::open (void *arg) -{ - - ACE_Thread::spawn (Test_Task::svc, arg); - - return 0; -} - - -void * -Test_Task::svc (void *arg) -{ - ACE_TSS tss (new TSS_Obj); - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - wait_count_++; - max_count_++; - cout << "svc: waiting (" << ACE_OS::thr_self () << ")" << endl; - } - - while (1) - { - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - if (max_count_ >= num_threads_) - break; - else - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - } - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - cout << "svc: waiting (" << ACE_OS::thr_self () << ") finished" << endl; - } - } - - delete (Test_Task *) arg; - - return 0; -} - -int -main (int argc, char **argv) -{ - if (argc != 2) - { - cout << "Missing parameters!" << endl; - return 1; - } - - int num_Tasks = atoi (argv[1]); - - num_threads_ = num_Tasks; - - Test_Task **task_arr = (Test_Task**) new char[sizeof (Test_Task*) * num_Tasks]; - - while (1) - { - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - cout << "ReseTest_Tasking Test_Task::max_count_ from: " - << Test_Task::max_count_ << endl; - - Test_Task::max_count_ = 0; - } - - for (int i = 0; i < num_Tasks; i++) - { - task_arr[i] = new Test_Task; - task_arr[i]->open (task_arr[i]); - } - - cout << "Waiting for first thread started..." << endl; - - for (;;) - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - if (Test_Task::max_count_ != 0 ) - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - break; - } - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - cout << "First thread started!" << endl - << "Waiting for all threads finished..." << endl; - } - - for (;;) - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - if (!(Test_Task::max_count_ == num_threads_ - && Test_Task::wait_count_ == 0)) - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - continue; - } - - cout << "Test_Task::max_count_ = " - << Test_Task::max_count_ - << " Test_Task::wait_count_ = " - << Test_Task::wait_count_ - << endl; - break; - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - cout << "All threads finished..." << endl; - } - - ACE_OS::sleep (2); - } - - return 0; -} - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_tss1.cpp b/examples/Threads/test_tss1.cpp deleted file mode 100644 index 7efdc9dc3ef..00000000000 --- a/examples/Threads/test_tss1.cpp +++ /dev/null @@ -1,164 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// TSS_Test.cpp -// -// = DESCRIPTION -// This program tests thread specific storage of data. The ACE_TSS -// wrapper transparently ensures that the objects of this class -// will be placed in thread-specific storage. All calls on -// ACE_TSS::operator->() are delegated to the appropriate method -// in the Errno class. -// -// = AUTHOR -// Detlef Becker -// -// ============================================================================ - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -static int iterations = 100; - -class Errno -{ -public: - int error (void) { return this->errno_; } - void error (int i) { this->errno_ = i; } - - int line (void) { return this->lineno_; } - void line (int l) { this->lineno_ = l; } - - // Errno::flags_ is a static variable, so we've got to protect it - // with a mutex since it isn't kept in thread-specific storage. - int flags (void) { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_Mon, Errno::lock_, -1)); - - return Errno::flags_; - } - int flags (int f) - { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1)); - - Errno::flags_ = f; - return 0; - } - -private: - // = errno_ and lineno_ will be thread-specific data so they don't - // need a lock. - int errno_; - int lineno_; - - static int flags_; -#if defined (ACE_HAS_THREADS) - // flags_ needs a lock. - static ACE_Thread_Mutex lock_; -#endif /* ACE_HAS_THREADS */ -}; - -// Static variables. -ACE_MT (ACE_Thread_Mutex Errno::lock_); -int Errno::flags_; - -// This is our thread-specific error handler... -static ACE_TSS TSS_Error; - -#if defined (ACE_HAS_THREADS) -// Serializes output via cout. -static ACE_Thread_Mutex lock; - -typedef ACE_TSS_Guard GUARD; -#else -// Serializes output via cout. -static ACE_Null_Mutex lock; - -typedef ACE_Guard GUARD; -#endif /* ACE_HAS_THREADS */ - -// Keeps track of whether Tester::close () has started. -static int close_started = 0; - -template -class Tester: public ACE_Task -{ -public: - Tester (void) {} - ~Tester (void) {} - - virtual int open (void *theArgs = 0); - virtual int close (u_long theArg = 0); - virtual int put (ACE_Message_Block *theMsgBlock, - ACE_Time_Value *theTimeVal = 0); - virtual int svc (void); -}; - -template int -Tester::open (void *) -{ - return this->activate (); -} - -template -int Tester::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "close running\n!")); - close_started = 1; - ACE_OS::sleep (2); - ACE_DEBUG ((LM_DEBUG, "close: trying to log error code 7!\n")); - TSS_Error->error (7); - ACE_DEBUG ((LM_DEBUG, "close: logging succeeded!\n")); - return 0; -} - -template int -Tester::put (ACE_Message_Block *, ACE_Time_Value *) -{ - return 0; -} - -template int -Tester::svc (void) -{ - return 0; -} - -int -main (int, char *[]) -{ - Tester tester; - - tester.open (); - - while (!close_started) - continue; - - ACE_DEBUG ((LM_DEBUG, "main: trying to log error code 7!\n")); - - TSS_Error->error (3); - - ACE_DEBUG ((LM_DEBUG, "main: logging succeeded!\n")); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_TSS; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support threads on this platform (yet)\n"), - -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_tss2.cpp b/examples/Threads/test_tss2.cpp deleted file mode 100644 index 24a8d958e91..00000000000 --- a/examples/Threads/test_tss2.cpp +++ /dev/null @@ -1,252 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// TSS_Test.cpp -// -// = DESCRIPTION -// This program tests thread specific storage of data. The ACE_TSS -// wrapper transparently ensures that the objects of this class -// will be placed in thread-specific storage. All calls on -// ACE_TSS::operator->() are delegated to the appropriate method -// in the Errno class. -// -// = AUTHOR -// Prashant Jain and Doug Schmidt -// -// ============================================================================ - -#include "ace/Task.h" -#include "ace/Token.h" - -#if defined (ACE_HAS_THREADS) - -class TSS_Obj -{ -public: - - TSS_Obj (void); - ~TSS_Obj (void); - -private: - static int count_; - static ACE_Thread_Mutex lock_; -}; - -int TSS_Obj::count_ = 0; -ACE_Thread_Mutex TSS_Obj::lock_; - -TSS_Obj::TSS_Obj (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - count_++; - cout << "TO+ : " << count_ << endl; -} - -TSS_Obj::~TSS_Obj (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - count_--; - cout << "TO- : " << count_ << endl; -} - -class Test_Task -{ -public: - - Test_Task (void); - ~Test_Task (void); - - int open (void *arg); - - static void *svc (void *arg); - static int wait_count_; - static int max_count_; - -private: - static int count_; -}; - -int Test_Task::count_ = 0; -int Test_Task::wait_count_ = 0; -int Test_Task::max_count_ = 0; -int num_threads_ = 0; - -ACE_Token token; - -Test_Task::Test_Task (void) -{ - ACE_GUARD (ACE_Token, ace_mon, token); - - count_++; - cout << "Test_Task+ : " - << count_ << " (" - << ACE_OS::thr_self () - << ")" << endl; -} - -Test_Task::~Test_Task (void) -{ - ACE_GUARD (ACE_Token, ace_mon, token); - - count_--; - cout << "Test_Task- : " - << count_ << " (" - << ACE_OS::thr_self () - << ")" << endl; - - wait_count_--; -} - -void * -Test_Task::svc (void *arg) -{ - ACE_TSS tss (new TSS_Obj); - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - wait_count_++; - max_count_++; - cout << "svc: waiting (" << ACE_OS::thr_self () << ")" << endl; - } - - while (1) - { - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - if (max_count_ >= num_threads_) - break; - else - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - } - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - cout << "svc: waiting (" << ACE_OS::thr_self () << ") finished" << endl; - } - } - - delete (Test_Task *) arg; - - return 0; -} - -int -Test_Task::open (void *arg) -{ - if (ACE_Thread::spawn (Test_Task::svc, arg) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Thread::spawn"), 0); - - return 0; -} - -int -main (int argc, char **argv) -{ - if (argc != 2) - { - cout << "Missing parameters!" << endl; - return 1; - } - - int num_Tasks = atoi (argv[1]); - - num_threads_ = num_Tasks; - - Test_Task **task_arr = (Test_Task**) new char[sizeof (Test_Task*) * num_Tasks]; - - while (1) - { - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - cout << "ReseTest_Tasking Test_Task::max_count_ from: " - << Test_Task::max_count_ << endl; - - Test_Task::max_count_ = 0; - } - - for (int i = 0; i < num_Tasks; i++) - { - task_arr[i] = new Test_Task; - task_arr[i]->open (task_arr[i]); - } - - cout << "Waiting for first thread started..." << endl; - - for (;;) - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - if (Test_Task::max_count_ != 0 ) - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - break; - } - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - cout << "First thread started!" << endl - << "Waiting for all threads finished..." << endl; - } - - for (;;) - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - if (!(Test_Task::max_count_ == num_threads_ - && Test_Task::wait_count_ == 0)) - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - continue; - } - - cout << "Test_Task::max_count_ = " - << Test_Task::max_count_ - << " Test_Task::wait_count_ = " - << Test_Task::wait_count_ - << endl; - break; - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - cout << "All threads finished..." << endl; - } - - ACE_OS::sleep (2); - } - - return 0; -} - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/netsvcs/clients/Naming/Dump_Restore/nametest.cpp b/netsvcs/clients/Naming/Dump_Restore/nametest.cpp deleted file mode 100644 index fb9c71a5014..00000000000 --- a/netsvcs/clients/Naming/Dump_Restore/nametest.cpp +++ /dev/null @@ -1,112 +0,0 @@ -#include "ace/Naming_Context.h" -// $Id$ - -#include "ace/Name_Options.h" -#include "nametest.h" - -void -Nametest::listopt (void) -{ - cout << "serverport is " - << ACE_Name_Options::instance ()->nameserver_port() - << endl; - cout << "serverhost is " - << ACE_Name_Options::instance ()->nameserver_host() - << endl; - cout << "process_name is " - << ACE_Name_Options::instance ()->process_name() - << endl; - cout << "namespace_dir is " - << ACE_Name_Options::instance ()->namespace_dir() - << endl; -} - -int -Nametest::init (int argc, char *argv[]) -{ - ACE_Server_Record *sr; - ACE_Service_Config::svc_rep ()->find ("Name_Server_Proxy", &sr); - ACE_Service_Type *st = sr->type (); - ACE_Server_Object *so = st->object (); -dynamic_cast (so); - - ACE_Name_Server_Proxy *ns_proxy = ACE_Service_Config::name_server_proxy (); - - ns_proxy->bind (...); - - this->listopt (); - - ACE_Naming_Context ns_context; - - if (ns_context.open (ACE_Naming_Context::NET_LOCAL) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ns_context.open"), -1); - - const char *mykey = argv[0]; - char *myvalue = argv[1]; - char *ns_value = 0; - char *ns_type = 0; - - if (ns_context.bind (mykey, myvalue, "ottotype") == -1) - cout << "bind failed" << endl; - else - cout << "bind succeeded" << endl; - - - if (ns_context.resolve (mykey, ns_value, ns_type) == -1) - cout << "resolve of " << mykey << " failed" << endl; - else - cout << "resolve of " << mykey << " succeeded, value = " - << ns_value << ", type = " << ns_type << endl; - - delete [] ns_value; - delete [] ns_type; - ns_value = 0; - ns_type = 0; - - if (ns_context.rebind (mykey, myvalue, "newottotype") == -1) - cout << "rebind failed" << endl; - else - cout << "rebind succeeded" << endl; - - if (ns_context.resolve (mykey, ns_value, ns_type) == -1) - cout << "resolve of " << mykey << " failed" << endl; - else - cout << "resolve of " << mykey << " succeeded, value = " - << ns_value << ", type = " << ns_type << endl; - - delete [] ns_value; - delete [] ns_type; - ns_value = 0; - ns_type = 0; - - if (ns_context.unbind (mykey) == -1) - cout << "unbind failed" << endl; - else - cout << "unbind succeeded" << endl; - - return 0; -} - -int -Nametest::fini (void) -{ - cout << "Nametest::fini called" << endl; - return 0; -} - -int -Nametest::info (char **, unsigned) const -{ - cout << "Nametest::info called" << endl; - return 0; -} - -extern "C" ACE_Service_Object *_alloc(void); - -// Factory function that is called automatically when the ACE -// framework dynamically links this shared object file. - -ACE_Service_Object *_alloc (void) -{ - return new Nametest; -} diff --git a/netsvcs/clients/Naming/Dump_Restore/nametest.h b/netsvcs/clients/Naming/Dump_Restore/nametest.h deleted file mode 100644 index fa0cc5dc05c..00000000000 --- a/netsvcs/clients/Naming/Dump_Restore/nametest.h +++ /dev/null @@ -1,15 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/Service_Object.h" - -class Nametest : public ACE_Service_Object -{ -public: - virtual int init (int argc, char *argv[]); - virtual int fini (void); - virtual int info (char **, size_t) const; - - void listopt (void); -}; - diff --git a/netsvcs/lib/Client_Logging_Handler.i b/netsvcs/lib/Client_Logging_Handler.i deleted file mode 100644 index 57c6d26e751..00000000000 --- a/netsvcs/lib/Client_Logging_Handler.i +++ /dev/null @@ -1,4 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - diff --git a/netsvcs/lib/Server_Logging_Handler.i b/netsvcs/lib/Server_Logging_Handler.i deleted file mode 100644 index 57c6d26e751..00000000000 --- a/netsvcs/lib/Server_Logging_Handler.i +++ /dev/null @@ -1,4 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - diff --git a/netsvcs/servers/cli.conf b/netsvcs/servers/cli.conf deleted file mode 100644 index b2d8fbc8194..00000000000 --- a/netsvcs/servers/cli.conf +++ /dev/null @@ -1,11 +0,0 @@ -# UNIX version -# -# These are the services that can be linked into ACE. -# Note that you can replace the hardcoded "../lib/libnet_svcs" with -# a relative path if you set your LD search path correctly -- ACE will -# locate this for you automatically by reading your LD search path! -# In addition, you can replace the hardcoded "-p 20xxx" with "-p -# $PORTxxx" if you set your environment variables correctly. - -# Activate the Client Logging Daemon. -dynamic Client_Logging_Service Service_Object * ../lib/libnet_svcs:_make_ACE_Client_Logging_Connector() active "-p 20009 -h merengue" diff --git a/netsvcs/servers/ntsvc.conf b/netsvcs/servers/ntsvc.conf deleted file mode 100644 index 94ed5d78c2a..00000000000 --- a/netsvcs/servers/ntsvc.conf +++ /dev/null @@ -1,12 +0,0 @@ -# Windows NT version. -# -# These are the services that can be linked into ACE. -# Note that your path needs to include the path for netsvcs.dll -# In addition, you can replace the hardcoded "-p 20xxx" with "-p -# $PORTxxx" if you set your environment variables correctly. - -dynamic Token_Service Service_Object * netsvcs.dll:_make_ACE_Token_Acceptor() "-p 20202" -dynamic Name_Server Service_Object * netsvcs.dll:_make_ACE_Name_Acceptor() "-p 20012" -#dynamic Client_Logging_Service Service_Object * netsvcs.dll:_make_ACE_Client_Logging_Connector() active "-p 20008" -#dynamic Server_Logging_Service Service_Object * netsvcs.dll:_make_ACE_Server_Logging_Acceptor() active "-p 20009" -#dynamic Thr_Server_Logging_Service Service_Object * netsvcs.dll:_make_ACE_Thr_Server_Logging_Acceptor() active "-p 20020" diff --git a/protocols/ace/RMCast/README b/protocols/ace/RMCast/README deleted file mode 100644 index 2dd0c5d9cfc..00000000000 --- a/protocols/ace/RMCast/README +++ /dev/null @@ -1,57 +0,0 @@ -# $Id$ - - This directory will contain a simple, small-scale reliable -multicast framework for ACE. The framework is based on the ASX -components of the ACE library: the protocol is implemented as a stack -of interchangeable "modules", each one in charge of a very small task. -For example, one module implements fragmentation and reassembly, other -modules implement retransmission, send ACK and NAK messages, and -maintain receiver membership. - - The modules are replaced to achieve different levels of -reliability. For example, the retransmission module can be either the -"Best_Effort", "Semi_Reliable" or "Reliable" implementation. In the -first case no retransmissions are performed, but lost messages are -detected and reported to the receiver. The "Semi_Reliable" case -messages are held for a pre-specified amount of time, and -re-transmited if requested, but it is possible to loose some messages -if multiple re-transmissions fail. As in the "Best_Effort" case the -lost messages are detected and flagged to the application. Finally -in the "Reliable" mode the senders are flowed controlled until enough -messages are successfully transmitted. - - In general the stack looks like this: - - -SENDER: - ----------------------------------------------------------------- -Buffering : Save lost messages -Retransmission : Retransmit ----------------------------------------------------------------- -Fragmentation : Fragment messages in smaller chunks -Reassembly : and ensure that the IOVMAX limit is not - : reached ----------------------------------------------------------------- -Tranport : Encapsulate the specific transport media - : such as TCP/IP, ATM, or shared memory - : Demuxes incoming data to the right chain - : Change control messages and data messages - : to the right dynamic types. ----------------------------------------------------------------- - -RECEIVER: - ----------------------------------------------------------------- -Lost detection : Detect lost messages and send control - : messages back ----------------------------------------------------------------- -Reassembly : Reassemble messages, fragment control -Fragmentation : data ----------------------------------------------------------------- -Transport : Group membership, ACT reception, - : handle keep-alive messages... ----------------------------------------------------------------- - - -@@ TODO: Piggybacking... diff --git a/protocols/ace/RMCast/RMCast_Export.h b/protocols/ace/RMCast/RMCast_Export.h deleted file mode 100644 index 665d4ecf229..00000000000 --- a/protocols/ace/RMCast/RMCast_Export.h +++ /dev/null @@ -1,40 +0,0 @@ -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by -// generate_export_file.pl -// ------------------------------ -#if !defined (ACE_RMCAST_EXPORT_H) -#define ACE_RMCAST_EXPORT_H - -#include "ace/config-all.h" - -#if !defined (ACE_RMCAST_HAS_DLL) -#define ACE_RMCAST_HAS_DLL 1 -#endif /* ! ACE_RMCAST_HAS_DLL */ - -#if defined (ACE_RMCAST_HAS_DLL) -# if (ACE_RMCAST_HAS_DLL == 1) -# if defined (ACE_RMCAST_BUILD_DLL) -# define ACE_RMCast_Export ACE_Proper_Export_Flag -# define ACE_RMCAST_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define ACE_RMCAST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else -# define ACE_RMCast_Export ACE_Proper_Import_Flag -# define ACE_RMCAST_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define ACE_RMCAST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ACE_RMCAST_BUILD_DLL */ -# else -# define ACE_RMCast_Export -# define ACE_RMCAST_SINGLETON_DECLARATION(T) -# define ACE_RMCAST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ! ACE_RMCAST_HAS_DLL == 1 */ -#else -# define ACE_RMCast_Export -# define ACE_RMCAST_SINGLETON_DECLARATION(T) -# define ACE_RMCAST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* ACE_RMCAST_HAS_DLL */ - -#endif /* ACE_RMCAST_EXPORT_H */ - -// End of auto generated file. diff --git a/tests/CPP_Test.cpp b/tests/CPP_Test.cpp deleted file mode 100644 index 4c0bd291a50..00000000000 --- a/tests/CPP_Test.cpp +++ /dev/null @@ -1,261 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// CPP_Test.cpp -// -// = DESCRIPTION -// This is a simple test of the ACE_SOCK_Acceptor and -// AC_SOCK_Connector classes. The test forks two processes or -// spawns two threads (depending upon the platform) and then executes -// client and server allowing them to connect and exchange -// data. No user input is required as far as command line -// arguments are concerned. -// -// = AUTHOR -// Prashant Jain and Doug Schmidt -// -// ============================================================================ - -#include "ace/OS.h" -#include "ace/Thread.h" -#include "ace/Service_Config.h" -#include "ace/SOCK_Connector.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/SOCK_Stream.h" -#include "ace/INET_Addr.h" -#include "ace/Handle_Set.h" -#include "test_config.h" - -static void * -client (void *arg) -{ -#if (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) - // Insert thread into thr_mgr - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); - ACE_NEW_THREAD; -#endif /* (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) */ - - ACE_INET_Addr *remote_addr = (ACE_INET_Addr *) arg; - ACE_INET_Addr server_addr (remote_addr->get_port_number (), "localhost"); - ACE_SOCK_Stream cli_stream; - ACE_SOCK_Connector con; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) starting non-blocking connect\n")); - // Initiate timed, non-blocking connection with server. - - // Attempt a non-blocking connect to the server, reusing the local - // addr if necessary. - if (con.connect (cli_stream, server_addr, - (ACE_Time_Value *) &ACE_Time_Value::zero) == -1) - { - if (errno != EWOULDBLOCK) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "connection failed")); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) starting timed connect\n")); - - // Check if non-blocking connection is in progress, - // and wait up to ACE_DEFAULT_TIMEOUT seconds for it to complete. - ACE_Time_Value tv (ACE_DEFAULT_TIMEOUT); - - if (con.complete (cli_stream, &server_addr, &tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "connection failed"), 0); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) connected to %s\n", - server_addr.get_host_name ())); - } - - if (cli_stream.disable (ACE_NONBLOCK) == -1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "disable")); - - // Send data to server (correctly handles "incomplete writes"). - - for (char c = 'a'; c <= 'z'; c++) - if (cli_stream.send_n (&c, 1) == -1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "send_n")); - - // Explicitly close the writer-side of the connection. - if (cli_stream.close_writer () == -1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "close_writer")); - - char buf[1]; - - // Wait for handshake with server. - if (cli_stream.recv_n (buf, 1) != 1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "recv_n")); - - // Close the connection completely. - if (cli_stream.close () == -1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "close")); - - return 0; -} - -static void * -server (void *arg) -{ -#if (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) - // Insert thread into thr_mgr - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); - ACE_NEW_THREAD; -#endif /* (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) */ - - ACE_SOCK_Acceptor *peer_acceptor = (ACE_SOCK_Acceptor *) arg; - - if (peer_acceptor->enable (ACE_NONBLOCK) == -1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "enable")); - - // Keep these objects out here to prevent excessive constructor - // calls... - ACE_SOCK_Stream new_stream; - ACE_INET_Addr cli_addr; - ACE_Handle_Set handle_set; - ACE_Time_Value tv (ACE_DEFAULT_TIMEOUT); - // Performs the iterative server activities. - - for (;;) - { - char buf[BUFSIZ]; - char t = 'a'; - - handle_set.reset (); - handle_set.set_bit (peer_acceptor->get_handle ()); - - int result = ACE_OS::select (int (peer_acceptor->get_handle ()) + 1, - handle_set, - 0, 0, &tv); - if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "select"), 0); - else if (result == 0) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) select timed out, shutting down\n")); - return 0; - } - - // Create a new ACE_SOCK_Stream endpoint (note automatic restart - // if errno == EINTR). - - while ((result = peer_acceptor->accept (new_stream, &cli_addr)) != -1) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client %s connected from %d\n", - cli_addr.get_host_name (), cli_addr.get_port_number ())); - - // Enable non-blocking I/O. - if (new_stream.enable (ACE_NONBLOCK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "enable"), 0); - - handle_set.reset (); - handle_set.set_bit (new_stream.get_handle ()); - - // Read data from client (terminate on error). - - for (ssize_t r_bytes; ;) - { - if (ACE_OS::select (int (new_stream.get_handle ()) + 1, - handle_set, - 0, 0, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "select"), 0); - - while ((r_bytes = new_stream.recv_n (buf, 1)) > 0) - { - ACE_ASSERT (t == buf[0]); - t++; - } - - if (r_bytes == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) reached end of input, connection closed by client\n")); - - // Handshake back with client. - if (new_stream.send_n ("", 1) != 1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "send_n")); - - // Close endpoint. - if (new_stream.close () == -1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "close")); - return 0; - } - else if (r_bytes == -1) - { - if (errno == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) no input available, going back to reading\n")); - else - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "recv_n"), 0); - } - } - } - - if (result == -1) - { - if (errno == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) no connections available, going back to accepting\n")); - else - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "accept")); - } - } - return 0; -} - -static void -spawn (void) -{ - // Acceptor - ACE_SOCK_Acceptor peer_acceptor; - - // Create a server address. - ACE_INET_Addr server_addr; - - // Bind listener to any port and then find out what the port was. - if (peer_acceptor.open (ACE_Addr::sap_any) == -1 - || peer_acceptor.get_local_addr (server_addr) == -1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "open")); - else - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) starting server at port %d\n", - server_addr.get_port_number ())); - -#if !defined (ACE_WIN32) && !defined (VXWORKS) - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "fork failed")); - exit (-1); - case 0: - ACE_LOG_MSG->sync ("child"); - client (&server_addr); - default: - server ((void *) &peer_acceptor); - ACE_OS::wait (); - } -#elif defined (ACE_HAS_THREADS) - if (ACE_Service_Config::thr_mgr ()->spawn - (ACE_THR_FUNC (server), (void *) &peer_acceptor, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed")); - - if (ACE_Service_Config::thr_mgr ()->spawn - (ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed")); - - // Wait for the threads to exit. - ACE_Service_Config::thr_mgr ()->wait (); -#else - ACE_ERROR ((LM_ERROR, "(%P|%t) only one thread may be run in a process on this platform\n%a", 1)); -#endif /* ACE_HAS_THREADS */ - } -} - -int -main (int, char *[]) -{ - ACE_START_TEST ("CPP_Test"); - - spawn (); - - ACE_END_TEST; - return 0; -} diff --git a/tests/Shared_Memory_SV_Test.cpp b/tests/Shared_Memory_SV_Test.cpp deleted file mode 100644 index a3654a7745b..00000000000 --- a/tests/Shared_Memory_SV_Test.cpp +++ /dev/null @@ -1,83 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Shared_Memory_SV_Test.cpp -// -// = DESCRIPTION -// This is a simple test of ACE_Shared_Memory_SV -// -// = AUTHOR -// Prashant Jain and Doug Schmidt -// -// ============================================================================ - - -#include "ace/Shared_Memory_SV.h" -#include "test_config.h" - -const int SHMSZ = 27; -const int SHM_KEY = 5678; - -static void -client (void) -{ - char t = 'a'; - ACE_Shared_Memory_SV shm_client (SHM_KEY, SHMSZ, - ACE_Shared_Memory_SV::ACE_CREATE); - char *shm = (char *) shm_client.malloc (); - - for (char *s = shm; *s != '\0'; s++) - { - ACE_ASSERT (t == s[0]); - t++; - } - *shm = '*'; - ACE_OS::exit (0); -} - -static void -server (void) -{ - ACE_Shared_Memory_SV shm_server (SHM_KEY, SHMSZ, - ACE_Shared_Memory_SV::ACE_CREATE); - char *shm = (char *) shm_server.malloc (); - char *s = shm; - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - while (*shm != '*') - ACE_OS::sleep (1); - - if (shm_server.remove () < 0) - ACE_ERROR ((LM_ERROR, "%p\n", "remove")); -} - -int -main (int, char *argv []) -{ - ACE_START_TEST ("Shared_Memory_SV_Test.cpp"); - - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "fork"), 1); - case 0: - client (); - break; - default: - server (); - break; - } - - ACE_END_TEST; - return 0; -} - diff --git a/tests/run_tests.ksh b/tests/run_tests.ksh deleted file mode 100755 index a4d7f0d8b17..00000000000 --- a/tests/run_tests.ksh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/ksh -f - -. ./run_tests.sh - -# EOF - -- cgit v1.2.1