diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-24 16:53:27 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-24 16:53:27 +0000 |
commit | e173ad0583f6dfa2ce58b777c434c0906e1be292 (patch) | |
tree | 4232a1221f83956ea047668a0ff601d1a5547462 /TAO | |
parent | 6327ce1265bd35827064d920c9d9bc4e05be6cd4 (diff) | |
download | ATCD-e173ad0583f6dfa2ce58b777c434c0906e1be292.tar.gz |
ChangeLogTag:Sat Jan 24 10:30:40 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO')
144 files changed, 25527 insertions, 2494 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 07c2804101c..7485c3880db 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,1252 @@ +Sat Jan 24 10:30:40 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * The POA branch is merged back into the main trunk. For the + record we reproduce the ChangeLog in the branch. + + * ============ + * ============ Start of POA branch changes. + * ============ + + Fri Jan 23 17:13:14 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * Merged changes from main_to_poa_merge_11 up to + main_to_poa_merge_12 + + Fri Jan 23 17:08:45 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * orbsvcs/Event_Service/Event_Channel.h: + * orbsvcs/Event_Service/Event_Channel.i: + Fixed problem with Event Channel, it was using _this + unproperly. + + Fri Jan 23 16:49:19 1998 Chris Cleeland <cleeland@cs.wustl.edu> + + * tests/Param_Test/{server.cpp,param_test_i.h,param_test_i.cpp}: + Updated to compile with new POA. + + * tests/Param_Test/Makefile: Moved LDFLAGS up, included the + rules.tao.GNU, and removed the dependencies which were causing me + no end of grief. + + * tests/Cubit/TAO/IDL_Cubit/svr.cpp (main): Changed the check on + return value from resolve_initial_references() to use the + CORBA::is_nil() check. + + Fri Jan 23 16:43:12 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * orbsvcs/Dump_Schedule/Dump_Schedule.cpp: + * orbsvcs/Event_Service/Event_Channel.cpp: + * orbsvcs/Event_Service/Event_Channel.i: + * orbsvcs/Event_Service/Event_Service.cpp: + * orbsvcs/Naming_Service/CosNaming_i.cpp: + * orbsvcs/Naming_Service/CosNaming_i.h: + * orbsvcs/Naming_Service/Naming_Service.cpp: + * orbsvcs/Scheduling_Service/Config_Scheduler.cpp: + * orbsvcs/Scheduling_Service/Scheduling_Service.cpp: + * orbsvcs/orbsvcs/Runtime_Scheduler.cpp: + * orbsvcs/orbsvcs/Scheduler_Factory.cpp: + * orbsvcs/tests/Event_Latency/Event_Latency.cpp: + * orbsvcs/tests/Event_Latency/Event_Latency.h: + "Ported" the orbsvcs and the Event_Latency test to POA, with + little success though, things will compile and it seems that the + Naming_Service and Scheduling_Services run properly, but + Event_Service does not. + We use a nested POA with "PERSISTENT" lifespan policy because it + is easier to set an enviroment variable or command line to the + NameService IOR. + + * tests/Cubit/TAO/IDL_Cubit/svr.cpp: + Removed some extra (and unwanted) code. + + Fri Jan 23 14:47:18 1998 Chris Cleeland <cleeland@cs.wustl.edu> + + * tests/POA/{FindPOA,RootPOA,NewPOA}/Makefile: Added + -L$(TAO_ROOT)/tao to LDFLAGS. + + * tests/POA/NewPOA/NewPOA.cpp: + * tests/POA/RootPOA/RootPOA.cpp: + * tests/POA/FindPOA/FindPOA.cpp: + Used the ::in() method as first argument to _narrow() calls. + + * tests/{Makefile,README}: Updated for new tests. + + * tao/poa.cpp: Added explicit template instantiations. + + Fri Jan 23 14:30:19 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/poa.h: + * tao/poa.cpp: + * tao/servant_base.cpp: + _this() was using the object id for the current servant in *all* + objects, now it only does so for the servant invoked. + + * tests/Cubit/TAO/IDL_Cubit/Makefile: + * tests/Cubit/TAO/IDL_Cubit/clnt.cpp: + * tests/Cubit/TAO/IDL_Cubit/clnt.h: + * tests/Cubit/TAO/IDL_Cubit/cubit_i.cpp: + * tests/Cubit/TAO/IDL_Cubit/cubit_i.h: + * tests/Cubit/TAO/IDL_Cubit/svr.cpp: + Ported the Cubit test to POA, including some funky persistent + policies to simplify its use. + + Sat Jan 24 01:24:24 1998 Irfan Pyarali <irfan@cs.wustl.edu> + + * tao/poa.cpp (destroy_i): Changed etherealize objects to correct + report remaining_activations. + + Fri Jan 23 10:55:40 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/objtable.cpp: + Linear object tables were not using the initial size to + pre-allocate a buffer. + + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_state_argument.cpp: + Fixed the mapping for native as OUT or INOUT parameters, also + fixed the name for the _dispatch() method. + + Fri Jan 23 01:12:28 1998 Irfan Pyarali <irfan@cs.wustl.edu> + + * tao/poaS.cpp: Added ACE_NESTED_CLASS macro to constructors. + + Thu Jan 22 23:57:31 1998 Chris Cleeland <cleeland@tango.cs.wustl.edu> + + * tao/poa.cpp (wstring_to_ObjectId): Stuck the CORBA::WChar type + in parens for sizeof...g++ likes it better that way. + + Fri Jan 23 00:14:03 1998 Irfan Pyarali <irfan@cs.wustl.edu> + + * tao/poa: + + - Added support for transient and persistent POAs by changing + the ObjectKey. From now on, each key will contain an + identifier that will indicate whether the key came from a + persistent or transient POA. That way the dispatch method can + decide the value of the activate_it flag while finding the + POA. If the key is from a persistent POA, the activate_it + flag will be true, else the flag will be set to false. + + - All operations on the parent POA will check for a valid parent + before executing the call. Remember that the RootPOA does not + have a parent POA. + + - Temporarily added export macros to the POA implementation + classes, so that the implementations can directly be debugged + (rather than going through the stubs/skeletons). These should + be removed once the debugging process is over. + + - Moved the registeration of the POA with its manager from the + create_POA method to the POA constructor. This is to insure + that the registration of the RootPOA is not "missed" since the + RootPOA is not created via the create_POA call. Similarly, + moved the removal of the POA from its manager from the destroy + method to the POA destructor. + + - TAO_POA::delete_child and TAO_POA_Manager::remove_poa were + changed such that when the object is closing down, we are + currently iterating over our poa collection and there is not + need to remove the item from our collection. + + - Changed use of substr from starting_at/ending_at to + starting_at/now_many. + + - Methods that return duplicated values/objects, must first be + assigned to a _var variable before being used. This will + avoid memory leaks. + + - For find methods, always use != -1 for success. + + - Added code to create_POA_i and find_POA_i_optimized to check + when topmost_poa_name == this->name_. + + - Added the concept of creation time to a POA. This way when a + transient POA gets a object key from a previous incarnation, + the OBJECT_NOT_EXISTS exception can be thrown. + + - Added a locator cookie field to TAO_POA_Current to keep track + of the cookie produced by the servant locator. + + - Made all methods virtual. + + - Renamed active_object_table to active_object_map. + + - Added pre_invoke and post_invoke methods to setup the + necessary state before doing the upcall to the servant. + + - Changed locate_servant to return 0 for success and -1 for + failure instead of trying to return a servant. This change is + necessary since there may not be a servant available but there + may be default servants or servant managers that could fill in + for the servant. Currently the locate_servant method takes an + optimistic approach to return TRUE when the servant was not + found but a default servant or servant manager was registered + with the POA, hoping the default servant or servant manager + will be able to fill in when the real request arrives. + + - Add a validity checks for POA policies. + + - Added support for servant managers (both servant locators and + servant activators), default servants and DSI. + + * tao/poaC.h: Added DynamicImplementation class to the + PortableServer. + + * tao/poaS: Changed dispatch to _dispatch. + + * tao/servant_base: + + - Added TAO_DynamicImplementation class + (a.k.a. PortableServer::DynamicImplementation). Users will + inherit from this to implement DSI. + + - Added prefix _ to all methods names in the ServantBase class + to avoid potential crashes with user specified method names. + + - Made TAO_POA a friend of ServantBase. + + * tao/connect.cpp (handle_locate): Changed to use latest version + of TAO_POA::locate_servant. + + * tao/servant_base.cpp (_default_POA): Changed to use + TAO_ORB_Core_instance()->root_poa() instead of + TAO_ORB_Core_instance()->orb()->resolve_initial_references("RootPOA"). + + * tao/poaC: Added string_to_ObjectId and ObjectId_to_string + methods to PortableServer. + + * tao/poa.cpp (TAO_Adapter_Activator::unknown_adapter): Changed + the implementation of this object so that it does not depend on + being friends with the POA and the POAManager. Initially, this + was done to avoid recursive locks. However, since user may want + to write their own implementations, recursive locks were deemed + necessary. + + * tao/default_server.cpp (create_poa_lock): Changed implementation + to produce ACE_Recursive_Thread_Mutex instead of + ACE_Thread_Mutex. + + * tests/POA/RootPOA/RootPOA.cpp (main) and + tests/POA/NewPOA/NewPOA.cpp (main): Added code to destroy the + rootPOA. I am not sure this is the responsibility of the user + to destroy the rootPOA since they never really created it. The + responsibility probably lies with the ORB, but since the spec + seems neutral about this, it is ok for now. + + * tao/object.i (CORBA_Object::Release): We must delete the object + when the parent_ refcount goes to zero. + + Thu Jan 22 16:56:32 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/be_include/be_interface.h: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_visitor_interface.cpp: + Fixed some relative name problems for the server header file. + + * TAO_IDL/be/be_visitor_sequence.cpp: + * TAO_IDL/be/be_visitor_root.cpp: + * TAO_IDL/be/be_visitor_args.cpp: + Get rid of some "unused arg" warnings. + + Thu Jan 22 15:26:55 1998 Chris Cleeland <cleeland@cs.wustl.edu> + + * tao/object.i: CORBA::Object --> CORBA_Object for internal stuff. + + * tao/object.i (CORBA_Object): Re-ordered member initialization to + match declaration order. + + Thu Jan 22 14:40:01 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/corbacom.h: + Fixed multiple definitions of ORB_var and ORB_out due to a + simplistic merge. + + * TAO_IDL/be/be_interface.cpp: + Generate _find() to locate operations; using just find() is not + complaint. + + Thu Jan 22 10:40:13 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * Merged changes from main_to_poa_merge_10 up to + main_to_poa_merge_11 + + Wed Jan 21 17:35:20 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/be/be_visitor_interface.cpp: + Generate CORBA_Object instead of CORBA::Object to keep NT + happy. + + * TAO_IDL/be/be_visitor_args.cpp: + Fixed mapping for strings as arguments, they should always be + char*. + + Mon Jan 19 22:03:38 1998 <coryan@MILONGA> + + * tao/sequence_T.i: + Object_Manager constructor was calling _duplicate(). That is not + the right semantics, and produces a crash when working on an + unitialized buffer. + + * tests/POA/NewPOA/NewPOA.cpp: + * tests/POA/NewPOA/NewPOA.dsp: + Fixed signed/unsigned warning. + + * tests/POA/NewPOA/NewPOA.dsp: + Fixed missing options to find ACE. + + Mon Jan 19 16:36:22 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/iiopobj.h: + * tao/iiopobj.cpp: + Added a missed in action key() method to IIOP_Object. + + * tao/stub.h: + * tao/objkeyC.h: + * tao/object.h: + * tao/object.cpp: + Removed the non-complaint ObjectKey_ptr type. + + Mon Jan 19 16:19:28 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/deep_free.cpp: + A reinterpret cast was dropping constness also, thanks to Irfan + for pointing this one out. + + Mon Jan 19 15:36:10 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/sequence_T.i: + * tao/sequence_T.cpp: + The last merge was too smart, it kept some changes on this + branch that should have gone away. + + Mon Jan 19 13:58:01 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/be/be_visitor_interface.cpp: + * TAO_IDL/be/be_interface.cpp: + Fixed operation table initialization, also called proper + constructor for CORBA::Object in collocated classes. + + * tao/corba.h: + More include reordering. + + * tao/servant_base.h: + The operation table was not properly initialized. + + Mon Jan 19 11:28:47 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * Merged changes from main_to_poa_merge_9 up to + main_to_poa_merge_10. + + Sun Jan 18 01:04:22 1998 <coryan@MILONGA> + + * TAO_IDL/be/be_attribute.cpp: + * TAO_IDL/be/be_codegen.cpp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be_include/be_interface.h: + * tao/servant_base.h: + Added support for collocation in the _narrow method, this + required a complete implementation of _downcast() for each + skeleton. + + Sat Jan 17 20:54:26 1998 <coryan@MILONGA> + + * TAO_IDL/be/be_attribute.cpp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_sequence.cpp: + * TAO_IDL/be/be_visitor_interface.cpp: + * TAO_IDL/be/be_visitor_sequence.cpp: + More bug fixes in code generation for sequences, attributes, + etc. Most of them were minor inconsitencies. Also fixed + constructors for collocated classes on NT (working around MSVC++ + bug). + + * tao/servant_base.cpp: + * tao/servant_base.h: + Added default implementation for _downcast(), it just works if + downcasting to "Object". + + * tao/sequence_T.cpp: + * tao/sequence_T.h: + * tao/sequence_T.i: + Fixed some problems with managed sequences. + + Sat Jan 17 19:27:12 1998 <coryan@MILONGA> + + * tao/servant_base.h: + * tao/servant_base.cpp: + Added the new _is_a() method on TAO_ServantBase. + + * TAO_IDL/tao_idl.dsp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_string.cpp: + * TAO_IDL/be/be_visitor_args.cpp: + * TAO_IDL/be/be_visitor_interface.cpp: + * TAO_IDL/be/be_visitor_sequence.cpp: + * TAO_IDL/be_include/be_visitor.h: + * TAO_IDL/be_include/be_visitor_args.h: + * TAO_IDL/be_include/be_visitor_interface.h: + Added a new _is_a to the generated servants, also implemented + the _is_a method on the collocated classes by invoking that + _is_a(). + Added support for attributes in collocated classes, thanks to + Irfan for noticing this. + + Sat Jan 17 15:44:43 1998 <coryan@MILONGA> + + * tao/corba.h: + * tao/iiopobj.cpp: + Fixed undetected inconsistencies in the last merge. + + * tao/objkeyC.cpp: + * tao/objkeyC.h: + * tao/objkeyC.i: + I regenrated from the IDL file to use the new sequences. + + Sat Jan 17 11:49:15 1998 <coryan@MILONGA> + + * Merged changes from main_to_poa_merge_8 to main_to_poa_merge_9. + + Sat Jan 17 00:45:59 1998 Irfan Pyarali <irfan@cs.wustl.edu> + + * tests/POA: Added new tests: Explicit_Activation_POA_Ids and + NewPOA. + + * tao/servant_base.h (TAO_ServantBase): Added a _downcast method + that gets the servant with the correct vtable. Also added a new + class TAO_Local_ServantBase that overwrites _create_stub. + TAO_Local_ServantBase::_create_stub uses a fake key and does not + registration with the default POA. + + * tao/poaS.*: Added _downcast to the generated code. Also added + attribute accessor methods. Also updated constructors to + explicitly initialize the virtual base class (CORBA::Object). + + * tao/poaC.h: Added TAO_Local_ServantBase to the PortableServer + namespace as PortableServer::LocalServantBase. + + * tao/poaC.cpp (_narrow): Changed the implementation of _narrow to + produce a collocated class when appropriate. + + * tao/poa.cpp (TAO_POA::create_*_policy): Made sure these methods + return collocated classes and not implementation classes. + + * tao/poa.h (class TAO_POA_Policies): Added set methods to + TAO_POA_Policies. + + * tao/orbobj.cpp (resolve_poa): Made sure that the RootPOA is + created with the PortableServer::IMPLICIT_ACTIVATION policy. + + * tao/object: Added servant pointer and a collocated flag to + object class. + + Fri Jan 16 03:27:30 1998 Irfan Pyarali <irfan@cs.wustl.edu> + + * tao: + + BOA begone: CORBA::POA and all BOA related code has been + removed from TAO. + + POA: Today the PortableServer and the POA were born in TAO. + + * tao/connect (handle_request): Changed handle_request to accept + the TAO_GIOP_RequestHeader parameter by reference rather than by + value. + + * tao/corba.h: Rearranged header to accommodate the new POA. + + * tao/corbacom.h (CORBA): Added typedefs for Object_var Object_out + in the CORBA class. + + * tao/current: Absorbed all the POACurrent code into the poa.* + files. + + * tao/iiopobj.cpp (operator==): Added comparison operator for + TAO::ObjectKey. + + * tao/orbobj.cpp (resolve_poa_current and resolve_poa): Made sure + that we return the colocated class and not the implementation + class. + + * tao/orbobj.h (objref.): POA_init was deprecated. Please use + orb->resolve_initial_references ("RootPOA") instead. + + * tao/objtable.cpp (find): Change the use of auto_ptr(s) to deal + correctly with explicit constructors. + + Thu Jan 15 17:27:26 1998 Chris Cleeland <cleeland@cs.wustl.edu> + + * tao/orb_core.{h,i}: Added the poa_current() method and internal + structure so that state is available to the POA and to the upcall. + + * tao/orbobj.{h,cpp}: Added resolve_poa_current() in order to + return the POACurrent state context. Added the "POACurrent" to + one of the things for which resolve_initial_references() works. + Changed resolve_poa() so that things can compile; the impl isn't + correct but when the POA stuff gets committed, this will be + changed accordingly. + + Tue Jan 13 12:15:54 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/be_include/be_operation.h: + * TAO_IDL/be/be_operation.cpp: + * TAO_IDL/be/be_state_operation.cpp: + The stubs and skeletons for operations that have a "native" + argument or return value simply "throw" a CORBA::MARSHAL + exception; those methods cannot be called for remote objects. + I also had to return something when an exception is raised and + the return type is a "native", we choose to return 0 for lack of + a better choice. + + Tue Jan 13 10:49:48 1998 Chris Cleeland <cleeland@cs.wustl.edu> + + * tao/current.{i,cpp}: Added a first cut at implementations for + the POA Current impl. + + Mon Jan 12 19:47:42 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/poa.h: + * tao/poa.cpp: + Added a _get_stub() method that encapsulates code common to all + _this implementations. + + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_visitor_interface.cpp: + The _this() method implementation was changed to use the new + _get_stub finally adding full support for the standard poa, some + changes were required in the _tao_collocated classes and their + constructors. + + * TAO_IDL/be_include/be_helper.h: + * TAO_IDL/be/be_helper.cpp: + Added "manipulators" to increase and decrement indentation + level. + + Mon Jan 12 14:55:53 1998 Chris Cleeland <cleeland@cs.wustl.edu> + + * tao/current.h (class TAO_POA_Current_Impl): Added this as the + beginning of the implementation for the POA Current. More to + come... + + * tao/default_server.*: Added implementations of create_poa_lock() + and create_poa_mgr_lock() to obtain their values from -ORBpoalock + and -ORBpoamgrlock options, respectively, to the Default Server + Strategy Factory specified in svc.conf. Values for these are + either "thread" or "null", which specify an ACE_Thread_Mutex or + ACE_NULL_Mutex, respectively. + + * tao/server_factory.*: Added create_poa_lock() and + create_poa_mgr_lock() to obtain locks for use in POA and POA + Manager instances. + + Mon Jan 12 12:10:58 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/objtable.cpp: + Fixed some problems with misused auto_ptr and dynamic cast that + was taking away constness at the same time. + + Mon Jan 12 11:55:53 1998 Chris Cleeland <cleeland@cs.wustl.edu> + + * tao/orbobj.cpp (resolve_poa): Added skeletal code to create root + POAs using the resolve_initial_references() interface. Irfan will + fill in the correct code for actually creating the POA. + + Sun Jan 11 14:09:48 1998 <coryan@MILONGA> + + * orbsvcs/Dump_Schedule/Dump_Schedule.dsp: + * orbsvcs/Event_Service/CORBA_Utils_T.cpp: + * orbsvcs/Event_Service/Dispatching_Modules.cpp: + * orbsvcs/Event_Service/Event_Channel.cpp: + * orbsvcs/Event_Service/Event_Service.cpp: + * orbsvcs/tests/Event_Latency/Event_Latency.cpp: + Adapted so they compile with the new POA mapping. + + Sun Jan 11 11:33:36 1998 <coryan@MILONGA> + + * tao/connect.cpp: + On this branch the find() method for POA's require a + PortableServer::Servant parameter. + + * orbsvcs/Scheduling_Service/Scheduling_Service.cpp: + * orbsvcs/Naming_Service/Naming_Service.cpp: + * orbsvcs/Naming_Service/CosNaming_i.cpp: + Modified to use the new POA mapping for servers. + + * TAO_IDL/tao_idl.dsp: + Replaced the old drv_main.cpp with tao_idl.cpp. + + * orbsvcs/orbsvcs/orbsvcs_lib.dsp: + The final library is not generated inside Debug and its name is + orbsvcs.lib, not orbsvcs_lib.lib + + Sun Jan 11 10:55:04 CST 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * Merged changes from tag main_to_poa_merge_5 and + main_to_poa_merge_6. This late merge is risky, needs complete + validation before public release. + + Sat Jan 10 22:11:47 1998 <coryan@MILONGA> + + * TAO_IDL/be_include/be_interface.h: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_visitor_interface.cpp: + Work around bug in MSVC++ 5.0 wrt inheritance from nested + classes and the constructor invocation. + + Sat Jan 10 19:21:18 1998 <coryan@MILONGA> + + * TAO_IDL/tao_idl.dsp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be_include/be_interface.h: + * tao/orb_core.cpp: + Fixed some problems in the latest merges. + + Sat Jan 10 18:06:24 1998 <coryan@MILONGA> + + * Merged changes from tag main_to_poa_merge_7 and + main_to_poa_merge_8. + Resolved many conflicts in TAO_IDL due to similar changes in + both branches. + + Sat Jan 10 16:57:42 1998 <coryan@MILONGA> + + * Merged changes from tag main_to_poa_merge_6 and + main_to_poa_merge_7. + + Fri Jan 9 17:58:43 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/be/be_array.cpp: + * TAO_IDL/be/be_decl.cpp: + * TAO_IDL/be/be_enum.cpp: + * TAO_IDL/be/be_enum_val.cpp: + * TAO_IDL/be/be_exception.cpp: + * TAO_IDL/be/be_expression.cpp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_interface_fwd.cpp: + * TAO_IDL/be/be_module.cpp: + * TAO_IDL/be/be_predefined_type.cpp: + * TAO_IDL/be/be_root.cpp: + * TAO_IDL/be/be_scope.cpp: + * TAO_IDL/be/be_sequence.cpp: + * TAO_IDL/be/be_string.cpp: + * TAO_IDL/be/be_structure.cpp: + * TAO_IDL/be/be_type.cpp: + * TAO_IDL/be/be_typedef.cpp: + Minor cosmetic changes to make the main trunk changes identic to + the ones on this branch. + + Thu Jan 8 15:50:59 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/be/be_state_operation.cpp: + Added support for native as return type. + + Thu Jan 8 13:20:11 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/ast/Makefile: + * TAO_IDL/be/Makefile: + Added ast_native and be_native to the list of files. + + * TAO_IDL/be_include/be_native.h: + * TAO_IDL/be/be_native.cpp: + * TAO_IDL/be_include/be_visitor.h: + * TAO_IDL/be/be_visitor.cpp: + Added support for visiting be_native. + + * TAO_IDL/be_include/be_visitor_args.h: + * TAO_IDL/be/be_visitor_args.cpp: + Added support for native and improved the implementation. + + * TAO_IDL/fe/y.tab.cpp: + Removed some includes and pragmas that cause trouble on NT. + + * TAO_IDL/be/be_type.cpp: + Print an error if the default implementation for write_as_return + is called. + + Thu Jan 8 12:53:28 1998 Chris Cleeland <cleeland@cs.wustl.edu> + + * tao/corbacom.i (wstring_dup): Added this, which simply calls + wstring_copy(). Of course, I can't find any mention of EITHER of + these functions in the 2.0 or 2.1 spec, but what good are wstrings + if you can't make copies? Plus, Irfan really wanted it. + + Wed Jan 7 15:09:47 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/fe/y.tab.cpp: + This is the actual file generated from idl.yy, thanks to the + "clone" scheme for building ACE it was lost in the previous + commits. + + Wed Jan 7 14:17:14 1998 Chris Cleeland <cleeland@cs.wustl.edu> + + * tao/orbobj.{h,cpp} (key_to_object): Changed signature so that + it's more in line with what we really need. This is okay because + this method is not in the standard, so we can choose whatever we + damn well please! + + Wed Jan 7 14:08:41 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * Merged changes from version main_to_poa_merge_4 and + main_to_poa_merge_5. + + Tue Jan 6 17:35:44 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/be/be_visitor_interface.cpp: + Added several fixes for mutiple inheritance, but still needs + some work. + + Tue Jan 6 15:20:13 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/object.h: + * tao/object.cpp: + Removed obsolete methods, they were there to support upcalls on + the server side, but now this is done on + PortableServer::ServantBase. + + Tue Jan 6 14:46:27 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/poa.h: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_visitor_interface.cpp: + Added a _get_servant () method to the collocated classes, to + obtain access to the underlying skeleton. + + Tue Jan 6 13:31:20 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/objtable.h: + * tao/objtable.cpp: + Fixed some problems with the PortableServer::ObjectId and + PortableServer::Servant changes. + + * tao/poa.h: + * TAO_IDL/be/be_interface.cpp: + Added a method to get the interface repository name for a + skeleton. + + * tao/encode.cpp: + Fixed problem on object reference enconding. + + Mon Jan 05 23:41:59 1998 <coryan@MILONGA> + + * tao/objkeyC.cpp: + The code for memory reallocation was missing, I added it back. + + * tao/iiopobj.cpp: + Fixed bug in object key generation. + + * tao/poa.cpp: + More debug messages when an object is missing. + + Mon Jan 05 17:46:00 1998 <coryan@MILONGA> + + * tao/connect.cpp: + * tao/corba.h: + * tao/corbacom.h: + * tao/default_server.cpp: + * tao/default_server.h: + * tao/iiopobj.cpp: + * tao/iiopobj.i: + * tao/iioporb.cpp: + * tao/orbobj.cpp: + * tao/params.h: + * tao/params.i: + * tao/poa.cpp: + * tao/poa.h: + * tao/server_factory.cpp: + * tao/server_factory.h: + The ObjectId changes were "accepted for revision" by the POA + committe, hence I'll commit them, they check them and then I'll + have to make the changes they require ;-) + The current scheme uses TAO::ObjectKey as a representation for + sequence<octet>, this class is generated by the IDL compiler. + The ORB core uses a typedef (TAO_opaque) for all its internal + object keys; the current (and deprecated) POA uses ObjectId + (another typedef on the same thing) as object identifiers. + + Mon Jan 5 13:06:19 1998 Carlos O'Ryan <coryan@macarena.cs.wustl.edu> + + * Merged changes from revision main_to_poa_merge_3 up to revision + main_to_poa_merge_4. + + Mon Jan 05 00:11:45 1998 <coryan@MILONGA> + + * tao/objtable.h: + * tao/objtable.cpp: + New Object Table interface, in preparation for the POA needs. + + Sat Jan 03 11:37:21 1998 <coryan@MILONGA> + + * TAO_IDL/be/be_visitor_args.cpp: + Typedefs and predefined types where unproperly handled. + + Fri Jan 2 14:09:49 1998 Carlos O'Ryan <coryan@macarena.cs.wustl.edu> + + * tests/Cubit/TAO/IDL_Cubit/clnt.cpp: + Sequences work on Solaris, even Purify gives its "Houston it's a + go", so I'm reinstating them. + + * tests/Cubit/TAO/IDL_Cubit/svr.cpp: + Minor cosmetic changes. + + Fri Jan 02 08:31:32 1998 <coryan@MILONGA> + + * Merged changes from revision main_to_poa_merge_2 up to revision + main_to_poa_merge_3. + Had to disable sequence test from IDL_Cubit. + + Thu Jan 01 15:43:43 1998 <coryan@MILONGA> + + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_visitor_interface.cpp: + Generated code for collocations setup the "parent_" field + properly. + + * tao/objkeyC.h: + * tao/corbacom.h: + Added export macros. + + * tao/objtable.cpp: + * tao/objtable.h: + * tao/poa.cpp: + * tao/poa.h: + Object table is based on servants now. + + * tests/Cubit/TAO/IDL_Cubit/cubit_i.cpp: + * tests/Cubit/TAO/IDL_Cubit/server.dsp: + * tests/Cubit/TAO/IDL_Cubit/svr.cpp: + Fixed to use the new POA mapping. + + * TAO_IDL/tao_idl.dsp: + * tao/TAO.dsp: + Added the new files to the MSVC++ project. + + Tue Dec 30 16:38:42 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu> + + * More advances in code generation, it compiles and links now, but + won't run. + + * TAO_IDL/be/be_array.cpp: + * TAO_IDL/be/be_enum.cpp: + * TAO_IDL/be/be_exception.cpp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_interface_fwd.cpp: + * TAO_IDL/be/be_predefined_type.cpp: + * TAO_IDL/be/be_sequence.cpp: + * TAO_IDL/be/be_string.cpp: + * TAO_IDL/be/be_structure.cpp: + * TAO_IDL/be/be_type.cpp: + * TAO_IDL/be/be_typedef.cpp: + * TAO_IDL/be/be_union.cpp: + * TAO_IDL/be/be_visitor_args.cpp: + * TAO_IDL/be_include/be_array.h: + * TAO_IDL/be_include/be_enum.h: + * TAO_IDL/be_include/be_exception.h: + * TAO_IDL/be_include/be_interface.h: + * TAO_IDL/be_include/be_interface_fwd.h: + * TAO_IDL/be_include/be_predefined_type.h: + * TAO_IDL/be_include/be_sequence.h: + * TAO_IDL/be_include/be_string.h: + * TAO_IDL/be_include/be_structure.h: + * TAO_IDL/be_include/be_type.h: + * TAO_IDL/be_include/be_typedef.h: + * TAO_IDL/be_include/be_union.h: + Added methods to be_type to generate the return types; this + time without any switches, just visitors and virtual + dispatching. + + * tao/poa.cpp: + * tao/poa.h: + Added the methods to lookup operations, this are TAO specific + and should have complaint names, but currently I just kept the + old names to avoid a major breakdown. + + * TAO_IDL/ast/Makefile: + * TAO_IDL/be/Makefile: + * TAO_IDL/driver/Makefile: + * TAO_IDL/fe/Makefile: + * TAO_IDL/narrow/Makefile: + * TAO_IDL/util/Makefile: + Updated dependencies. + + * TAO_IDL/be/be_visitor_interface.cpp: + * TAO_IDL/be_include/be_visitor_interface.h: + * TAO_IDL/be/be_interface.cpp: + Reverted some changes (code moved from be_interface.cpp into + visitors) to avoid massive conflicts with Andy's changes. + + Tue Dec 30 11:07:06 1997 Chris Cleeland <cleeland@cs.wustl.edu> + + * tao/orb_core.h (TAO_Resource_Factory): Corrected my "fat-finger" + mistake for the return type of get_allocator (). + + Mon Dec 29 16:26:24 1997 Chris Cleeland <cleeland@tango.cs.wustl.edu> + + * tao/orb_core.{h,cpp}: Added methods for the orb core allocator + to the resource factory. + + Mon Dec 29 13:18:49 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu> + + * TAO_IDL/be/Makefile: + * TAO_IDL/be/be_visitor.cpp: + * TAO_IDL/be/be_visitor_args.cpp: + * TAO_IDL/be/be_visitor_interface.cpp: + * TAO_IDL/be_include/be_visitor.h: + * TAO_IDL/be_include/be_visitor_args.h: + * TAO_IDL/be_include/be_visitor_interface.h: + Started implementation of the collocated class code generation, + using the visitor pattern; hence the new be_visitor class and + some examples of its use. + + * TAO_IDL/be_include/be_type.h: + * TAO_IDL/be_include/be_typedef.h: + * TAO_IDL/be/be_type.cpp: + * TAO_IDL/be/be_typedef.cpp: + Added method to obtain the node type for the most "unaliased" + type though a typedef chain. This is needed in several points + for code generation. + + * TAO_IDL/be/be_interface.cpp: + Implemented the collocated class generation using visitors, + ditto for (part of) the main class. + + * TAO_IDL/util/utl_identifier.cpp: + Fixed memory deallocation problem. The string was copied using + ACE_OS::strdup(), but deleted using operator delete[]. + + * TAO_IDL/be/be_argument.cpp: + * TAO_IDL/be/be_array.cpp: + * TAO_IDL/be/be_attribute.cpp: + * TAO_IDL/be/be_constant.cpp: + * TAO_IDL/be/be_decl.cpp: + * TAO_IDL/be/be_enum.cpp: + * TAO_IDL/be/be_enum_val.cpp: + * TAO_IDL/be/be_exception.cpp: + * TAO_IDL/be/be_expression.cpp: + * TAO_IDL/be/be_field.cpp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_interface_fwd.cpp: + * TAO_IDL/be/be_module.cpp: + * TAO_IDL/be/be_operation.cpp: + * TAO_IDL/be/be_predefined_type.cpp: + * TAO_IDL/be/be_root.cpp: + * TAO_IDL/be/be_scope.cpp: + * TAO_IDL/be/be_sequence.cpp: + * TAO_IDL/be/be_string.cpp: + * TAO_IDL/be/be_structure.cpp: + * TAO_IDL/be/be_type.cpp: + * TAO_IDL/be/be_typedef.cpp: + * TAO_IDL/be/be_union.cpp: + * TAO_IDL/be/be_union_branch.cpp: + * TAO_IDL/be/be_union_label.cpp: + * TAO_IDL/be_include/be.h: + * TAO_IDL/be_include/be_argument.h: + * TAO_IDL/be_include/be_array.h: + * TAO_IDL/be_include/be_attribute.h: + * TAO_IDL/be_include/be_constant.h: + * TAO_IDL/be_include/be_decl.h: + * TAO_IDL/be_include/be_enum.h: + * TAO_IDL/be_include/be_enum_val.h: + * TAO_IDL/be_include/be_exception.h: + * TAO_IDL/be_include/be_expression.h: + * TAO_IDL/be_include/be_field.h: + * TAO_IDL/be_include/be_interface.h: + * TAO_IDL/be_include/be_interface_fwd.h: + * TAO_IDL/be_include/be_module.h: + * TAO_IDL/be_include/be_operation.h: + * TAO_IDL/be_include/be_predefined_type.h: + * TAO_IDL/be_include/be_root.h: + * TAO_IDL/be_include/be_scope.h: + * TAO_IDL/be_include/be_sequence.h: + * TAO_IDL/be_include/be_string.h: + * TAO_IDL/be_include/be_structure.h: + * TAO_IDL/be_include/be_type.h: + * TAO_IDL/be_include/be_typedef.h: + * TAO_IDL/be_include/be_union.h: + * TAO_IDL/be_include/be_union_branch.h: + * TAO_IDL/be_include/be_union_label.h: + Added the accept() method for the vistor pattern + implementation. + + Mon Dec 29 11:37:47 1997 Chris Cleeland <cleeland@tango.cs.wustl.edu> + + * tests/Cubit/TAO/MT_Cubit/server/Makefile: Updated dependencies. + + Fri Dec 26 12:05:41 1997 Chris Cleeland <cleeland@tango.cs.wustl.edu> + + * tests/Cubit/TAO/IDL_Cubit/cubit_i.cpp: Correctly modified the + make_cubit() method to properly access the underlying object key. + + * tao/objkeyC.cpp: Added this crucial file that I somehow missed + adding in the last round of changes. + + Wed Dec 24 15:50:38 1997 Chris Cleeland <cleeland@tango.cs.wustl.edu> + + * tests/Cubit/TAO/IDL_Cubit/cubit_i.cpp: Removed non-standard + reliance on underlying object key implementation. It relied on + the buffer being publicly-accessible, which is wrong. However, + I'm not sure that my interim fix is very "right" since it takes + the address of operator[](0) to get to the underlying entire + buffer. + + * tests/Cubit/TAO/{IDL_Cubit,MT_Cubit/{server,client}}/Makefile: + Updated to use rules.tao.GNU. + + * tests/Thruput_test/Makefile: Updated to use rules.tao.GNU. + + * tao/orb.h: Removed unnecessary inclusions of object.h and + corbacom.h from this file. + + * tao/objkeyC.{h,cpp}: Moved the inclusion of corba.h from the + header to the implementation because of strange requirements of + the orb core. This means that this file CANNOT be used as + generated by the IDL compiler. + + * tao/{orbobj,stub,object,iiopobj}.cpp: Updated to use the proper + TAO::ObjectKey_ptr type. + + * tao/Makefile: Updated this after the recent merge that + accidentally overrote some changes I'd made. + + * taoconfig.mk: Moved the implicit rule into rules.tao.GNU. + + * rules.tao.GNU: Added this file where rules specific to TAO can + be collected. Right now it just contains an implicit rule for + executing the IDL compiler on .idl files. + + Tue Dec 23 12:00:38 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu> + + * TAO-INSTALL.html: + * VERSION: + * Benchmark/benchmark/Makefile: + * TAO_IDL/be/be_array.cpp: + * TAO_IDL/be/be_attribute.cpp: + * TAO_IDL/be/be_codegen.cpp: + * TAO_IDL/be/be_decl.cpp: + * TAO_IDL/be/be_exception.cpp: + * TAO_IDL/be/be_operation.cpp: + * TAO_IDL/be/be_scope.cpp: + * TAO_IDL/be/be_sequence.cpp: + * TAO_IDL/be/be_state.cpp: + * TAO_IDL/be/be_state_argument.cpp: + * TAO_IDL/be/be_state_exception.cpp: + * TAO_IDL/be/be_state_operation.cpp: + * TAO_IDL/be/be_state_sequence.cpp: + * TAO_IDL/be/be_state_structure.cpp: + * TAO_IDL/be/be_state_typedef.cpp: + * TAO_IDL/be/be_state_union.cpp: + * TAO_IDL/be/be_type.cpp: + * TAO_IDL/be/be_union.cpp: + * TAO_IDL/be/be_union_branch.cpp: + * TAO_IDL/be_include/be_array.h: + * TAO_IDL/be_include/be_codegen.h: + * TAO_IDL/be_include/be_decl.h: + * TAO_IDL/be_include/be_scope.h: + * TAO_IDL/be_include/be_sequence.h: + * TAO_IDL/be_include/be_state.h: + * TAO_IDL/narrow/narrow.cpp: + * docs/Options.html: + * docs/components.html: + * docs/configurations.html: + * docs/index.html: + * docs/orbsvcs.html: + * docs/releasenotes/index.html: + * orbsvcs/README: + * orbsvcs/Dump_Schedule/Dump_Schedule.cpp: + * orbsvcs/Dump_Schedule/Makefile: + * orbsvcs/Event_Service/Dispatching_Modules.cpp: + * orbsvcs/Event_Service/Dispatching_Modules.i: + * orbsvcs/Event_Service/Event_Channel.cpp: + * orbsvcs/Event_Service/Event_Channel.i: + * orbsvcs/Event_Service/Event_Service.cpp: + * orbsvcs/Event_Service/Makefile: + * orbsvcs/Event_Service/RT_Task.cpp: + * orbsvcs/Event_Service/ReactorTask.cpp: + * orbsvcs/Naming_Service/CosNaming_i.cpp: + * orbsvcs/Naming_Service/Makefile: + * orbsvcs/Scheduling_Service/Config_Scheduler.cpp: + * orbsvcs/Scheduling_Service/Config_Scheduler.h: + * orbsvcs/Scheduling_Service/Makefile: + * orbsvcs/Scheduling_Service/Scheduling_Service.cpp: + * orbsvcs/orbsvcs/Makefile: + * orbsvcs/orbsvcs/RtecEventChannelAdmin.idl: + * orbsvcs/orbsvcs/Runtime_Scheduler.cpp: + * orbsvcs/orbsvcs/Runtime_Scheduler.h: + * orbsvcs/orbsvcs/Scheduler_Factory.cpp: + * orbsvcs/tests/Event_Latency/Event_Latency.cpp: + * orbsvcs/tests/Event_Latency/Makefile: + * orbsvcs/tests/Logger/Makefile: + * orbsvcs/tests/Logger/clnt.cpp: + * orbsvcs/tests/Simple_Naming/Makefile: + * tao/Makefile: + * tao/Timeprobe.cpp: + * tao/corba.h: + * tao/corbacom.cpp: + * tao/deep_free.cpp: + * tao/encode.cpp: + * tao/except.cpp: + * tao/except.h: + * tao/giop.cpp: + * tao/invoke.cpp: + * tao/managed_types.cpp: + * tao/managed_types.h: + * tao/managed_types.i: + * tao/object.i: + * tao/orb_core.cpp: + * tao/request.cpp: + * tao/tao_internals.cpp: + * tests/Cubit/TAO/IDL_Cubit/clnt.cpp: + * tests/Cubit/TAO/IDL_Cubit/clnt.h: + * tests/Cubit/TAO/MT_Cubit/client/Task_Client.cpp: + * tests/Cubit/TAO/MT_Cubit/client/Task_Client.h: + * tests/Cubit/TAO/MT_Cubit/client/client.cpp: + * tests/Cubit/TAO/MT_Cubit/client/cubit.idl: + * tests/Cubit/TAO/MT_Cubit/server/cubit.h: + * tests/Cubit/TAO/MT_Cubit/server/cubit.idl: + * tests/Cubit/TAO/MT_Cubit/server/cubit_i.cpp: + * tests/Cubit/TAO/MT_Cubit/server/cubit_i.h: + * tests/Cubit/TAO/MT_Cubit/server/method_db.i: + * tests/Cubit/TAO/MT_Cubit/server/svr.cpp: + Merged in the changes between revisions main_to_poa_merge_1 and + main_to_poa_merge_2. + The only conflicts were: + + ChangeLog: + removed all the main truck comments and added the one you are + reading just now. + + tests/Cubit/TAO/MT_Cubit/client/Makefile: + + tests/Cubit/TAO/MT_Cubit/client/Makefile: + Left the branch revision, it included the dependencies and had + correct syntax. + + tao/poa.cpp: + CORBA_POA::handle_request was removed on the + branch but modified on the main revision; keep it removed. + + Wed Dec 17 02:11:11 1997 Chris Cleeland <cleeland@tango.cs.wustl.edu> + + * tao/poa.h: + * tao/poa.cpp: + * tao/orbobj.h: + * tao/orbobj.cpp: + * tao/objkeyC.i: + * tao/objkeyC.h: + * tao/object.h: + * tao/iiopobj.h: + * tao/iiopobj.cpp: + * tao/decode.cpp: + * tao/corbacom.h: + * tao/corba.h: + * tao/any.cpp: + All affected by changes to support interfaces required by the new + POA, specifically CORBA::Object::key() and + CORBA::ORB::key_to_object(). It does not compile now, and seems + as if it's simply an ordering problem of header files. + + Mon Dec 15 19:39:20 1997 Chris Cleeland <cleeland@cs.wustl.edu> + + * TAO_IDL/be/Makefile: + * TAO_IDL/be/be_codegen.cpp: + * TAO_IDL/be/be_exception.cpp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_state.cpp: + * TAO_IDL/be/be_state_attribute.cpp: + * TAO_IDL/be/be_state_exception.cpp: + * TAO_IDL/be/be_union_branch.cpp: + * TAO_IDL/be_include/be_state.h: + * docs/releasenotes/orbcore.html: + * docs/releasenotes/index.html: + * orbsvcs/Naming_Service.cpp: + * tao/iiopobj.h: + * tao/except.h: + * tao/except.cpp: Merged in changes from the main trunk. + + * tests/Thruput_test/Makefile: Updated to use taoconfig.mk. + + Sat Dec 13 22:06:25 1997 Chris Cleeland <cleeland@tango.cs.wustl.edu> + + * tao/poa.* (get_key): Removed this method, since it's + unnecessary. + + * tao/objkey.idl: Added this file, which is the idl for an object + key. + + * tao/iiopobj.*: Added some '@@' comments for Irfan. + + * tao/Makefile: Reworked this monstrositry a bit. + + Fri Dec 12 12:09:42 1997 Chris Cleeland <cleeland@cs.wustl.edu> + + * tests/Cubit/TAO/IDL_Cubit/cubit_i.cpp: Changed to use + CORBA::Object::key() rather than _get_name(). + + * tests/Cubit/TAO/{DII_Cubit,IDL_Cubit,MT_Cubit}/Makefile: Updated + to use taoconfig.mk. + + * tao/orb_core.i: Removed stray printf. + + * taoconfig.mk: Added this file which contains common + configuration stuff for applications. + + Thu Dec 11 21:28:09 1997 Chris Cleeland <cleeland@tango.cs.wustl.edu> + + * tao/poa.{h,cpp}: Moved handle_request to + TAO_Server_Connection_Handler and moved create to + CORBA::ORB::key_to_object. + + * tao/orbobj.{h,cpp}: Added key_to_object as a method to create an + object reference from an object key and type id. This code + actually used to live in POA::create. + + * tao/object.h: Brief documentation twiddling, and renamed + get_subclass to get_most_derived, which is hopefully more + explicative. + + * tao/{object,iiopobj,stub}.{h,cpp}: Renamed _get_name to 'key' + and have it return a TAO_ObjectKey_ptr rather than a const char*. + + * tao/corbacom.h: Added typedef for TAO_ObjectKey, which + represents an object key in GIOP. + + * tao/connect.{h,cpp}: Moved handle_request from the POA into + here, thereby helping confine IIOP-ness to the ORB Core and + keeping the POA pristine. + + Thu Dec 11 22:18:52 1997 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu> + + * TAO_IDL/be/be_interface.cpp: Moved the code generation for the + _var and _out classes before the actual class declaration, but + after the forward declaration. This was necessary if any elements + in the scope of the interface are defined to be of the same type + as that interface. In such a situation those elements are defined + to be of the _var type. Hence the declaration for _var and _out + must precede the class declaration. + + Thu Dec 11 22:00:52 1997 Sergio Flores <sergio@tango.cs.wustl.edu> + + * orbsvcs/Naming_Service/Naming_Service.cpp (main): Fixed a bug + related to returning an empty string as the ior in the reply from + the multicast request. + + Thu Dec 11 14:06:50 1997 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu> + + * TAO_IDL/be/{be_exception,be_state_exception}.cpp: Support for + exceptions added. Added a new file called + "be_state_exception.cpp". + + * TAO_IDL/be_include/be_state.h: Added a new singleton for + be_state_exception. + + * TAO_IDL/be/be_state.cpp: Template instantiations for + be_state_exception. + + * TAO/docs/releasenotes/index.html: Updated to include exception + support. + + * TAO/tao/except.{h,cpp}: Moved the TypeCode member from the + private section to the protected section so that derived classes + can set it. Also, changed the variable from _type to type_ to + stick to the ACE design standards. + + * ============ + * ============ End of POA branch changes. + * ============ + Fri Jan 23 10:29:17 1998 David L. Levine <@cs.wustl.edu> * tao/deep_free.cpp (TAO_Marshal_Sequence::deep_free): added diff --git a/TAO/TAO_IDL/be/Makefile b/TAO/TAO_IDL/be/Makefile index 7098b9a53c9..cea025273e9 100644 --- a/TAO/TAO_IDL/be/Makefile +++ b/TAO/TAO_IDL/be/Makefile @@ -57,6 +57,8 @@ BE_FILES = \ be_decl \ be_scope \ be_visitor \ + be_visitor_interface \ + be_visitor_args \ be_visitor_root \ be_visitor_sequence \ be_interpretive @@ -138,16 +140,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -214,16 +215,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -290,16 +290,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -366,16 +365,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -442,16 +440,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -518,16 +515,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -594,16 +590,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -670,16 +665,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -746,16 +740,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -822,16 +815,17 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h \ + ../be_include/be_visitor_interface.h ../be_include/be_visitor.h \ + ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -898,16 +892,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -974,16 +967,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1050,16 +1042,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1126,16 +1117,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1202,16 +1192,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1278,16 +1267,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1354,16 +1342,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1431,16 +1418,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1507,16 +1493,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1583,16 +1568,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1659,16 +1643,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1735,16 +1718,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1811,16 +1793,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1887,16 +1868,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -1963,16 +1943,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2039,16 +2018,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2115,16 +2093,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2192,16 +2169,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2268,16 +2244,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2344,16 +2319,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2420,16 +2394,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2496,16 +2469,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2572,16 +2544,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2648,16 +2619,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2724,16 +2694,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2800,16 +2769,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2876,16 +2844,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -2952,16 +2919,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -3028,16 +2994,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -3104,16 +3069,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -3180,16 +3144,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -3257,16 +3220,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -3334,16 +3296,15 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h \ + ../include/idl_extern.h ../include/fe_extern.h ../include/be_extern.h \ + ../include/drv_extern.h ../include/ast_extern.h \ + ../include/nr_extern.h ../include/global_extern.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ @@ -3410,16 +3371,12 @@ CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \ ../include/ast_constant.h ../include/ast_enum_val.h \ ../include/ast_array.h ../include/ast_sequence.h \ ../include/ast_string.h ../include/ast_typedef.h \ - ../include/ast_native.h ../include/utl_strlist.h \ - ../include/utl_exprlist.h ../include/ast_generator.h \ - ../include/util.h ../include/utl_stack.h ../include/utl_idlist.h \ - ../include/utl_exceptlist.h ../include/utl_namelist.h \ - ../include/utl_labellist.h ../include/utl_decllist.h \ - ../include/idl_global.h ../include/utl_error.h \ - ../include/utl_indenter.h ../include/idl_extern.h \ - ../include/fe_extern.h ../include/be_extern.h ../include/drv_extern.h \ - ../include/ast_extern.h ../include/nr_extern.h \ - ../include/global_extern.h ../be_include/be.h \ + ../include/utl_strlist.h ../include/utl_exprlist.h \ + ../include/ast_generator.h ../include/util.h ../include/utl_stack.h \ + ../include/utl_idlist.h ../include/utl_exceptlist.h \ + ../include/utl_namelist.h ../include/utl_labellist.h \ + ../include/utl_decllist.h ../include/idl_global.h \ + ../include/utl_error.h ../include/utl_indenter.h ../be_include/be.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ diff --git a/TAO/TAO_IDL/be/be_array.cpp b/TAO/TAO_IDL/be/be_array.cpp index c26f44ecf46..b6515710a0c 100644 --- a/TAO/TAO_IDL/be/be_array.cpp +++ b/TAO/TAO_IDL/be/be_array.cpp @@ -1433,6 +1433,13 @@ be_array::compute_size_type (void) return 0; } +int be_array::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + *stream << type->name () << "_slice *"; + return 0; +} + int be_array::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_attribute.cpp b/TAO/TAO_IDL/be/be_attribute.cpp index 47cac837d05..28b4ff9c168 100644 --- a/TAO/TAO_IDL/be/be_attribute.cpp +++ b/TAO/TAO_IDL/be/be_attribute.cpp @@ -563,7 +563,7 @@ be_attribute::gen_server_skeletons (void) *ss << "void " << intf->full_skel_name () << "::_get_" << this->local_name () << "_skel (" << "CORBA::ServerRequest &_tao_server_request, " - << "void *_tao_object_reference, void */*context*/, " + << "void *_tao_object_reference, void * /*context*/, " << "CORBA::Environment &_tao_environment)" << nl; *ss << "{\n"; ss->incr_indent (); @@ -628,7 +628,7 @@ be_attribute::gen_server_skeletons (void) *ss << "void " << intf->full_skel_name () << "::_set_" << this->local_name () << "_skel (" << "CORBA::ServerRequest &_tao_server_request, " - << "void *_tao_object_reference, void */*context*/, " + << "void *_tao_object_reference, void * /*context*/, " << "CORBA::Environment &_tao_environment)" << nl; *ss << "{\n"; ss->incr_indent (); diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index 005735ec430..d1214f1a8b9 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -270,6 +270,9 @@ TAO_CodeGen::client_stubs (const char *fname) *this->client_stubs_ << "#include \"" << idl_global->be_get_client_hdr_fname () << "\"\n\n"; + *this->client_stubs_ << "#include \"" << + idl_global->be_get_server_hdr_fname () << "\"\n\n"; + // generate the code that includes the inline file if not included in the // header file *this->client_stubs_ << "#if !defined (__ACE_INLINE__)\n"; diff --git a/TAO/TAO_IDL/be/be_enum.cpp b/TAO/TAO_IDL/be/be_enum.cpp index 6c3dead7f5c..f4431c30d77 100644 --- a/TAO/TAO_IDL/be/be_enum.cpp +++ b/TAO/TAO_IDL/be/be_enum.cpp @@ -314,6 +314,13 @@ be_enum::tc_encap_len (void) return this->encap_len_; } +int be_enum::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + *stream << type->name (); + return 0; +} + int be_enum::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_exception.cpp b/TAO/TAO_IDL/be/be_exception.cpp index 95332e2fefa..e3c5db792fc 100644 --- a/TAO/TAO_IDL/be/be_exception.cpp +++ b/TAO/TAO_IDL/be/be_exception.cpp @@ -504,6 +504,13 @@ be_exception::tc_encap_len (void) return this->encap_len_; } +int be_exception::write_as_return (TAO_OutStream *, + be_type *) +{ + // exceptions cannot be returned + return -1; +} + int be_exception::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index 2de95f3ee1f..d75afa50673 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -19,6 +19,7 @@ #include "idl.h" #include "idl_extern.h" +#include "be_visitor_interface.h" #include "be.h" /* @@ -28,7 +29,9 @@ // default constructor be_interface::be_interface (void) : full_skel_name_ (0), - skel_count_ (0) + skel_count_ (0), + full_coll_name_ (0), + local_coll_name_ (0) { this->size_type (be_decl::VARIABLE); // always the case } @@ -40,11 +43,124 @@ be_interface::be_interface (UTL_ScopedName *n, AST_Interface **ih, long nih, AST_Decl (AST_Decl::NT_interface, n, p), UTL_Scope (AST_Decl::NT_interface), full_skel_name_ (0), - skel_count_ (0) + skel_count_ (0), + full_coll_name_ (0), + local_coll_name_ (0) { this->size_type (be_decl::VARIABLE); // always the case } +be_interface::~be_interface (void) +{ + if (this->full_skel_name_ != 0) + { + delete[] this->full_skel_name_; + this->full_skel_name_ = 0; + } + if (this->full_coll_name_ != 0) + { + delete[] this->full_coll_name_; + this->full_coll_name_ = 0; + } + if (this->local_coll_name_ != 0) + { + delete[] this->local_coll_name_; + this->local_coll_name_ = 0; + } +} + +// compute stringified fully qualified collocated class name. +void +be_interface::compute_coll_name (void) +{ + if (this->full_coll_name_ != 0) + return; + + const char collocated[] = "_tao_collocated_"; + const char poa[] = "POA_"; + // Reserve enough room for the "POA_" prefix, the "_tao_collocated_" + // prefix and the local name and the (optional) "::" + int namelen = sizeof (collocated) + sizeof (poa); + + UTL_IdListActiveIterator *i; + ACE_NEW (i, UTL_IdListActiveIterator (this->name ())); + while (!i->is_done ()) + { + // reserve 2 characters for "::". + namelen += ACE_OS::strlen (i->item ()->get_string ()) + 2; + i->next (); + } + delete i; + + ACE_NEW (this->full_coll_name_, char[namelen+1]); + this->full_coll_name_[0] = 0; // null terminate the string... + + // Iterate again.... + ACE_NEW (i, UTL_IdListActiveIterator (this->name ())); + + // Only the first component get the "POA_" preffix. + int poa_added = 0; + while (!i->is_done ()) + { + const char* item = i->item ()->get_string (); + + // Increase right away, so we can test for the final component + // in the loop. + i->next (); + + // We add the POA_ preffix only if the first component is not + // the global scope... + if (ACE_OS::strcmp (item, "") != 0) + { + if (!i->is_done ()) + { + // We only add the POA_ preffix if there are more than + // two components in the name, in other words, if the + // class is inside some scope. + if (!poa_added) + { + ACE_OS::strcat (this->full_coll_name_, poa); + poa_added = 1; + } + ACE_OS::strcat (this->full_coll_name_, item); + ACE_OS::strcat (this->full_coll_name_, "::"); + } + else + { + ACE_OS::strcat (this->full_coll_name_, collocated); + ACE_OS::strcat (this->full_coll_name_, item); + } + } + } + delete i; + + // Compute the local name for the collocated class. + int localen = sizeof (collocated); + localen += ACE_OS::strlen (this->local_name ()->get_string ()); + ACE_NEW (this->local_coll_name_, char[localen]); + ACE_OS::strcpy(this->local_coll_name_, collocated); + ACE_OS::strcat(this->local_coll_name_, + this->local_name ()->get_string ()); +} + +const char* +be_interface::full_coll_name (void) const +{ + if (this->full_coll_name_ == 0) + ACE_const_cast(be_interface*, this)->compute_coll_name (); + + return this->full_coll_name_; +} + +const char* +be_interface::local_coll_name (void) const +{ + if (this->local_coll_name_ == 0) + ACE_const_cast(be_interface*, this)->compute_coll_name (); + + return this->local_coll_name_; +} + // compute stringified fully scoped skel name void be_interface::compute_fullskelname (void) @@ -126,22 +242,21 @@ be_interface::full_skel_name (void) // ---------------------------------------- // generate the client header -int be_interface::gen_client_header (void) +int +be_interface::gen_client_header (void) { - TAO_OutStream *ch; // output stream - long i; // loop index - TAO_NL nl; // end line - - if (!this->cli_hdr_gen_) // not already generated { + long i; // loop index + TAO_NL nl; // end line + // retrieve a singleton instance of the code generator TAO_CodeGen *cg = TAO_CODEGEN::instance (); cg->push (TAO_CodeGen::TAO_INTERFACE_CH); // set the current code // generation state - ch = cg->client_header (); + TAO_OutStream *ch = cg->client_header (); // == STEP 1: generate the class name and class names we inherit == ch->indent (); // start with whatever indentation level we are at @@ -156,7 +271,7 @@ int be_interface::gen_client_header (void) *ch << "class " << this->local_name () << ";" << nl; // generate the _ptr declaration *ch << "typedef " << this->local_name () << " *" << this->local_name () - << "_ptr;" << nl; + << "_ptr;" << nl; ch->gen_endif (); @@ -165,11 +280,11 @@ int be_interface::gen_client_header (void) // generate the _var declaration if (this->gen_var_defn () == -1) - { - ACE_ERROR ((LM_ERROR, - "be_interface - error generating _var definition\n")); - return -1; - } + { + ACE_ERROR ((LM_ERROR, + "be_interface - error generating _var definition\n")); + return -1; + } ch->gen_endif (); // generate the ifdef macro for the _out class @@ -177,11 +292,11 @@ int be_interface::gen_client_header (void) // generate the _out declaration - ORBOS/97-05-15 pg 16-20 spec if (this->gen_out_defn () == -1) - { - ACE_ERROR ((LM_ERROR, - "be_interface - error generating _var definition\n")); - return -1; - } + { + ACE_ERROR ((LM_ERROR, + "be_interface - error generating _var definition\n")); + return -1; + } // generate the endif macro ch->gen_endif (); @@ -230,49 +345,55 @@ int be_interface::gen_client_header (void) ch->incr_indent (); // generate the static _duplicate, _narrow, and _nil operations *ch << "// the static operations" << nl; - *ch << "static " << local_name () << "_ptr " << "_duplicate (" << - local_name () << "_ptr obj);" << nl; - *ch << "static " << local_name () << "_ptr " << "_narrow (" << - "CORBA::Object_ptr obj, CORBA::Environment &env);" << nl; - *ch << "static " << local_name () << "_ptr " << "_nil (" << - "void);" << nl; + *ch << "static " << this->local_name () << "_ptr " << "_duplicate (" + << this->local_name () << "_ptr obj);" << nl; + *ch << "static " << this->local_name () << "_ptr " << "_narrow (" + << "CORBA::Object_ptr obj, CORBA::Environment &env);" << nl; + *ch << "static " << this->local_name () << "_ptr " + << "_nil (void);" << nl; // generate a TAO-specific _bind method similar to what Orbix and VisiBroker // have *ch << "static " << this->local_name () << "_ptr _bind (const char *host, " - << "CORBA::UShort port, const char *key, CORBA::Environment &env);\n\n"; + << "CORBA::UShort port, const char *key, CORBA::Environment &env);\n\n"; + + // the _is_a method + ch->indent (); + *ch << "virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, " + << "CORBA::Environment &env);\n" << be_nl + << "// = user methods\n"; // generate code for the interface definition by traversing thru the // elements of its scope. We depend on the front-end to have made sure // that only legal syntactic elements appear in our scope. - if (be_scope::gen_client_header () == -1) - { - ACE_ERROR ((LM_ERROR, "be_interface::gen_client_header\n")); - ACE_ERROR ((LM_ERROR, "Scope code generation failure\n")); - return -1; - } - - // the _is_a method - ch->indent (); - *ch << "virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, " << - "CORBA::Environment &env);\n"; + if (this->be_scope::gen_client_header () == -1) + { + ACE_ERROR ((LM_ERROR, "be_interface::gen_client_header\n")); + ACE_ERROR ((LM_ERROR, "Scope code generation failure\n")); + return -1; + } // generate the "protected" constructor so that users cannot instantiate // us - ch->decr_indent (); - *ch << "protected:\n"; - ch->incr_indent (); - *ch << local_name () << " (void); // default constructor" << nl; - *ch << local_name () << " (STUB_Object *objref);" << nl; - *ch << "virtual ~" << local_name () << " (void);\n"; + *ch << be_uidt_nl + << "protected:" << be_idt_nl + << this->local_name () << " (" << be_idt << be_idt_nl + << "STUB_Object *objref = 0," << be_nl + << "TAO_ServantBase *servant = 0," << be_nl + << "CORBA::Boolean collocated = CORBA::B_FALSE" << be_uidt_nl + << ");\n" << be_uidt; ch->decr_indent (); + // dtor is public... + *ch << "public:" << be_idt_nl + << "virtual ~" << this->local_name () << " (void);" << be_uidt_nl; + // private copy constructor and assignment operator. These are not // allowed, hence they are private. *ch << "private:\n"; ch->incr_indent (); - *ch << local_name () << " (const " << local_name () << "&);" << nl; - *ch << "void operator= (const " << local_name () << "&);\n"; + *ch << this->local_name () << " (const " << this->local_name () << "&);" << nl; + *ch << "void operator= (const " << this->local_name () << "&);\n"; ch->decr_indent (); *ch << "};\n\n"; ch->gen_endif (); @@ -281,19 +402,19 @@ int be_interface::gen_client_header (void) // generate the typecode decl. If we are in the outermost scope, our typecode // decl is extern if (this->is_nested ()) - { - // we have a scoped name - ch->indent (); - *ch << "static CORBA::TypeCode_ptr " << this->tc_name - ()->last_component () << ";\n\n"; - } + { + // we have a scoped name + ch->indent (); + *ch << "static CORBA::TypeCode_ptr " << this->tc_name + ()->last_component () << ";\n\n"; + } else - { - // we are in the ROOT scope - ch->indent (); - *ch << "extern CORBA::TypeCode_ptr " << this->tc_name - ()->last_component () << ";\n\n"; - } + { + // we are in the ROOT scope + ch->indent (); + *ch << "extern CORBA::TypeCode_ptr " << this->tc_name + ()->last_component () << ";\n\n"; + } cg->pop (); this->cli_hdr_gen_ = I_TRUE; @@ -301,28 +422,89 @@ int be_interface::gen_client_header (void) return 0; } -int be_interface::gen_client_stubs (void) +// Generates the client-side inline functions +int +be_interface::gen_client_inline (void) { - TAO_OutStream *cs; // output stream - long i; // loop index TAO_NL nl; // end line - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (i); + // retrieve a singleton instance of the code generator + TAO_CodeGen *cg = TAO_CODEGEN::instance (); + + TAO_OutStream *ci = cg->client_inline (); + ci->indent (); // start from the current indentation level + + *ci << "ACE_INLINE" << nl; + *ci << this->name () << "::" + << this->local_name () << "(" << be_idt << be_idt_nl + << "STUB_Object *objref," << be_nl + << "TAO_ServantBase *servant," << be_nl + << "CORBA::Boolean collocated" << be_uidt_nl + << ")" << be_uidt_nl + << " : ACE_CORBA_1 (Object) (objref, servant, collocated)" << be_nl + << "{}" << be_nl << be_nl; + + *ci << "ACE_INLINE" << nl; + *ci << this->name () << "::~" << this->local_name () << + " (void) // destructor" << nl; + *ci << "{}\n\n"; + + // _nil method + *ci << "ACE_INLINE " << this->name () << "_ptr" << be_nl + << this->name () << "::_nil (void)" << be_nl + << "{" << be_idt_nl + << "return (" << this->name () << "_ptr)0;" << be_uidt_nl + << "}\n" << be_nl; + + // generate the ifdefined macro for the _var type + ci->gen_ifdef_macro (this->flatname (), "_var"); + + if (this->gen_var_impl () == -1) + { + ACE_ERROR ((LM_ERROR, "be_interface: _var impl code gen failed\n")); + return -1; + } + ci->gen_endif (); + + // generate the ifdefined macro for the _out type + ci->gen_ifdef_macro (this->flatname (), "_out"); + + if (this->gen_out_impl () == -1) + { + ACE_ERROR ((LM_ERROR, "be_interface: _out impl code gen failed\n")); + return -1; + } + ci->gen_endif (); + + if (this->be_scope::gen_client_inline () == -1) + { + ACE_ERROR ((LM_ERROR, "be_interface: code gen failed for scope\n")); + return -1; + } + + return 0; +} + + +// Generate the client-side stubs +int +be_interface::gen_client_stubs (void) +{ + TAO_NL nl; // end line // retrieve a singleton instance of the code generator TAO_CodeGen *cg = TAO_CODEGEN::instance (); cg->push (TAO_CodeGen::TAO_INTERFACE_CS); // set the current code generation // state - cs = cg->client_stubs (); + TAO_OutStream *cs = cg->client_stubs (); cs->indent (); // start with whatever indentation level we are at // first generate the code for the static methods // The _duplicate method - *cs << name () << "_ptr " << name () << "::_duplicate (" << - name () << "_ptr obj)" << nl; + *cs << this->name () << "_ptr " << this->name () << "::_duplicate (" + << this->name () << "_ptr obj)" << nl; *cs << "{\n"; cs->incr_indent (); *cs << "if (!CORBA::is_nil (obj))\n"; @@ -335,17 +517,22 @@ int be_interface::gen_client_stubs (void) *cs << "} // end of _duplicate" << nl << nl; // The _narrow method - *cs << name () << "_ptr " << name () << - "::_narrow (CORBA::Object_ptr obj, CORBA::Environment &env)" << nl; - *cs << "{\n"; - cs->incr_indent (); - *cs << "if (CORBA::is_nil (obj)) return " << this->name () << "::_nil ();" << - nl; - *cs << "if (obj->_is_a (\"" << this->repoID () << "\", env))" << nl; - *cs << "{\n"; - cs->incr_indent (); + *cs << this->name () << "_ptr " << this->name () + << "::_narrow (" << be_idt << be_idt_nl + << "CORBA::Object_ptr obj," << be_nl + << "CORBA::Environment &env" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "if (CORBA::is_nil (obj))" << be_idt_nl + << "return " << this->name () << "::_nil ();" << be_uidt_nl + << "if (!obj->_is_a (\"" << this->repoID () << "\", env))" + << be_idt_nl + << "return " << this->name () << "::_nil ();" << be_uidt_nl; + + *cs << "if (!obj->_is_collocated () || !obj->_servant())" << be_nl + << "{" << be_idt_nl; *cs << "STUB_Object *istub;" << nl; - *cs << name () << "_ptr new_obj; // to be returned " << nl; + *cs << this->name () << "_ptr new_obj; // to be returned " << nl; #if 0 // XXXASG - I was told that emitting this line of code is the root cause // of all evil *cs << "obj->Release ();" << @@ -361,23 +548,24 @@ int be_interface::gen_client_stubs (void) *cs << "obj->Release (); " << "// need this since QueryIntf bumped our refcount" << nl; #endif - *cs << "new_obj = new " << name () << " (istub); " << - "// construct obj ref using the stub object" << nl; + *cs << "new_obj = new " << this->name () << " (istub); " + << "// construct obj ref using the stub object" << nl; *cs << "return new_obj;\n"; cs->decr_indent (); - *cs << "} // end of if" << nl; - *cs << "return " << this->name () << "::_nil (); // _narrow failed\n"; - cs->decr_indent (); - *cs << "} // end of _narrow" << nl << nl; - - // _nil method - *cs << this->name () << "_ptr " << this->name () << "::_nil (void)" << - nl; - *cs << "{\n"; - cs->incr_indent (); - *cs << "return (" << name () << "_ptr)NULL;\n"; - cs->decr_indent (); - *cs << "} // end of _nil" << nl << nl; + *cs << "} // end of if\n" << nl; + + *cs << "STUB_Object *stub = obj->_servant ()->_create_stub (env);" << be_nl + << "if (env.exception () != 0)" << be_idt_nl + << "return " << this->name () << "::_nil ();" << be_uidt_nl + << "void* servant = obj->_servant ()->_downcast (\"" + << this->repoID () << "\");" << be_nl + << "return new " + << this->full_coll_name () << "(" << be_idt << be_idt_nl + << "ACE_reinterpret_cast(" << this->full_skel_name () + << "_ptr, servant)," << be_nl + << "stub" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl + << "}" << be_nl << be_nl; // the _bind method *cs << this->name () << "_ptr " << this->name () << "::_bind (" << @@ -406,7 +594,7 @@ int be_interface::gen_client_stubs (void) *cs << "}\n\n"; // generate code for the elements of the interface - if (be_scope::gen_client_stubs () == -1) + if (this->be_scope::gen_client_stubs () == -1) { ACE_ERROR ((LM_ERROR, "be_interface::gen_client_stubs\n")); ACE_ERROR ((LM_ERROR, "Scope code generation failure\n")); @@ -416,7 +604,7 @@ int be_interface::gen_client_stubs (void) // generate the is_a method cs->indent (); *cs << "CORBA::Boolean " << this->name () << "::_is_a (" << - "const CORBA::Char *value, CORBA::Environment &env)" << nl; + "const CORBA::Char *value, CORBA::Environment &_tao_environment)" << nl; *cs << "{\n"; cs->incr_indent (); *cs << "if (\n"; @@ -428,11 +616,11 @@ int be_interface::gen_client_stubs (void) "inheritance graph failed\n"), -1); } cs->indent (); - *cs << "(!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (env))))\n"; + *cs << "(!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment))))\n"; *cs << "\treturn 1; // success using local knowledge\n"; cs->decr_indent (); *cs << "else" << nl; - *cs << "\treturn this->CORBA_Object::_is_a (value, env); // remote call\n"; + *cs << "\treturn this->CORBA_Object::_is_a (value, _tao_environment); // remote call\n"; cs->decr_indent (); *cs << "}\n\n"; @@ -503,30 +691,48 @@ int be_interface::gen_server_header (void) << "_ptr;" << nl; // now generate the class definition - *sh << "class " << namebuf << " : public virtual " << this->name (); + *sh << "class " << namebuf << " : "; if (n_inherits () > 0) // this interface inherits from other interfaces { be_interface *intf; - for (i = 0; i < n_inherits (); i++) + *sh << "public virtual "; + intf = be_interface::narrow_from_decl (inherits ()[0]); + *sh << intf->relative_skel_name (this->full_skel_name ()); + for (i = 1; i < n_inherits (); i++) { *sh << ", public virtual "; intf = be_interface::narrow_from_decl (inherits ()[i]); - *sh << intf->relative_skel_name (this->full_skel_name ()); // dump - // the - // scoped - // name + *sh << intf->relative_skel_name (this->full_skel_name ()); } // end of for loop } + else + { + // We don't inherit from another user defined object, hence our + // base class is the ServantBase class. + *sh << " public virtual PortableServer::ServantBase"; + } *sh << nl; *sh << "{" << nl; *sh << "protected:\n"; sh->incr_indent (); - *sh << namebuf << " (const char *obj_name = 0);" << nl; - *sh << "virtual ~" << namebuf << " (void);\n"; + *sh << namebuf << " (void);" << nl; sh->decr_indent (); *sh << "public:\n"; - sh->incr_indent (0); + sh->incr_indent (); + *sh << "virtual ~" << namebuf << " (void);\n"; + + sh->indent (); + *sh << "virtual CORBA::Boolean _is_a (" << be_idt << be_idt_nl + << "const char* logical_type_id," << be_nl + << "CORBA::Environment &_tao_environment" << be_uidt + << ");\n" << be_uidt; + + sh->indent (); + *sh << "virtual void* _downcast (" << be_idt << be_idt_nl + << "const char* logical_type_id" << be_uidt_nl + << ");\n" << be_uidt; + // generate code for elements in the scope (e.g., operations) if (be_scope::gen_server_header () == -1) { @@ -538,7 +744,7 @@ int be_interface::gen_server_header (void) // add our _is_a method sh->indent (); *sh << "static void _is_a_skel (CORBA::ServerRequest &req, " << - "void *obj, void *context, CORBA::Environment &env);\n\n"; + "void *obj, void *context, CORBA::Environment &_tao_enviroment);\n\n"; // generate skeletons for operations of our base classes. These skeletons // just cast the pointer to the appropriate type before invoking the call @@ -551,11 +757,25 @@ int be_interface::gen_server_header (void) // add the dispatch method sh->indent (); - *sh << "virtual void dispatch (CORBA::ServerRequest &req, " << - "void *context, CORBA::Environment &env);" << nl; + *sh << "virtual void _dispatch (CORBA::ServerRequest &req, " << + "void *context, CORBA::Environment &env);\n\n"; + + // Print out the _this() method. + sh->indent (); + *sh << this->name () << " *_this (CORBA::Environment &_tao_environment);\n"; + + sh->indent (); + *sh << "virtual const char* _interface_repository_id" + << " (void) const;\n"; + sh->decr_indent (); + *sh << "};\n\n"; + be_visitor_collocated_sh visitor; + this->accept (&visitor); + *sh << "\n"; + cg->pop (); return 0; } @@ -593,39 +813,19 @@ int be_interface::gen_server_skeletons (void) { // we are outermost. So the POA_ prefix is prepended to our name *ss << this->full_skel_name () << "::POA_" << this->local_name () << - " (const char *obj_name)" << nl; + " (void)" << nl; } else { // the POA_ prefix is prepended to our outermost module name *ss << this->full_skel_name () << "::" << this->local_name () << - " (const char *obj_name)" << nl; + " (void)" << nl; } - *ss << "{\n"; - ss->incr_indent (); - // code for the skeleton constructor - *ss << "const CORBA::String repoID = \"" << this->repoID () << "\"; // repository ID" << nl; - *ss << "IIOP_Object *data; // Actual object reference" << nl; - *ss << "TAO_ORB_Core *ocp = TAO_ORB_Core_instance (); " << - "// underlying ORB core instance" << nl; - *ss << "CORBA::POA_ptr oa = TAO_ORB_Core_instance ()->root_poa (); " << - "// underlying OA" << nl; - *ss << "const ACE_INET_Addr &addr = ocp->orb_params ()->addr ();" << nl; - *ss << "this->optable_ = &tao_" << this->flatname () << "_optable;" << nl << - nl; - *ss << "// set up an IIOP object" << nl; - *ss << "data = new IIOP_Object (CORBA::string_dup (repoID), addr, obj_name);" - << nl; - *ss << "this->set_parent (data); // store the IIOP obj ref with us" << - nl; - // *ss << "this->sub_ = this; // set the most derived type to be us" << nl; - *ss << "// @@ TODO this cast is while we still have sequences " << nl - << "// implemented using the old CORBA_SEQUENCE template " << nl; - *ss << "if (oa) oa->bind (data->profile.object_key, this); " << - "// register ourselves\n"; - ss->decr_indent (); - *ss << "}\n\n"; + *ss << "{" << be_idt_nl + << "this->optable_ = &tao_" << this->flatname () + << "_optable;" << be_uidt_nl + << "}\n\n"; // generate code for elements in the scope (e.g., operations) if (be_scope::gen_server_skeletons () == -1) @@ -637,44 +837,88 @@ int be_interface::gen_server_skeletons (void) // generate code for the _is_a skeleton ss->indent (); - *ss << "void " << this->full_skel_name () << - "::_is_a_skel (CORBA::ServerRequest &req, " << - "void * /* obj */, void * /*context*/, CORBA::Environment &env)" << nl; + *ss << "void " << this->full_skel_name () + << "::_is_a_skel (" << be_idt << be_idt_nl + << "CORBA::ServerRequest &req, " << be_nl + << "void * _tao_object_reference," << be_nl + << "void * /*context*/," << be_nl + << "CORBA::Environment &_tao_environment" << be_uidt_nl + << ")" << be_uidt_nl; + *ss << "{\n"; ss->incr_indent (); *ss << "CORBA::NVList_ptr nvlist;" << nl; *ss << "CORBA::NamedValue_ptr nv;" << nl; *ss << "CORBA::Any temp_value (CORBA::_tc_string);" << nl; *ss << "CORBA::Any *any;" << nl; - *ss << "CORBA::Boolean *retval;" << nl; + *ss << "CORBA::Boolean *retval = new CORBA::Boolean;" << nl; *ss << "CORBA::String value;" << nl; *ss << nl; *ss << "req.orb()->create_list (0, nvlist);" << nl; - *ss << "nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, env);" << nl; - *ss << "req.params (nvlist, env); // parse the args" << nl; - *ss << "if (env.exception () != 0) return;" << nl; + *ss << "nv = nvlist->add_value (0, temp_value, " + << "CORBA::ARG_IN, _tao_environment);" << nl; + *ss << "req.params (nvlist, _tao_environment); // parse the args" << nl; + *ss << "if (_tao_environment.exception () != 0) return;" << nl; *ss << "value = *(CORBA::String *)nv->value ()->value ();" << nl; - *ss << "if (\n"; - ss->incr_indent (0); + + *ss << this->full_skel_name () << "_ptr \t impl = (" + << this->full_skel_name () << "_ptr) _tao_object_reference;" + << nl; + + *ss << "*retval = impl->_is_a (value, _tao_environment);" << be_nl + << "if (_tao_environment.exception () != 0) return;" << be_nl; + *ss << "any = new CORBA::Any (CORBA::_tc_boolean, " + << "retval, CORBA::B_TRUE);" << nl; + *ss << "req.result (any, _tao_environment);\n"; + ss->decr_indent (); + *ss << "}\n\n"; + + ss->indent (); + *ss << "CORBA::Boolean " << this->full_skel_name () + << "::_is_a (" << be_idt << be_idt_nl + << "const char* value," << be_nl + << "CORBA::Environment &_tao_environment" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "if (\n" << be_idt; if (this->traverse_inheritance_graph (be_interface::is_a_helper, ss) == -1) { + return -1; } + ss->indent (); - *ss << "(!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (env))))\n"; - *ss << "\tretval = new CORBA::Boolean (CORBA::B_TRUE);\n"; - ss->decr_indent (); - *ss << "else" << nl; - *ss << "\tretval = new CORBA::Boolean (CORBA::B_FALSE);" << nl; - *ss << "any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE);" << - nl; - *ss << "req.result (any, env);\n"; - ss->decr_indent (); - *ss << "}\n\n"; + *ss << "(!ACE_OS::strcmp ((char *)value, " + << "CORBA::_tc_Object->id (_tao_environment))))" + << be_idt_nl << "return CORBA::B_TRUE;" << be_uidt_nl + << "else" << be_idt_nl + << "return CORBA::B_FALSE;" << be_uidt << be_uidt << be_uidt_nl + << "}\n\n"; + + ss->indent (); + *ss << "void* " << this->full_skel_name () + << "::_downcast (" << be_idt << be_idt_nl + << "const char* logical_type_id" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl; + + if (this->traverse_inheritance_graph (be_interface::downcast_helper, ss) == -1) + { + return -1; + } + + *ss << "if (ACE_OS::strcmp (logical_type_id, " + << "\"IDL:omg.org/CORBA/Object:1.0\") == 0)" << be_idt_nl + << "return ACE_static_cast(PortableServer::Servant, this);" + << be_uidt_nl; + + *ss << "return 0;" << be_uidt_nl + << "}\n\n"; + // now the dispatch method ss->indent (); *ss << "void " << this->full_skel_name () << - "::dispatch (CORBA::ServerRequest &req, " << + "::_dispatch (CORBA::ServerRequest &req, " << "void *context, CORBA::Environment &env)" << nl; *ss << "{\n"; ss->incr_indent (); @@ -682,7 +926,7 @@ int be_interface::gen_server_skeletons (void) *ss << "CORBA::String opname = req.op_name (); // retrieve operation name" << nl; *ss << "// find the skeleton corresponding to this opname" << nl; - *ss << "if (this->find (opname, skel) == -1)" << nl; + *ss << "if (this->_find (opname, skel) == -1)" << nl; *ss << "{\n"; ss->incr_indent (); *ss << "env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO));" << @@ -693,67 +937,69 @@ int be_interface::gen_server_skeletons (void) *ss << "else" << nl; *ss << "\tskel (req, this, context, env);\n"; ss->decr_indent (); - *ss << "}\n"; - cg->pop (); - return 0; -} - -// Generates the client-side inline information -int -be_interface::gen_client_inline (void) -{ - TAO_OutStream *ci; // output stream - TAO_NL nl; // end line - - // retrieve a singleton instance of the code generator - TAO_CodeGen *cg = TAO_CODEGEN::instance (); - - ci = cg->client_inline (); - ci->indent (); // start from the current indentation level - - // generate the constructors and destructor - *ci << "ACE_INLINE" << nl; - *ci << this->name () << "::" << this->local_name () << - " (void) // default constructor" << nl; - *ci << "{}" << nl << nl; - - *ci << "ACE_INLINE" << nl; - *ci << this->name () << "::" << this->local_name () << - " (STUB_Object *objref) // constructor" << nl; - *ci << "\t: CORBA_Object (objref)" << nl; - *ci << "{}" << nl << nl; - - *ci << "ACE_INLINE" << nl; - *ci << this->name () << "::~" << this->local_name () << - " (void) // destructor" << nl; - *ci << "{}\n\n"; + *ss << "}\n\n"; - // generate the ifdefined macro for the _var type - ci->gen_ifdef_macro (this->flatname (), "_var"); + ss->indent (); + *ss << "const char* " << this->full_skel_name () + << "::_interface_repository_id (void) const" + << nl; + *ss << "{\n"; + ss->incr_indent (); + *ss << "return \"" << this->repoID () << "\";\n"; + ss->decr_indent (); + *ss << "}\n\n"; - if (this->gen_var_impl () == -1) - { - ACE_ERROR ((LM_ERROR, "be_interface: _var impl code gen failed\n")); - return -1; - } - ci->gen_endif (); + cg->pop (); - // generate the ifdefined macro for the _out type - ci->gen_ifdef_macro (this->flatname (), "_out"); + be_visitor_collocated_ss visitor; + this->accept (&visitor); + *ss << "\n"; + + *ss << this->name () << "*" << be_nl + << this->full_skel_name () + << "::_this (CORBA_Environment &_env)" << be_nl + << "{" << be_idt_nl + << "STUB_Object *stub = this->_create_stub (_env);" << be_nl + << "if (_env.exception () != 0)" << be_idt_nl + << "return 0;" << be_uidt_nl + +#if 0 + << "TAO_ORB_Core *orb_core = TAO_ORB_Core_instance ();" << be_nl + << "if (orb_core->get_current ()->in_servant_upcall ())" << be_nl + << "{" << be_idt << be_nl + << "stub = new IIOP_Object (" << be_idt << be_idt << be_nl + << "CORBA::string_copy (this->_interface_repository_id ())," << be_nl + << "IIOP::Profile (" << be_idt << be_idt << be_nl + << "TAO_ORB_Core_instance ()->orb_params ()->addr ()," << be_nl + << "orb_core->get_current ()->object_key ()" << be_uidt << be_nl + << ")" << be_uidt << be_uidt << be_nl + << ");" << be_uidt << be_uidt << be_nl + << "}" << be_nl + << "else" << be_nl + << "{" << be_idt_nl + << "POA* poa = this->default_poa (_env);" << be_nl + << "if (_env.exception () != 0)" << be_idt << be_nl + << "return 0;" << be_uidt << be_nl + << "const TAO::ObjectKey& object_key = " << be_idt << be_nl + << "poa->servant_to_id (this, _env);" << be_uidt << be_nl + << "if (_env.exception () != 0)" << be_idt << be_nl + << "return 0;" << be_uidt << be_nl + << "stub = new IIOP_Object (" << be_idt << be_idt << be_nl + << "CORBA::string_copy (this->_interface_repository_id ())," << be_nl + << "IIOP::Profile (" << be_idt << be_idt << be_nl + << "TAO_ORB_Core_instance ()->orb_params ()->addr ()," << be_nl + << "object_key" << be_uidt << be_nl + << ")" << be_uidt << be_uidt << be_nl + << ");" << be_uidt << be_uidt << be_nl + << "}\n" << be_nl +#endif /* 0 */ + + << "return new " << this->full_coll_name () + << " (this, stub);" << be_uidt << be_nl; - if (this->gen_out_impl () == -1) - { - ACE_ERROR ((LM_ERROR, "be_interface: _out impl code gen failed\n")); - return -1; - } - ci->gen_endif (); + *ss << "}\n\n"; - if (be_scope::gen_client_inline () == -1) - { - ACE_ERROR ((LM_ERROR, "be_interface: code gen failed for scope\n")); - return -1; - } - return 0; + return 0; } // Generates the server-side inline @@ -793,9 +1039,10 @@ be_interface::gen_server_inline (void) " (void)" << nl; } - *si << "{" << nl; + *si << "{\n"; *si << "}\n"; + // generate skeletons for operations of our base classes. These skeletons // just cast the pointer to the appropriate type before invoking the call if (this->traverse_inheritance_graph (be_interface::gen_skel_helper, si) == -1) @@ -1612,7 +1859,9 @@ be_interface::gen_optable_helper (be_interface *derived, } int -be_interface::is_a_helper (be_interface * /*derived*/, be_interface *bi, TAO_OutStream *os) +be_interface::is_a_helper (be_interface * /*derived*/, + be_interface *bi, + TAO_OutStream *os) { // emit the comparison code os->indent (); @@ -1623,6 +1872,18 @@ be_interface::is_a_helper (be_interface * /*derived*/, be_interface *bi, TAO_Out } int +be_interface::downcast_helper (be_interface * /* derived */, + be_interface *base, + TAO_OutStream *os) +{ + *os << "if (ACE_OS::strcmp (logical_type_id, \"" + << base->repoID () << "\") == 0)" << be_idt_nl + << "return ACE_static_cast (" + << base->full_skel_name () << "_ptr, this);" << be_uidt_nl; + return 0; +} + +int be_interface::gen_skel_helper (be_interface *derived, be_interface *ancestor, TAO_OutStream *os) @@ -1753,14 +2014,29 @@ be_interface::gen_skel_helper (be_interface *derived, return 0; } +const char* +be_interface::relative_coll_name (const char *collname) +{ + return be_interface::relative_name (this->full_coll_name (), + collname); +} + // return the relative skeleton name (needed due to NT compiler insanity) -char * +const char * be_interface::relative_skel_name (const char *skelname) { - // some compilers do not like generating a fully scoped name for a type that - // was defined in the same enclosing scope in which it was defined. For such, - // we emit a macro defined in the ACE library. - // + return be_interface::relative_name (this->full_skel_name (), + skelname); +} + +const char* +be_interface::relative_name (const char *localname, + const char *othername) +{ + // some compilers do not like generating a fully scoped name for a + // type that was defined in the same enclosing scope in which it was + // defined. We have to emit just the partial name, relative to our + // "localname" // The tricky part here is that it is not enough to check if the // typename we are using was defined in the current scope. But we @@ -1792,8 +2068,8 @@ be_interface::relative_skel_name (const char *skelname) // macro. Whenever there is no match, the remaining components of the // def_scope form the second argument - ACE_OS::strcpy (def_name, this->full_skel_name ()); - ACE_OS::strcpy (use_name, skelname); + ACE_OS::strcpy (def_name, localname); + ACE_OS::strcpy (use_name, othername); while (def_curr && use_curr) { @@ -1845,6 +2121,13 @@ be_interface::accept (be_visitor *visitor) return visitor->visit_interface (this); } +int be_interface::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + *stream << type->name () << "_ptr"; + return 0; +} + // Narrowing IMPL_NARROW_METHODS3 (be_interface, AST_Interface, be_scope, be_type) IMPL_NARROW_FROM_DECL (be_interface) diff --git a/TAO/TAO_IDL/be/be_interface_fwd.cpp b/TAO/TAO_IDL/be/be_interface_fwd.cpp index d9a352eaef6..cf1b0345ce3 100644 --- a/TAO/TAO_IDL/be/be_interface_fwd.cpp +++ b/TAO/TAO_IDL/be/be_interface_fwd.cpp @@ -623,6 +623,13 @@ be_interface_fwd::tc_size (void) return 0; } +int be_interface_fwd::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + *stream << type->name () << "_ptr"; + return 0; +} + int be_interface_fwd::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_native.cpp b/TAO/TAO_IDL/be/be_native.cpp index ece9f06bd51..eaaf1f9d325 100644 --- a/TAO/TAO_IDL/be/be_native.cpp +++ b/TAO/TAO_IDL/be/be_native.cpp @@ -84,6 +84,14 @@ be_native::tc_size (void) } int +be_native::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + *stream << type->name (); + return 0; +} + +int be_native::accept (be_visitor *visitor) { return visitor->visit_native (this); diff --git a/TAO/TAO_IDL/be/be_operation.cpp b/TAO/TAO_IDL/be/be_operation.cpp index 7e3ae3864ed..09b84b5612f 100644 --- a/TAO/TAO_IDL/be/be_operation.cpp +++ b/TAO/TAO_IDL/be/be_operation.cpp @@ -25,7 +25,8 @@ * BE_Operation */ be_operation::be_operation (void) - : argument_count_ (-1) + : argument_count_ (-1), + has_native_ (0) { } @@ -34,16 +35,17 @@ be_operation::be_operation (AST_Type *rt, AST_Operation::Flags fl, : AST_Operation (rt, fl, n, p), AST_Decl (AST_Decl::NT_op, n, p), UTL_Scope (AST_Decl::NT_op), - argument_count_ (-1) + argument_count_ (-1), + has_native_ (0) { } // compute total number of members int -be_operation::compute_argument_count (void) +be_operation::compute_argument_attr (void) { - UTL_ScopeActiveIterator *si; // iterator - AST_Decl *d; // temp node + if (this->argument_count_ != -1) + return 0; this->argument_count_ = 0; @@ -51,18 +53,34 @@ be_operation::compute_argument_count (void) if (this->nmembers () > 0) { // instantiate a scope iterator. - si = new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls); + UTL_ScopeActiveIterator *si = + new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls); while (!(si->is_done ())) { // get the next AST decl node - d = si->item (); - if (!d->imported () && d->node_type () == AST_Decl::NT_argument) - this->argument_count_++; + AST_Decl *d = si->item (); + + if (!d->imported () + && d->node_type () == AST_Decl::NT_argument) + { + this->argument_count_++; + be_argument *arg = be_argument::narrow_from_decl (d); + be_type* type = + be_type::narrow_from_decl (arg->field_type ()); + + if (type->base_node_type () == AST_Decl::NT_native) + this->has_native_ = 1; + } si->next (); } // end of while delete si; // free the iterator object } + + be_type* type = be_type::narrow_from_decl (this->return_type ()); + if (type->base_node_type () == AST_Decl::NT_native) + this->has_native_ = 1; + return 0; } @@ -70,12 +88,20 @@ be_operation::compute_argument_count (void) int be_operation::argument_count (void) { - if (this->argument_count_ == -1) - this->compute_argument_count (); + this->compute_argument_attr (); return this->argument_count_; } +// return if any argument or the return type is a <native> type. +int +be_operation::has_native (void) +{ + this->compute_argument_attr (); + + return this->has_native_; +} + // ---------------------------------------- // CODE GENERATION METHODS // ---------------------------------------- @@ -172,155 +198,160 @@ be_operation::gen_client_stubs (void) bpd = be_predefined_type::narrow_from_decl (bt); } - // generate the TAO_Param_Data table - *cs << "static const TAO_Param_Data " << this->flatname () << - "_paramdata [] = " << nl; - *cs << "{\n"; - cs->incr_indent (); - - // entry for the return type - *cs << "{" << bt->tc_name () << ", PARAM_RETURN, "; - // Are we returning a pointer to value? i.e., is the type variable? If it is, - // we must tell the stub what is the size of the top level structure - be_type *prim; - if (bt->node_type () == AST_Decl::NT_typedef) + if (!this->has_native ()) { - be_typedef *tdef = be_typedef::narrow_from_decl (bt); - prim = tdef->primitive_base_type (); - } - else - prim = bt; - if (prim->size_type () == be_decl::VARIABLE) - { - switch (prim->node_type ()) - { - case AST_Decl::NT_interface: - case AST_Decl::NT_interface_fwd: - case AST_Decl::NT_string: - case AST_Decl::NT_sequence: - case AST_Decl::NT_struct: - case AST_Decl::NT_union: - // no need of size here - *cs << "0}"; - break; - case AST_Decl::NT_pre_defined: - { - be_predefined_type *bpd = be_predefined_type::narrow_from_decl - (bt); - if (bpd->pt () == AST_PredefinedType::PT_pseudo) - // no need of size here - *cs << "0}"; - else - *cs << "sizeof (" << bt->name () << ")}"; - } - break; - default: - *cs << "sizeof (" << bt->name () << ")}"; - } - } - else - *cs << "0}"; - paramtblsize++; - // if we have any arguments, get each one of them - if (this->nmembers () > 0) - { - // if there are elements in this scope + // generate the TAO_Param_Data table + *cs << "static const TAO_Param_Data " << this->flatname () << + "_paramdata [] = " << nl; + *cs << "{\n"; + cs->incr_indent (); - si = new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls); - // instantiate a scope iterator. + // entry for the return type + *cs << "{" << bt->tc_name () << ", PARAM_RETURN, "; - while (!(si->is_done ())) - { - // get the next AST decl node - d = si->item (); - // only if this is an argument node - if (d->node_type () == AST_Decl::NT_argument) - { - bd = be_argument::narrow_from_decl (d); - bt = be_type::narrow_from_decl (bd->field_type ()); - *cs << "," << nl; // put a comma and newline before the - // previous entry - *cs << "{" << bt->tc_name (); - // based on the direction, output the appropriate constant. - switch (bd->direction ()) - { - case AST_Argument::dir_IN: - *cs << ", PARAM_IN, 0}"; - break; - case AST_Argument::dir_INOUT: - *cs << ", PARAM_INOUT, 0}"; - break; - case AST_Argument::dir_OUT: - { - *cs << ", PARAM_OUT, 0}"; + // Are we returning a pointer to value? i.e., is the type + // variable? If it is, we must tell the stub what is the size of + // the top level structure + be_type *prim; + if (bt->node_type () == AST_Decl::NT_typedef) + { + be_typedef *tdef = be_typedef::narrow_from_decl (bt); + prim = tdef->primitive_base_type (); + } + else + prim = bt; + if (prim->size_type () == be_decl::VARIABLE) + { + switch (bt->node_type ()) + { + case AST_Decl::NT_interface: + case AST_Decl::NT_interface_fwd: + case AST_Decl::NT_string: + // no need of size here + *cs << "0}"; + break; + case AST_Decl::NT_pre_defined: + { + be_predefined_type *bpd = be_predefined_type::narrow_from_decl + (bt); + if (bpd->pt () == AST_PredefinedType::PT_pseudo) + // no need of size here + *cs << "0}"; + else + *cs << "sizeof (" << bt->name () << ")}"; + } + break; + default: + *cs << "sizeof (" << bt->name () << ")}"; + } + } + else + *cs << "0}"; + paramtblsize++; + + // if we have any arguments, get each one of them + if (this->nmembers () > 0) + { + // if there are elements in this scope + + si = new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls); + // instantiate a scope iterator. + + while (!(si->is_done ())) + { + // get the next AST decl node + d = si->item (); + // only if this is an argument node + if (d->node_type () == AST_Decl::NT_argument) + { + bd = be_argument::narrow_from_decl (d); + bt = be_type::narrow_from_decl (bd->field_type ()); + *cs << "," << nl; // put a comma and newline before the + // previous entry + *cs << "{" << bt->tc_name (); + // based on the direction, output the appropriate constant. + switch (bd->direction ()) + { + case AST_Argument::dir_IN: + *cs << ", PARAM_IN, 0}"; + break; + case AST_Argument::dir_INOUT: + *cs << ", PARAM_INOUT, 0}"; + break; + case AST_Argument::dir_OUT: + { + *cs << ", PARAM_OUT, 0}"; #if 0 - // Are we returning a pointer to value? i.e., is the type variable? If it is, - // we must tell the stub what is the size of the top level structure - if (bt->size_type () == be_decl::VARIABLE) - { - switch (bt->node_type ()) - { - case AST_Decl::NT_interface: - case AST_Decl::NT_interface_fwd: - // no need of size here - *cs << "0}"; - break; - case AST_Decl::NT_pre_defined: - { - be_predefined_type *bpd = - be_predefined_type::narrow_from_decl (bt); - if (bpd->pt () == AST_PredefinedType::PT_pseudo) + // Are we returning a pointer to value? i.e., + // is the type variable? If it is, we must + // tell the stub what is the size of the top + // level structure + if (bt->size_type () == be_decl::VARIABLE) + { + switch (bt->node_type ()) + { + case AST_Decl::NT_interface: + case AST_Decl::NT_interface_fwd: + // no need of size here + *cs << "0}"; + break; + case AST_Decl::NT_pre_defined: + { + be_predefined_type *bpd = + be_predefined_type::narrow_from_decl (bt); + if (bpd->pt () == AST_PredefinedType::PT_pseudo) // no need of size here - *cs << "0}"; - else - *cs << "sizeof (" << bt->name () << ")}"; - } - break; - default: - *cs << "sizeof (" << bt->name () << ")}"; - } - } - else - *cs << "0}"; + *cs << "0}"; + else + *cs << "sizeof (" << bt->name () << ")}"; + } + break; + default: + *cs << "sizeof (" << bt->name () << ")}"; + } + } + else + *cs << "0}"; #endif - } - break; - } // end switch - paramtblsize++; - } // end if argument node - si->next (); - } // end of while - delete si; // free the iterator object - } // end of arg list - *cs << "\n"; - cs->decr_indent (); - *cs << "};\n\n"; - - // now generate the calldata table - - cs->indent (); - *cs << "static const TAO_Call_Data " << this->flatname () << "_calldata = " - << nl; - *cs << "{"; - *cs << "\"" << this->local_name () << "\", "; + } + break; + } // end switch + paramtblsize++; + } // end if argument node + si->next (); + } // end of while + delete si; // free the iterator object + } // end of arg list + *cs << "\n"; + cs->decr_indent (); + *cs << "};\n\n"; + + // now generate the calldata table + + cs->indent (); + *cs << "static const TAO_Call_Data " << this->flatname () + << "_calldata = " << nl + << "{" + << "\"" << this->local_name () << "\", "; + + // are we oneway or two operation? + if (this->flags () == AST_Operation::OP_oneway) + { + *cs << "0, "; // for false + } + else + { + *cs << "1, "; // for true + } + // insert the size of the paramdata table + *cs << paramtblsize << ", "; + + // insert the address of the paramdata table + *cs << this->flatname () << "_paramdata, "; - // are we oneway or two operation? - if (this->flags () == AST_Operation::OP_oneway) - { - *cs << "0, "; // for false + // XXXASG - Exception list goes here (if it exists) - TODO + *cs << "0, 0};\n\n"; } - else - { - *cs << "1, "; // for true - } - // insert the size of the paramdata table - *cs << paramtblsize << ", "; - - // insert the address of the paramdata table - *cs << this->flatname () << "_paramdata, "; - - // XXXASG - Exception list goes here (if it exists) - TODO - *cs << "0, 0};\n\n"; // now generate the actual stub @@ -369,128 +400,123 @@ be_operation::gen_client_stubs (void) *cs << "{\n"; cs->incr_indent (); - // declare a return type - cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS); - s = cg->make_state (); - if (!s || !bt || (s->gen_code (bt, this) == -1)) + if (this->has_native ()) { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::gen_client_stubs - " - "retval declaration failure\n"), - -1); + *cs << "env.exception (new CORBA::MARSHAL " + << "(CORBA::COMPLETED_NO));" << nl; + // return the appropriate error value on exception + cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS); + s = cg->make_state (); + if (!s || !bt || (s->gen_code (bt, this) == -1)) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::gen_client_stubs - " + "failure returning from exception\n"), + -1); + } } - cg->pop (); - - // generate code that calls QueryInterface - *cs << "STUB_Object *istub;\n\n"; - cs->indent (); - *cs << "if (this->QueryInterface (IID_STUB_Object, " << - "(void **)&istub) != TAO_NOERROR)" << nl; - *cs << "{\n"; - cs->incr_indent (); - *cs << "env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));" << - nl; - - // return the appropriate error value on exception - cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS); - s = cg->make_state (); - if (!s || !bt || (s->gen_code (bt, this) == -1)) + else { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::gen_client_stubs - " - "failure returning from exception\n"), - -1); - } - cg->pop (); + // declare a return type + cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS); + s = cg->make_state (); + if (!s || !bt || (s->gen_code (bt, this) == -1)) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::gen_client_stubs - " + "retval declaration failure\n"), + -1); + } + cg->pop (); - cs->decr_indent (); - *cs << "}" << nl; - *cs << "this->Release (); // QueryInterface has bumped up our refcount" << nl; + // generate code that calls QueryInterface + *cs << "STUB_Object *istub;\n\n"; + cs->indent (); + *cs << "if (this->QueryInterface (IID_STUB_Object, " << + "(void **)&istub) != TAO_NOERROR)" << nl; + *cs << "{\n"; + cs->incr_indent (); + *cs << "env.exception (new CORBA::DATA_CONVERSION " + << "(CORBA::COMPLETED_NO));" << nl; + + // return the appropriate error value on exception + cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS); + s = cg->make_state (); + if (!s || !bt || (s->gen_code (bt, this) == -1)) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::gen_client_stubs - " + "failure returning from exception\n"), + -1); + } + cg->pop (); - // do any pre do_call stuff with arguments - cg->push (TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS); - if (be_scope::gen_client_stubs () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::gen_client_stubs - " - "failure generating pre docall stuff\n"), - -1); - } - cg->pop (); + cs->decr_indent (); + *cs << "}" << nl; + *cs << "this->Release (); " + << "// QueryInterface has bumped up our refcount" << nl; + + // do any pre do_call stuff with arguments + cg->push (TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS); + if (be_scope::gen_client_stubs () == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::gen_client_stubs - " + "failure generating pre docall stuff\n"), + -1); + } + cg->pop (); - // call do_call with appropriate number of arguments - *cs << "istub->do_call (env, &" << this->flatname () << "_calldata"; + // call do_call with appropriate number of arguments + *cs << "istub->do_call (env, &" << this->flatname () + << "_calldata"; - // if our return type is not void, then pass the address of retval - if (!bpd || (bpd->pt () != AST_PredefinedType::PT_void)) - { - if (bt->node_type () == AST_Decl::NT_typedef) - { - be_typedef *tdef = be_typedef::narrow_from_decl (bt); - prim = tdef->primitive_base_type (); - } + // if our return type is not void, then pass the address of retval + if (!bpd || (bpd->pt () != AST_PredefinedType::PT_void)) + { + *cs << ", &retval"; + } else - prim = bt; - if (prim->size_type () == be_decl::VARIABLE) - { - switch (prim->node_type ()) - { - case AST_Decl::NT_interface: - case AST_Decl::NT_interface_fwd: - case AST_Decl::NT_string: - *cs << ", &retval"; - break; - case AST_Decl::NT_sequence: - case AST_Decl::NT_struct: - case AST_Decl::NT_union: - *cs << ", retval"; - break; - default: - *cs << ", &retval"; - } - } - else - *cs << ", &retval"; - } - else - { - // pass a 0 - *cs << ", 0"; - } - - cg->push (TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS); - if (be_scope::gen_client_stubs () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::gen_client_stubs - " - "failed to emit code for arguments in docall\n"), - -1); - } - cg->pop (); - *cs << ");" << nl; - - // do any post do_call stuff with arguments - cg->push (TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS); - if (be_scope::gen_client_stubs () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::gen_client_stubs - " - "failed to emit code for post docall processing\n"), - -1); - } - cg->pop (); + { + // pass a 0 + *cs << ", 0"; + } + + cg->push (TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS); + if (be_scope::gen_client_stubs () == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::gen_client_stubs - " + "failed to emit code for arguments in docall\n"), + -1); + } + cg->pop (); + *cs << ");" << nl; + + // do any post do_call stuff with arguments + cg->push (TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS); + if (be_scope::gen_client_stubs () == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::gen_client_stubs - " + "failed to emit code for post " + "docall processing\n"), + -1); + } + cg->pop (); - // return the retval - cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS); - s = cg->make_state (); - if (!s || !bt || (s->gen_code (bt, this) == -1)) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::gen_client_stubs\n" - "return val return generation failure\n"), - -1); + // return the retval + cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS); + s = cg->make_state (); + if (!s || !bt || (s->gen_code (bt, this) == -1)) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::gen_client_stubs\n" + "return val return generation failure\n"), + -1); + } + cg->pop (); } - cg->pop (); cs->decr_indent (0); *cs << "\n}\n\n"; @@ -593,215 +619,242 @@ be_operation::gen_server_skeletons (void) *ss << "{\n"; ss->incr_indent (); *ss << "ACE_UNUSED_ARG (context);" << nl; - // define an NVList to hold arguments - *ss << "CORBA::NVList_ptr \t nvlist;" << nl; - // define a variable that will eventually point to our implementation object - *ss << intf->full_skel_name () << "_ptr \t impl = (" << intf->full_skel_name - () << "_ptr) _tao_object_reference;" << nl; - - // verify if we need to define a variable intended to hold the operation - // return type. We do not need one if the return type is void - rt = be_type::narrow_from_decl (this->return_type ()); - if (!rt) - { - ACE_ERROR ((LM_ERROR, - "be_operation::gen_server_skeletons - bad return type\n")); - return -1; - } - if (rt->node_type () == AST_Decl::NT_pre_defined) + if (this->has_native ()) { - bpd = be_predefined_type::narrow_from_decl (rt); + // Native types cannot be exported... + *ss << "_tao_environment.exception (new CORBA::MARSHAL" + << " (CORBA::COMPLETED_NO));\n"; } - if (!bpd || (bpd->pt () != AST_PredefinedType::PT_void)) + else { - // not a void type - *ss << "CORBA::Any *result;" << nl; - - // emit the return type - cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS); // emit type for - // return value - // get a state based code gen object - s = cg->make_state (); - - if (s->gen_code (rt, this) == -1) - { - ACE_ERROR ((LM_ERROR, - "be_operation::gen_server_skeletons - codegen failed for return type\n")); - return -1; - } - cg->pop (); - } + // define an NVList to hold arguments + *ss << "CORBA::NVList_ptr \t nvlist;" << nl; + // define a variable that will eventually point to our + // implementation object + *ss << intf->full_skel_name () << "_ptr \t impl = (" + << intf->full_skel_name () << "_ptr) _tao_object_reference;" + << nl; + + // verify if we need to define a variable intended to hold the + // operation return type. We do not need one if the return type + // is void + + rt = be_type::narrow_from_decl (this->return_type ()); + if (!rt) + { + ACE_ERROR ((LM_ERROR, + "be_operation::gen_server_skeletons - bad " + "return type\n")); + return -1; + } + if (rt->node_type () == AST_Decl::NT_pre_defined) + { + bpd = be_predefined_type::narrow_from_decl (rt); + } + if (!bpd || (bpd->pt () != AST_PredefinedType::PT_void)) + { + // not a void type + *ss << "CORBA::Any *result;" << nl; + + // emit the return type + + // emit type for return value + cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS); + + // get a state based code gen object + s = cg->make_state (); + + if (s->gen_code (rt, this) == -1) + { + ACE_ERROR ((LM_ERROR, + "be_operation::gen_server_skeletons - " + "codegen failed for return type\n")); + return -1; + } + cg->pop (); + } #if 0 - // if we have any arguments, get each one of them and allocate an Any and - // NamedValue for each. In addition, define a variable of that type - cg->push (TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS); - if (be_scope::gen_server_skeletons () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_operation::gen_server_skeletons - argument gen code failed\n"), - -1); - } - *ss << "\n"; - cg->pop (); - -#endif - - // declare an NVList and create one - ss->indent (); - *ss << "// create an NV list and populate it with typecodes" << nl; - *ss << "_tao_server_request.orb ()->create_list (" << this->argument_count () - << ", nvlist); // initialize a list" << nl; - - // add each argument according to the in, out, inout semantics - if (this->nmembers () > 0) - { - *ss << "// add each argument according to the in, out, inout semantics" - << nl; - // if we have any arguments, insert its typecode and a pointer to storage - // for the variable + // if we have any arguments, get each one of them and allocate + // an Any and NamedValue for each. In addition, define a + // variable of that type cg->push (TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS); - s = cg->make_state (); - if (!s) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::" - "gen_server_skeletons - " - "Bad state\n"), - -1); - } - - // if there are elements in this scope - si = new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls); - // instantiate a scope iterator. + if (be_scope::gen_server_skeletons () == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "be_operation::gen_server_skeletons - " + "argument gen code failed\n"), + -1); + } + *ss << "\n"; + cg->pop (); +#endif - while (!(si->is_done ())) - { - // get the next AST decl node - d = si->item (); - if (!d->imported ()) - { - // only if this is an argument node - if (d->node_type () == AST_Decl::NT_argument) - { - bd = be_argument::narrow_from_decl (d); - if (!bd) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::" - "gen_server_skeletons - " - "Bad argument\n"), - -1); - } - bt = be_type::narrow_from_decl (bd->field_type ()); - if (!bt) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::" - "gen_server_skeletons - " - "Bad type\n"), - -1); - } - // emit code that adds this argument to the NVList + // declare an NVList and create one + ss->indent (); + *ss << "// create an NV list and populate it with typecodes" << nl; + *ss << "_tao_server_request.orb ()->create_list (" + << this->argument_count () + << ", nvlist); // initialize a list" << nl; + + // add each argument according to the in, out, inout semantics + if (this->nmembers () > 0) + { + *ss << "// add each argument according to the " + << "in, out, inout semantics" << nl; + // if we have any arguments, insert its typecode and a + // pointer to storage for the variable + cg->push (TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS); + s = cg->make_state (); + if (!s) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::" + "gen_server_skeletons - " + "Bad state\n"), + -1); + } + + // if there are elements in this scope + si = new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls); + // instantiate a scope iterator. + + while (!(si->is_done ())) + { + // get the next AST decl node + d = si->item (); + if (!d->imported ()) + { + // only if this is an argument node + if (d->node_type () == AST_Decl::NT_argument) + { + bd = be_argument::narrow_from_decl (d); + if (!bd) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::" + "gen_server_skeletons - " + "Bad argument\n"), + -1); + } + bt = be_type::narrow_from_decl (bd->field_type ()); + if (!bt) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::" + "gen_server_skeletons - " + "Bad type\n"), + -1); + } + // emit code that adds this argument to the + // NVList #if 0 - *ss << "nv_" << bd->local_name () << - " = nvlist->add_value (\"" << bd->local_name () << "\", " - << "any_" << bd->local_name () << ", "; - switch (bd->direction ()) - { - case AST_Argument::dir_IN: - *ss << "CORBA::ARG_IN, _tao_environment);" << nl; - break; - case AST_Argument::dir_INOUT: - *ss << "CORBA::ARG_INOUT, _tao_environment);" << nl; - break; - case AST_Argument::dir_OUT: - *ss << "CORBA::ARG_OUT, _tao_environment);" << nl; - break; - } + *ss << "nv_" << bd->local_name () + << " = nvlist->add_value (\"" + << bd->local_name () << "\", " + << "any_" << bd->local_name () << ", "; + switch (bd->direction ()) + { + case AST_Argument::dir_IN: + *ss << "CORBA::ARG_IN, _tao_environment);" << nl; + break; + case AST_Argument::dir_INOUT: + *ss << "CORBA::ARG_INOUT, _tao_environment);" << nl; + break; + case AST_Argument::dir_OUT: + *ss << "CORBA::ARG_OUT, _tao_environment);" << nl; + break; + } #endif - if (s->gen_code (bt, bd) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_operation::" - "gen_server_skeletons - " - "state based code gen failed\n"), - -1); - } - } // end if argument node - } // end if ! imported - si->next (); - } // end of while - delete si; // free the iterator object + if (s->gen_code (bt, bd) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_operation::" + "gen_server_skeletons - " + "state based code gen failed\n"), + -1); + } + } // end if argument node + } // end if ! imported + si->next (); + } // end of while + delete si; // free the iterator object + cg->pop (); + } // end of arg list + + // parse the arguments + *ss << "// parse the arguments" << nl; + *ss << "_tao_server_request.params (nvlist, _tao_environment);" << nl; + *ss << "if (_tao_environment.exception ()) return;" << nl; + + cg->push (TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS); + if (be_scope::gen_server_skeletons () == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "be_operation::gen_server_skeletons - " + "argument gen code failed\n"), + -1); + } cg->pop (); - } // end of arg list - // parse the arguments - *ss << "// parse the arguments" << nl; - *ss << "_tao_server_request.params (nvlist, _tao_environment);" << nl; - *ss << "if (_tao_environment.exception ()) return;" << nl; - - cg->push (TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS); - if (be_scope::gen_server_skeletons () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_operation::gen_server_skeletons - argument gen code failed\n"), - -1); - } - cg->pop (); - - // make the upcall - // *ss << "impl = (" << intf->full_skel_name () << "_ptr) _tao_object_reference->get_subclass ();" - // << nl; - if (!bpd || (bpd->pt () != AST_PredefinedType::PT_void)) - { - cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS); - s = cg->make_state (); - // emit code to assign to retval - if (!s || (s->gen_code (rt, this) == -1)) - { - return -1; - } - *ss << " = impl->" << this->local_name () << "("; + // make the upcall + // *ss << "impl = (" << intf->full_skel_name () + // << "_ptr) _tao_object_reference->get_subclass ();" + // << nl; + if (!bpd || (bpd->pt () != AST_PredefinedType::PT_void)) + { + cg->push (TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS); + s = cg->make_state (); + // emit code to assign to retval + if (!s || (s->gen_code (rt, this) == -1)) + { + return -1; + } + *ss << " = impl->" << this->local_name () << "("; + cg->pop (); + } + else + { + // void return type + *ss << "impl->" << this->local_name () << "("; + } + + cg->push (TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS); + if (be_scope::gen_server_skeletons () == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "be_operation::gen_server_skeletons - " + "argument in upcall\n"), + -1); + } cg->pop (); - } - else - { - // void return type - *ss << "impl->" << this->local_name () << "("; - } - - cg->push (TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS); - if (be_scope::gen_server_skeletons () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_operation::gen_server_skeletons - argument in upcall\n"), - -1); - } - cg->pop (); - *ss << "_tao_environment);" << nl; - - cg->push (TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS); - if (be_scope::gen_server_skeletons () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_operation::gen_server_skeletons - argument gen code failed\n"), - -1); - } - cg->pop (); - - // if there is any return type, send it via the ServerRequest - if (!bpd || (bpd->pt () != AST_PredefinedType::PT_void)) - { - cg->push (TAO_CodeGen::TAO_OPERATION_RESULT_SS); - s = cg->make_state (); - if (!s || (s->gen_code (rt, this) == -1)) - return -1; + *ss << "_tao_environment);" << nl; + + cg->push (TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS); + if (be_scope::gen_server_skeletons () == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "be_operation::gen_server_skeletons - " + "argument gen code failed\n"), + -1); + } cg->pop (); - *ss << "_tao_server_request.result (result, _tao_environment);" << nl; - } - *ss << "\n"; + + // if there is any return type, send it via the ServerRequest + if (!bpd || (bpd->pt () != AST_PredefinedType::PT_void)) + { + cg->push (TAO_CodeGen::TAO_OPERATION_RESULT_SS); + s = cg->make_state (); + if (!s || (s->gen_code (rt, this) == -1)) + return -1; + cg->pop (); + *ss << "_tao_server_request.result (result, " + << "_tao_environment);" << nl; + } + *ss << "\n"; + } + ss->decr_indent (); *ss << "}\n\n"; diff --git a/TAO/TAO_IDL/be/be_predefined_type.cpp b/TAO/TAO_IDL/be/be_predefined_type.cpp index d7a191ba065..1d0b9d19c53 100644 --- a/TAO/TAO_IDL/be/be_predefined_type.cpp +++ b/TAO/TAO_IDL/be/be_predefined_type.cpp @@ -432,6 +432,24 @@ be_predefined_type::compute_size_type (void) return 0; } +int be_predefined_type::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + *stream << type->name (); + // check if the type is an any + if (this->pt () == AST_PredefinedType::PT_any) + { + // if it is an any, return a pointer to it + *stream << " *"; + } + else if (this->pt () == AST_PredefinedType::PT_pseudo) + { + // pseudo object, return a pointer + *stream << "_ptr"; + } + return 0; +} + int be_predefined_type::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_scope.cpp b/TAO/TAO_IDL/be/be_scope.cpp index 3757103664d..1842d29143a 100644 --- a/TAO/TAO_IDL/be/be_scope.cpp +++ b/TAO/TAO_IDL/be/be_scope.cpp @@ -30,6 +30,12 @@ be_scope::comma (unsigned short comma) } int +be_scope::comma (void) const +{ + return this->comma_; +} + +int be_scope::gen_client_header (void) { UTL_ScopeActiveIterator *si; diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp index 9a181def54a..85ed898c6c2 100644 --- a/TAO/TAO_IDL/be/be_sequence.cpp +++ b/TAO/TAO_IDL/be/be_sequence.cpp @@ -1548,7 +1548,7 @@ be_sequence::gen_var_impl (void) } #endif - be_visitor_sequence_elemtype elemtype (ci, this, bt); + be_visitor_sequence_elemtype elemtype (ci, 0, bt); if (bt->accept (&elemtype) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -1915,7 +1915,7 @@ be_sequence::gen_out_impl (void) } #endif - be_visitor_sequence_elemtype elemtype (ci, this, bt); + be_visitor_sequence_elemtype elemtype (ci, 0, bt); if (bt->accept (&elemtype) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -2605,6 +2605,13 @@ be_sequence::decl (void) return this; } +int be_sequence::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + *stream << type->name () << " *"; + return 0; +} + int be_sequence::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_state_argument.cpp b/TAO/TAO_IDL/be/be_state_argument.cpp index efefcc61f4c..e890aecb5e6 100644 --- a/TAO/TAO_IDL/be/be_state_argument.cpp +++ b/TAO/TAO_IDL/be/be_state_argument.cpp @@ -2232,26 +2232,56 @@ be_state_argument::gen_code (be_type *bt, be_decl *d, be_type *type) } // end switch direction break; case AST_Decl::NT_native: - { - switch (cg->state ()) - { - case TAO_CodeGen::TAO_ARGUMENT_CH: - // to keep the MSVC++ compiler happy - *os << bt->nested_type_name (bif) << " " << arg->local_name () << - ", "; - break; - case TAO_CodeGen::TAO_ARGUMENT_CS: - case TAO_CodeGen::TAO_ARGUMENT_SH: - *os << bt->name () << " " << arg->local_name () << ", "; - break; - case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS: - case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS: - *os << "env.exception (new CORBA::MARSHAL " << - "(CORBA::COMPLETED_NO));" << nl; - break; - default: - break; - } + { + switch (arg->direction ()) + { + case AST_Argument::dir_IN: + { + switch (cg->state ()) + { + case TAO_CodeGen::TAO_ARGUMENT_CH: + // to keep the MSVC++ compiler happy + *os << bt->nested_type_name (bif) << " " + << arg->local_name () << ", "; + break; + case TAO_CodeGen::TAO_ARGUMENT_CS: + case TAO_CodeGen::TAO_ARGUMENT_SH: + *os << bt->name () << " " << arg->local_name () << ", "; + break; + case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS: + case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS: + *os << "env.exception (new CORBA::MARSHAL " << + "(CORBA::COMPLETED_NO));" << nl; + break; + default: + break; + } + case AST_Argument::dir_INOUT: + case AST_Argument::dir_OUT: + { + switch (cg->state ()) + { + case TAO_CodeGen::TAO_ARGUMENT_CH: + // to keep the MSVC++ compiler happy + *os << bt->nested_type_name (bif) << " &" + << arg->local_name () << ", "; + break; + case TAO_CodeGen::TAO_ARGUMENT_CS: + case TAO_CodeGen::TAO_ARGUMENT_SH: + *os << bt->name () << " &" + << arg->local_name () << ", "; + break; + case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS: + case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS: + *os << "env.exception (new CORBA::MARSHAL " << + "(CORBA::COMPLETED_NO));" << nl; + break; + default: + break; + } + } + } + } } break; case AST_Decl::NT_except: // type is an exception diff --git a/TAO/TAO_IDL/be/be_state_operation.cpp b/TAO/TAO_IDL/be/be_state_operation.cpp index 30879d33f41..8e0a255232e 100644 --- a/TAO/TAO_IDL/be/be_state_operation.cpp +++ b/TAO/TAO_IDL/be/be_state_operation.cpp @@ -682,6 +682,38 @@ be_state_operation::gen_code (be_type *bt, be_decl *d, be_type *type) } // end of switch cg->state } break; + case AST_Decl::NT_native: + { + switch (cg->state ()) + { + case TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS: + { + *os << bt->name (); + } + break; + case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS: + case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS: + case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS: + case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS: + case TAO_CodeGen::TAO_OPERATION_RESULT_SS: + break; + case TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS: + *os << "return 0;\n"; + break; + case TAO_CodeGen::TAO_OPERATION_CH: + { + // to keep MSVC++ happy + *os << bt->nested_type_name (bif) << " "; + } + break; + default: + { + *os << bt->name (); + } + break; + } + } + break; case AST_Decl::NT_except: // type is an exception { // XXXASG TODO: is this allowed ??? diff --git a/TAO/TAO_IDL/be/be_string.cpp b/TAO/TAO_IDL/be/be_string.cpp index d2dcdd37f61..c883c6e80eb 100644 --- a/TAO/TAO_IDL/be/be_string.cpp +++ b/TAO/TAO_IDL/be/be_string.cpp @@ -157,6 +157,13 @@ be_string::tc_encap_len (void) return this->encap_len_; } +int be_string::write_as_return (TAO_OutStream *stream, + be_type * /* type */) +{ + *stream << "char* "; + return 0; +} + int be_string::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_structure.cpp b/TAO/TAO_IDL/be/be_structure.cpp index a040abd4fd7..4f8471b7213 100644 --- a/TAO/TAO_IDL/be/be_structure.cpp +++ b/TAO/TAO_IDL/be/be_structure.cpp @@ -882,6 +882,17 @@ be_structure::compute_size_type (void) return 0; } +int be_structure::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + *stream << type->name (); + if (this->size_type () == be_decl::VARIABLE) + { + *stream << " *"; + } + return 0; +} + int be_structure::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_type.cpp b/TAO/TAO_IDL/be/be_type.cpp index e4241fe2ae0..de58512125a 100644 --- a/TAO/TAO_IDL/be/be_type.cpp +++ b/TAO/TAO_IDL/be/be_type.cpp @@ -249,6 +249,18 @@ be_type::gen_out_impl (void) return 0; } +AST_Decl::NodeType be_type::base_node_type (void) const +{ + return ACE_const_cast(be_type*, this)->node_type (); +} + +int be_type::write_as_return (TAO_OutStream *, be_type *) +{ + ACE_ERROR_RETURN ((LM_ERROR, + "be_type::write_as_return - internal error," + " method shouldn't be invoked\n"), -1); +} + int be_type::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_typedef.cpp b/TAO/TAO_IDL/be/be_typedef.cpp index 968da2c0157..5a584c9d145 100644 --- a/TAO/TAO_IDL/be/be_typedef.cpp +++ b/TAO/TAO_IDL/be/be_typedef.cpp @@ -318,6 +318,19 @@ be_typedef::compute_size_type (void) return 0; } +AST_Decl::NodeType be_typedef::base_node_type (void) const +{ + be_type *base = be_type::narrow_from_decl (ACE_const_cast(be_typedef*, this)->base_type ()); + return base->base_node_type (); +} + +int be_typedef::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + be_type *base = be_type::narrow_from_decl (this->base_type ()); + return base->write_as_return (stream, type); +} + int be_typedef::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_union.cpp b/TAO/TAO_IDL/be/be_union.cpp index 4a1669e9a79..13fdaecdad1 100644 --- a/TAO/TAO_IDL/be/be_union.cpp +++ b/TAO/TAO_IDL/be/be_union.cpp @@ -1121,6 +1121,17 @@ be_union::tc_encap_len (void) return this->encap_len_; } +int be_union::write_as_return (TAO_OutStream *stream, + be_type *type) +{ + *stream << type->name (); + if (this->size_type () == be_decl::VARIABLE) + { + *stream << " *"; + } + return 0; +} + int be_union::accept (be_visitor *visitor) { diff --git a/TAO/TAO_IDL/be/be_union_label.cpp b/TAO/TAO_IDL/be/be_union_label.cpp index 0c4f6af91fc..64d1f74893e 100644 --- a/TAO/TAO_IDL/be/be_union_label.cpp +++ b/TAO/TAO_IDL/be/be_union_label.cpp @@ -1,3 +1,6 @@ +// +// $Id$ +// #include "idl.h" #include "idl_extern.h" #include "be.h" diff --git a/TAO/TAO_IDL/be/be_visitor_args.cpp b/TAO/TAO_IDL/be/be_visitor_args.cpp index 36c2f6e563f..4403b67e2e8 100644 --- a/TAO/TAO_IDL/be/be_visitor_args.cpp +++ b/TAO/TAO_IDL/be/be_visitor_args.cpp @@ -15,6 +15,16 @@ be_visitor_args_decl::~be_visitor_args_decl (void) { } +void be_visitor_args_decl::argument_direction (int direction) +{ + this->argument_direction_ = direction; +} + +void be_visitor_args_decl::current_type_name (UTL_ScopedName* name) +{ + this->current_type_name_ = name; +} + inline TAO_OutStream& be_visitor_args_decl::stream (void) const { return *this->stream_; @@ -181,7 +191,7 @@ int be_visitor_args_decl::visit_enum (be_enum *node) return 0; } -int be_visitor_args_decl::visit_union (be_union *node) +int be_visitor_args_decl::visit_union (be_union *) { return this->dump_structure (); } @@ -207,45 +217,24 @@ int be_visitor_args_decl::visit_array (be_array *node) return 0; } -int be_visitor_args_decl::visit_sequence (be_sequence *node) +int be_visitor_args_decl::visit_sequence (be_sequence *) { return this->dump_structure (); } -int be_visitor_args_decl::visit_string (be_string *node) +int be_visitor_args_decl::visit_string (be_string *) { - if (this->current_type_name_ == node->name ()) - { - // Strings have special mapping, the <name> returned by - // be_string is not useful for this. - - switch (this->argument_direction_) - { - case AST_Argument::dir_IN: - this->stream () << "const char*"; - break; - case AST_Argument::dir_INOUT: - this->stream () << "char*"; - break; - case AST_Argument::dir_OUT: - this->stream () << "CORBA::String_out"; - break; - } - } - else + switch (this->argument_direction_) { - switch (this->argument_direction_) - { - case AST_Argument::dir_IN: - this->stream () << "const " << this->current_type_name_; - break; - case AST_Argument::dir_INOUT: - this->stream () << this->current_type_name_; - break; - case AST_Argument::dir_OUT: - this->stream () << this->current_type_name_ << "_out"; - break; - } + case AST_Argument::dir_IN: + this->stream () << "const char*"; + break; + case AST_Argument::dir_INOUT: + this->stream () << "char*"; + break; + case AST_Argument::dir_OUT: + this->stream () << "CORBA::String_out"; + break; } return 0; } @@ -255,7 +244,7 @@ int be_visitor_args_decl::visit_typedef (be_typedef *node) return node->primitive_base_type ()->accept (this); } -int be_visitor_args_decl::visit_native (be_native *node) +int be_visitor_args_decl::visit_native (be_native *) { switch (this->argument_direction_) { diff --git a/TAO/TAO_IDL/be/be_visitor_interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface.cpp index f1be9fbb420..baa3059fee4 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface.cpp @@ -37,7 +37,8 @@ int be_visitor_collocated_sh::visit_interface (be_interface *node) *os << "," << nl; be_interface* parent = be_interface::narrow_from_decl (node->inherits()[i]); - *os << " public virtual " << parent->full_coll_name (); + *os << " public virtual " + << parent->relative_coll_name (node->full_coll_name ()); } } *os << "\n"; @@ -74,7 +75,12 @@ int be_visitor_collocated_sh::visit_interface (be_interface *node) *os << "POA_"; } *os << node->local_name () - << "_ptr _get_servant (void) const;\n"; + << "_ptr _get_servant (void) const;" << be_nl; + + *os << "virtual CORBA::Boolean _is_a (" << be_idt << be_idt_nl + << "const char *logical_type_id," << be_nl + << "CORBA::Environment &_tao_environment" << be_uidt_nl + << ");\n" << be_uidt; if (node->nmembers () > 0) { @@ -88,9 +94,7 @@ int be_visitor_collocated_sh::visit_interface (be_interface *node) AST_Decl *d = si->item (); si->next (); be_decl *bd = be_decl::narrow_from_decl (d); - if (d->imported () - || bd == 0 - || bd->node_type () != AST_Decl::NT_op) + if (d->imported () || bd == 0) { continue; } @@ -156,6 +160,47 @@ int be_visitor_collocated_sh::visit_operation (be_operation *node) return 0; } +int be_visitor_collocated_sh::visit_attribute (be_attribute *node) +{ + // retrieve a singleton instance of the code generator + TAO_CodeGen *cg = TAO_CODEGEN::instance (); + TAO_OutStream *sh = cg->server_header (); + sh->indent (); // start with the current indentation level + + be_type* bt = be_type::narrow_from_decl (node->field_type ()); + + // the retrieve method is defined virtual + *sh << "virtual "; + + if (bt->write_as_return (sh, bt) == -1) + { + return -1; + } + + *sh << " " << node->local_name () << " (" << be_idt << be_idt_nl + << "CORBA::Environment &env" << be_uidt_nl + << ");\n" << be_uidt; + + if (!node->readonly ()) + { + sh->indent (); + *sh << "virtual void " << node->local_name () + << " (" << be_idt << be_idt; + + be_visitor_args_decl vdecl (sh); + vdecl.current_type_name (bt->name ()); + vdecl.argument_direction (AST_Argument::dir_IN); + if (bt->accept (&vdecl) == -1) + return -1; + + + *sh << " _tao_value," << be_nl + << "CORBA::Environment &_tao_environment" << be_uidt_nl + << ");\n" << be_uidt; + } + return 0; +} + be_visitor_collocated_ss::be_visitor_collocated_ss (void) @@ -169,8 +214,6 @@ be_visitor_collocated_ss::~be_visitor_collocated_ss (void) int be_visitor_collocated_ss::visit_interface (be_interface *node) { - TAO_NL nl; - TAO_CodeGen *cg = TAO_CODEGEN::instance (); TAO_OutStream *ss = cg->server_skeletons (); @@ -182,7 +225,7 @@ int be_visitor_collocated_ss::visit_interface (be_interface *node) ss->incr_indent (0); ss->incr_indent (); *ss << node->full_skel_name () << "_ptr " - << " servant," << nl; + << " servant," << be_nl; *ss << "STUB_Object *stub\n"; ss->decr_indent (); @@ -190,7 +233,23 @@ int be_visitor_collocated_ss::visit_interface (be_interface *node) ss->decr_indent (0); ss->incr_indent (); - *ss << ": " << node->name () << " (stub)," << nl; +#if defined (ACE_WIN32) + // @@ TODO MSVC++ compiler has some kind of issue (read + // *bug*) wrt nested classes in constructors, if the fully + // qualified name is used it gets all confused. Quite to my + // dismay the work around is to use a non-qualified name for + // the base class! + // I wish I never have to know why the symbol table for + // MSVC++ can get so confused ;-) (coryan) + *ss << ": " << node->local_name () + << " (stub, servant, CORBA::B_TRUE)," << be_nl; +#else + *ss << ": " << node->name () + << " (stub, servant, CORBA::B_TRUE)," << be_nl; +#endif /* ACE_WIN32 */ + + // @@ We should call the constructor for all base classes, since we + // are using multiple inheritance. if (this->current_interface_->n_inherits () > 0) { for (int i = 0; i < node->n_inherits (); ++i) @@ -205,16 +264,17 @@ int be_visitor_collocated_ss::visit_interface (be_interface *node) // the base class! // I wish I never have to know why the symbol table for // MSVC++ can get so confused ;-) (coryan) - *ss << " " << parent->local_coll_name () << " (servant)," - << nl; + *ss << " " << parent->local_coll_name () << " (servant, stub)," + << be_nl; #else - *ss << " " << parent->full_coll_name () << " (servant)," - << nl; + *ss << " " << parent->full_coll_name () << " (servant, stub)," + << be_nl; #endif /* ACE_WIN32 */ } } - *ss << " servant_ (servant)"; + *ss << " CORBA_Object (stub, servant, CORBA::B_TRUE)," << be_nl + << " servant_ (servant)"; *ss << "\n"; ss->decr_indent (); @@ -231,6 +291,19 @@ int be_visitor_collocated_ss::visit_interface (be_interface *node) ss->decr_indent (); *ss << "}\n\n"; + ss->indent (); + *ss << "CORBA::Boolean " << this->current_interface_->full_coll_name () + << "::_is_a (" << be_idt << be_idt_nl + << "const char* logical_type_id," << be_nl + << "CORBA::Environment &_tao_environment" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "return this->servant_->_is_a (" << be_idt << be_idt_nl + << "logical_type_id," << be_nl + << "_tao_environment" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl + << "}\n\n"; + if (node->nmembers () > 0) { UTL_ScopeActiveIterator *si; @@ -315,6 +388,57 @@ int be_visitor_collocated_ss::visit_operation (be_operation *node) return 0; } +int be_visitor_collocated_ss::visit_attribute (be_attribute *node) +{ + // retrieve a singleton instance of the code generator + TAO_CodeGen *cg = TAO_CODEGEN::instance (); + TAO_OutStream *ss = cg->server_skeletons (); + ss->indent (); // start with the current indentation level + + be_type* bt = be_type::narrow_from_decl (node->field_type ()); + + if (bt->write_as_return (ss, bt) == -1) + { + return -1; + } + + *ss << be_nl << this->current_interface_->full_coll_name () + << "::" << node->local_name () << " (" << be_idt << be_idt_nl + << "CORBA::Environment &_tao_environment" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "return this->servant_->" + << node->local_name () << "(_tao_environment);" << be_uidt_nl + << "}\n"; + + if (!node->readonly ()) + { + *ss << be_nl + << "void " + << this->current_interface_->full_coll_name () + << "::" << node->local_name () + << " (" << be_idt << be_idt_nl; + + be_visitor_args_decl vdecl (ss); + vdecl.current_type_name (bt->name ()); + vdecl.argument_direction (AST_Argument::dir_IN); + if (bt->accept (&vdecl) == -1) + return -1; + + *ss << "_tao_value," << be_nl + << "CORBA::Environment &_tao_environment" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "this->servant_->" << node->local_name () + << " (" << be_idt << be_idt_nl + << "_tao_value," << be_nl + << "_tao_environment" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl + << "}\n\n"; + } + return 0; +} + int be_visitor_collocated_ss::visit_argument (be_argument *node) { // retrieve a singleton instance of the code generator diff --git a/TAO/TAO_IDL/be/be_visitor_root.cpp b/TAO/TAO_IDL/be/be_visitor_root.cpp index f6dfc5afee7..d483a1e5472 100644 --- a/TAO/TAO_IDL/be/be_visitor_root.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root.cpp @@ -107,7 +107,7 @@ int be_visitor_root_ci::visit_root (be_root *node) return 0; } -int be_visitor_root_ci::visit_sequence (be_sequence *node) +int be_visitor_root_ci::visit_sequence (be_sequence *) { return 0; } @@ -151,7 +151,7 @@ int be_visitor_root_cs::visit_root (be_root *node) return 0; } -int be_visitor_root_cs::visit_sequence (be_sequence *node) +int be_visitor_root_cs::visit_sequence (be_sequence *) { return 0; } @@ -198,7 +198,7 @@ int be_visitor_root_sh::visit_root (be_root *node) return 0; } -int be_visitor_root_sh::visit_sequence (be_sequence *node) +int be_visitor_root_sh::visit_sequence (be_sequence *) { return 0; } @@ -242,7 +242,7 @@ int be_visitor_root_si::visit_root (be_root *node) return 0; } -int be_visitor_root_si::visit_sequence (be_sequence *node) +int be_visitor_root_si::visit_sequence (be_sequence *) { return 0; } @@ -286,7 +286,7 @@ int be_visitor_root_ss::visit_root (be_root *node) return 0; } -int be_visitor_root_ss::visit_sequence (be_sequence *node) +int be_visitor_root_ss::visit_sequence (be_sequence *) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_sequence.cpp b/TAO/TAO_IDL/be/be_visitor_sequence.cpp index aee6b4f9f86..36a6f661f94 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence.cpp @@ -121,7 +121,10 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) os << " " << node->local_name () << ";" << nl; - // Generate the typecode decl + os << "typedef " << node->local_name () << "* " + << node->local_name () << "_ptr;\n"; + + // Generate the typecode decl if (node->is_nested ()) { // we have a scoped name @@ -133,8 +136,8 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) { // we are in the ROOT scope os.indent (); - os << "extern CORBA::TypeCode_ptr " << node->tc_name - ()->last_component () << ";\n\n"; + os << "extern CORBA::TypeCode_ptr " + << node->tc_name ()->last_component () << ";\n\n"; } @@ -193,6 +196,9 @@ be_visitor_sequence_base_ch::~be_visitor_sequence_base_ch (void) be_decl * be_visitor_sequence_base_ch::seq_scope (void) { + if (this->node_ == 0) + return 0; + be_decl *scope = 0; if (this->node_->is_nested ()) scope = be_scope::narrow_from_scope (this->node_->defined_in ())->decl (); @@ -221,7 +227,7 @@ be_visitor_sequence_base_ch::visit_sequence (be_sequence *node) // helper int -be_visitor_sequence_base_ch::visit_node (be_type * /* node */) +be_visitor_sequence_base_ch::visit_node (be_type *) { TAO_OutStream &os = this->stream (); os << this->current_type_->nested_type_name (this->seq_scope ()); @@ -229,7 +235,7 @@ be_visitor_sequence_base_ch::visit_node (be_type * /* node */) } int -be_visitor_sequence_base_ch::visit_interface (be_interface * /* node */) +be_visitor_sequence_base_ch::visit_interface (be_interface *) { TAO_OutStream &os = this->stream (); os << this->current_type_->nested_type_name (this->seq_scope ()); @@ -237,7 +243,7 @@ be_visitor_sequence_base_ch::visit_interface (be_interface * /* node */) } int -be_visitor_sequence_base_ch::visit_interface_fwd (be_interface_fwd *node) +be_visitor_sequence_base_ch::visit_interface_fwd (be_interface_fwd *) { TAO_OutStream &os = this->stream (); os << this->current_type_->nested_type_name (this->seq_scope ()); @@ -245,7 +251,7 @@ be_visitor_sequence_base_ch::visit_interface_fwd (be_interface_fwd *node) } int -be_visitor_sequence_base_ch::visit_string (be_string * /* node */) +be_visitor_sequence_base_ch::visit_string (be_string * ) { // NO-OP, we have ad-hoc classes from strings. return 0; @@ -303,6 +309,9 @@ be_visitor_sequence_elemtype::~be_visitor_sequence_elemtype (void) be_decl * be_visitor_sequence_elemtype::seq_scope (void) { + if (this->node_ == 0) + return 0; + be_decl *scope = 0; if (this->node_->is_nested ()) scope = be_scope::narrow_from_scope (this->node_->defined_in ())->decl (); @@ -313,15 +322,12 @@ int be_visitor_sequence_elemtype::visit_predefined_type (be_predefined_type *node) { TAO_OutStream &os = this->stream (); - be_sequence *seq = be_sequence::narrow_from_decl (this->be_node ()); - if (!seq) - return -1; switch (node->pt ()) { case AST_PredefinedType::PT_pseudo: - if (seq->unbounded ()) - os << "TAO_Object_Manager<CORBA::Object> "; + os << "TAO_Object_Manager<CORBA::Object> "; + break; default: os << this->current_type_->name () << " &"; } @@ -336,7 +342,7 @@ be_visitor_sequence_elemtype::visit_sequence (be_sequence *node) // helper int -be_visitor_sequence_elemtype::visit_node (be_type *node) +be_visitor_sequence_elemtype::visit_node (be_type *) { TAO_OutStream &os = this->stream (); @@ -348,12 +354,9 @@ be_visitor_sequence_elemtype::visit_node (be_type *node) } int -be_visitor_sequence_elemtype::visit_interface (be_interface *node) +be_visitor_sequence_elemtype::visit_interface (be_interface *) { TAO_OutStream &os = this->stream (); - be_sequence *seq = be_sequence::narrow_from_decl (this->be_node ()); - if (!seq) - return -1; os << "TAO_Object_Manager <" << this->current_type_->nested_type_name (this->seq_scope ()) @@ -363,12 +366,9 @@ be_visitor_sequence_elemtype::visit_interface (be_interface *node) } int -be_visitor_sequence_elemtype::visit_interface_fwd (be_interface_fwd *node) +be_visitor_sequence_elemtype::visit_interface_fwd (be_interface_fwd *) { TAO_OutStream &os = this->stream (); - be_sequence *seq = be_sequence::narrow_from_decl (this->be_node ()); - if (!seq) - return -1; os << "TAO_Object_Manager <" << this->current_type_->nested_type_name (this->seq_scope ()) @@ -378,12 +378,9 @@ be_visitor_sequence_elemtype::visit_interface_fwd (be_interface_fwd *node) } int -be_visitor_sequence_elemtype::visit_string (be_string * /*node*/) +be_visitor_sequence_elemtype::visit_string (be_string *) { TAO_OutStream &os = this->stream (); - be_sequence *seq = be_sequence::narrow_from_decl (this->be_node ()); - if (!seq) - return -1; os << "TAO_String_Manager "; return 0; diff --git a/TAO/TAO_IDL/be_include/be_array.h b/TAO/TAO_IDL/be_include/be_array.h index 74dcc38b95d..b9e1182f98c 100644 --- a/TAO/TAO_IDL/be_include/be_array.h +++ b/TAO/TAO_IDL/be_include/be_array.h @@ -89,6 +89,10 @@ public: virtual long tc_encap_len (void); // return length of encapsulation + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting virtual int accept (be_visitor *visitor); diff --git a/TAO/TAO_IDL/be_include/be_enum.h b/TAO/TAO_IDL/be_include/be_enum.h index e7a3637b750..c8f4f80a8e5 100644 --- a/TAO/TAO_IDL/be_include/be_enum.h +++ b/TAO/TAO_IDL/be_include/be_enum.h @@ -70,6 +70,10 @@ public: virtual int member_count (void); // return the count of members + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting virtual int accept (be_visitor *visitor); diff --git a/TAO/TAO_IDL/be_include/be_exception.h b/TAO/TAO_IDL/be_include/be_exception.h index 202b9d1df04..46081d3c90f 100644 --- a/TAO/TAO_IDL/be_include/be_exception.h +++ b/TAO/TAO_IDL/be_include/be_exception.h @@ -52,6 +52,10 @@ public: virtual int member_count (void); // return the count of members + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting virtual int accept (be_visitor *visitor); diff --git a/TAO/TAO_IDL/be_include/be_interface.h b/TAO/TAO_IDL/be_include/be_interface.h index f418864e982..e8b58e4f468 100644 --- a/TAO/TAO_IDL/be_include/be_interface.h +++ b/TAO/TAO_IDL/be_include/be_interface.h @@ -49,6 +49,9 @@ public: // Constructor that sets its scoped name <n>, a list of inherited interfaces // <ih>, the number of inherited interfaces <nih>, and any prgmas <p> + ~be_interface (void); + // dtor + virtual int gen_client_header (void); // Generates the client-side header information for the interface @@ -82,6 +85,23 @@ public: const char *full_skel_name (void); // retrieve the fully scoped skel class name + // + // Each interface (to fix names "T") also defines two help classes, + // the "collocated" class inherits from T, but delegates on the + // skeleton for T (usually POA_T or POA_ModuleName::T), in other + // words it is a Bridge from T to its implementation. + // The class is nested inside the skeleton class. + // + // The "stub" is a class defined on the client scope, it actually + // defines the stubs (all operations in T are pure virtual). + // @@ TODO currently the stub class is not implemented. + // + const char *full_coll_name (void) const; + // retrieve the fully qualified collocated class name + + const char *local_coll_name (void) const; + // retrieve the fully qualified collocated class name + virtual int gen_typecode (void); // generate the typecode @@ -98,30 +118,31 @@ public: TAO_OutStream *os); // template method using breadth first traversal of inheritance graph - char *relative_skel_name (const char *); + const char *relative_skel_name (const char *other_class_name); // relative skeleton name + const char *relative_coll_name (const char *other_class_name); + // relative name for collocated class. + // Visiting virtual int accept (be_visitor *visitor); + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Narrowing DEF_NARROW_METHODS3 (be_interface, AST_Interface, be_scope, be_type); DEF_NARROW_FROM_DECL (be_interface); DEF_NARROW_FROM_SCOPE (be_interface); -private: - void compute_fullskelname (void); - // compute the fully scoped skel class name - - int gen_operation_table (void); - // generate the operation table including entries for inherited interfaces - - int gen_optable_entries (be_interface *); - // generate the operation table entries - static int is_a_helper (be_interface *, be_interface *, TAO_OutStream *os); // helper method passed to the template method + static int downcast_helper (be_interface *, + be_interface *, + TAO_OutStream *os); + static int gen_optable_helper (be_interface *, be_interface *, TAO_OutStream *os); @@ -132,9 +153,30 @@ private: TAO_OutStream *os); // helper method passed to the template method +private: + void compute_fullskelname (void); + // compute the fully scoped skel class name + + int gen_operation_table (void); + // generate the operation table including entries for inherited interfaces + + static const char *relative_name (const char* our_name, + const char *other_class_name); + // relative name for collocated class. + + int gen_optable_entries (be_interface *); + // generate the operation table entries + + void compute_coll_name (void); + // compute the fully qualified collocated class name. + +private: char *full_skel_name_; // fully scoped skeleton name int skel_count_; // number of static skeletons in the operation table + + char *full_coll_name_; + char *local_coll_name_; }; #endif // if !defined diff --git a/TAO/TAO_IDL/be_include/be_interface_fwd.h b/TAO/TAO_IDL/be_include/be_interface_fwd.h index ac97d8f9020..717e388b46b 100644 --- a/TAO/TAO_IDL/be_include/be_interface_fwd.h +++ b/TAO/TAO_IDL/be_include/be_interface_fwd.h @@ -76,8 +76,12 @@ public: virtual long tc_size (void); // return typecode size + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting - virtual int accept (be_visitor *visitor); + virtual int accept (be_visitor* visitor); // Narrowing DEF_NARROW_METHODS2 (be_interface_fwd, AST_InterfaceFwd, be_type); diff --git a/TAO/TAO_IDL/be_include/be_native.h b/TAO/TAO_IDL/be_include/be_native.h index 70dd2254b57..8b04f93565c 100644 --- a/TAO/TAO_IDL/be_include/be_native.h +++ b/TAO/TAO_IDL/be_include/be_native.h @@ -60,6 +60,10 @@ public: virtual long tc_size (void); // return typecode size + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting virtual int accept (be_visitor *visitor); diff --git a/TAO/TAO_IDL/be_include/be_operation.h b/TAO/TAO_IDL/be_include/be_operation.h index dbdd30b9e2e..56dd57b42d6 100644 --- a/TAO/TAO_IDL/be_include/be_operation.h +++ b/TAO/TAO_IDL/be_include/be_operation.h @@ -58,6 +58,11 @@ public: virtual int argument_count (void); // return the count of members + virtual int has_native (void); + // Any of the arguments or the return value is a <native> type. + // This is important because in that case no code should be + // generated for the stubs. + // Visiting virtual int accept (be_visitor *visitor); @@ -71,11 +76,14 @@ protected: int compute_size_type (void); // compute the size type if it is unknown - int compute_argument_count (void); + int compute_argument_attr (void); // count the number of arguments int argument_count_; - // number of argument + // number of arguments + + int has_native_; + // Is any argument of type native. }; #endif diff --git a/TAO/TAO_IDL/be_include/be_predefined_type.h b/TAO/TAO_IDL/be_include/be_predefined_type.h index 9afb62b3ec3..7b0d6c8406f 100644 --- a/TAO/TAO_IDL/be_include/be_predefined_type.h +++ b/TAO/TAO_IDL/be_include/be_predefined_type.h @@ -71,8 +71,12 @@ public: virtual long tc_encap_len (void); // return length of encapsulation + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting - virtual int accept (be_visitor *visitor); + virtual int accept (be_visitor* visitor); // Narrowing DEF_NARROW_METHODS2 (be_predefined_type, AST_PredefinedType, be_type); diff --git a/TAO/TAO_IDL/be_include/be_scope.h b/TAO/TAO_IDL/be_include/be_scope.h index 0a17593a99c..c5509438613 100644 --- a/TAO/TAO_IDL/be_include/be_scope.h +++ b/TAO/TAO_IDL/be_include/be_scope.h @@ -71,6 +71,9 @@ public: virtual void comma (unsigned short set); // set the comma producing state + int comma (void) const; + // get the comma producing state + virtual be_decl *decl (void); // return the be_decl node corresponding to this scope node diff --git a/TAO/TAO_IDL/be_include/be_sequence.h b/TAO/TAO_IDL/be_include/be_sequence.h index ede7010e89d..eeec67624c3 100644 --- a/TAO/TAO_IDL/be_include/be_sequence.h +++ b/TAO/TAO_IDL/be_include/be_sequence.h @@ -117,6 +117,10 @@ public: virtual be_decl *decl (void); // overridden method on the be_scope class + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting virtual int accept (be_visitor *visitor); diff --git a/TAO/TAO_IDL/be_include/be_string.h b/TAO/TAO_IDL/be_include/be_string.h index 30f26043b31..0121bcf1216 100644 --- a/TAO/TAO_IDL/be_include/be_string.h +++ b/TAO/TAO_IDL/be_include/be_string.h @@ -68,6 +68,10 @@ public: virtual long tc_encap_len (void); // return length of encapsulation + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting virtual int accept (be_visitor *visitor); diff --git a/TAO/TAO_IDL/be_include/be_structure.h b/TAO/TAO_IDL/be_include/be_structure.h index be9240dfb64..d1521ea9d25 100644 --- a/TAO/TAO_IDL/be_include/be_structure.h +++ b/TAO/TAO_IDL/be_include/be_structure.h @@ -82,6 +82,10 @@ public: virtual int member_count (void); // return the count of members + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting virtual int accept (be_visitor *visitor); diff --git a/TAO/TAO_IDL/be_include/be_type.h b/TAO/TAO_IDL/be_include/be_type.h index 39834b02b9c..8b572b19245 100644 --- a/TAO/TAO_IDL/be_include/be_type.h +++ b/TAO/TAO_IDL/be_include/be_type.h @@ -20,6 +20,8 @@ #if !defined (BE_TYPE_H) #define BE_TYPE_H +class TAO_OutStream; + /* * BE_Type */ @@ -77,8 +79,25 @@ public: virtual char *nested_type_name (be_decl *d, char *suffix = 0); // type name of a node used when generating declarations + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // Different types have different mappings as return values, for + // instance interfaces are returned by reference (_ptr), but basic + // types by value. + // Typedefs are tricky, their mapping depend on the real type they + // are aliasing, but the name should be the typedef name, hence + // typedefs delegate on their base type, but pass their nodes down + // so the real name can be generated; hence the <type> parameter. + // This method writes the type as a return value on the stream. + + virtual AST_Decl::NodeType base_node_type (void) const; + // Typedefs are tricky to handle, in many points their mapping + // depend on base type they are aliasing. Since typedefs can be + // recursive simply using "base_type->node_type()" will not work, so + // the most "unaliased" type is needed. + // Visiting - virtual int accept (be_visitor *visitor); + virtual int accept (be_visitor* visitor); // Narrowing DEF_NARROW_METHODS2 (be_type, AST_Type, be_decl); diff --git a/TAO/TAO_IDL/be_include/be_typedef.h b/TAO/TAO_IDL/be_include/be_typedef.h index ce8802dab53..3afda4d7125 100644 --- a/TAO/TAO_IDL/be_include/be_typedef.h +++ b/TAO/TAO_IDL/be_include/be_typedef.h @@ -69,6 +69,14 @@ public: virtual long tc_encap_len (void); // return length of encapsulation + virtual AST_Decl::NodeType base_node_type (void) const; + // Return the most "unaliased" type node for the base type (see + // be_type.h). + + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting virtual int accept (be_visitor *visitor); diff --git a/TAO/TAO_IDL/be_include/be_union.h b/TAO/TAO_IDL/be_include/be_union.h index 7104b2403c9..93555e10b0d 100644 --- a/TAO/TAO_IDL/be_include/be_union.h +++ b/TAO/TAO_IDL/be_include/be_union.h @@ -84,6 +84,10 @@ public: virtual int default_index (void); // return the default index used + virtual int write_as_return (TAO_OutStream *stream, + be_type *type); + // write the mapping as a return value on the stream. + // Visiting virtual int accept (be_visitor *visitor); diff --git a/TAO/TAO_IDL/be_include/be_visitor_args.h b/TAO/TAO_IDL/be_include/be_visitor_args.h index 9c1890f9118..6f2b7e8a4b3 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_args.h +++ b/TAO/TAO_IDL/be_include/be_visitor_args.h @@ -43,6 +43,9 @@ public: virtual int visit_typedef (be_typedef *node); virtual int visit_native (be_native *node); + void argument_direction (int direction); + void current_type_name (UTL_ScopedName* name); + private: TAO_OutStream& stream (void) const; diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface.h b/TAO/TAO_IDL/be_include/be_visitor_interface.h index 33b370cfbf9..dce8faf3a61 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface.h @@ -35,8 +35,7 @@ public: virtual int visit_interface (be_interface *node); virtual int visit_operation (be_operation *node); - // virtual int visit_argument (be_argument *node); - // virtual int visit_attribute (be_attribute *node); + virtual int visit_attribute (be_attribute *node); }; class be_visitor_collocated_ss : public be_visitor @@ -51,7 +50,7 @@ public: virtual int visit_interface (be_interface *node); virtual int visit_operation (be_operation *node); virtual int visit_argument (be_argument *node); - // virtual int visit_attribute (be_attribute *node); + virtual int visit_attribute (be_attribute *node); private: be_interface* current_interface_; diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp index 3e934756171..2cc5d88addc 100644 --- a/TAO/TAO_IDL/fe/y.tab.cpp +++ b/TAO/TAO_IDL/fe/y.tab.cpp @@ -837,10 +837,6 @@ char * yyreds[] = * Copyright (c) 1993 by Sun Microsystems, Inc. */ -#if !defined (ACE_WIN32) -#pragma ident "@(#)yaccpar 6.12 93/06/07 SMI" -#endif /* ACE_WIN32 */ - /* ** Skeleton parser driver for yacc output */ diff --git a/TAO/TAO_IDL/util/utl_identifier.cpp b/TAO/TAO_IDL/util/utl_identifier.cpp index 458fcc20c5c..750810be112 100644 --- a/TAO/TAO_IDL/util/utl_identifier.cpp +++ b/TAO/TAO_IDL/util/utl_identifier.cpp @@ -83,7 +83,11 @@ Identifier::Identifier (char *s, long, long, long) Identifier::~Identifier () { - delete pv_string; + if (this->pv_string != 0) + { + // The string was allocated using strdup, which uses malloc. + ACE_OS::free (this->pv_string); + } } // Operations diff --git a/TAO/docs/releasenotes/orbcore.html b/TAO/docs/releasenotes/orbcore.html index bf393d789b3..0ceb92f25e0 100644 --- a/TAO/docs/releasenotes/orbcore.html +++ b/TAO/docs/releasenotes/orbcore.html @@ -393,6 +393,12 @@ <li>Compile and verify ACE and TAO on Linux using the Kuck and Associates, Inc. (KAI) compiler tools.</li> + <LI>CORBA::TypeCode is causing a memory leak. Since objects + of this type are rather static in nature, this is + currently not a big deal. However, it should be fixed + soon. </LI> + <LI>CORBA_Exception::Release is not working correctly as the + memory is never really freed. </LI> </ol> </li> diff --git a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp index dfcd8010711..fc8372e0691 100644 --- a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp +++ b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp @@ -18,29 +18,39 @@ int main (int argc, char *argv[]) TAO_TRY { // Initialize ORB. - CORBA::ORB_ptr orb = - CORBA::ORB_init (argc, argv, "dump_schedule", TAO_TRY_ENV); + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); TAO_CHECK_ENV; - CORBA::POA_ptr poa = - orb->POA_init(argc, argv, "POA"); - if (poa == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - } + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + if (poa_object == 0) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); - CORBA::Object_ptr objref = - orb->resolve_initial_references ("NameService"); + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object, TAO_TRY_ENV); + TAO_CHECK_ENV; + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); TAO_CHECK_ENV; + + CORBA::Object_var naming_obj = + orb->resolve_initial_references ("NameService"); + if (naming_obj == 0) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (objref, TAO_TRY_ENV); + CosNaming::NamingContext::_narrow (naming_obj, TAO_TRY_ENV); TAO_CHECK_ENV; - ACE_Scheduler_Factory::use_config (naming_context.ptr ()); + ACE_Scheduler_Factory::use_config (naming_context.in ()); - RtecScheduler::RT_Info_Set* infos; + RtecScheduler::RT_Info_Set_var infos; ACE_Scheduler_Factory::server ()->compute_scheduling (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, ACE_SCOPE_THREAD), @@ -49,9 +59,8 @@ int main (int argc, char *argv[]) infos, TAO_TRY_ENV); TAO_CHECK_ENV; - ACE_Scheduler_Factory::dump_schedule (*infos, + ACE_Scheduler_Factory::dump_schedule (infos.in (), "Scheduler_Runtime.cpp"); - delete infos; } TAO_CATCH (CORBA::SystemException, sys_ex) { diff --git a/TAO/orbsvcs/Event_Service/Dispatching_Modules.cpp b/TAO/orbsvcs/Event_Service/Dispatching_Modules.cpp index d0359fbb287..e9a0041044d 100644 --- a/TAO/orbsvcs/Event_Service/Dispatching_Modules.cpp +++ b/TAO/orbsvcs/Event_Service/Dispatching_Modules.cpp @@ -10,10 +10,6 @@ #include "Dispatching_Modules.i" #endif /* __ACE_INLINE__ */ -typedef ACE_EventChannel::DISPATCH_ERROR DISPATCH_ERROR; -typedef ACE_EventChannel::SYNCHRONIZATION_ERROR SYNC_ERROR; -typedef ACE_EventChannel::QOS_ERROR QOS_ERROR; - // ************************************************************ void diff --git a/TAO/orbsvcs/Event_Service/Event_Channel.cpp b/TAO/orbsvcs/Event_Service/Event_Channel.cpp index fa3fd4bc33f..87d01ed7869 100644 --- a/TAO/orbsvcs/Event_Service/Event_Channel.cpp +++ b/TAO/orbsvcs/Event_Service/Event_Channel.cpp @@ -1,6 +1,7 @@ // $Id$ + #include "ace/Service_Config.h" #include "orbsvcs/Scheduler_Factory.h" @@ -376,7 +377,6 @@ ACE_ES_Event_Container::dump (void) ACE_Push_Supplier_Proxy::ACE_Push_Supplier_Proxy (ACE_ES_Supplier_Module *sm) : supplier_module_ (sm), - me_ (this), push_supplier_ (0) { } @@ -454,8 +454,7 @@ ACE_Push_Supplier_Proxy::shutdown (void) // ************************************************************ ACE_Push_Consumer_Proxy::ACE_Push_Consumer_Proxy (ACE_ES_Consumer_Module *cm) - : me_ (this), - push_consumer_ (0), + : push_consumer_ (0), consumer_module_ (cm) { } @@ -526,25 +525,16 @@ ACE_Push_Consumer_Proxy::shutdown (void) // ************************************************************ ACE_EventChannel::ACE_EventChannel (u_long type) - : POA_RtecEventChannelAdmin::EventChannel ("EventChannel"), - rtu_manager_ (0), + : rtu_manager_ (0), type_ (type), state_ (INITIAL_STATE), - me_ (this), destroyed_ (0) { consumer_module_ = new ACE_ES_Consumer_Module (this); // RtecEventChannelAdmin::ConsumerAdmin_duplicate(consumer_module_); -#if defined(ACE_ES_LACKS_ORB) - UPSSingleProcessorOrb_startup(type, - dispatching_module, - rtu_active, - rtu_manager); -#else ACE_NEW(dispatching_module_, ACE_ES_Priority_Dispatching(this, THREADS_PER_DISPATCH_QUEUE)); -#endif correlation_module_ = new ACE_ES_Correlation_Module (this); subscription_module_ = new ACE_ES_Subscription_Module (this); @@ -605,15 +595,11 @@ ACE_EventChannel::destroy (CORBA::Environment &_env) Shutdown_Channel *sc = new Shutdown_Channel (this); if (sc == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO: Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_EventChannel::destroy")); // Create a wrapper around the dispatch request. Flush_Queue_ACT *act = new Flush_Queue_ACT (sc, dispatching_module_); if (act == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_EventChannel::destroy")); // Set a 100ns timer. if (this->timer ()->schedule_timer (0, // no rt-info @@ -868,18 +854,10 @@ ACE_ES_Subscription_Info::insert_or_fail (Subscriber_Map &type_map, // ************************************************************ -typedef ACE_EventChannel::SYNCHRONIZATION_ERROR SYNC_ERROR; -typedef ACE_EventChannel::QOS_ERROR QOS_ERROR; -typedef ACE_EventChannel::SUBSCRIPTION_ERROR SUBSCRIPTION_ERROR; -typedef ACE_EventChannel::CORRELATION_ERROR CORRELATION_ERROR; - -// ************************************************************ - ACE_ES_Consumer_Module::ACE_ES_Consumer_Module (ACE_EventChannel* channel) : lock_ (), all_consumers_ (), channel_ (channel), - me_ (this), down_ (0) { } @@ -956,8 +934,8 @@ ACE_ES_Consumer_Module::shutdown (void) iter.advance ()) { (*proxy)->shutdown (); - CORBA::release (*proxy); - // Shouldn't this be _release () + // @@ Cannnot use CORBA::release (*proxy), since it is a servant. + delete *proxy; // Remove the consumer from our list. { @@ -982,9 +960,7 @@ ACE_ES_Consumer_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer, { ACE_ES_GUARD ace_mon (lock_); if (ace_mon.locked () == 0) - TAO_THROW (SYNC_ERROR); - // @@ TODO Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_ES_Consumer_Module::disconnected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR); if (all_consumers_.remove (consumer) == -1) return; @@ -1008,15 +984,11 @@ ACE_ES_Consumer_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer, Shutdown_Consumer *sc = new Shutdown_Consumer (this, consumer); if (sc == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Consumer_Module::disconnected")); // Create a wrapper around the dispatch request. Flush_Queue_ACT *act = new Flush_Queue_ACT (sc, channel_->dispatching_module_); if (act == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Consumer_Module::disconnecting")); ACE_DEBUG ((LM_DEBUG, "(%t) initiating consumer disconnect.\n")); @@ -1071,8 +1043,6 @@ ACE_ES_Consumer_Module::obtain_push_supplier (CORBA::Environment &_env) ACE_ERROR ((LM_ERROR, "ACE_EventChannel" "::obtain_push_supplier failed.\n")); TAO_THROW_RETURN (CORBA::NO_MEMORY (CORBA::COMPLETED_NO), 0); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Consumer_Module::obtain_push_supplier")); } { @@ -1080,10 +1050,7 @@ ACE_ES_Consumer_Module::obtain_push_supplier (CORBA::Environment &_env) if (ace_mon.locked () == 0) { delete new_consumer; - TAO_THROW_RETURN (SYNC_ERROR, 0); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, - // "ACE_ES_Consumer_Module::obtain_push_supplier"), 0); + TAO_THROW_RETURN (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, 0); } if (all_consumers_.insert (new_consumer) == -1) @@ -1117,9 +1084,7 @@ ACE_ES_Correlation_Module::connected (ACE_Push_Consumer_Proxy *consumer, { // Initialize the consumer correlation filter. if (consumer->correlation ().connected (consumer, this) == -1) - TAO_THROW (CORRELATION_ERROR); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Correlation_Module::connected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::CORRELATION_ERROR); } void @@ -1830,9 +1795,7 @@ ACE_ES_Subscription_Module::connected (ACE_Push_Supplier_Proxy *supplier, { ACE_ES_WGUARD ace_mon (lock_); if (ace_mon.locked () == 0) - TAO_THROW (SYNC_ERROR); - // @@ TODO: Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_ES_Subscription_Module::connected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR); if (all_suppliers_.insert (supplier) == -1) ACE_ERROR ((LM_ERROR, "ACE_ES_Subscription_Module insert failed.\n")); @@ -1968,14 +1931,10 @@ ACE_ES_Subscription_Module::disconnecting (ACE_Push_Supplier_Proxy *supplier, { ACE_ES_WGUARD ace_mon (lock_); if (ace_mon.locked () == 0) - TAO_THROW (SYNC_ERROR); - // @@ TODO: Orbix parameters - // (0, CORBA::COMPLETED_NO, "ACE_ES_Subscription_Module::disconnected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR); if (all_suppliers_.remove (supplier) == -1) - TAO_THROW (SUBSCRIPTION_ERROR); - // @@ TODO: Orbix parameters. - // (0, CORBA::COMPLETED_NO, "ACE_ES_Subscription_Module remove failed")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR); // Remove all consumers from the supplier's source-based subscription lists. ACE_ES_Subscription_Info::Subscriber_Set_Iterator source_iterator @@ -2495,7 +2454,6 @@ ACE_ES_Subscription_Module::shutdown (void) ACE_ES_Supplier_Module::ACE_ES_Supplier_Module (ACE_EventChannel *channel) : all_suppliers_ (), lock_ (), - me_ (this), up_ (0), channel_ (channel) { @@ -2523,14 +2481,10 @@ ACE_ES_Supplier_Module::disconnecting (ACE_Push_Supplier_Proxy *supplier, { ACE_ES_GUARD ace_mon (lock_); if (ace_mon.locked () == 0) - TAO_THROW (SYNC_ERROR); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Supplier_Module::disconnected")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR); if (all_suppliers_.remove (supplier) == -1) - TAO_THROW (SUBSCRIPTION_ERROR); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Supplier_Module remove failed")); + TAO_THROW (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR); up_->disconnecting (supplier, _env); @@ -2584,18 +2538,13 @@ ACE_ES_Supplier_Module::obtain_push_consumer (CORBA::Environment &_env) if (new_supplier == 0) TAO_THROW_RETURN (CORBA::NO_MEMORY (CORBA::COMPLETED_NO), 0); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, "ACE_ES_Supplier_Module::obtain_push_consumer")); { ACE_ES_GUARD ace_mon (lock_); if (ace_mon.locked () == 0) { delete new_supplier; - TAO_THROW_RETURN (SYNC_ERROR, 0); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, - // "ACE_ES_Supplier_Module::obtain_push_consumer"), 0); + TAO_THROW_RETURN (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, 0); } if (all_suppliers_.insert (new_supplier) == -1) @@ -2620,9 +2569,6 @@ ACE_ES_Supplier_Module::push (ACE_Push_Supplier_Proxy *proxy, if (temp == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - // @@ TODO Orbix parameters: - // (0, CORBA::COMPLETED_NO, - // "ACE_ES_Supplier_Module::obtain_push_consumer")); // This will guarantee that release gets called when we exit // the scope. diff --git a/TAO/orbsvcs/Event_Service/Event_Channel.h b/TAO/orbsvcs/Event_Service/Event_Channel.h index da26e4cf0e6..9d5f798f242 100644 --- a/TAO/orbsvcs/Event_Service/Event_Channel.h +++ b/TAO/orbsvcs/Event_Service/Event_Channel.h @@ -235,9 +235,6 @@ private: ACE_ES_MUTEX lock_; // Used to lock shared state. - RtecEventChannelAdmin::EventChannel_ptr me_; - // CORBA reference to self. - int destroyed_; // Ensures this->destory is executed only once. }; @@ -862,8 +859,6 @@ private: ACE_EventChannel *channel_; // Used to test for shutdown. - RtecEventChannelAdmin::ConsumerAdmin_ptr me_; - ACE_ES_Dispatching_Module *down_; // Next module down. }; @@ -1126,8 +1121,6 @@ private: ACE_ES_MUTEX lock_; // Protects access to all_suppliers_ and type_suppliers_; - RtecEventChannelAdmin::SupplierAdmin_ptr me_; - ACE_ES_Subscription_Module *up_; ACE_EventChannel *channel_; @@ -1208,9 +1201,6 @@ private: RtecEventComm::EventSourceID source_id_; // We keep a proxy of the Supplier source_id_; - RtecEventChannelAdmin::ProxyPushConsumer_ptr me_; - // CORBA reference to self. - RtecEventComm::PushSupplier_ptr push_supplier_; // CORBA reference to remote push supplier. }; @@ -1280,9 +1270,6 @@ private: // A hook so that the Correlation Module can associate correlation // information with the consumer. - RtecEventChannelAdmin::ProxyPushSupplier_ptr me_; - // CORBA reference to self. - RtecEventComm::PushConsumer_ptr push_consumer_; // Reference to our push consumer. diff --git a/TAO/orbsvcs/Event_Service/Event_Channel.i b/TAO/orbsvcs/Event_Service/Event_Channel.i index 5aa3fb8453a..4e1eb79db94 100644 --- a/TAO/orbsvcs/Event_Service/Event_Channel.i +++ b/TAO/orbsvcs/Event_Service/Event_Channel.i @@ -14,7 +14,8 @@ const unsigned int ACE_INT2BIT[32] = ACE_INLINE RtecEventChannelAdmin::ProxyPushConsumer_ptr ACE_Push_Supplier_Proxy::get_ref (void) { - return RtecEventChannelAdmin::ProxyPushConsumer::_duplicate(me_); + CORBA::Environment env; + return this->_this (env); } ACE_INLINE int @@ -53,7 +54,8 @@ ACE_Push_Supplier_Proxy::source_id (void) ACE_INLINE RtecEventChannelAdmin::ProxyPushSupplier_ptr ACE_Push_Consumer_Proxy::get_ref (void) { - return RtecEventChannelAdmin::ProxyPushSupplier::_duplicate(me_); + CORBA::Environment env; + return this->_this (env); } ACE_INLINE RtecEventChannelAdmin::ConsumerQOS & @@ -109,13 +111,15 @@ ACE_Push_Consumer_Proxy::correlation (void) ACE_INLINE RtecEventChannelAdmin::ConsumerAdmin_ptr ACE_ES_Consumer_Module::get_ref (void) { - return RtecEventChannelAdmin::ConsumerAdmin::_duplicate(me_); + CORBA::Environment env; + return this->_this (env); } ACE_INLINE RtecEventChannelAdmin::SupplierAdmin_ptr ACE_ES_Supplier_Module::get_ref (void) { - return RtecEventChannelAdmin::SupplierAdmin::_duplicate(me_); + CORBA::Environment env; + return this->_this (env); } // ************************************************** @@ -123,7 +127,8 @@ ACE_ES_Supplier_Module::get_ref (void) ACE_INLINE RtecEventChannelAdmin::EventChannel_ptr ACE_EventChannel::get_ref (void) { - return RtecEventChannelAdmin::EventChannel::_duplicate(me_); + CORBA::Environment env; + return this->_this (env); } ACE_INLINE RtecEventChannelAdmin::SupplierAdmin_ptr diff --git a/TAO/orbsvcs/Event_Service/Event_Service.cpp b/TAO/orbsvcs/Event_Service/Event_Service.cpp index 44177359cca..6e40b7b46b4 100644 --- a/TAO/orbsvcs/Event_Service/Event_Service.cpp +++ b/TAO/orbsvcs/Event_Service/Event_Service.cpp @@ -17,51 +17,63 @@ int main (int argc, char *argv[]) TAO_TRY { // Initialize ORB. - CORBA::ORB_ptr orb = + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); TAO_CHECK_ENV; - CORBA::POA_ptr poa = - orb->POA_init(argc, argv, "POA"); - if (poa == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - } + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + if (poa_object == 0) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); - CORBA::Object_ptr objref = - orb->resolve_initial_references ("NameService"); + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object, TAO_TRY_ENV); TAO_CHECK_ENV; - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (objref, TAO_TRY_ENV); + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, "got reference to NameService\n")); + CORBA::Object_var naming_obj = + orb->resolve_initial_references ("NameService"); + if (naming_obj == 0) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); - ACE_Scheduler_Factory::use_config (naming_context.ptr ()); + CosNaming::NamingContext_var naming_context = + CosNaming::NamingContext::_narrow (naming_obj, TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_Scheduler_Factory::use_config (naming_context.in ()); // Register Event_Service with Naming Service. - ACE_EventChannel* ec; - ACE_NEW_RETURN (ec, ACE_EventChannel, -1); - CORBA::Object::_duplicate(ec); + ACE_EventChannel ec_impl; + + RtecEventChannelAdmin::EventChannel_var ec = + ec_impl._this (TAO_TRY_ENV); TAO_CHECK_ENV; - CORBA::String str = - orb->object_to_string (ec, TAO_TRY_ENV); - ACE_OS::puts ((char *) str); + CORBA::String_var str = + orb->object_to_string (ec.in (), TAO_TRY_ENV); + + ACE_DEBUG ((LM_DEBUG, "The EC IOR is <%s>\n", str.in ())); CosNaming::Name channel_name (1); - channel_name[0].id = CORBA::string_dup ("EventService"); channel_name.length (1); + channel_name[0].id = CORBA::string_dup ("EventService"); naming_context->bind (channel_name, ec, TAO_TRY_ENV); TAO_CHECK_ENV; - orb->run (); - - CORBA::release (ec); + poa_manager->activate (TAO_TRY_ENV); TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, "running scheduling service\n")); + if (orb->run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1); + } TAO_CATCHANY { diff --git a/TAO/orbsvcs/Naming_Service/CosNaming_i.cpp b/TAO/orbsvcs/Naming_Service/CosNaming_i.cpp index 3de2f8155f4..1450ad12b82 100644 --- a/TAO/orbsvcs/Naming_Service/CosNaming_i.cpp +++ b/TAO/orbsvcs/Naming_Service/CosNaming_i.cpp @@ -16,14 +16,6 @@ #include "CosNaming_i.h" -NS_NamingContext::NS_NamingContext (const char *key) - : POA_CosNaming::NamingContext (key) -{ - if (context_.open (NS_MAP_SIZE) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "NS_NamingContext")); - // deal with fault -} - NS_NamingContext::NS_NamingContext (void) { if (context_.open (NS_MAP_SIZE) == -1) @@ -92,7 +84,6 @@ NS_NamingContext::bind (const CosNaming::Name& n, { IT_env.clear (); - cout << "sizeof Naming Component = %d\n" << sizeof (CosNaming::NameComponent) << endl; // get the length of the name CORBA::ULong len = n.length (); @@ -147,7 +138,7 @@ NS_NamingContext::rebind (const CosNaming::Name& n, if (len == 0) { IT_env.clear (); - IT_env.exception (new POA_CosNaming::NamingContext::InvalidName); + IT_env.exception (new CosNaming::NamingContext::InvalidName); return; } @@ -370,34 +361,32 @@ NS_NamingContext::unbind (const CosNaming::Name& n, } } } - -CosNaming::NamingContext_ptr -NS_NamingContext::new_context (CORBA::Environment &IT_env) + +CosNaming::NamingContext_ptr +NS_NamingContext::new_context (CORBA::Environment &_env) { - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (IT_env); NS_NamingContext *c = new NS_NamingContext; - return NS_NamingContext::_duplicate (c); + return c->_this (_env); } - -CosNaming::NamingContext_ptr -NS_NamingContext::bind_new_context (const CosNaming::Name& n, - CORBA::Environment &IT_env) + +CosNaming::NamingContext_ptr +NS_NamingContext::bind_new_context (const CosNaming::Name& n, + CORBA::Environment &_env) { NS_NamingContext *c = new NS_NamingContext; - bind_context (n, c, IT_env); - - // release object if exception occurs. - if (IT_env.exception () != 0) + bind_context (n, c->_this (_env), _env); + + // release object if exception occurs. + if (_env.exception () != 0) { - CORBA::release (c); + delete c; return CosNaming::NamingContext::_nil (); } - - return NS_NamingContext::_duplicate (c); + + return c->_this (_env); } void @@ -413,16 +402,13 @@ NS_NamingContext::destroy (CORBA::Environment &IT_env) // destroy context CORBA::release (tie_ref_); } - -void -NS_NamingContext::list (CORBA::ULong how_many, - CosNaming::BindingList_out bl, - CosNaming::BindingIterator_out bi, - CORBA::Environment &IT_env) + +void +NS_NamingContext::list (CORBA::ULong how_many, + CosNaming::BindingList_out bl, + CosNaming::BindingIterator_out bi, + CORBA::Environment &) { - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (IT_env); - // Dynamically allocate hash map iterator. NS_NamingContext::HASH_MAP::ITERATOR *hash_iter = new NS_NamingContext::HASH_MAP::ITERATOR (context_); @@ -441,7 +427,7 @@ NS_NamingContext::list (CORBA::ULong how_many, ACE_UNUSED_ARG (bind_iter); // bind_iter->initialize (bi); - CosNaming::BindingIterator::_duplicate (bi); + CosNaming::BindingIterator::_duplicate (bi); n = how_many; } diff --git a/TAO/orbsvcs/Naming_Service/CosNaming_i.h b/TAO/orbsvcs/Naming_Service/CosNaming_i.h index e0358929eb6..351df038cfe 100644 --- a/TAO/orbsvcs/Naming_Service/CosNaming_i.h +++ b/TAO/orbsvcs/Naming_Service/CosNaming_i.h @@ -43,9 +43,6 @@ class NS_NamingContext : public POA_CosNaming::NamingContext NS_NamingContext (void); // default constructor. - NS_NamingContext (const char *key); - // constructor - ~NS_NamingContext (void); // destructor. diff --git a/TAO/orbsvcs/Naming_Service/NS_CosNaming.cpp b/TAO/orbsvcs/Naming_Service/NS_CosNaming.cpp index 6cc90cacb95..6c2c45fe1e5 100644 --- a/TAO/orbsvcs/Naming_Service/NS_CosNaming.cpp +++ b/TAO/orbsvcs/Naming_Service/NS_CosNaming.cpp @@ -2,13 +2,13 @@ // // = LIBRARY // cos -// +// // = FILENAME // NS_CosNaming.C // // = AUTHOR // Marina Spivak <marina@cs.wustl.edu> -// +// // ============================================================================ #include "NS_CosNaming.h" @@ -23,7 +23,7 @@ NS_IntId::NS_IntId (CORBA::Object_ptr obj, CosNaming::BindingType type) : type_ (type) { - ref_ = CORBA::Object::_duplicate (obj); + ref_ = CORBA::Object::_duplicate (obj); } NS_IntId::NS_IntId (const NS_IntId &rhs) @@ -37,7 +37,7 @@ NS_IntId::~NS_IntId (void) CORBA::release (ref_); } -void +void NS_IntId::operator= (const NS_IntId &rhs) { // check for self assignment. @@ -45,7 +45,7 @@ NS_IntId::operator= (const NS_IntId &rhs) return; type_ = rhs.type_; - + CORBA::release (ref_); ref_ = CORBA::Object::_duplicate (rhs.ref_); } @@ -56,7 +56,7 @@ NS_ExtId::NS_ExtId (void) { } -NS_ExtId::NS_ExtId (const char *id, +NS_ExtId::NS_ExtId (const char *id, const char *kind) : kind_ (kind), id_ (id) @@ -66,14 +66,14 @@ NS_ExtId::NS_ExtId (const char *id, NS_ExtId::NS_ExtId (const NS_ExtId &rhs) { id_ = rhs.id_; - kind_ = rhs.kind_; + kind_ = rhs.kind_; } NS_ExtId::~NS_ExtId (void) { } -void +void NS_ExtId::operator= (const NS_ExtId &rhs) { // Check for self assignment. @@ -81,16 +81,16 @@ NS_ExtId::operator= (const NS_ExtId &rhs) return; id_ = rhs.id_; - kind_ = rhs.kind_; + kind_ = rhs.kind_; } - -int + +int NS_ExtId::operator== (const NS_ExtId &rhs) const { return id_ == rhs.id_ && kind_ == rhs.kind_; } -int +int NS_ExtId::operator!= (const NS_ExtId &rhs) const { return id_ != rhs.id_ || kind_ != rhs.kind_; @@ -104,4 +104,3 @@ NS_ExtId::hash (void) const return temp.hash (); } - diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp b/TAO/orbsvcs/Naming_Service/Naming_Service.cpp index 7abea35852a..36152b29adb 100644 --- a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp +++ b/TAO/orbsvcs/Naming_Service/Naming_Service.cpp @@ -52,7 +52,7 @@ IOR_Multicast::handle_input (ACE_HANDLE) if (retcode == -1) return -1; - ACE_DEBUG ((LM_DEBUG, "Received multicast.\n")); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Received multicast.\n")); // @@ validate data string received is from a valid client here // @@ Probably not needed @@ -78,7 +78,9 @@ IOR_Multicast::handle_input (ACE_HANDLE) 0); ACE_DEBUG ((LM_DEBUG, - "ior_ '%s' sent through port %u.\nretcode=%d\n", + "(%P|%t) ior_: <%s>\n" + " sent through port %u.\n" + "retcode=%d\n", this->ior_, this->remote_addr_.get_port_number (), retcode)); @@ -89,87 +91,129 @@ IOR_Multicast::handle_input (ACE_HANDLE) return 0; } - int main (int argc, char ** argv) { - CORBA::Environment env; - char *orb_name = "internet"; - - CORBA::ORB_ptr orb_ptr = CORBA::ORB_init (argc, - argv, - orb_name, - env); - - if (env.exception () != 0) + TAO_TRY { - env.print_exception ("ORB init"); - return 1; - } - - // Initialize the Object Adapter - CORBA::POA_ptr oa_ptr = orb_ptr->POA_init (argc, argv, "POA"); - - if (oa_ptr == 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - // Create a naming context object. - NS_NamingContext *naming_context = new NS_NamingContext ("NameService"); + CORBA::ORB_var orb = CORBA::ORB_init (argc, + argv, + "internet", + TAO_TRY_ENV); + TAO_CHECK_ENV; + + // Initialize the Object Adapter + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + if (poa_object == 0) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object, TAO_TRY_ENV); + TAO_CHECK_ENV; + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); + TAO_CHECK_ENV; + + // We use a different POA. The RootPOA lifespan policy is + // "TRANSIENT", hence whatever object key we export (for + // instance in an environment variable) is invalid next time we + // run. To avoid this (and make the user life easier) we create + // a new POA: - // Stringify the objref we'll be implementing, and print it to - // stdout. Someone will take that string and give it to a - // client. Then release the object. - CORBA::String str; - str = ACE_OS::strdup (orb_ptr->object_to_string (naming_context, env)); - - if (env.exception () != 0) - { - env.print_exception ("object2string"); - return 1; - } - - ACE_DEBUG ((LM_DEBUG, "listening as object '%s'\n", str)); + PortableServer::PolicyList policies (2); + policies.length (2); + policies[0] = + root_poa->create_id_assignment_policy (PortableServer::USER_ID, + TAO_TRY_ENV); + policies[1] = + root_poa->create_lifespan_policy (PortableServer::PERSISTENT, + TAO_TRY_ENV); + + PortableServer::POA_var good_poa = + root_poa->create_POA ("RootPOA_is_BAD", + poa_manager.in (), + policies, + TAO_TRY_ENV); + TAO_CHECK_ENV; + + // Create a naming context object. + NS_NamingContext naming_context_impl; + + PortableServer::ObjectId_var id = + PortableServer::string_to_ObjectId ("NameService"); + good_poa->activate_object_with_id (id.in (), + &naming_context_impl, + TAO_TRY_ENV); + TAO_CHECK_ENV; + + // Stringify the objref we'll be implementing, and print it to + // stdout. Someone will take that string and give it to a + // client. Then release the object. + CORBA::Object_var obj = + good_poa->id_to_reference (id.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + CORBA::String_var str = + orb->object_to_string (obj.in (), + TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, "listening as object <%s>\n", str.in ())); #if defined (ACE_HAS_IP_MULTICAST) - // get reactor instance from TAO - ACE_Reactor *reactor = TAO_ORB_Core_instance ()->reactor (); + // get reactor instance from TAO + ACE_Reactor *reactor = TAO_ORB_Core_instance ()->reactor (); - // First, see if the user has given us a multicast port number - // for the name service on the command-line; - u_short port = TAO_ORB_Core_instance ()->orb_params ()->name_service_port (); - if (port == 0) - { - const char *port_number = ACE_OS::getenv ("NameServicePort"); - - if (port_number != 0) - port = ACE_OS::atoi (port_number); - } - - if (port == 0) - port = TAO_DEFAULT_NAME_SERVER_REQUEST_PORT; - - // Instantiate a server which will receive requests for an ior - IOR_Multicast ior_multicast (str, - port, - ACE_DEFAULT_MULTICAST_ADDR); - - // register event handler for the ior multicast. - if (reactor->register_handler (&ior_multicast, - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); + // First, see if the user has given us a multicast port number + // for the name service on the command-line; + u_short port = TAO_ORB_Core_instance ()->orb_params ()->name_service_port (); + if (port == 0) + { + const char *port_number = ACE_OS::getenv ("NameServicePort"); + + if (port_number != 0) + port = ACE_OS::atoi (port_number); + } + + if (port == 0) + port = TAO_DEFAULT_NAME_SERVER_REQUEST_PORT; + + // Instantiate a server which will receive requests for an ior + IOR_Multicast ior_multicast (str, + port, + ACE_DEFAULT_MULTICAST_ADDR); + + // register event handler for the ior multicast. + if (reactor->register_handler (&ior_multicast, + ACE_Event_Handler::READ_MASK) == -1) + ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); - ACE_DEBUG ((LM_DEBUG, "The multicast server setup is done.\n")); + ACE_DEBUG ((LM_DEBUG, "The multicast server setup is done.\n")); #endif /* ACE_HAS_IP_MULTICAST */ - // Handle requests for this object until we're killed, or one of the - // methods asks us to exit. - if (orb_ptr->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); + poa_manager->activate (TAO_TRY_ENV); + TAO_CHECK_ENV; + + // Handle requests for this object until we're killed, or one of + // the methods asks us to exit. + if (orb->run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); - // free memory with "free" because we used strdup which uses malloc - ACE_OS::free (str); + root_poa->destroy (CORBA::B_TRUE, + CORBA::B_TRUE, + TAO_TRY_ENV); + TAO_CHECK_ENV; + } + TAO_CATCHANY + { + TAO_TRY_ENV.print_exception ("Naming Service"); + return 1; + } + TAO_ENDTRY; return 0; } diff --git a/TAO/orbsvcs/Scheduling_Service/Config_Scheduler.cpp b/TAO/orbsvcs/Scheduling_Service/Config_Scheduler.cpp index 768b6b1f7b7..fbce0144337 100644 --- a/TAO/orbsvcs/Scheduling_Service/Config_Scheduler.cpp +++ b/TAO/orbsvcs/Scheduling_Service/Config_Scheduler.cpp @@ -14,8 +14,7 @@ #endif /* __ACE_INLINE__ */ ACE_Config_Scheduler::ACE_Config_Scheduler (void) - : POA_RtecScheduler::Scheduler ("Scheduler_Generic"), - impl(new Scheduler_Generic) + : impl(new Scheduler_Generic) { impl->output_level (10); } diff --git a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp b/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp index a156cc558e0..b5ec3320990 100644 --- a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp +++ b/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp @@ -12,35 +12,49 @@ int main (int argc, char *argv[]) TAO_TRY { // Initialize ORB. - CORBA::ORB_ptr orb = + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); TAO_CHECK_ENV; - CORBA::POA_ptr poa = - orb->POA_init(argc, argv, "POA"); - if (poa == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - } + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + if (poa_object == 0) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); - CORBA::Object_ptr objref = - orb->resolve_initial_references ("NameService"); + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object, TAO_TRY_ENV); + TAO_CHECK_ENV; + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); TAO_CHECK_ENV; + CORBA::Object_var naming_obj = + orb->resolve_initial_references ("NameService"); + if (naming_obj == 0) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (objref, TAO_TRY_ENV); + CosNaming::NamingContext::_narrow (naming_obj, TAO_TRY_ENV); TAO_CHECK_ENV; // Create an Scheduling service servant... - ACE_Config_Scheduler *scheduler = new ACE_Config_Scheduler; - CORBA::Object::_duplicate(scheduler); + ACE_Config_Scheduler scheduler_impl; TAO_CHECK_ENV; - CORBA::String str = - orb->object_to_string (scheduler, TAO_TRY_ENV); - ACE_OS::puts ((char *) str); + RtecScheduler::Scheduler_var scheduler = + scheduler_impl._this (TAO_TRY_ENV); + TAO_CHECK_ENV; + + CORBA::String_var str = + orb->object_to_string (scheduler.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, "The scheduler IOR is <%s>\n", str.in ())); // Register the servant with the Naming Context.... CosNaming::Name schedule_name (1); @@ -49,13 +63,13 @@ int main (int argc, char *argv[]) naming_context->bind (schedule_name, scheduler, TAO_TRY_ENV); TAO_CHECK_ENV; + poa_manager->activate (TAO_TRY_ENV); + TAO_CHECK_ENV; + ACE_DEBUG ((LM_DEBUG, "running scheduling service\n")); if (orb->run () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1); - } + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1); - CORBA::release (scheduler); } TAO_CATCHANY { diff --git a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp index ffe3639d3d9..190927faa5b 100644 --- a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp +++ b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp @@ -13,8 +13,7 @@ ACE_Runtime_Scheduler:: ACE_Runtime_Scheduler (int entry_count, RtecScheduler::RT_Info* rt_info[]) -: POA_RtecScheduler::Scheduler ("Static_Scheduler"), - entry_count_ (entry_count), +: entry_count_ (entry_count), rt_info_ (rt_info) { } diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp index 681470630e8..b6abd44a072 100644 --- a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp @@ -68,9 +68,16 @@ RtecScheduler::Scheduler_ptr static_server () info[i]->subpriority = rt_info[i].subpriority; info[i]->preemption_priority = rt_info[i].preemption_priority; } - server_ = new ACE_Runtime_Scheduler (entry_count, info); + static ACE_Runtime_Scheduler scheduler(entry_count, info); + TAO_TRY + { + server_ = scheduler._this (TAO_TRY_ENV); + TAO_CHECK_ENV; - if (server_ == 0) + ACE_DEBUG ((LM_DEBUG, + "ACE_Scheduler_Factory - configured static server\n")); + } + TAO_CATCHANY { for (int i = 0; i < entry_count; ++i) { @@ -81,9 +88,7 @@ RtecScheduler::Scheduler_ptr static_server () "ACE_Scheduler_Factory::config_runtime - " "cannot allocate server\n"), 0); } - ACE_DEBUG ((LM_DEBUG, - "ACE_Scheduler_Factory - configured static server\n")); - CORBA::Object::_duplicate (server_); + TAO_ENDTRY; return server_; } diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp index 02961f65817..b71694d7458 100644 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp +++ b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp @@ -85,16 +85,21 @@ Latency_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec, this->channel_admin_ = ec; // = Connect as a consumer. - consumer_admin_ = - RtecEventChannelAdmin::ConsumerAdmin::_duplicate(channel_admin_->for_consumers (TAO_TRY_ENV)); + this->consumer_admin_ = + channel_admin_->for_consumers (TAO_TRY_ENV); TAO_CHECK_ENV; - suppliers_ = - RtecEventChannelAdmin::ProxyPushSupplier::_duplicate(consumer_admin_->obtain_push_supplier (TAO_TRY_ENV)); + + this->suppliers_ = + consumer_admin_->obtain_push_supplier (TAO_TRY_ENV); TAO_CHECK_ENV; - suppliers_->connect_push_consumer (this, - dependencies.get_ConsumerQOS (), - TAO_TRY_ENV); + RtecEventComm::PushConsumer_var objref = + this->_this (TAO_TRY_ENV); + TAO_CHECK_ENV; + + this->suppliers_->connect_push_consumer (objref.in (), + dependencies.get_ConsumerQOS (), + TAO_TRY_ENV); TAO_CHECK_ENV; } TAO_CATCH (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR, se) @@ -330,14 +335,12 @@ Latency_Supplier::Latency_Supplier (const u_int total_messages, supplier_ (new Supplier (this)), consumer_ (new Consumer (this)) { - CORBA::Object::_duplicate (this->supplier_); - CORBA::Object::_duplicate (this->consumer_); } Latency_Supplier::~Latency_Supplier (void) { - CORBA::release (this->supplier_); - CORBA::release (this->consumer_); + delete this->consumer_; + delete this->supplier_; } int @@ -348,23 +351,19 @@ Latency_Supplier::open_supplier (RtecEventChannelAdmin::EventChannel_ptr ec, master_ = master; TAO_TRY { + this->channel_admin_ = ec; + RtecScheduler::Scheduler_ptr server = ACE_Scheduler_Factory::server (); - rt_info_ = + this->rt_info_ = server->create (name, TAO_TRY_ENV); server->set (rt_info_, 1, 1, 1, timeout_interval * 10000, RtecScheduler::VERY_LOW, RtecScheduler::NO_QUANTUM, 1, TAO_TRY_ENV); - -#if 0 - SUPPLIER_NS::RegisterService - (entry_point (), - // ACE_Naming::NOBJECT, - NOBJECT, this); -#endif /* 0 */ + TAO_CHECK_ENV; ACE_SupplierQOS_Factory publications; publications.insert (supplier_id_, @@ -374,17 +373,20 @@ Latency_Supplier::open_supplier (RtecEventChannelAdmin::EventChannel_ptr ec, ACE_ES_EVENT_SHUTDOWN, rt_info_, 1); - this->channel_admin_ = ec; - // = Connect as a supplier. - supplier_admin_ = - RtecEventChannelAdmin::SupplierAdmin::_duplicate(channel_admin_->for_suppliers (TAO_TRY_ENV)); + this->supplier_admin_ = + channel_admin_->for_suppliers (TAO_TRY_ENV); TAO_CHECK_ENV; - consumers_ = - RtecEventChannelAdmin::ProxyPushConsumer::_duplicate(supplier_admin_->obtain_push_consumer (TAO_TRY_ENV)); + + this->consumers_ = + supplier_admin_->obtain_push_consumer (TAO_TRY_ENV); TAO_CHECK_ENV; - consumers_->connect_push_supplier (this->supplier_, + RtecEventComm::PushSupplier_var objref = + this->supplier_->_this (TAO_TRY_ENV); + TAO_CHECK_ENV; + + consumers_->connect_push_supplier (objref.in (), publications.get_SupplierQOS (), TAO_TRY_ENV); TAO_CHECK_ENV; @@ -429,13 +431,17 @@ Latency_Supplier::start_generating_events (void) // = Connect as a consumer. consumer_admin_ = - RtecEventChannelAdmin::ConsumerAdmin::_duplicate(channel_admin_->for_consumers (TAO_TRY_ENV)); + channel_admin_->for_consumers (TAO_TRY_ENV); TAO_CHECK_ENV; suppliers_ = - RtecEventChannelAdmin::ProxyPushSupplier::_duplicate(consumer_admin_->obtain_push_supplier (TAO_TRY_ENV)); + consumer_admin_->obtain_push_supplier (TAO_TRY_ENV); + TAO_CHECK_ENV; + + RtecEventComm::PushConsumer_var objref = + this->consumer_->_this (TAO_TRY_ENV); TAO_CHECK_ENV; - suppliers_->connect_push_consumer (this->consumer_, + suppliers_->connect_push_consumer (objref, dependencies.get_ConsumerQOS (), TAO_TRY_ENV); TAO_CHECK_ENV; @@ -743,11 +749,9 @@ get_options (int argc, char *argv []) return 0; } -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// +// // function main -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// +// int main (int argc, char *argv []) { @@ -765,7 +769,6 @@ main (int argc, char *argv []) else { ACE_DEBUG ((LM_ERROR, "%p\n", "Latency")); - ACE_OS::exit (-1); } } @@ -774,40 +777,56 @@ main (int argc, char *argv []) TAO_TRY { // Initialize ORB. - CORBA::ORB_ptr orb = + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); TAO_CHECK_ENV; - CORBA::POA_ptr poa = - orb->POA_init(argc, argv, "POA"); - - if (get_options (argc, argv)) - ACE_OS::exit (-1); + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + if (poa_object == 0) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object, TAO_TRY_ENV); + TAO_CHECK_ENV; + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); + TAO_CHECK_ENV; - CORBA::Object_ptr objref = + CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); - TAO_CHECK_ENV; + if (naming_obj == 0) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (objref, TAO_TRY_ENV); + CosNaming::NamingContext::_narrow (naming_obj, TAO_TRY_ENV); TAO_CHECK_ENV; - ACE_Scheduler_Factory::use_config (naming_context.ptr ()); + ACE_Scheduler_Factory::use_config (naming_context.in ()); + + if (get_options (argc, argv)) + ACE_OS::exit (-1); // Allocate the timeprobe instance now, so we don't measure // the cost of doing it later. ACE_TIMEPROBE_RESET; CosNaming::Name channel_name (1); - channel_name[0].id = CORBA::string_dup ("EventService"); channel_name.length (1); + channel_name[0].id = CORBA::string_dup ("EventService"); - CORBA::Object_ptr ec_ptr = + CORBA::Object_var ec_obj = naming_context->resolve (channel_name, TAO_TRY_ENV); TAO_CHECK_ENV; + RtecEventChannelAdmin::EventChannel_var ec = - RtecEventChannelAdmin::EventChannel::_narrow (ec_ptr, TAO_TRY_ENV); + RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), + TAO_TRY_ENV); TAO_CHECK_ENV; // Create supplier(s). @@ -836,7 +855,6 @@ main (int argc, char *argv []) for (i = 0; i < consumers; ++i) { ACE_NEW_RETURN (consumer [i], Latency_Consumer (measure_jitter), -1); - RtecEventComm::PushConsumer::_duplicate (consumer[i]); char buf [BUFSIZ]; sprintf (buf, "consumer-%d", i+1); @@ -873,7 +891,7 @@ main (int argc, char *argv []) for (i = 0; i < consumers; ++i) { consumer [i]->print_stats (); - CORBA::release (consumer [i]); + delete consumer [i]; TAO_CHECK_ENV; } delete [] consumer; @@ -881,7 +899,7 @@ main (int argc, char *argv []) ACE_TIMEPROBE_PRINT; ACE_TIMEPROBE_FINI; } - TAO_CATCH (CORBA::SystemException, sys_ex) + TAO_CATCHANY { TAO_TRY_ENV.print_exception ("SYS_EX"); } diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h index f722eff644a..5c5b977d69d 100644 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h +++ b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h @@ -67,8 +67,8 @@ protected: // = Event channel adminstration references. RtecEventChannelAdmin::EventChannel_var channel_admin_; - RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin_; - RtecEventChannelAdmin::ProxyPushSupplier_ptr suppliers_; + RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_; + RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_; private: RtecScheduler::handle_t rt_info_; diff --git a/TAO/rules.tao.GNU b/TAO/rules.tao.GNU new file mode 100644 index 00000000000..9a97fc82e51 --- /dev/null +++ b/TAO/rules.tao.GNU @@ -0,0 +1,18 @@ +#---------------------------------------------------------------------------- +# $Id$ +# +# Common rules for all of TAO +# +#---------------------------------------------------------------------------- + +ifndef TAO_IDL +TAO_IDL = $(TAO_ROOT)/TAO_IDL/tao_idl +endif + +IDLFLAGS = + +.SUFFIXES: S.h C.h S.i C.i S.cpp C.cpp + +%S.h %C.h %S.i %C.i %S.cpp %C.cpp: %.idl + $(TAO_IDL) $(IDLFLAGS) $? + diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile index 579fd7372fd..d96b5547753 100644 --- a/TAO/tao/Makefile +++ b/TAO/tao/Makefile @@ -9,21 +9,26 @@ LIBNAME = libTAO LIB = $(LIBNAME).a SHLIB = $(LIBNAME).$(SOEXT) -# These are components that are only headers and must be installed -CORBA_HDRS = orb sequence stub orbconf objtable optable $(CORBA_SRCS) -CORBA_SRCS = any corbacom except nvlist object orbobj poa \ - principa request svrrqst typecode sequence +# These are headers for things which are exported and must be +# installed. (Currently not used). +PUB_HDRS = align cdr giop iiopobj iioporb xdr connect params marshal debug \ + default_client default_server server_factory client_factory orb_core -# These are components that are only headers and must be installed -OTHERS_HDRS = align cdr giop iiopobj iioporb xdr connect params marshal debug \ - default_client default_server server_factory client_factory orb_core - -OTHERS_INLN = any poa cdr connect iiopobj iioporb object orbobj params svrrqst \ - nvlist typecode marshal default_client default_server server_factory \ - client_factory orb_core - -# These are components that are either header & source or source-only -OTHERS_SRCS = \ +ORBCORE_SRCS = \ + any \ + corbacom \ + except \ + nvlist \ + object \ + orbobj \ + poa \ + poaC \ + poaS \ + principa \ + request \ + sequence \ + svrrqst \ + typecode \ arg_shifter \ cdr \ client_factory \ @@ -34,6 +39,7 @@ OTHERS_SRCS = \ deep_free \ default_client \ default_server \ + objkeyC \ encode \ giop \ iiopobj \ @@ -46,11 +52,12 @@ OTHERS_SRCS = \ orb_core \ params \ server_factory \ + servant_base \ tao_internals \ tc_const \ - Timeprobe \ + Timeprobe -FILES = $(OTHERS_SRCS) $(CORBA_SRCS) +FILES = $(ORBCORE_SRCS) ifndef TAO_ROOT TAO_ROOT = $(ACE_ROOT)/TAO @@ -61,9 +68,7 @@ COMPATFILES = objbase.h initguid.h BIN = # t-xdr t-sizes -TEMPLATE_FILES = - -DEFS = $(addsuffix .h,$(OTHERS_HDRS)) +DEFS = $(addsuffix .h,$(PUB_HDRS)) LSRC = $(addsuffix .cpp,$(FILES)) LSRC2 = $(addsuffix .cpp,$(TEMPLATE_FILES)) @@ -79,14 +84,14 @@ BUILD = $(VSHLIB) $(VLIB) $(VBIN) #---------------------------------------------------------------------------- include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -#VSHDIR = obj/ -#VSHOBJS = $(LSRC:%.cpp=$(VSHDIR)/$(notdir %).so) include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(TAO_ROOT)/rules.tao.GNU include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +include $(TAO_ROOT)/taoconfig.mk #---------------------------------------------------------------------------- # Local targets (and local hacks) @@ -98,7 +103,7 @@ endif ifdef VXWORKS override fakesvcconf = 1 endif - + ifeq ($(fakesvcconf),1) CPPFLAGS += -DTAO_PLATFORM_SVC_CONF_FILE_NOTSUP endif @@ -108,38 +113,9 @@ ifeq ($(probe),1) endif # probe #RLDFLAGS := $(subst -L,-Wl\,-rpath ,$(LDFLAGS)) -#CPPFLAGS += -D__IIOP_BUILD -I$(COMPATDIR) -DDEBUG CPPFLAGS += -I$(TAO_ROOT) -I$(COMPATDIR) #-H LDFLAGS += $(RLDFLAGS) -INSINC = ../proto/include -INSLIB = ../proto/lib - -# The first value is a nasty hack because $(VSHLIB) was not working -# for some reason :-( -INSTALL = $(INSLIB)/libTAO.$(SOEXT) \ - $(addprefix $(INSINC)/,$(addsuffix .h,$(OTHERS_HDRS)) $(addsuffix .i,$(OTHERS_INLN)) $(addsuffix .h,$(basename $(COMPATFILES)) ) ) \ - $(addprefix $(INSINC)/corba/, $(addsuffix .h,$(CORBA_SRCS) $(CORBA_HDRS) debug)) \ - - -INST = install -c -INSTALL_BY_COPY = $(INST) $^ $@ - -$(INSINC)/%: % - test -d $(@D) || mkdir -p $(@D) - $(INSTALL_BY_COPY) -$(INSINC)/%: $(COMPATDIR)/% - test -d $(@D) || mkdir -p $(@D) - $(INSTALL_BY_COPY) -$(INSLIB)/%: % - test -d $(@D) || mkdir -p $(@D) - $(INSTALL_BY_COPY) -$(INSINC)/corba/%: % - test -d $(@D) || mkdir -p $(@D) - $(INSTALL_BY_COPY) - -copy: $(INSTALL) - # DO NOT DELETE THIS LINE -- g++dep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/TAO/tao/any.cpp b/TAO/tao/any.cpp index 4e6e22ec5f8..bfc628c1737 100644 --- a/TAO/tao/any.cpp +++ b/TAO/tao/any.cpp @@ -196,13 +196,12 @@ deep_copy (CORBA::TypeCode_ptr tc, break; case CORBA::tk_objref: - *(CORBA::Object_ptr *) dest = CORBA::Object:: - _duplicate (*(CORBA::Object_ptr *) source); + *(CORBA::Object_ptr *) dest = CORBA::Object::_duplicate (*(CORBA::Object_ptr *) source); break; case CORBA::tk_sequence: { - CORBA::OctetSeq *src, *dst; + CORBA::OctetSeq *src, *dst; CORBA::TypeCode_ptr tcp; size_t size; @@ -399,6 +398,8 @@ deep_free (CORBA::TypeCode_ptr tc, 0, env); // @@ This better be allocated via new[]. + // @@ (ANDY) I'm not sure what to do here...should I delete the value? It seems + // that the DTOR for the sequence will insure that this buffer goes away. delete [] ((CORBA::OctetSeq *) value)->buffer; break; diff --git a/TAO/tao/connect.h b/TAO/tao/connect.h index 5d251bf32f5..b55244bf617 100644 --- a/TAO/tao/connect.h +++ b/TAO/tao/connect.h @@ -7,13 +7,13 @@ // // = LIBRARY // TAO -// +// // = FILENAME // connect.h // // = AUTHOR // Chris Cleeland -// +// // ============================================================================ # include "ace/Reactor.h" @@ -24,14 +24,15 @@ // Forward Decls class TAO_OA_Parameters; +class TAO_GIOP_RequestHeader; -typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> TAO_SVC_HANDLER; class TAO_Client_Connection_Handler : public TAO_SVC_HANDLER // = TITLE // <Svc_Handler> used on the client side and returned by the - // <TAO_CONNECTOR>. + // <TAO_CONNECTOR>. // @@ (CJC) Should this be in here or in the default_client.*? { public: @@ -51,7 +52,7 @@ class TAO_Server_Connection_Handler : public TAO_SVC_HANDLER public: TAO_Server_Connection_Handler (ACE_Thread_Manager *t = ACE_Thread_Manager::instance ()); // Constructor. - + virtual int open (void *); // Called by the <Strategy_Acceptor> when the handler is completely // connected. Argument is unused. @@ -93,7 +94,7 @@ public: // errors, -1 is returned and additional information carried in // <env>. - virtual void handle_request (TAO_GIOP_RequestHeader hdr, + virtual void handle_request (const TAO_GIOP_RequestHeader &hdr, CDR &request_body, CDR &response, TAO_Dispatch_Context *some_info, @@ -101,24 +102,24 @@ public: // Once a request is found in a message, this finds the appropriate // POA and dispatches it, then takes care to properly format any // response. - + virtual void send_response (CDR &response); // Send <response> to the client on the other end. protected: // = Event Handler overloads - + virtual int handle_input (ACE_HANDLE = ACE_INVALID_HANDLE); // Reads a message from the <peer()>, dispatching and servicing it // appropriately. - + virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); // Perform appropriate closing of the connection. TAO_OA_Parameters *params_; }; -typedef ACE_Strategy_Acceptor<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> +typedef ACE_Strategy_Acceptor<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> TAO_ACCEPTOR; #endif /* TAO_CONNECT_H */ diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h index b1317f4e032..b76d2ee11d8 100644 --- a/TAO/tao/corba.h +++ b/TAO/tao/corba.h @@ -91,11 +91,12 @@ #include "tao/sequence.h" #include "tao/sequence_T.h" +#include "tao/objkeyC.h" + typedef TAO_Unbounded_Sequence<CORBA::Octet> TAO_opaque; extern CORBA::TypeCode TC_opaque; #include "tao/any.h" -#include "tao/poa.h" #include "tao/params.h" #include "tao/client_factory.h" @@ -119,6 +120,14 @@ extern CORBA::TypeCode TC_opaque; #include "tao/cdr.h" #include "tao/stub.h" +#include "tao/poa.h" + +extern TAO_Export int operator== (const PortableServer::ObjectId &l, + const PortableServer::ObjectId &r); + +extern TAO_Export int operator== (const TAO::ObjectKey &l, + const TAO::ObjectKey &r); + // TAO specific includes #include "tao/connect.h" #include "tao/orb_core.h" @@ -151,7 +160,6 @@ extern CORBA::TypeCode TC_opaque; #include "tao/orbobj.i" #include "tao/marshal.i" #include "tao/cdr.i" -#include "tao/poa.i" #include "tao/giop.i" #include "tao/iioporb.i" #include "tao/iiopobj.i" diff --git a/TAO/tao/corbacom.h b/TAO/tao/corbacom.h index c9a8be7b4bc..7bb87596390 100644 --- a/TAO/tao/corbacom.h +++ b/TAO/tao/corbacom.h @@ -58,9 +58,6 @@ class CORBA_Any_out; class CORBA_TypeCode; //typedef class CORBA_TypeCode *CORBA_TypeCode_ptr; -class CORBA_POA; -//typedef class CORBA_POA *CORBA_BOA_ptr; - class CORBA_Exception; //typedef class CORBA_Exception *CORBA_Exception_ptr; @@ -134,16 +131,25 @@ typedef class CORBA_InterfaceDef * // =Forward declarations struct TAO_Dispatch_Context; -class TAO_Object_Table; +class TAO_Object_Table_Impl; class TAO_Operation_Table; class TAO_Client_Strategy_Factory; class TAO_Server_Strategy_Factory; class TAO_ORB_Parameters; struct CDR; +// The new (POA) base class for servants. +class TAO_ServantBase; + // enum values defined in nvlist.h, bitwise ORed. typedef u_int CORBA_Flags; +# if SIZEOF_BOOL != 0 + typedef bool CORBA_Boolean; +# else /* "bool" not builtin to this compiler */ + typedef int CORBA_Boolean; +# endif /* "bool" not builtin */ + // forward declare sequences. template <class T> class TAO_Unbounded_Sequence; @@ -163,14 +169,10 @@ struct CORBA_SEQUENCE u_int length; #endif /* SIZEOF_LONG */ T *buffer; -# if SIZEOF_BOOL != 0 - bool release; -# else /* "bool" not builtin to this compiler */ - int release; -# endif /* "bool" not builtin */ - + CORBA_Boolean release; // Only here to make it compliant with IDL-generated layout + CORBA_SEQUENCE (void) - : maximum (0), length (0), buffer (0) { } + : maximum (0), length (0), buffer (0), release(CORBA::B_FALSE) { } // XXX destructor should free buffer, elements!! ~CORBA_SEQUENCE (void) { } @@ -188,16 +190,14 @@ public: // typedef void Status; // g++ doesn't like this // return status of operations in a number of standard CORBA classes. -# if SIZEOF_BOOL != 0 - typedef bool Boolean; +# if SIZEOF_BOOL != 0 # define B_FALSE false # define B_TRUE true - -# else /* "bool" not builtin to this compiler */ - typedef int Boolean; +# else /* "bool" not builtin to this compiler */ enum { B_FALSE = 0, B_TRUE = 1 }; # endif /* "bool" not builtin */ + typedef CORBA_Boolean Boolean; typedef Boolean &Boolean_out; // out type for boolean typedef u_char Octet; @@ -426,9 +426,6 @@ public: typedef CORBA_Any_out Any_out; typedef Any *Any_ptr; - typedef CORBA_POA POA; - typedef POA *POA_ptr; - typedef CORBA_Environment Environment; typedef Environment *Environment_ptr; @@ -526,7 +523,6 @@ public: #undef TAO_SYSTEM_EXCEPTION // = all the CORBA::is_nil methods - static Boolean is_nil (POA_ptr); static Boolean is_nil (Object_ptr); static Boolean is_nil (Environment_ptr); static Boolean is_nil (NamedValue_ptr); @@ -539,7 +535,6 @@ public: static Boolean is_nil (ServerRequest_ptr req); // = all the CORBA release methods - static void release (POA_ptr); static void release (Object_ptr); static void release (Environment_ptr); static void release (NamedValue_ptr); @@ -704,7 +699,6 @@ extern "C" TAO_Export const TAO_IID IID_IIOP_ServerRequest; extern "C" TAO_Export const TAO_IID IID_STUB_Object; extern "C" TAO_Export const TAO_IID IID_IIOP_Object; extern "C" TAO_Export const TAO_IID IID_IIOP_ORB; -extern "C" TAO_Export const TAO_IID IID_POA; // NOTE: stub APIs are nonportable, and must be explicitly #included // by code emitted from an IDL compiler. diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp index c10b1cd951b..eac7514c125 100644 --- a/TAO/tao/decode.cpp +++ b/TAO/tao/decode.cpp @@ -993,7 +993,7 @@ TAO_Marshal_Sequence::decode (CORBA::TypeCode_ptr tc, CORBA::Boolean continue_decoding = CORBA::B_TRUE; CDR *stream = (CDR *) context; TAO_Base_Sequence *seq = (TAO_Base_Sequence *)data; - // CORBA::OctetSeq *seq = (CORBA::OctetSeq *) data; + CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE; // return status CORBA::TypeCode_ptr tc2; // typecode of the element diff --git a/TAO/tao/deep_free.cpp b/TAO/tao/deep_free.cpp index 0dd45883f26..aa11c0e481d 100644 --- a/TAO/tao/deep_free.cpp +++ b/TAO/tao/deep_free.cpp @@ -435,18 +435,17 @@ TAO_Marshal_Union::deep_free (CORBA::TypeCode_ptr tc, CORBA::TypeCode::traverse_status TAO_Marshal_Sequence::deep_free (CORBA::TypeCode_ptr tc, const void *source, - const void *dest, - CORBA::Environment &env){ + const void *, + CORBA::Environment &) +{ // TAO implements sequences using inheritance from a base // class. That class allocate and deallocates the buffer, using // virtual methods. - ACE_UNUSED_ARG (dest); - ACE_UNUSED_ARG (env); - if (tc) { - TAO_Base_Sequence *src = ACE_reinterpret_cast(TAO_Base_Sequence*,source); + TAO_Base_Sequence *src = + ACE_reinterpret_cast(TAO_Base_Sequence*,ACE_const_cast(void*,source)); src->_deallocate_buffer (); return CORBA::TypeCode::TRAVERSE_CONTINUE; diff --git a/TAO/tao/default_server.cpp b/TAO/tao/default_server.cpp index 6761526b157..8471fc922ab 100644 --- a/TAO/tao/default_server.cpp +++ b/TAO/tao/default_server.cpp @@ -17,6 +17,8 @@ TAO_Default_Server_Strategy_Factory::TAO_Default_Server_Strategy_Factory (void) : thread_flags_ (0), object_table_size_ (TAO_DEFAULT_SERVER_OBJECT_TABLE_SIZE), object_lookup_strategy_ (TAO_DYNAMIC_HASH), + poa_lock_type_ (TAO_THREAD_LOCK), + poa_mgr_lock_type_ (TAO_THREAD_LOCK), concurrency_strategy_ (0) { } @@ -32,12 +34,56 @@ TAO_Default_Server_Strategy_Factory::concurrency_strategy (void) return this->concurrency_strategy_; } -TAO_Object_Table * +ACE_Lock * +TAO_Default_Server_Strategy_Factory::create_poa_lock (void) +{ + ACE_Lock *thelock = 0; + + switch (this->poa_lock_type_) + { + case TAO_THREAD_LOCK: + ACE_NEW_RETURN (thelock, + ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex> (), + 0); + break; + case TAO_NULL_LOCK: + ACE_NEW_RETURN (thelock, + ACE_Lock_Adapter<ACE_Null_Mutex> (), + 0); + break; + } + + return thelock;// Just to make sure we return something +} + +ACE_Lock * +TAO_Default_Server_Strategy_Factory::create_poa_mgr_lock (void) +{ + ACE_Lock *thelock = 0; + + switch (this->poa_mgr_lock_type_) + { + case TAO_THREAD_LOCK: + ACE_NEW_RETURN (thelock, + ACE_Lock_Adapter<ACE_Thread_Mutex> (), + 0); + break; + case TAO_NULL_LOCK: + ACE_NEW_RETURN (thelock, + ACE_Lock_Adapter<ACE_Null_Mutex> (), + 0); + break; + } + + return thelock;// Just to make sure we return something +} + +TAO_Object_Table_Impl * TAO_Default_Server_Strategy_Factory::create_object_table (void) { // Create the appropriate-sized object table based on passed // arguments. - TAO_Object_Table *objtable = 0; + TAO_Object_Table_Impl *objtable = 0; switch (this->object_lookup_strategy_) { @@ -86,13 +132,11 @@ TAO_Default_Server_Strategy_Factory::create_object_table (void) void TAO_Default_Server_Strategy_Factory::tokenize (char *flag_string) { - // @@ Danger! strtok not re-entrant...need to find a re-entrant - // version! @@ Chris, please see ACE_OS::strtok_r (). There are - // some examples of how to use this in JAWS. - - for (char *flag = ACE_OS::strtok (flag_string, "|"); + char *lasts = 0; + + for (char *flag = ACE_OS::strtok_r (flag_string, "|", &lasts); flag != 0; - flag = ACE_OS::strtok (0, "|")) + flag = ACE_OS::strtok_r (0, "|", &lasts)) { TAO_BEGINCHECK; TAO_CHECKANDSET (THR_DETACHED); @@ -169,6 +213,32 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, char *argv[]) this->object_lookup_strategy_ = TAO_USER_DEFINED; } } + else if (ACE_OS::strcmp (argv[curarg], "-ORBpoalock") == 0) + { + curarg++; + if (curarg < argc) + { + char *name = argv[curarg]; + + if (ACE_OS::strcasecmp (name, "thread") == 0) + this->poa_lock_type_ = TAO_THREAD_LOCK; + else if (ACE_OS::strcasecmp (name, "null") == 0) + this->poa_lock_type_ = TAO_NULL_LOCK; + } + } + else if (ACE_OS::strcmp (argv[curarg], "-ORBpoamgrlock") == 0) + { + curarg++; + if (curarg < argc) + { + char *name = argv[curarg]; + + if (ACE_OS::strcasecmp (name, "thread") == 0) + this->poa_mgr_lock_type_ = TAO_THREAD_LOCK; + else if (ACE_OS::strcasecmp (name, "null") == 0) + this->poa_mgr_lock_type_ = TAO_NULL_LOCK; + } + } else if (ACE_OS::strcmp (argv[curarg], "-ORBthreadflags") == 0) { curarg++; diff --git a/TAO/tao/default_server.h b/TAO/tao/default_server.h index f84fdd61ab7..7ac576a9440 100644 --- a/TAO/tao/default_server.h +++ b/TAO/tao/default_server.h @@ -38,9 +38,21 @@ public: // = Server-side ORB Strategy Factory Methods. virtual CONCURRENCY_STRATEGY *concurrency_strategy (void); - virtual TAO_Object_Table *create_object_table (void); + virtual TAO_Object_Table_Impl *create_object_table (void); // Factory method for object tables. + virtual ACE_Lock *create_poa_lock (void); + // Creates and returns a lock for POA based on the setting for + // <-ORBpoalock>. A setting of <thread> returns an + // <ACE_Lock_Adapter\<ACE_Thread_Mutex\>>; a setting of <null> + // returns an <ACE_Lock_Adapter\<ACE_NULL_Mutex\>>. + + virtual ACE_Lock *create_poa_mgr_lock (void); + // Creates and returns a lock for a POA Manager based on the setting + // for <-ORBpoamgrlock>. A setting of <thread> returns an + // <ACE_Lock_Adapter\<ACE_Thread_Mutex\>>; a setting of <null> + // returns an <ACE_Lock_Adapter\<ACE_NULL_Mutex\>>. + // = Service Configurator hooks. virtual int init (int argc, char *argv[]); // Initialize the ORB when it's linked dynamically. @@ -52,7 +64,11 @@ public: // <-ORBtablesize> <{num}> // to set the table size // <-ORBdemuxstrategy> <{which}> - // where <{which}> is one of <dynamic>, <linear>, or <active>. + // where <{which}> is one of <dynamic>, <linear>, or <active> + // <-ORBpoalock> <{which}> + // where <{which}> is one of <thread> or <null> (default <thread>) + // <-ORBpoamgrlock> <{which}> + // where <{which}> is one of <thread> or <null> (default <thread>) private: void tokenize (char *flag_string); @@ -66,6 +82,18 @@ private: TAO_Demux_Strategy object_lookup_strategy_; // The type of lookup/demultiplexing strategy being used + enum Lock_Type + { + TAO_NULL_LOCK, + TAO_THREAD_LOCK + }; + + Lock_Type poa_lock_type_; + // The type of lock to be returned by <create_poa_lock()>. + + Lock_Type poa_mgr_lock_type_; + // The type of lock to be returned by <create_poa_mgr_lock()>. + // = Strategies Used. TAO_Reactive_Strategy<TAO_Server_Connection_Handler> reactive_strategy_; // A strategy for passively establishing connections which utilizes diff --git a/TAO/tao/iiopobj.cpp b/TAO/tao/iiopobj.cpp index f60c3b98e39..d691b78d5b5 100644 --- a/TAO/tao/iiopobj.cpp +++ b/TAO/tao/iiopobj.cpp @@ -1,3 +1,4 @@ +// $Id$ // @ (#)iiopobj.cpp 1.9 95/11/04 // Copyright 1995 by Sun Microsystems Inc. @@ -53,16 +54,16 @@ IIOP::Profile::set (const char *h, char buffer[bufs]; if (key == 0) { + // @@ (IRFAN) Object key generation // Use <this> as the key... ACE_OS::sprintf (buffer, "0x%024.24x", this); key = buffer; } - this->object_key.length (ACE_OS::strlen (key) + 1); + int l = ACE_OS::strlen (key); + this->object_key.length (l); - for (CORBA::ULong i = 0; - i < this->object_key.length (); - ++i) + for (int i = 0; i < l; ++i) { this->object_key[i] = key[i]; } @@ -326,12 +327,11 @@ IIOP_Object::QueryInterface (REFIID riid, return TAO_NOERROR; } -//TAO extensions -const char * -IIOP_Object::_get_name (CORBA::Environment &) +// TAO extensions +TAO::ObjectKey* +IIOP_Object::key (CORBA::Environment &) { - // @@ We need access to the underlying buffer. - return (const char *) &(this->profile.object_key[0]); + return new TAO::ObjectKey (this->profile.object_key); } // It will usually be used by the _bind call. diff --git a/TAO/tao/iiopobj.h b/TAO/tao/iiopobj.h index f0d97898926..6b7b042801c 100644 --- a/TAO/tao/iiopobj.h +++ b/TAO/tao/iiopobj.h @@ -195,14 +195,14 @@ public: IIOP_Object (const char *host = ACE_DEFAULT_SERVER_HOST, const CORBA::UShort p = TAO_DEFAULT_SERVER_PORT, - const char *objkey = "0", + const char *objkey = "0", // @@ (IRFAN) We may need to remove this def arg char *repository_id = 0); // This constructor will usually be used by a <_bind> call on the // client side. IIOP_Object (char *repository_id, const ACE_INET_Addr &addr, - const char *objkey = "0"); + const char *objkey /*= "0"*/); // @@ (IRFAN) We may need to remove this def arg // Constructor used typically by the server side. // = COM stuff @@ -211,11 +211,9 @@ public: TAO_HRESULT QueryInterface (REFIID type_id, void **ppv); - virtual const char *_get_name (CORBA::Environment &env); - // Get the underlying object key, which is stored as a - // NUL-terminated character string. Note that this does not - // allocate any new memory, so this return value should not be - // changed by the caller. + virtual TAO::ObjectKey *key (CORBA::Environment &env); + // Return the object key as an out parameter. Caller should release + // return value when finished with it. IIOP::Profile profile; // Profile for this object. @@ -238,7 +236,7 @@ private: IIOP::Profile *fwd_profile_; // This is a pointer to a profile used if the object is not - // colocated in the current process. + // collocated in the current process. ~IIOP_Object (void); // Destructor is to be called only through Release() diff --git a/TAO/tao/objkey.idl b/TAO/tao/objkey.idl new file mode 100644 index 00000000000..88e781a9f6c --- /dev/null +++ b/TAO/tao/objkey.idl @@ -0,0 +1,3 @@ +module TAO { + typedef sequence<octet> ObjectKey; +};
\ No newline at end of file diff --git a/TAO/tao/objkeyC.cpp b/TAO/tao/objkeyC.cpp new file mode 100644 index 00000000000..2b2d276bffe --- /dev/null +++ b/TAO/tao/objkeyC.cpp @@ -0,0 +1,45 @@ +// ****** 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 + +#include "tao/corba.h" + +#if !defined (__ACE_INLINE__) +#include "objkeyC.i" +#endif // !defined INLINE + + +#if !defined (_TAO__TAO_SEQ_OCTET_CS_) +#define _TAO__TAO_SEQ_OCTET_CS_ + +static const CORBA::Long _oc_TAO__tao_seq_Octet[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + CORBA::tk_octet, + + 0, +}; +static CORBA::TypeCode _tc__tc_TAO__tao_seq_Octet (CORBA::tk_sequence, sizeof (_oc_TAO__tao_seq_Octet), (unsigned char *) &_oc_TAO__tao_seq_Octet, CORBA::B_FALSE); +CORBA::TypeCode_ptr TAO::_tc__tao_seq_Octet = &_tc__tc_TAO__tao_seq_Octet; + + +#endif // end #if !defined + +static const CORBA::Long _oc_TAO_ObjectKey[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 22, 0x49444c3a, 0x54414f2f, 0x4f626a65, 0x63744b65, 0x793a312e, 0x30000000, // repository ID = IDL:TAO/ObjectKey:1.0 + 10, 0x4f626a65, 0x63744b65, 0x79000000, // name = ObjectKey + CORBA::tk_sequence, // typecode kind + 12, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + CORBA::tk_octet, + + 0, +}; +static CORBA::TypeCode _tc__tc_TAO_ObjectKey (CORBA::tk_alias, sizeof (_oc_TAO_ObjectKey), (unsigned char *) &_oc_TAO_ObjectKey, CORBA::B_FALSE); +CORBA::TypeCode_ptr TAO::_tc_ObjectKey = &_tc__tc_TAO_ObjectKey; + diff --git a/TAO/tao/objkeyC.h b/TAO/tao/objkeyC.h new file mode 100644 index 00000000000..1f8923793ec --- /dev/null +++ b/TAO/tao/objkeyC.h @@ -0,0 +1,107 @@ +// ****** 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 + +#if !defined (_TAO_IDL_OBJKEYC_H_) +#define _TAO_IDL_OBJKEYC_H_ + +class TAO{ +public: + +#if !defined (_TAO__TAO_SEQ_OCTET_CH_) +#define _TAO__TAO_SEQ_OCTET_CH_ + + // ************************************************************* + // _tao_seq_Octet + // ************************************************************* + + typedef TAO_Unbounded_Sequence<CORBA::Octet > _tao_seq_Octet; + typedef _tao_seq_Octet* _tao_seq_Octet_ptr; + static CORBA::TypeCode_ptr _tc__tao_seq_Octet; + + +#endif // end #if !defined + + +#if !defined (_TAO__TAO_SEQ_OCTET___VAR_CH_) +#define _TAO__TAO_SEQ_OCTET___VAR_CH_ + +// ************************************************************* + // class TAO::_tao_seq_Octet_var + // ************************************************************* + + class _tao_seq_Octet_var + { + public: + _tao_seq_Octet_var (void); // default constructor + _tao_seq_Octet_var (_tao_seq_Octet *); + _tao_seq_Octet_var (const _tao_seq_Octet_var &); // copy constructor + ~_tao_seq_Octet_var (void); // destructor + + _tao_seq_Octet_var &operator= (_tao_seq_Octet *); + _tao_seq_Octet_var &operator= (const _tao_seq_Octet_var &); + _tao_seq_Octet *operator-> (void); + const _tao_seq_Octet *operator-> (void) const; + + operator const _tao_seq_Octet &() const; + operator _tao_seq_Octet &(); + operator _tao_seq_Octet &() const; + CORBA::Octet &operator[] (CORBA::ULong index); + // in, inout, out, _retn + const _tao_seq_Octet &in (void) const; + _tao_seq_Octet &inout (void); + _tao_seq_Octet *&out (void); + _tao_seq_Octet *_retn (void); + _tao_seq_Octet *ptr (void) const; + + private: + _tao_seq_Octet *ptr_; + }; + + +#endif // end #if !defined + + +#if !defined (_TAO__TAO_SEQ_OCTET___OUT_CH_) +#define _TAO__TAO_SEQ_OCTET___OUT_CH_ + + class _tao_seq_Octet_out + { + public: + _tao_seq_Octet_out (_tao_seq_Octet *&); + _tao_seq_Octet_out (_tao_seq_Octet_var &); + _tao_seq_Octet_out (_tao_seq_Octet_out &); + _tao_seq_Octet_out &operator= (_tao_seq_Octet_out &); + _tao_seq_Octet_out &operator= (_tao_seq_Octet *); + operator _tao_seq_Octet *&(); + _tao_seq_Octet *&ptr (void); + _tao_seq_Octet *operator-> (void); + CORBA::Octet &operator[] (CORBA::ULong index); + + private: + _tao_seq_Octet *&ptr_; + // assignment from T_var not allowed + void operator= (const _tao_seq_Octet_var &); + }; + + +#endif // end #if !defined + + typedef _tao_seq_Octet ObjectKey; + typedef _tao_seq_Octet_var ObjectKey_var; + typedef _tao_seq_Octet_out ObjectKey_out; + + static CORBA::TypeCode_ptr _tc_ObjectKey; + +}; + + +#if defined (__ACE_INLINE__) +#include "objkeyC.i" +#endif // defined INLINE + + +#endif // if !defined diff --git a/TAO/tao/objkeyC.i b/TAO/tao/objkeyC.i new file mode 100644 index 00000000000..032aa7144de --- /dev/null +++ b/TAO/tao/objkeyC.i @@ -0,0 +1,202 @@ +// ****** 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 + + +#if !defined (_TAO__TAO_SEQ_OCTET___VAR_CI_) +#define _TAO__TAO_SEQ_OCTET___VAR_CI_ + +// ************************************************************* +// Inline operations for class TAO::_tao_seq_Octet_var +// ************************************************************* + +ACE_INLINE +TAO::_tao_seq_Octet_var::_tao_seq_Octet_var (void) // default constructor + : ptr_ (0) +{} + +ACE_INLINE +TAO::_tao_seq_Octet_var::_tao_seq_Octet_var (TAO::_tao_seq_Octet *p) + : ptr_ (p) +{} + +ACE_INLINE +TAO::_tao_seq_Octet_var::_tao_seq_Octet_var (const TAO::_tao_seq_Octet_var &p) // copy constructor +{ + if (p.ptr_) + this->ptr_ = new TAO::_tao_seq_Octet(*p.ptr_); + else + this->ptr_ = 0; +} + +ACE_INLINE +TAO::_tao_seq_Octet_var::~_tao_seq_Octet_var (void) // destructor +{ + delete this->ptr_; +} + +ACE_INLINE TAO::_tao_seq_Octet_var & +TAO::_tao_seq_Octet_var::operator= (TAO::_tao_seq_Octet *p) +{ + delete this->ptr_; + this->ptr_ = p; + return *this; +} + +ACE_INLINE TAO::_tao_seq_Octet_var & +TAO::_tao_seq_Octet_var::operator= (const TAO::_tao_seq_Octet_var &p) // deep copy +{ + if (this != &p) + { + delete this->ptr_; + this->ptr_ = new TAO::_tao_seq_Octet (*p.ptr_); + } + return *this; +} + +ACE_INLINE const TAO::_tao_seq_Octet * +TAO::_tao_seq_Octet_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE TAO::_tao_seq_Octet * +TAO::_tao_seq_Octet_var::operator-> (void) +{ + return this->ptr_; +} + +ACE_INLINE +TAO::_tao_seq_Octet_var::operator const TAO::_tao_seq_Octet &() const // cast +{ + return *this->ptr_; +} + +ACE_INLINE +TAO::_tao_seq_Octet_var::operator TAO::_tao_seq_Octet &() // cast +{ + return *this->ptr_; +} + +ACE_INLINE +TAO::_tao_seq_Octet_var::operator TAO::_tao_seq_Octet &() const// cast +{ + return *this->ptr_; +} + +ACE_INLINE CORBA::Octet & +TAO::_tao_seq_Octet_var::operator[] (CORBA::ULong index) +{ + return this->ptr_->operator[] (index); +} + +ACE_INLINE const TAO::_tao_seq_Octet & +TAO::_tao_seq_Octet_var::in (void) const +{ + return *this->ptr_; +} + +ACE_INLINE TAO::_tao_seq_Octet & +TAO::_tao_seq_Octet_var::inout (void) +{ + return *this->ptr_; +} + +// mapping for variable size +ACE_INLINE TAO::_tao_seq_Octet *& +TAO::_tao_seq_Octet_var::out (void) +{ + delete this->ptr_; + this->ptr_ = 0; + return this->ptr_; +} + +ACE_INLINE TAO::_tao_seq_Octet * +TAO::_tao_seq_Octet_var::_retn (void) +{ + TAO::_tao_seq_Octet *tmp = this->ptr_; + this->ptr_ = 0; + return tmp; +} + +ACE_INLINE TAO::_tao_seq_Octet * +TAO::_tao_seq_Octet_var::ptr (void) const +{ + return this->ptr_; +} + + +#endif // end #if !defined + + +#if !defined (_TAO__TAO_SEQ_OCTET___OUT_CI_) +#define _TAO__TAO_SEQ_OCTET___OUT_CI_ + +// ************************************************************* +// Inline operations for class TAO::_tao_seq_Octet_out +// ************************************************************* + +ACE_INLINE +TAO::_tao_seq_Octet_out::_tao_seq_Octet_out (TAO::_tao_seq_Octet *&p) + : ptr_ (p) +{ + this->ptr_ = 0; +} + +ACE_INLINE +TAO::_tao_seq_Octet_out::_tao_seq_Octet_out (TAO::_tao_seq_Octet_var &p) // constructor from _var + : ptr_ (p.out ()) +{ + delete this->ptr_; + this->ptr_ = 0; +} + +ACE_INLINE +TAO::_tao_seq_Octet_out::_tao_seq_Octet_out (TAO::_tao_seq_Octet_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE TAO::_tao_seq_Octet_out & +TAO::_tao_seq_Octet_out::operator= (TAO::_tao_seq_Octet_out &p) +{ + this->ptr_ = p.ptr_; + return *this; +} + +ACE_INLINE TAO::_tao_seq_Octet_out & +TAO::_tao_seq_Octet_out::operator= (TAO::_tao_seq_Octet *p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +TAO::_tao_seq_Octet_out::operator TAO::_tao_seq_Octet *&() // cast +{ + return this->ptr_; +} + +ACE_INLINE TAO::_tao_seq_Octet *& +TAO::_tao_seq_Octet_out::ptr (void) // ptr +{ + return this->ptr_; +} + +ACE_INLINE TAO::_tao_seq_Octet * +TAO::_tao_seq_Octet_out::operator-> (void) +{ + return this->ptr_; +} + +ACE_INLINE CORBA::Octet & +TAO::_tao_seq_Octet_out::operator[] (CORBA::ULong index) +{ + return this->ptr_->operator[] (index); +} + + +#endif // end #if !defined + diff --git a/TAO/tao/objtable.h b/TAO/tao/objtable.h index 8917861f48a..747d057b3be 100644 --- a/TAO/tao/objtable.h +++ b/TAO/tao/objtable.h @@ -16,146 +16,369 @@ #if !defined (TAO_OBJTABLE_H) # define TAO_OBJTABLE_H -class TAO_Object_Table +typedef +ACE_Map_Entry<PortableServer::ObjectId,PortableServer::Servant> +TAO_Object_Table_Entry; + +class TAO_Export TAO_Object_Table_Iterator_Impl +{ + // = TITLE + // Abstract iterator for all Object Table strategies. + // + // = DESCRIPTION + // We want to provide an common interface for the different object + // tables and their iterators. Object Tables are handled using + // base classes and virtual methods; but we must provide a "by + // value" interface for iterators. + // To do this we use several well know patterns: + // TAO_Object_Table::iterator uses the Bridge pattern to give a + // consistent and "by-value" interface to all the iterators. + // The base class for all the iterators is + // TAO_Object_Table_Iterator, here we use external polymorphism + // to adapt all the iterators to this common interface. + // +public: + virtual ~TAO_Object_Table_Iterator_Impl (void); + // dtor + + virtual TAO_Object_Table_Iterator_Impl *clone (void) const = 0; + // Make a copy of the iterator, pointing to the current position. + + virtual const TAO_Object_Table_Entry& item (void) const = 0; + // Obtain the current item + + virtual void advance (void) = 0; + // Advance to the next element. + + virtual int done (const TAO_Object_Table_Iterator_Impl *end) const = 0; + // Returns 1 if "this" points to the same position as <end>, returns + // 0 otherwise. +}; + +class TAO_Export TAO_Object_Table_Impl +{ + // = TITLE + // Abstract class for maintaining a mapping from ObjectId's to + // Servants. + // + // = DESCRIPTION + // + // = NOTES + // Iterators may return free entries, whose "int_id" (the servant) + // is 0. +public: + virtual ~TAO_Object_Table_Impl (void); + // Destructor. + + virtual int find (const PortableServer::ObjectId &id, + PortableServer::Servant &servant) = 0; + // Find object associated with <{id}>. + // If the ObjectId is found it sets <{servant}> and returns a + // non-negative integer. If not found, <{servant}> is unchanged and + // the value <-1> is returned. + + virtual int bind (const PortableServer::ObjectId &id, + PortableServer::Servant servant) = 0; + // Associate <{id}> with <{servant}>, returning 0 if object is + // registered successfully, 1 if it's already registered, and -1 if + // a failure occurs during registration. + + virtual int unbind (const PortableServer::ObjectId &id, + PortableServer::Servant &servant) = 0; + // Remote any association among <id> and <servant>. + // Returns 0 if the operation was succesful, <-1> otherwise. + + virtual TAO_Object_Table_Iterator_Impl* begin () const = 0; + virtual TAO_Object_Table_Iterator_Impl* end () const = 0; + // Iterator interface + + virtual int find (const PortableServer::Servant servant); + // Returns 0 if <servant> is in the table, <-1> otherwise. + + virtual int find (const PortableServer::ObjectId &id); + // Returns 0 if there is a servant for <id> in the table, <-1> + // otherwise. + + // @@ TODO check with Irfan the semantics of this method when more + // than one <id> is handled by the same servant. Also wonder if the + // "default" implementation (linear search on the iterator) makes + // sense, since the operation is (IMHO) not time critical. + virtual int find (const PortableServer::Servant servant, + PortableServer::ObjectId_out id); + // Find the <id> for <servant>. + // Returns <-1> if <servant> is not found or if more than one <id> + // is associated with <servant>, returns <0> otherwise. + +}; + +class TAO_Export TAO_Object_Table_Iterator +{ + // = TITLE + // Bridge for abstract iterator. + // + // = DESCRIPTION + // This class provides the "Abstraction" for iteration over Object + // Tables. +public: + TAO_Object_Table_Iterator (TAO_Object_Table_Iterator_Impl *impl); + // Constructor taking an implementation. + + TAO_Object_Table_Iterator (const TAO_Object_Table_Iterator& x); + TAO_Object_Table_Iterator& operator=(const TAO_Object_Table_Iterator& x); + ~TAO_Object_Table_Iterator (void); + // This is a well behaved class + + const TAO_Object_Table_Entry& operator* (void) const; + // Return the current item. + + TAO_Object_Table_Iterator operator++ (void); + TAO_Object_Table_Iterator operator++ (int); + // Increase the current position. + + friend int operator==(const TAO_Object_Table_Iterator &l, + const TAO_Object_Table_Iterator &r); + friend int operator!=(const TAO_Object_Table_Iterator &l, + const TAO_Object_Table_Iterator &r); + // Compare two iterators. + +private: + TAO_Object_Table_Iterator_Impl* impl_; +}; + +class TAO_Export TAO_Object_Table // = TITLE // Abstract class for maintaining a mapping of CORBA object keys // to pointers to CORBA objects. { public: - virtual int find (const TAO_opaque &key, - CORBA::Object_ptr &obj) = 0; - // Find object associated with <{key}>, setting <{obj}> to the - // pointer and returning a non-negative integer. If not found, - // <{obj}> is unchanged and the value <-1> is returned. - - virtual int bind (const TAO_opaque &key, - CORBA::Object_ptr obj) = 0; - // Associated <{key}> with <{obj}>, returning 0 if object is + TAO_Object_Table (void); + // Constructor + + ~TAO_Object_Table (void); + // Destructor. + + int find (const PortableServer::ObjectId &id, + PortableServer::Servant &servant); + // Find object associated with <{id}>. + // If the ObjectId is found it sets <{servant}> and returns a + // non-negative integer. If not found, <{servant}> is unchanged and + // the value <-1> is returned. + + int bind (const PortableServer::ObjectId &id, + PortableServer::Servant servant); + // Associate <{id}> with <{servant}>, returning 0 if object is // registered successfully, 1 if it's already registered, and -1 if // a failure occurs during registration. - virtual ~TAO_Object_Table (void); - // Destructor. + int unbind (const PortableServer::ObjectId &id, + PortableServer::Servant &servant); + // Remote any association among <id> and <servant>. + // Returns 0 if the operation was succesful, <-1> otherwise. + + int find (const PortableServer::Servant servant); + // Returns 0 if <servant> is in the table, <-1> otherwise. + + int find (const PortableServer::ObjectId &id); + // Returns 0 if there is a servant for <id> in the table, <-1> + // otherwise. + + // @@ TODO check with Irfan the semantics of this method when more + // than one <id> is handled by the same servant. Also wonder if the + // "default" implementation (linear search on the iterator) makes + // sense, since the operation is (IMHO) not time critical. + int find (const PortableServer::Servant servant, + PortableServer::ObjectId_out id); + // Find the <id> for <servant>. + // Returns <-1> if <servant> is not found or if more than one <id> + // is associated with <servant>, returns <0> otherwise. + + typedef TAO_Object_Table_Iterator iterator; + iterator begin (void) const; + iterator end (void) const; + +private: + TAO_Object_Table (const TAO_Object_Table&); + TAO_Object_Table& operator= (const TAO_Object_Table&); + // disallow copying. + +private: + TAO_Object_Table_Impl* impl_; }; -// Dynamic Hashing scheme using template specialization for char* -typedef ACE_Hash_Map_Manager<const char*, CORBA::Object_ptr, ACE_SYNCH_RW_MUTEX> - OBJ_MAP_MANAGER; +/****************************************************************/ + +// In the next section we implement a few concrete object table +// implementations, namely: +// TAO_Dynamic_Hash_ObjTable, based on dynamic hashing +// (ACE_Hash_Map_Manager). +// TAO_Linear_ObjTable, using linear search and a simple dynamically +// growing array. +// TAO_Active_Demux_ObjTable, using also a dynamically allocated +// array, but using active demultiplexing to do the lookups. -class TAO_Dynamic_Hash_ObjTable : public TAO_Object_Table +/****************************************************************/ + +class TAO_Export TAO_Dynamic_Hash_ObjTable : public TAO_Object_Table_Impl +{ // = TITLE // Lookup strategy based on dynamic hashing. This works on the // assumption that the object keys are essentially strings. -{ + // + // = DESCRIPTION + // The object table is implemented using a ACE_Hash_Map_Manager, + // the iterators are implemented using the ACE_Hash_Map_Iterator + // class. + // public: TAO_Dynamic_Hash_ObjTable (CORBA::ULong size = 0); // constructor. If size is 0, some default is used. - ~TAO_Dynamic_Hash_ObjTable (void); - // destructor - - virtual int bind (const TAO_opaque &key, - CORBA::Object_ptr obj); - // Registers a CORBA::Object into the object table and associates - // the key with it. Returns -1 on failure, 0 on success, 1 on - // duplicate. + // Implement TAO_Dynamic_Hash_ObjTable.... + virtual int find (const PortableServer::Servant servant); + virtual int find (const PortableServer::ObjectId &id); + virtual int find (const PortableServer::Servant servant, + PortableServer::ObjectId_out id); + virtual int find (const PortableServer::ObjectId &id, + PortableServer::Servant &servant); + virtual int bind (const PortableServer::ObjectId &id, + PortableServer::Servant servant); + virtual int unbind (const PortableServer::ObjectId &id, + PortableServer::Servant &servant); + virtual TAO_Object_Table_Iterator_Impl* begin (void) const; + virtual TAO_Object_Table_Iterator_Impl* end (void) const; - virtual int find (const TAO_opaque &key, - CORBA::Object_ptr &obj); - // Looks up an object in the object table using <{key}>. Returns - // non-negative integer on success, or -1 on failure. + // Dynamic Hashing scheme using template specialization for char* + typedef ACE_Hash_Map_Manager<PortableServer::ObjectId, PortableServer::Servant, ACE_SYNCH_RW_MUTEX> Hash_Map; + typedef ACE_Hash_Map_Iterator<PortableServer::ObjectId, PortableServer::Servant, ACE_SYNCH_RW_MUTEX> Iterator; private: - OBJ_MAP_MANAGER hash_; + Hash_Map hash_map_; // internal hash table }; -struct TAO_Linear_ObjTable_Entry - // = TITLE - // Linear strategy table entry. This assumes that the object keys - // will be strings encoded as an octet sequence. +class TAO_Export TAO_Dynamic_Hash_ObjTable_Iterator : public TAO_Object_Table_Iterator_Impl { - CORBA::String opname_; - // Stores the object key. + // = TITLE + // Iterator for TAO_Dynamic_Hash_ObjTable. +public: + typedef TAO_Dynamic_Hash_ObjTable::Iterator Impl; + TAO_Dynamic_Hash_ObjTable_Iterator (const Impl& impl); - CORBA::Object_ptr obj_; - // Holds the CORBA::Object pointer corresponding to the object key. + // default copy ctor, dtor and operator= - TAO_Linear_ObjTable_Entry (void); - // constructor + // TAO_Object_Table_Impl methods... + virtual TAO_Object_Table_Iterator_Impl *clone (void) const; + virtual const TAO_Object_Table_Entry& item (void) const; + virtual void advance (void); + virtual int done (const TAO_Object_Table_Iterator_Impl *end) const; - ~TAO_Linear_ObjTable_Entry (void); - // destructor +private: + Impl impl_; }; -class TAO_Linear_ObjTable: public TAO_Object_Table +/****************************************************************/ + +class TAO_Export TAO_Array_ObjTable_Iterator : public TAO_Object_Table_Iterator_Impl { // = TITLE - // Lookup strategy based on a simple linear search. Not - // efficient, but most likely will always work. + // Iterator for TAO_Linear_ObjTable and TAO_Active_Demux_ObjTable public: - TAO_Linear_ObjTable (CORBA::ULong size); - - ~TAO_Linear_ObjTable (void); + TAO_Array_ObjTable_Iterator (TAO_Object_Table_Entry *pos); - virtual int bind (const TAO_opaque &key, - CORBA::Object_ptr obj); - // Registers a CORBA::Object into the object table and associates the - // key with it. Returns -1 on failure, 0 on success, 1 on - // duplicate. + // default copy ctor, dtor and operator= - virtual int find (const TAO_opaque &key, - CORBA::Object_ptr &obj); - // Looks up an object in the object table using <{key}>. Returns - // non-negative integer on success, or -1 on failure. + // TAO_Object_Table_Impl methods... + virtual TAO_Object_Table_Iterator_Impl *clone (void) const; + virtual const TAO_Object_Table_Entry& item (void) const; + virtual void advance (void); + virtual int done (const TAO_Object_Table_Iterator_Impl *end) const; private: - CORBA::ULong next_; - CORBA::ULong tablesize_; - TAO_Linear_ObjTable_Entry *tbl_; + TAO_Object_Table_Entry* pos_; }; -struct TAO_Active_Demux_ObjTable_Entry +/****************************************************************/ + +class TAO_Export TAO_Linear_ObjTable : public TAO_Object_Table_Impl { // = TITLE - // Active Demux lookup table entry. - CORBA::Object_ptr obj_; - // CORBA::Object pointer corresponding to the key + // Lookup strategy based on a simple linear search. Not + // efficient, but most likely will always work. + // + // = DESCRIPTION + // Uses a dynamic array to store the objects and linear search + // for the lookups. + // +public: + TAO_Linear_ObjTable (CORBA::ULong size); + virtual ~TAO_Linear_ObjTable (void); - TAO_Active_Demux_ObjTable_Entry (void); - // constructor + virtual int find (const PortableServer::Servant servant); + virtual int find (const PortableServer::ObjectId &id); + virtual int find (const PortableServer::Servant servant, + PortableServer::ObjectId_out id); + virtual int find (const PortableServer::ObjectId &id, + PortableServer::Servant &servant); + virtual int bind (const PortableServer::ObjectId &id, + PortableServer::Servant servant); + virtual int unbind (const PortableServer::ObjectId &id, + PortableServer::Servant &servant); + virtual TAO_Object_Table_Iterator_Impl* begin () const; + virtual TAO_Object_Table_Iterator_Impl* end () const; - ~TAO_Active_Demux_ObjTable_Entry (void); - // destructor +private: + int next_; + int tablesize_; + TAO_Object_Table_Entry *table_; }; -class TAO_Active_Demux_ObjTable : public TAO_Object_Table +/****************************************************************/ + +class TAO_Export TAO_Active_Demux_ObjTable : public TAO_Object_Table_Impl { // = TITLE // An object table lookup strategy based on active // demultiplexing strategy. + // + // = DESCRIPTION + // Use an static array to store the objects, keys must be the + // string representation of the indices into the array so lookups + // can be done in O(1). + // Iterators are implemented using pointers on the array. public: TAO_Active_Demux_ObjTable (CORBA::ULong size); + // Constructor, including an initial size. ~TAO_Active_Demux_ObjTable (void); + // Destructor - virtual int bind (const TAO_opaque &key, - CORBA::Object_ptr obj); - // Registers a CORBA::Object into the object table and associates - // the key with it. Returns -1 on failure, 0 on success, 1 on - // duplicate. + int next_free (void) const; + // Searches the array for the next free element, returns -1 if none + // is found. + // @@ Discuss what is the right interface to create ObjectId's + // assigned by the Object Table... - virtual int find (const TAO_opaque &key, - CORBA::Object_ptr &obj); - // Looks up an object in the object table using <{key}>. Returns - // non-negative integer on success, or -1 on failure. + // Implement TAO_Dynamic_Hash_ObjTable.... + virtual int find (const PortableServer::Servant servant); + virtual int find (const PortableServer::ObjectId &id); + virtual int find (const PortableServer::Servant servant, + PortableServer::ObjectId_out id); + virtual int find (const PortableServer::ObjectId &id, + PortableServer::Servant &servant); + virtual int bind (const PortableServer::ObjectId &id, + PortableServer::Servant servant); + virtual int unbind (const PortableServer::ObjectId &id, + PortableServer::Servant &servant); + virtual TAO_Object_Table_Iterator_Impl* begin () const; + virtual TAO_Object_Table_Iterator_Impl* end () const; private: - CORBA::ULong next_; - CORBA::ULong tablesize_; - TAO_Active_Demux_ObjTable_Entry *tbl_; + int index_from_id (const PortableServer::ObjectId &id) const; + // Return the array index for the id... + +private: + int tablesize_; + TAO_Object_Table_Entry *table_; }; #endif /* TAO_OBJTABLE_H */ - - diff --git a/TAO/tao/orbobj.cpp b/TAO/tao/orbobj.cpp index 78721dfa8c4..5d757e04620 100644 --- a/TAO/tao/orbobj.cpp +++ b/TAO/tao/orbobj.cpp @@ -193,6 +193,7 @@ CORBA_ORB::create_list (CORBA::Long count, // // XXX it's server-side so should be OA-specific and not in this module +#if 0 CORBA::POA_ptr CORBA_ORB::POA_init (int &argc, char **argv, @@ -237,6 +238,7 @@ CORBA_ORB::POA_init (int &argc, return rp; } +#endif /* 0 */ int CORBA_ORB::perform_work (ACE_Time_Value *tv) @@ -295,9 +297,54 @@ CORBA_ORB::run (ACE_Time_Value *tv) CORBA_Object_ptr CORBA_ORB::resolve_poa (void) { - ACE_NOTSUP_RETURN (CORBA_Object::_nil ()); + CORBA::Environment env; + + TAO_POA *poa = TAO_ORB_Core_instance ()->root_poa (); + + // Need to do double-checked locking here to cover the case of + // multiple threads using a global resource policy. + if (poa == 0) + { + TAO_POA_Manager *manager = new TAO_Strategy_POA_Manager; + TAO_POA_Policies root_poa_policies; + root_poa_policies.implicit_activation (PortableServer::IMPLICIT_ACTIVATION); + + // Construct a new POA + poa = new TAO_Strategy_POA ("RootPOA", + *manager, + root_poa_policies, + 0, + env); + + if (env.exception () != 0) + return CORBA_Object::_nil (); + + // set the poa in the orbcore instance + TAO_ORB_Core_instance ()->root_poa (poa); + } + + PortableServer::POA_var result = poa->_this (env); + if (env.exception () != 0) + return CORBA_Object::_nil (); + else + return result._retn (); +} + +CORBA_Object_ptr +CORBA_ORB::resolve_poa_current (void) +{ + // Return the pointer to this thread's POACurrent. + + CORBA::Environment env; + + PortableServer::Current_var result = TAO_ORB_Core_instance ()->poa_current ()->_this (env); + if (env.exception () != 0) + return CORBA_Object::_nil (); + else + return result._retn (); } + CORBA_Object_ptr CORBA_ORB::resolve_name_service (void) { @@ -435,14 +482,68 @@ CORBA_ORB::resolve_name_service (void) CORBA_Object_ptr CORBA_ORB::resolve_initial_references (CORBA::String name) { - if (ACE_OS::strcmp (name, "NameService") == 0) + if (ACE_OS::strcmp (name, TAO_OBJID_NAMESERVICE) == 0) return this->resolve_name_service (); - else if (ACE_OS::strcmp (name, "RootPOA") == 0) + else if (ACE_OS::strcmp (name, TAO_OBJID_ROOTPOA) == 0) return this->resolve_poa (); + else if (ACE_OS::strcmp (name, TAO_OBJID_POACURRENT) == 0) + return this->resolve_poa_current (); else return CORBA_Object::_nil (); } +// Create an objref + +CORBA::Object_ptr +CORBA_ORB::key_to_object (const TAO::ObjectKey &key, + const char *type_id, + CORBA::Environment &env) +{ + CORBA::String id; + IIOP_Object *data; + + if (type_id) + id = CORBA::string_copy (type_id); + else + id = 0; + + // @@ (IRFAN) This is the most likely chunk of code to break because + // of this evil cast. Unfortunately, the generated code for + // sequences doesn't give access to the underlying buffer, so I + // don't have a way to construct a new OctetSeq instance in the + // appropriate manner. Fortunately, in order for ObjectKey to be + // useable internally, we need the same capabilities, and so right + // around the time that this conversion could be done properly it + // won't have to be done at all. + // @@ I (coryan@cs) modified the ORB core to use + // PortableServer::ObjectId instead of CORBA::OctetSeq as object + // identifiers, if this prove to be wrong I'll take it back. + // CORBA::OctetSeq *internal_key = (CORBA::OctetSeq *)key; + data = new IIOP_Object (id, + IIOP::Profile (TAO_ORB_Core_instance ()->orb_params ()->addr (), + key)); + if (data != 0) + env.clear (); + else + { + env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + return 0; + } + + // Return the CORBA::Object_ptr interface to this objref. + CORBA::Object_ptr new_obj; + + if (data->QueryInterface (IID_CORBA_Object, + (void **) &new_obj) != TAO_NOERROR) + env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_NO)); + + data->Release (); + return new_obj; + + // return new CORBA::Object (data); +} + + #define TAO_HASH_ADDR ACE_Hash_Addr<ACE_INET_Addr> #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Dynamic_Service<TAO_Server_Strategy_Factory>; diff --git a/TAO/tao/orbobj.h b/TAO/tao/orbobj.h index 0a465592dd8..e0ef8b40a38 100644 --- a/TAO/tao/orbobj.h +++ b/TAO/tao/orbobj.h @@ -25,15 +25,25 @@ #include "tao/corba.h" +// ObjectIds recognized by CORBA_ORB::resolve_initial_references ()... +// of course, no guarantees are made that the call will return something +// useful. +#define TAO_OBJID_NAMESERVICE "NameService" +#define TAO_OBJID_ROOTPOA "RootPOA" +#define TAO_OBJID_POACURRENT "POACurrent" +#define TAO_OBJID_INTERFACEREP "InterfaceRepository" + class TAO_Export CORBA_ORB : public TAO_IUnknown // = TITLE // ORB pseudo-objref. { public: - CORBA::POA_ptr POA_init (int &argc, - char **argv, - const char *poa_identifier = 0); + /* + TAO_POA *POA_init (int &argc, + char **argv, + const char *poa_identifier = 0); // Initialize the Portable Object Adapter (POA). + */ static CORBA::ORB_ptr _duplicate (CORBA::ORB_ptr orb); // Return a duplicate of <{orb}>. When work with this duplicate is @@ -108,6 +118,29 @@ public: // has completed. <[NOTE]> <wait_for_completion>=TRUE is not // currently supported. + // = TAO-specific Extensions + + CORBA_Object_ptr key_to_object (const TAO::ObjectKey &key, + const char *type_id, + CORBA::Environment &env); + // Convert key into an object reference. Return Object_ptr as out + // parameter. Errors will come through the environment. + // + // Object IDs are assigned and used by servers to identify objects. + // + // Type IDs are repository IDs, assigned as part of OMG-IDL + // interface definition to identify specific interfaces and their + // relationships to other OMG-IDL interfaces. It's OK to provide a + // null type ID. Providing a null object key will result in an + // INV_OBJREF exception. + // + // Clients which invoke operations using one of these references + // when the server is not active (or after the last reference to the + // POA is released) will normally see an OBJECT_NOT_EXIST exception + // reported by the ORB. If the POA is a "Named POA" the client's + // ORB will not normally return OBJECT_NOT_EXIST unless the POA + // reports that fault. + // = <IUnknown> Support // // Stuff required for COM IUnknown support ... this class is @@ -142,6 +175,9 @@ private: CORBA_Object_ptr resolve_poa (void); // Resolve the POA. + CORBA_Object_ptr resolve_poa_current (void); + // Resolve the POA current. + ACE_SYNCH_MUTEX lock_; u_int refcount_; ACE_Atomic_Op<ACE_SYNCH_MUTEX, CORBA::Boolean> open_called_; diff --git a/TAO/tao/params.h b/TAO/tao/params.h index e7f845c60df..502bf914ec6 100644 --- a/TAO/tao/params.h +++ b/TAO/tao/params.h @@ -133,11 +133,11 @@ public: TAO_LOCAL_INLINE TAO_Demux_Strategy demux_strategy (void); // Return the demultiplexing strategy being used. - TAO_LOCAL_INLINE void userdef_lookup_strategy (TAO_Object_Table *&ot); + TAO_LOCAL_INLINE void userdef_lookup_strategy (TAO_Object_Table_Impl *&ot); // Provide a way for user defined object key lookup strategies to be // plugged in. - TAO_LOCAL_INLINE TAO_Object_Table *userdef_lookup_strategy (void); + TAO_LOCAL_INLINE TAO_Object_Table_Impl *userdef_lookup_strategy (void); // return the lookup strategy TAO_LOCAL_INLINE void tablesize (CORBA::ULong tablesize); @@ -153,7 +153,7 @@ private: CORBA::ULong tablesize_; // size of object lookup table - TAO_Object_Table *ot_; + TAO_Object_Table_Impl *ot_; // concrete lookup table instance }; diff --git a/TAO/tao/params.i b/TAO/tao/params.i index 07536ae67f0..9a0e11ef157 100644 --- a/TAO/tao/params.i +++ b/TAO/tao/params.i @@ -49,7 +49,7 @@ TAO_OA_Parameters::tablesize (void) } ACE_INLINE void -TAO_OA_Parameters::userdef_lookup_strategy (TAO_Object_Table *&ot) +TAO_OA_Parameters::userdef_lookup_strategy (TAO_Object_Table_Impl *&ot) { // provide a way for user defined object key lookup strategies to be plugged // in @@ -57,7 +57,7 @@ TAO_OA_Parameters::userdef_lookup_strategy (TAO_Object_Table *&ot) ot = 0; // we own it now } -ACE_INLINE TAO_Object_Table * +ACE_INLINE TAO_Object_Table_Impl * TAO_OA_Parameters::userdef_lookup_strategy (void) { // return the lookup strategy diff --git a/TAO/tao/poa.cpp b/TAO/tao/poa.cpp index 4e74e271f8f..6c31ba52759 100644 --- a/TAO/tao/poa.cpp +++ b/TAO/tao/poa.cpp @@ -1,361 +1,3407 @@ // @(#) $Id$ -// -// Copyright 1994-1995 by Sun Microsystems Inc. -// All Rights Reserved -// -// POA initialisation -- both anonymous and (for system bootstrapping) -// named POAs. -// -// XXX at this time, there's a strong linkage between this code and -// the modules knowing about IIOP. In the future, a looser coupling -// between OA initialiszation and protocol components is desired. +// CORBA #include "tao/corba.h" -// {A201E4C8-F258-11ce-9598-0000C07CA898} -DEFINE_GUID (IID_POA, -0xa201e4c8, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98) ; +// POA +#include "tao/poa.h" -// CORBA_POA::init() is used in get_poa() and get_named_poa() in order -// to initialize the OA. It was originally part of POA, and may no -// longer be useful. +// Exception macros +#include "tao/poa_macros.h" -CORBA::POA_ptr -CORBA_POA::init (CORBA::ORB_ptr parent, - ACE_INET_Addr &, - CORBA::Environment &env) +// auto_ptr class +#include "ace/Auto_Ptr.h" + +// This is the maximum space require to convert the ulong into a string +const int TAO_POA::max_space_required_for_ulong = 24; + +TAO_Thread_Policy::TAO_Thread_Policy (PortableServer::ThreadPolicyValue value) + : value_ (value) +{ +} + +TAO_Thread_Policy::TAO_Thread_Policy (const TAO_Thread_Policy &rhs) + : value_ (rhs.value_) { - env.clear (); - TAO_ORB_Core *p = TAO_ORB_Core_instance (); +} + +PortableServer::ThreadPolicyValue +TAO_Thread_Policy::value (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + return this->value_; +} - if (p->root_poa ()) +PortableServer::Policy_ptr +TAO_Thread_Policy::copy (CORBA::Environment &env) +{ + auto_ptr<TAO_Thread_Policy> new_policy (new TAO_Thread_Policy (*this)); + + PortableServer::Policy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::Policy::_nil (); + else { - env.exception (new CORBA_INITIALIZE (CORBA::COMPLETED_NO)); - return 0; + // Make sure that the auto_ptr does not delete the + // implementation object + new_policy.release (); + return result._retn (); } +} - CORBA::POA_ptr rp; - ACE_NEW_RETURN (rp, CORBA_POA (parent, env), 0); - p->root_poa (rp); +void +TAO_Thread_Policy::destroy (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); - return rp; + // Commit suicide: must have been dynamically allocated + delete this; } -CORBA_POA::CORBA_POA (CORBA::ORB_ptr owning_orb, - CORBA::Environment &) - : do_exit_ (CORBA::B_FALSE), - orb_ (owning_orb), - call_count_ (0), - skeleton_ (0) +TAO_Lifespan_Policy::TAO_Lifespan_Policy (PortableServer::LifespanPolicyValue value) + : value_ (value) { - TAO_ORB_Core* p = TAO_ORB_Core_instance (); - TAO_Server_Strategy_Factory *f = p->server_factory (); +} - this->objtable_ = f->create_object_table (); +TAO_Lifespan_Policy::TAO_Lifespan_Policy (const TAO_Lifespan_Policy &rhs) + : value_ (rhs.value_) +{ +} - // @@ What is this doing here? Why is it setting the root poa based - // on whether objtable_ is non-zero? (cjc) - if (this->objtable_ != 0) - p->root_poa (this); +PortableServer::LifespanPolicyValue +TAO_Lifespan_Policy::value (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + return this->value_; } -CORBA_POA::~CORBA_POA (void) +PortableServer::Policy_ptr +TAO_Lifespan_Policy::copy (CORBA::Environment &env) { + auto_ptr<TAO_Lifespan_Policy> new_policy (new TAO_Lifespan_Policy (*this)); + + PortableServer::Policy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::Policy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation object + new_policy.release (); + return result._retn (); + } } -// Create an objref +void +TAO_Lifespan_Policy::destroy (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); -CORBA::Object_ptr -CORBA_POA::create (TAO_opaque &key, - CORBA::String type_id, - CORBA::Environment &env) + // Commit suicide: must have been dynamically allocated + delete this; +} + +TAO_Id_Uniqueness_Policy::TAO_Id_Uniqueness_Policy (PortableServer::IdUniquenessPolicyValue value) + : value_ (value) { - CORBA::String id; - IIOP_Object *data; +} - if (type_id) - id = CORBA::string_copy (type_id); +TAO_Id_Uniqueness_Policy::TAO_Id_Uniqueness_Policy (const TAO_Id_Uniqueness_Policy &rhs) + : value_ (rhs.value_) +{ +} + +PortableServer::IdUniquenessPolicyValue +TAO_Id_Uniqueness_Policy::value (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + return this->value_; +} + +PortableServer::Policy_ptr +TAO_Id_Uniqueness_Policy::copy (CORBA::Environment &env) +{ + auto_ptr<TAO_Id_Uniqueness_Policy> new_policy (new TAO_Id_Uniqueness_Policy (*this)); + + PortableServer::Policy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::Policy::_nil (); else - id = 0; + { + // Make sure that the auto_ptr does not delete the + // implementation object + new_policy.release (); + return result._retn (); + } +} + +void +TAO_Id_Uniqueness_Policy::destroy (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + + // Commit suicide: must have been dynamically allocated + delete this; +} + +TAO_Id_Assignment_Policy::TAO_Id_Assignment_Policy (PortableServer::IdAssignmentPolicyValue value) + : value_ (value) +{ +} +TAO_Id_Assignment_Policy::TAO_Id_Assignment_Policy (const TAO_Id_Assignment_Policy &rhs) + : value_ (rhs.value_) +{ +} + +PortableServer::IdAssignmentPolicyValue +TAO_Id_Assignment_Policy::value (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + return this->value_; +} +PortableServer::Policy_ptr +TAO_Id_Assignment_Policy::copy (CORBA::Environment &env) +{ + auto_ptr<TAO_Id_Assignment_Policy> new_policy (new TAO_Id_Assignment_Policy (*this)); - data = new IIOP_Object (id, - IIOP::Profile (TAO_ORB_Core_instance ()->orb_params ()->addr (), - key)); - if (data != 0) - env.clear (); + PortableServer::Policy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::Policy::_nil (); else { - env.exception (new CORBA_NO_MEMORY (CORBA::COMPLETED_NO)); + // Make sure that the auto_ptr does not delete the + // implementation object + new_policy.release (); + return result._retn (); + } +} + +void +TAO_Id_Assignment_Policy::destroy (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + + // Commit suicide: must have been dynamically allocated + delete this; +} + +TAO_Implicit_Activation_Policy::TAO_Implicit_Activation_Policy (PortableServer::ImplicitActivationPolicyValue value) + : value_ (value) +{ +} + +TAO_Implicit_Activation_Policy::TAO_Implicit_Activation_Policy (const TAO_Implicit_Activation_Policy &rhs) + : value_ (rhs.value_) +{ +} + +PortableServer::ImplicitActivationPolicyValue +TAO_Implicit_Activation_Policy::value (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + return this->value_; +} + +PortableServer::Policy_ptr +TAO_Implicit_Activation_Policy::copy (CORBA::Environment &env) +{ + auto_ptr<TAO_Implicit_Activation_Policy> new_policy (new TAO_Implicit_Activation_Policy (*this)); + + PortableServer::Policy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::Policy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation object + new_policy.release (); + return result._retn (); + } +} + +void +TAO_Implicit_Activation_Policy::destroy (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + + // Commit suicide: must have been dynamically allocated + delete this; +} + +TAO_Servant_Retention_Policy::TAO_Servant_Retention_Policy (PortableServer::ServantRetentionPolicyValue value) + : value_ (value) +{ +} + +TAO_Servant_Retention_Policy::TAO_Servant_Retention_Policy (const TAO_Servant_Retention_Policy &rhs) + : value_ (rhs.value_) +{ +} + +PortableServer::ServantRetentionPolicyValue +TAO_Servant_Retention_Policy::value (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + return this->value_; +} + +PortableServer::Policy_ptr +TAO_Servant_Retention_Policy::copy (CORBA::Environment &env) +{ + auto_ptr<TAO_Servant_Retention_Policy> new_policy (new TAO_Servant_Retention_Policy (*this)); + + PortableServer::Policy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::Policy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation object + new_policy.release (); + return result._retn (); + } +} + +void +TAO_Servant_Retention_Policy::destroy (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + + // Commit suicide: must have been dynamically allocated + delete this; +} + +TAO_Request_Processing_Policy::TAO_Request_Processing_Policy (PortableServer::RequestProcessingPolicyValue value) + : value_ (value) +{ +} + +TAO_Request_Processing_Policy::TAO_Request_Processing_Policy (const TAO_Request_Processing_Policy &rhs) + : value_ (rhs.value_) +{ +} + +PortableServer::RequestProcessingPolicyValue +TAO_Request_Processing_Policy::value (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + return this->value_; +} + +PortableServer::Policy_ptr +TAO_Request_Processing_Policy::copy (CORBA::Environment &env) +{ + auto_ptr<TAO_Request_Processing_Policy> new_policy (new TAO_Request_Processing_Policy (*this)); + + PortableServer::Policy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::Policy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation object + new_policy.release (); + return result._retn (); + } +} + +void +TAO_Request_Processing_Policy::destroy (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + + // Commit suicide: must have been dynamically allocated + delete this; +} + +TAO_POA_Policies::TAO_POA_Policies (void) + : 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) +{ +} + +void +TAO_POA_Policies::parse_policies (const PortableServer::PolicyList &policies, + CORBA::Environment &env) +{ + for (CORBA::ULong i = 0; + i < policies.length () && env.exception () == 0; + i++) + { + this->parse_policy (policies[i], env); + } + + if (this->validity_check () == -1) + { + CORBA::Exception *exception = new PortableServer::POA::InvalidPolicy; + env.exception (exception); + return; + } +} + +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; + + return 0; +} + +void +TAO_POA_Policies::parse_policy (const PortableServer::Policy_ptr policy, + CORBA::Environment &env) +{ + PortableServer::ThreadPolicy_var thread + = PortableServer::ThreadPolicy::_narrow (policy, env); + if (!CORBA::is_nil (thread.in ())) + { + this->thread_ = thread->value (env); + return; + } + else + { + env.clear (); + } + + PortableServer::LifespanPolicy_var lifespan + = PortableServer::LifespanPolicy::_narrow (policy, env); + if (!CORBA::is_nil (lifespan.in ())) + { + this->lifespan_ = lifespan->value (env); + return; + } + else + { + env.clear (); + } + + PortableServer::IdUniquenessPolicy_var id_uniqueness + = PortableServer::IdUniquenessPolicy::_narrow (policy, env); + if (!CORBA::is_nil (id_uniqueness.in ())) + { + this->id_uniqueness_ = id_uniqueness->value (env); + return; + } + else + { + env.clear (); + } + + PortableServer::IdAssignmentPolicy_var id_assignment + = PortableServer::IdAssignmentPolicy::_narrow (policy, env); + if (!CORBA::is_nil (id_assignment.in ())) + { + this->id_assignment_ = id_assignment->value (env); + return; + } + else + { + env.clear (); + } + + PortableServer::ImplicitActivationPolicy_var implicit_activation + = PortableServer::ImplicitActivationPolicy::_narrow (policy, env); + if (!CORBA::is_nil (implicit_activation.in ())) + { + this->implicit_activation_ = implicit_activation->value (env); + return; + } + else + { + env.clear (); + } + + PortableServer::ServantRetentionPolicy_var servant_retention + = PortableServer::ServantRetentionPolicy::_narrow (policy, env); + if (!CORBA::is_nil (servant_retention.in ())) + { + this->servant_retention_ = servant_retention->value (env); + return; + } + else + { + env.clear (); + } + + PortableServer::RequestProcessingPolicy_var request_processing + = PortableServer::RequestProcessingPolicy::_narrow (policy, env); + if (!CORBA::is_nil (request_processing.in ())) + { + this->request_processing_ = request_processing->value (env); + return; + } + else + { + env.clear (); + } + + CORBA::Exception *exception = new PortableServer::POA::InvalidPolicy; + env.exception (exception); + return; +} + +PortableServer::ThreadPolicyValue +TAO_POA_Policies::thread (void) const +{ + return this->thread_; +} + +void +TAO_POA_Policies::thread (PortableServer::ThreadPolicyValue value) +{ + this->thread_ = value; +} + +PortableServer::LifespanPolicyValue +TAO_POA_Policies::lifespan (void) const +{ + return this->lifespan_; +} + +void +TAO_POA_Policies::lifespan (PortableServer::LifespanPolicyValue value) +{ + this->lifespan_ = value; +} + +PortableServer::IdUniquenessPolicyValue +TAO_POA_Policies::id_uniqueness (void) const +{ + return this->id_uniqueness_; +} + +void +TAO_POA_Policies::id_uniqueness (PortableServer::IdUniquenessPolicyValue value) +{ + this->id_uniqueness_ = value; +} + +PortableServer::IdAssignmentPolicyValue +TAO_POA_Policies::id_assignment (void) const +{ + return this->id_assignment_; +} + +void +TAO_POA_Policies::id_assignment (PortableServer::IdAssignmentPolicyValue value) +{ + this->id_assignment_ = value; +} + +PortableServer::ImplicitActivationPolicyValue +TAO_POA_Policies::implicit_activation (void) const +{ + return this->implicit_activation_; +} + +void +TAO_POA_Policies::implicit_activation (PortableServer::ImplicitActivationPolicyValue value) +{ + this->implicit_activation_ = value; +} + +PortableServer::ServantRetentionPolicyValue +TAO_POA_Policies::servant_retention (void) const +{ + return this->servant_retention_; +} + +void +TAO_POA_Policies::servant_retention (PortableServer::ServantRetentionPolicyValue value) +{ + this->servant_retention_ = value; +} + +PortableServer::RequestProcessingPolicyValue +TAO_POA_Policies::request_processing (void) const +{ + return this->request_processing_; +} + +void +TAO_POA_Policies::request_processing (PortableServer::RequestProcessingPolicyValue value) +{ + this->request_processing_ = value; +} + +TAO_POA::TAO_POA (const TAO_POA::String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + CORBA::Environment &env) + : name_ (adapter_name), + poa_manager_ (poa_manager), + policies_ (policies), + parent_ (parent), + active_object_map_ (new TAO_Object_Table), + delete_active_object_map_ (1), + adapter_activator_ (), + servant_activator_ (), + servant_locator_ (), + default_servant_ (0), + children_ (), + lock_ (), + closing_down_ (0), + counter_ (0), + creation_time_ (ACE_OS::gettimeofday ()) +{ + this->set_complete_name (); + + // Register self with manager + this->poa_manager_.register_poa (this, env); +} + +TAO_POA::TAO_POA (const TAO_POA::String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + TAO_Object_Table &active_object_map, + CORBA::Environment &env) + : name_ (adapter_name), + poa_manager_ (poa_manager), + policies_ (policies), + parent_ (parent), + active_object_map_ (&active_object_map), + delete_active_object_map_ (0), + adapter_activator_ (), + servant_activator_ (), + servant_locator_ (), + default_servant_ (0), + children_ (), + lock_ (), + closing_down_ (0), + counter_ (0), + creation_time_ (ACE_OS::gettimeofday ()) +{ + this->set_complete_name (); + + // Register self with manager + this->poa_manager_.register_poa (this, env); +} + +TAO_POA * +TAO_POA::clone (const TAO_POA::String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + CORBA::Environment &env) +{ + return new TAO_POA (adapter_name, + poa_manager, + policies, + parent, + env); +} + +TAO_POA * +TAO_POA::clone (const TAO_POA::String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + TAO_Object_Table &active_object_map, + CORBA::Environment &env) +{ + return new TAO_POA (adapter_name, + poa_manager, + policies, + parent, + active_object_map, + env); +} + +TAO_POA::~TAO_POA (void) +{ + if (this->delete_active_object_map_) + delete active_object_map_; + + // Remove POA from the POAManager + // + // Note: Errors are ignored here since there is nothing we can do + // about them + // + CORBA::Environment env; + this->poa_manager_.remove_poa (this, env); +} + +ACE_Lock & +TAO_POA::lock (void) +{ + return this->lock_; +} + +PortableServer::POA_ptr +TAO_POA::create_POA (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + const PortableServer::PolicyList &policies, + CORBA::Environment &env) +{ + // 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; + tao_policies.parse_policies (policies, env); + if (env.exception () != 0) + 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 *poa_manager_impl = 0; + if (CORBA::is_nil (poa_manager)) + { + poa_manager_impl = this->poa_manager_.clone (); + } + else + { + PortableServer::Servant servant = poa_manager->_servant (); + if (servant == 0) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return PortableServer::POA::_nil (); + } + + void *ptr = servant->_downcast (servant->_interface_repository_id ()); + POA_PortableServer::POAManager *mgr = (POA_PortableServer::POAManager *) ptr; + poa_manager_impl = ACE_dynamic_cast (TAO_POA_Manager *, mgr); + } + + TAO_POA *result = this->create_POA (adapter_name, + *poa_manager_impl, + tao_policies, + env); + if (env.exception () != 0) + return PortableServer::POA::_nil (); + + return result->_this (env); +} + +TAO_POA * +TAO_POA::create_POA (const TAO_POA::String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD_RETURN (ACE_Lock, monitor, this->lock (), 0, env); + + return this->create_POA_i (adapter_name, + poa_manager, + policies, + env); +} + +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 &env) +{ + // If this is the leaf POA name + if (this->leaf_poa_name (adapter_name, env)) + { + // 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) + { + CORBA::Exception *exception = new PortableServer::POA::AdapterAlreadyExists; + env.exception (exception); + return 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. + auto_ptr<TAO_POA> new_poa (this->clone (adapter_name, + poa_manager, + policies, + this, + env)); + + if (env.exception () != 0) + return 0; + + // Add to children map + if (this->children_.bind (adapter_name, new_poa.get ()) != 0) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return 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 (); + } + // Not the leaf POA name + else + { + // Find the topmost name + TAO_POA::String topmost_poa_name; + TAO_POA::String tail_poa_name; + this->parse_poa_name (adapter_name, + topmost_poa_name, + tail_poa_name, + env); + + if (env.exception () != 0) + return 0; + + // If we are the topmost poa, let's create the tail + if (topmost_poa_name == this->name_) + { + return this->create_POA_i (tail_poa_name, + poa_manager, + policies, + env); + } + + // + // We are not the topmost POA + // + + // Try to find the topmost child + TAO_POA *child_poa = 0; + int result = this->children_.find (topmost_poa_name, child_poa); + + // Child was not found or the topmost is us + if (result != 0) + { + child_poa = this->create_POA_i (topmost_poa_name, + poa_manager, + policies, + env); + if (env.exception () != 0) + return 0; + } + + // At this point, the intermediate child POA was either found or + // created + return child_poa->create_POA (tail_poa_name, + poa_manager, + policies, + env); + } +} + +PortableServer::POA_ptr +TAO_POA::find_POA (const char *adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &env) +{ + TAO_POA::String name (adapter_name); + + TAO_POA *result = this->find_POA (name, + activate_it, + env); + + if (env.exception () != 0) + return PortableServer::POA::_nil (); + + return result->_this (env); +} + +TAO_POA * +TAO_POA::find_POA (const TAO_POA::String &adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &env) +{ + // Check if we are the POA the user is looking for + if (adapter_name == this->name_) + return this; + + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD_RETURN (ACE_Lock, monitor, this->lock (), 0, env); + + return this->find_POA_i_optimized (adapter_name, + activate_it, + env); + +} + +TAO_POA * +TAO_POA::find_POA_i (const TAO_POA::String &adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &env) +{ + // Check if we are the POA the user is looking for + if (adapter_name == this->name_) + return this; + + return this->find_POA_i_optimized (adapter_name, + activate_it, + env); +} + +TAO_POA * +TAO_POA::find_POA_i_optimized (const TAO_POA::String &adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &env) +{ + // If this is the leaf POA name + if (this->leaf_poa_name (adapter_name, env)) + { + // If the target POA is the parent of a child POA with the + // specified name (relative to the target POA), that child POA + // is returned. + TAO_POA *child_poa = 0; + int result = this->children_.find (adapter_name, child_poa); + + // Child was found + if (result != -1) + return child_poa; + + // + // Child was not found + // + + // If a child POA with the specified name does not exist and the + // value of the activate_it parameter is TRUE, the target POA's + // AdapterActivator, if one exists, is invoked, and, if it + // successfully activates the child POA, that child POA is + // returned. + if (activate_it && !CORBA::is_nil (this->adapter_activator_.in ())) + { + PortableServer::POA_var self = this->_this (env); + // Check for exceptions + if (env.exception () != 0) + return 0; + + CORBA::Boolean success = + this->adapter_activator_->unknown_adapter (self.in (), + adapter_name.c_str (), + env); + // Check for exceptions + if (env.exception () != 0) + return 0; + + // On success + if (success) + { + // Search the children table again + result = this->children_.find (adapter_name, child_poa); + + // Child was found + if (result != -1) + return child_poa; + } + } + + // Otherwise, the AdapterNonExistent exception is raised. + CORBA::Exception *exception = new PortableServer::POA::AdapterNonExistent; + env.exception (exception); return 0; } + // Not the leaf POA name + else + { + // Find the topmost name + // Find the topmost name + TAO_POA::String topmost_poa_name; + TAO_POA::String tail_poa_name; + this->parse_poa_name (adapter_name, + topmost_poa_name, + tail_poa_name, + env); + + if (env.exception () != 0) + return 0; + + // If we are the topmost poa, let's create the tail + if (topmost_poa_name == this->name_) + { + return this->find_POA_i (tail_poa_name, + activate_it, + env); + } - // Return the CORBA::Object_ptr interface to this objref. - CORBA::Object_ptr new_obj; + // + // We are not the topmost POA + // - if (data->QueryInterface (IID_CORBA_Object, - (void **) &new_obj) != TAO_NOERROR) - env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_NO)); + // Try to find the topmost child + TAO_POA *child_poa; + int result = this->children_.find (topmost_poa_name, child_poa); + + // Child was not found + if (result != 0) + { + child_poa = this->find_POA_i_optimized (topmost_poa_name, + activate_it, + env); + if (env.exception () != 0) + return 0; + } - data->Release (); - return new_obj; + // At this point, the intermediate child POA was either found or + // created + return child_poa->find_POA (tail_poa_name, + activate_it, + env); + } } -// Return the key fed into an object at creation time. +void +TAO_POA::destroy (CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, + CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); + + this->destroy_i (etherealize_objects, + wait_for_completion, + env); +} -CORBA::OctetSeq * -CORBA_POA::get_key (CORBA::Object_ptr, +void +TAO_POA::destroy_i (CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, CORBA::Environment &env) { - // XXX implement me ! ... must have been created by this OA. - env.exception (new CORBA_IMP_LIMIT (CORBA::COMPLETED_NO)); - return 0; + this->closing_down_ = 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) + this->parent_->delete_child (this->name_, env); + + if (env.exception () != 0) + return; + + // Remove all children POAs + for (CHILDREN::iterator iterator = this->children_.begin (); + iterator != this->children_.end () && env.exception () == 0; + iterator++) + { + TAO_POA *child_poa = (*iterator).int_id_; + child_poa->destroy (etherealize_objects, + wait_for_completion, + env); + } + + if (env.exception () != 0) + return; + + // 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 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. + + // Remove the registered objects + if (etherealize_objects) + { + if (this->policies ().servant_retention () == PortableServer::RETAIN && + this->policies ().request_processing () == PortableServer::USE_SERVANT_MANAGER && + !CORBA::is_nil (this->servant_activator_.in ())) + { + PortableServer::POA_var self = this->_this (env); + if (env.exception () != 0) + return; + + while (1) + { + TAO_Object_Table::iterator iterator = this->active_object_map ().begin (); + if (iterator == this->active_object_map ().end () || env.exception () != 0) + break; + + PortableServer::Servant servant = 0; + PortableServer::ObjectId id ((*iterator).ext_id_); + + int result = this->active_object_map ().unbind (id, servant); + if (result != 0) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return; + } + + CORBA::Boolean remaining_activations = CORBA::B_FALSE; + + if (this->policies ().id_uniqueness () == PortableServer::MULTIPLE_ID && + this->active_object_map ().find (servant) != -1) + remaining_activations = CORBA::B_TRUE; + + this->servant_activator_->etherealize (id, + self.in (), + servant, + CORBA::B_TRUE, + remaining_activations, + env); + } + } + } + + // 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. + + ACE_UNUSED_ARG (wait_for_completion); + + // Commit suicide + delete this; +} + +void +TAO_POA::delete_child (const TAO_POA::String &child, + CORBA::Environment &env) +{ + // If we are not closing down, we must remove this child from our + // collection. + if (!this->closing_down_) + { + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); + + this->delete_child_i (child, + env); + } + + // If we are closing down, we are currently iterating over our + // children and there is not need to remove this child from our + // collection. } -#if 0 -// Used by method code to ask the OA to shut down. void -CORBA_POA::please_shutdown (CORBA::Environment &env) +TAO_POA::delete_child_i (const TAO_POA::String &child, + CORBA::Environment &env) +{ + if (this->children_.unbind (child) != 0) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return; + } +} + +TAO_POA_Policies & +TAO_POA::policies (void) +{ + return this->policies_; +} + +TAO_Object_Table & +TAO_POA::active_object_map (void) +{ + return *this->active_object_map_; +} + +PortableServer::ServantManager_ptr +TAO_POA::get_servant_manager (CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_READ_GUARD_RETURN (ACE_Lock, monitor, this->lock (), PortableServer::ServantManager::_nil (), env); + + return this->get_servant_manager_i (env); +} + +PortableServer::ServantManager_ptr +TAO_POA::get_servant_manager_i (CORBA::Environment &env) { - ACE_MT (ACE_GUARD (ACE_SYNCH_MUTEX, poa_mon, lock_)); + // 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) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return PortableServer::ServantManager::_nil (); + } - env.clear (); - do_exit_ = CORBA::B_TRUE; + // 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 ()); } -// Used by non-method code to tell the OA to shut down. void -CORBA_POA::clean_shutdown (CORBA::Environment &env) +TAO_POA::set_servant_manager (PortableServer::ServantManager_ptr imgr, + CORBA::Environment &env) { - ACE_MT (ACE_GUARD (ACE_SYNCH_MUTEX, poa_mon, lock_)); + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); - env.clear (); + this->set_servant_manager_i (imgr, + env); +} - if (call_count_ != 0) +void +TAO_POA::set_servant_manager_i (PortableServer::ServantManager_ptr imgr, + CORBA::Environment &env) +{ + // 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) { - dmsg ("called clean_shutdown with requests outstanding"); - env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO)); + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); return; } - // Here we need to tell all the endpoints to shut down... + // 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, env); + if (CORBA::is_nil (this->servant_activator_.in ())) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return; + } + } + else + { + this->servant_locator_ = PortableServer::ServantLocator::_narrow (imgr, env); + if (CORBA::is_nil (this->servant_locator_.in ())) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return; + } + } +} + +PortableServer::Servant +TAO_POA::get_servant (CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_READ_GUARD_RETURN (ACE_Lock, monitor, this->lock (), 0, env); + + return this->get_servant_i (env); +} + +PortableServer::Servant +TAO_POA::get_servant_i (CORBA::Environment &env) +{ + // 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) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return 0; + } + + // This operation returns the default servant associated with the + // POA. + if (this->default_servant_ != 0) + { + return this->default_servant_; + } + else + // If no servant has been associated with the POA, the NoServant + // exception is raised. + { + CORBA::Exception *exception = new PortableServer::POA::NoServant; + env.exception (exception); + return 0; + } +} + +void +TAO_POA::set_servant (PortableServer::Servant servant, + CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); + + this->set_servant_i (servant, + env); } -#endif /* 0 */ -// For POA -- POA operations for which we provide the vtable entry void -CORBA_POA::register_dir (dsi_handler handler, - void *ctx, - CORBA::Environment &env) +TAO_POA::set_servant_i (PortableServer::Servant servant, + CORBA::Environment &env) { - if (handler == 0) + // 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) { - env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO)); + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); return; } - skeleton_ = handler; - context_ = ctx; - - env.clear (); -} - -// A "Named POA" is used in bootstrapping some part of the ORB since -// it's name-to-address binding is managed by the OS. Examples of -// such bindings are /etc/services (for TCP) and /etc/rpc (for ONC -// RPC) . The name of a POA is only guaranteed to be unique within -// the domain of a single system, as a rule; two hosts would have -// distinct "king" POAs. -// -// For network endpoints, most such names are manually administered. -// Some other namespaces (AF_UNIX filesystem names for example) have a -// more formal underlying name service that can be dynamically updated -// while not compromising system security. -// -// The address family used by the POA is found from the ORB passed in. -// -// XXX the coupling could stand to be looser here, so this module did -// not know specifically about the Internet ORB !! - -CORBA::POA_ptr -CORBA_POA::get_named_poa (CORBA::ORB_ptr orb, - CORBA::String name, + // 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; +} + +PortableServer::ObjectId * +TAO_POA::activate_object (PortableServer::Servant servant, CORBA::Environment &env) { - env.clear (); + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD_RETURN (ACE_Lock, monitor, this->lock (), 0, env); - // If the ORB is an Internet ORB, we know this must be a TCP OA. - { - IIOP_ORB *internet; + return this->activate_object_i (servant, + env); +} + +PortableServer::ObjectId * +TAO_POA::activate_object_i (PortableServer::Servant servant, + CORBA::Environment &env) +{ + // 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)) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return 0; + } - if (orb->QueryInterface (IID_IIOP_ORB, (void **) &internet) == TAO_NOERROR) - { - CORBA::POA_ptr tcp_oa; + // 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->active_object_map ().find (servant) != -1) + { + CORBA::Exception *exception = new PortableServer::POA::ServantAlreadyActive; + env.exception (exception); + return 0; + } - internet->Release (); + // 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 new_id = this->create_object_id (); - // POA initialization with name specified; it'll come from - // /etc/services if it's not a port number. + if (this->active_object_map ().bind (new_id.in (), servant) == -1) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; + } - ACE_INET_Addr poa_name (name, (ACE_UINT32) INADDR_ANY); + // Everything is finally ok + return new_id._retn (); +} - tcp_oa = CORBA::POA::init (orb, poa_name, env); +void +TAO_POA::activate_object_with_id (const PortableServer::ObjectId &id, + PortableServer::Servant servant, + CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); - if (env.exception () != 0) - return 0; - else - return tcp_oa; // derives from POA - } - } + this->activate_object_with_id_i (id, + servant, + env); +} - // We don't know how to deal with this kind of ORB. Report error. +void +TAO_POA::activate_object_with_id_i (const PortableServer::ObjectId &id, + PortableServer::Servant servant, + CORBA::Environment &env) +{ + // This operation requires the RETAIN policy; if not present, the + // WrongPolicy exception is raised. + if (this->policies ().servant_retention () != PortableServer::RETAIN) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return; + } - env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO) ); - return 0; + // 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)) + { + CORBA::Exception *exception = new CORBA::BAD_PARAM (CORBA::COMPLETED_NO); + env.exception (exception); + return; + } + + // 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. + if (this->active_object_map ().find (id) != -1) + { + CORBA::Exception *exception = new PortableServer::POA::ObjectAlreadyActive; + env.exception (exception); + return; + } + + // 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->active_object_map ().find (servant) != -1) + { + CORBA::Exception *exception = new PortableServer::POA::ServantAlreadyActive; + env.exception (exception); + return; + } + + // 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 (id, servant) == -1) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return; + } + + // Everything is finally ok } -// An "Anonymous" POA is used more routinely. The name used doesn't -// matter to anyone; it is only used to create object references with -// a short lifespan, namely that of the process acquiring this POA. +void +TAO_POA::deactivate_object (const PortableServer::ObjectId &oid, + CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); + + this->deactivate_object_i (oid, + env); +} -CORBA::POA_ptr -CORBA_POA::get_poa (CORBA::ORB_ptr orb, - CORBA::Environment &env) +void +TAO_POA::deactivate_object_i (const PortableServer::ObjectId &oid, + CORBA::Environment &env) { - env.clear (); + // This operation requires the RETAIN policy; if not present, the + // WrongPolicy exception is raised. + if (this->policies ().servant_retention () != PortableServer::RETAIN) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return; + } + + // 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. + PortableServer::Servant servant = 0; + int result = this->active_object_map ().unbind (oid, servant); - // If the ORB is an Internet ORB, we know this must be a TCP OA. - { - IIOP_ORB *internet; + // If there is no active object associated with the specified Object + // Id, the operation raises an ObjectNotActive exception. + if (result != 0) + { + CORBA::Exception *exception = new PortableServer::POA::ObjectNotActive; + env.exception (exception); + return; + } - if (orb->QueryInterface (IID_IIOP_ORB, (void **) &internet) == TAO_NOERROR) - { - CORBA::POA_ptr tcp_oa; + // 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 (!CORBA::is_nil (this->servant_activator_.in ())) + { + PortableServer::POA_var self = this->_this (env); + if (env.exception () != 0) + return; + + CORBA::Boolean remaining_activations = CORBA::B_FALSE; + + if (this->policies ().id_uniqueness () == PortableServer::MULTIPLE_ID && + this->active_object_map ().find (servant) != -1) + remaining_activations = CORBA::B_TRUE; + + this->servant_activator_->etherealize (oid, + self.in (), + servant, + CORBA::B_FALSE, + remaining_activations, + env); + } +} - internet->Release (); +CORBA::Object_ptr +TAO_POA::create_reference (const char *intf, + CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD_RETURN (ACE_Lock, monitor, this->lock (), CORBA::Object::_nil (), env); - // POA initialization with null name means anonymous OA + return this->create_reference_i (intf, + env); +} - ACE_INET_Addr anonymous ((u_short) 0, (ACE_UINT32) INADDR_ANY); +CORBA::Object_ptr +TAO_POA::create_reference_i (const char *intf, + CORBA::Environment &env) +{ + // This operation requires the SYSTEM_ID policy; if not present, the + // WrongPolicy exception is raised. + if (this->policies ().id_assignment () != PortableServer::SYSTEM_ID) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return CORBA::Object::_nil (); + } - tcp_oa = CORBA::POA::init (orb, anonymous, env); + // 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 new_id = this->create_object_id (); + TAO::ObjectKey_var new_key = this->create_object_key (new_id.in ()); + + // Ask the ORB to create you a reference + return TAO_ORB_Core_instance ()->orb ()->key_to_object (new_key.in (), intf, env); +} - if (env.exception () != 0) - return 0; - else - return tcp_oa; // derives from POA - } - } +CORBA::Object_ptr +TAO_POA::create_reference_with_id (const PortableServer::ObjectId &oid, + const char *intf, + CORBA::Environment &env) +{ + // 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 (oid)) + { + CORBA::Exception *exception = new CORBA::BAD_PARAM (CORBA::COMPLETED_NO); + env.exception (exception); + return 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. + TAO::ObjectKey_var new_key = this->create_object_key (oid); + + // Ask the ORB to create you a reference + return TAO_ORB_Core_instance ()->orb ()->key_to_object (new_key.in (), intf, env); +} - // We don't know how to deal with this kind of ORB. Report error. +PortableServer::ObjectId * +TAO_POA::servant_to_id (PortableServer::Servant servant, + CORBA::Environment &env) +{ + // If we had upgradeable locks, this would initially be a read lock + // + // Lock access to the POA for the duration of this transaction + TAO_POA_WRITE_GUARD_RETURN (ACE_Lock, monitor, this->lock (), 0, env); - env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO) ); - return 0; + return this->servant_to_id_i (servant, + env); } -void CORBA_POA::dispatch (TAO_opaque &key, - CORBA::ServerRequest &req, - void *context, +PortableServer::ObjectId * +TAO_POA::servant_to_id_i (PortableServer::Servant servant, CORBA::Environment &env) { - ACE_UNUSED_ARG(context); + // 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))) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return 0; + } - TAO_Skeleton skel; // pointer to function pointer for the operation - CORBA::Object_ptr obj; // object that will be looked up based on the key - CORBA::String opname; + // This operation has three possible behaviors. - // Get the skeleton + // 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 id; + if (this->policies ().id_uniqueness () == PortableServer::UNIQUE_ID && + this->active_object_map ().find (servant, id.out ()) != -1) + { + return id._retn (); + } - // Find the object based on the key - if (this->find (key, obj) != -1) + // 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 0 // XXXASG - testing a new way of handling requests to overcome the - // casting problem arising out of virtual inheritance - opname = req.op_name (); + if (this->policies ().id_uniqueness () == PortableServer::MULTIPLE_ID || + this->active_object_map ().find (servant) != 0) + { + PortableServer::ObjectId_var new_id = this->create_object_id (); + + if (this->active_object_map ().bind (new_id.in (), servant) == -1) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; + } - // Find the skeleton "glue" function based on the operation name - if (obj->find (opname, skel) != -1) - // Schedule the upcall. This is the degenerate case of scheduling... - // using a "do it now!" scheduler - skel (req, obj, env); + // Everything is finally ok + return new_id._retn (); + } + } + + // Otherwise, the ServantNotActive exception is raised. + CORBA::Exception *exception = new PortableServer::POA::ServantNotActive; + env.exception (exception); + return 0; +} + +CORBA::Object_ptr +TAO_POA::servant_to_reference (PortableServer::Servant servant, + CORBA::Environment &env) +{ + // 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). + PortableServer::ObjectId_var oid = this->servant_to_id (servant, + env); + + if (env.exception () != 0) + return CORBA::Object::_nil (); + else + return this->create_reference_with_id (oid.in (), + servant->_interface_repository_id (), + env); +} + +PortableServer::Servant +TAO_POA::reference_to_servant (CORBA::Object_ptr reference, + CORBA::Environment &env) +{ + // 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)) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return 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 (env); + + // If the object reference was not created by this POA, the + // WrongAdapter exception is raised. + PortableServer::ObjectId_var id; + TAO_POA::String poa_name; + CORBA::Boolean persistent = CORBA::B_FALSE; + ACE_Time_Value poa_creation_time; + + int result = this->parse_key (key.in (), + poa_name, + id.out (), + persistent, + poa_creation_time); + if (result != 0 || + poa_name != this->complete_name () || + persistent != this->persistent () || + !this->persistent () && poa_creation_time != this->creation_time_) + { + CORBA::Exception *exception = new PortableServer::POA::WrongAdapter; + env.exception (exception); + return 0; + } + + return this->id_to_servant (id.in (), env); + } + + // 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 to the POA for the duration of this transaction + TAO_POA_READ_GUARD_RETURN (ACE_Lock, monitor, this->lock (), 0, env); + + if (this->default_servant_ != 0) + { + return this->default_servant_; + } else + // Otherwise, the ObjectNotActive exception is raised. { - // Something really bad happened: the operation was not - // found in the object, fortunately there is a standard - // exception for that purpose. - env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); - ACE_ERROR ((LM_ERROR, - "Cannot find operation <%s> in object\n", - opname)); + CORBA::Exception *exception = new PortableServer::POA::ObjectNotActive; + env.exception (exception); + return 0; } -#else - ACE_UNUSED_ARG (opname); - ACE_UNUSED_ARG (skel); -#endif - obj->dispatch (req, context, env); } + + // Not reached + return 0; +} + +PortableServer::ObjectId * +TAO_POA::reference_to_id (CORBA::Object_ptr reference, + CORBA::Environment &env) +{ + // 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 (env); + PortableServer::ObjectId_var id; + TAO_POA::String poa_name; + CORBA::Boolean persistent = CORBA::B_FALSE; + ACE_Time_Value poa_creation_time; + + int result = this->parse_key (key.in (), + poa_name, + id.out (), + persistent, + poa_creation_time); + if (result != 0 || + poa_name != this->complete_name () || + persistent != this->persistent () || + !this->persistent () && poa_creation_time != this->creation_time_) + { + CORBA::Exception *exception = new PortableServer::POA::WrongAdapter; + env.exception (exception); + return 0; + } + + // The object denoted by the reference does not have to be active + // for this operation to succeed. + return id._retn (); +} + +PortableServer::Servant +TAO_POA::id_to_servant (const PortableServer::ObjectId &oid, + CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_READ_GUARD_RETURN (ACE_Lock, monitor, this->lock (), 0, env); + + return this->id_to_servant_i (oid, + env); +} + +PortableServer::Servant +TAO_POA::id_to_servant_i (const PortableServer::ObjectId &oid, + CORBA::Environment &env) +{ + // This operation requires the RETAIN policy; if not present, the + // WrongPolicy exception is raised. + if (this->policies ().servant_retention () != PortableServer::RETAIN) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return 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 (oid, servant) != -1) + { + return servant; + } + else + // Otherwise, the ObjectNotActive exception is raised. + { + CORBA::Exception *exception = new PortableServer::POA::ObjectNotActive; + env.exception (exception); + return 0; + } +} + +CORBA::Object_ptr +TAO_POA::id_to_reference (const PortableServer::ObjectId &oid, + CORBA::Environment &env) +{ + // Lock access to the POA for the duration of this transaction + TAO_POA_READ_GUARD_RETURN (ACE_Lock, monitor, this->lock (), 0, env); + + return this->id_to_reference_i (oid, env); +} + +CORBA::Object_ptr +TAO_POA::id_to_reference_i (const PortableServer::ObjectId &oid, + CORBA::Environment &env) +{ + // This operation requires the RETAIN policy; if not present, the + // WrongPolicy exception is raised. + if (this->policies ().servant_retention () != PortableServer::RETAIN) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return 0; + } + + // 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::Servant servant = 0; + if (this->active_object_map ().find (oid, servant) != -1) + return this->create_reference_with_id (oid, + servant->_interface_repository_id (), + env); + else + // If the Object Id value is not active in the POA, an + // ObjectNotActive exception is raised. + { + CORBA::Exception *exception = new PortableServer::POA::ObjectNotActive; + env.exception (exception); + return 0; + } +} + +PortableServer::POA_ptr +TAO_POA::the_parent (CORBA::Environment &env) +{ + if (this->parent_ != 0) + return this->parent_->_this (env); else + return PortableServer::POA::_nil (); +} + +PortableServer::POAManager_ptr +TAO_POA::the_POAManager (CORBA::Environment &env) +{ + return this->poa_manager_._this (env); +} + +PortableServer::AdapterActivator_ptr +TAO_POA::the_activator (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + + return PortableServer::AdapterActivator::_duplicate (this->adapter_activator_.in ()); +} + +void +TAO_POA::the_activator (PortableServer::AdapterActivator_ptr adapter_activator, + CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + + this->adapter_activator_ = PortableServer::AdapterActivator::_duplicate (adapter_activator); +} + +TAO_POA * +TAO_POA::locate_poa_i (const TAO::ObjectKey &key, + PortableServer::ObjectId_out id, + CORBA::Environment &env) +{ + TAO_POA::String poa_name; + CORBA::Boolean persistent = CORBA::B_FALSE; + ACE_Time_Value poa_creation_time; + + int result = this->parse_key (key, + poa_name, + id, + persistent, + poa_creation_time); + if (result != 0) { - env.exception (new CORBA::OBJECT_NOT_EXIST (CORBA::COMPLETED_NO)); - ACE_ERROR ((LM_ERROR, "Cannot find object\n")); + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; + } + TAO_POA *poa = this->find_POA_i (poa_name, + persistent, + env); + if (env.exception () != 0) + return 0; + + // Make sure it is not an "old" objectId + if (!poa->persistent () && + poa->creation_time () != poa_creation_time) + { + CORBA::Exception *exception = new CORBA::OBJECT_NOT_EXIST (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; } - // @@ XXXASG - - // We need to pass this skel and associated information to the - // scheduler. How do we do it?? + return poa; } int -CORBA_POA::find (const TAO_opaque &key, - CORBA::Object_ptr &obj) +TAO_POA::locate_servant (const TAO::ObjectKey &key, + CORBA::Environment &env) { - return objtable_->find (key, obj); + // Lock access to the POAManager for the duration of this transaction + TAO_POA_READ_GUARD_RETURN (ACE_Lock, monitor, this->lock (), -1, env); + + return this->locate_servant_i (key, env); } int -CORBA_POA::bind (const TAO_opaque &key, - CORBA::Object_ptr obj) +TAO_POA::locate_servant_i (const TAO::ObjectKey &key, + CORBA::Environment &env) +{ + PortableServer::ObjectId_var id; + + TAO_POA *poa = this->locate_poa_i (key, + id.out (), + env); + if (env.exception () != 0) + return -1; + + // 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 0. + if (poa->policies ().servant_retention () == PortableServer::RETAIN) + { + PortableServer::Servant servant = 0; + if (poa->active_object_map ().find (id.in (), servant) != -1) + // Success + return 0; + } + + // 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 (poa->policies ().request_processing () == PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY) + return -1; + + // If the POA has the USE_DEFAULT_SERVANT policy, a default servant + // has been associated with the POA, return 0. If no servant has + // been associated with the POA, return -1. + if (poa->policies ().request_processing () == PortableServer::USE_DEFAULT_SERVANT) + { + if (poa->default_servant_ == 0) + return -1; + else + // Success + return 0; + } + + // If the POA has the USE_SERVANT_MANAGER policy, a servant manager + // has been associated with the POA, return 0. If no servant manager + // has been associated with the POA, return -1. + if (poa->policies ().request_processing () == PortableServer::USE_SERVANT_MANAGER) + { + if (CORBA::is_nil (poa->servant_activator_.in ()) && + CORBA::is_nil (poa->servant_locator_.in ())) + return -1; + else + // Success + return 0; + } + + // Failure + return -1; +} + +PortableServer::Servant +TAO_POA::locate_poa_and_servant_i (const TAO::ObjectKey &key, + const char *operation, + PortableServer::ObjectId_out id, + TAO_POA *&poa_impl, + CORBA::Environment &env) +{ + poa_impl = this->locate_poa_i (key, + id, + env); + if (env.exception () != 0) + return 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 (poa_impl->policies ().servant_retention () == PortableServer::RETAIN) + { + PortableServer::Servant servant = 0; + if (poa_impl->active_object_map ().find (*id.ptr (), servant) != -1) + // 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 (poa_impl->policies ().request_processing () == PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY) + { + CORBA::Exception *exception = new CORBA::OBJECT_NOT_EXIST (CORBA::COMPLETED_NO); + env.exception (exception); + return 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 (poa_impl->policies ().request_processing () == PortableServer::USE_DEFAULT_SERVANT) + { + if (poa_impl->default_servant_ == 0) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; + } + else + { + // Success + return poa_impl->default_servant_; + } + } + + // 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 (poa_impl->policies ().request_processing () == PortableServer::USE_SERVANT_MANAGER) + { + if (CORBA::is_nil (poa_impl->servant_activator_.in ()) && + CORBA::is_nil (poa_impl->servant_locator_.in ())) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; + } + + PortableServer::POA_var poa = poa_impl->_this (env); + if (env.exception () != 0) + return 0; + + if (poa_impl->policies ().servant_retention () == PortableServer::RETAIN) + { + // @@ + // 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. + PortableServer::Servant servant = poa_impl->servant_activator_->incarnate (*id.ptr (), + poa.in (), + env); + if (env.exception () != 0 || servant == 0) + return 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 (poa_impl->policies ().id_uniqueness () == PortableServer::UNIQUE_ID && + poa_impl->active_object_map ().find (servant) != -1) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return 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. + if (poa_impl->active_object_map ().bind (*id.ptr (), servant) == -1) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; + } + + // Success + return servant; + } + else + // + // Don't retain servant + // + { + // 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 = poa_impl->servant_locator_->preinvoke (*id.ptr (), + poa.in (), + operation, + cookie, + env); + if (env.exception () != 0 || servant == 0) + return 0; + + // Remember the cookie + TAO_ORB_Core *orb_core = TAO_ORB_Core_instance (); + TAO_POA_Current *poa_current = orb_core->poa_current (); + poa_current->locator_cookie (cookie); + + // Success + return servant; + } + } + + // Failure + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; +} + +void +TAO_POA::dispatch_servant (const TAO::ObjectKey &key, + CORBA::ServerRequest &req, + void *context, + CORBA::Environment &env) { - return objtable_->bind (key, obj); + // Lock access to the POAManager for the duration of this transaction + TAO_POA_READ_GUARD (ACE_Lock, monitor, this->lock (), env); + + this->dispatch_servant_i (key, req, context, env); } -// IUnknown calls -ULONG -CORBA_POA::AddRef (void) +void +TAO_POA::dispatch_servant_i (const TAO::ObjectKey &key, + CORBA::ServerRequest &req, + void *context, + CORBA::Environment &env) { - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, poa_mon, com_lock_, 0)); - return ++refcount_; + PortableServer::ObjectId_var id; + TAO_POA *poa = 0; + // const char *operation = req.operation (); + const char *operation = req.op_name (); + + PortableServer::Servant servant = this->locate_poa_and_servant_i (key, + operation, + id.out (), + poa, + env); + if (env.exception () != 0 || servant == 0) + return; + + // Setup for upcall + poa->pre_invoke (key, + id.in (), + servant, + env); + + servant->_dispatch (req, + context, + env); + + // Cleanup from upcall + poa->post_invoke (servant, + operation, + env); } -ULONG -CORBA_POA::Release (void) +void +TAO_POA::pre_invoke (const TAO::ObjectKey &key, + const PortableServer::ObjectId &id, + PortableServer::Servant servant, + CORBA::Environment &env) { - { - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, poa_mon, com_lock_, 0)); + ACE_UNUSED_ARG (env); - if (--refcount_ != 0) - return refcount_; - } + TAO_ORB_Core *orb_core = TAO_ORB_Core_instance (); + TAO_POA_Current *poa_current = orb_core->poa_current (); - delete this; + poa_current->POA_impl (this); + poa_current->object_key (key); + poa_current->object_id (id); + poa_current->servant (servant); +} + +void +TAO_POA::post_invoke (PortableServer::Servant servant, + const char *operation, + CORBA::Environment &env) +{ + TAO_ORB_Core *orb_core = TAO_ORB_Core_instance (); + TAO_POA_Current *poa_current = orb_core->poa_current (); + + PortableServer::ServantLocator::Cookie cookie = poa_current->locator_cookie (); + + PortableServer::POA_var poa = poa_current->get_POA (env); + + if (cookie != 0) + this->servant_locator_->postinvoke (poa_current->object_id (), + poa.in (), + operation, + cookie, + servant, + env); + // Reset current + poa_current->clear (); +} + +const ACE_Time_Value & +TAO_POA::creation_time (void) +{ + return this->creation_time_; +} + +int +TAO_POA::parse_key (const TAO::ObjectKey &key, + TAO_POA::String &poa_name, + PortableServer::ObjectId_out id, + CORBA::Boolean &persistent, + ACE_Time_Value &poa_creation_time) +{ + // Grab the id buffer + TAO_POA::String object_key (TAO_POA::ObjectKey_to_const_string (key)); + + // Try to find the first separator + int first_token_position = object_key.find (TAO_POA::name_separator (), + 0); + // If not found, the name is not correct + if (first_token_position == TAO_POA::String::npos) + return -1; + else + first_token_position += 0; + + // Try to find the second separator + int second_token_position = object_key.find (TAO_POA::name_separator (), + first_token_position + 1); + // If not found, the name is not correct + if (second_token_position == TAO_POA::String::npos) + return -1; + else + second_token_position += first_token_position + 1; + + // Try to find the third separator + int third_token_position = object_key.find (TAO_POA::name_separator (), + second_token_position + 1); + // If not found, the name is not correct + if (third_token_position == TAO_POA::String::npos) + return -1; + else + third_token_position += second_token_position + 1; + + // Try to find the last separator + int last_token_position = object_key.rfind (TAO_POA::name_separator ()); + + // If not found or the token are not distinct, the name is not correct + if (last_token_position == TAO_POA::String::npos || + third_token_position == last_token_position) + return -1; + + // Take the substring from 0 to first_token_position for the + // object_key_type. + int starting_at = 0; + int now_many = first_token_position - starting_at; + TAO_POA::String object_key_type = object_key.substr (starting_at, + now_many); + if (object_key_type == this->persistent_key_type ()) + persistent = 1; + else if (object_key_type == this->transient_key_type ()) + persistent = 0; + else + // Incorrect key + return -1; + + // Take the substring from (first_token_position + separator_length) + // to second_token_position for the seconds + starting_at = first_token_position + TAO_POA::name_separator_length (); + now_many = second_token_position - starting_at; + TAO_POA::String seconds = object_key.substr (starting_at, + now_many); + + // Take the substring from (second_token_position + separator_length) + // to third_token_position for the micro_seconds + starting_at = second_token_position + TAO_POA::name_separator_length (); + now_many = third_token_position - starting_at; + TAO_POA::String micro_seconds = object_key.substr (starting_at, + now_many); + + // Take the substring from (third_token_position + separator_length) + // to last_token_position for the POA name + starting_at = third_token_position + TAO_POA::name_separator_length (); + now_many = last_token_position - starting_at; + poa_name = object_key.substr (starting_at, + now_many); + + // Take the substring from (last_token_position + + // separator_length) to length for the objectId + starting_at = last_token_position + TAO_POA::name_separator_length (); + now_many = object_key.length () - starting_at; + TAO_POA::String objectId = object_key.substr (starting_at, + now_many); + + id = TAO_POA::string_to_ObjectId (objectId.c_str ()); + + poa_creation_time.sec (::atol (seconds.c_str ())); + poa_creation_time.usec (::atol (micro_seconds.c_str ())); + + // Success return 0; } -TAO_HRESULT -CORBA_POA::QueryInterface (REFIID riid, - void **ppv) +CORBA::Boolean +TAO_POA::persistent (void) +{ + return this->policies ().lifespan () == PortableServer::PERSISTENT; +} + +const TAO_POA::String & +TAO_POA::object_key_type (void) +{ + if (this->persistent ()) + return TAO_POA::persistent_key_type (); + else + return TAO_POA::transient_key_type (); +} + +const TAO_POA::String & +TAO_POA::persistent_key_type (void) +{ + static TAO_POA::String persistent = "Persistent"; + return persistent; +} + +const TAO_POA::String & +TAO_POA::transient_key_type (void) +{ + static TAO_POA::String transient = "Transient"; + return transient; +} + +PortableServer::ObjectId * +TAO_POA::create_object_id (void) +{ + // Note: This method assumes two things: + // 1. Locks are held when this method is called + // 2. Size of octet == size of string element + + // Buffer for counter + char counter[TAO_POA::max_space_required_for_ulong]; + + // Convert counter into string + ACE_OS::sprintf (counter, + "%ld", + this->counter_); + + // Calculate the required buffer size. + // Note: 1 is for the null terminator + TAO_POA::String id = + this->name_ + + TAO_POA::id_separator () + + counter; + + // Increment counter + this->counter_++; + + // Create the sequence + return TAO_POA::string_to_ObjectId (id.c_str ()); +} + +TAO::ObjectKey * +TAO_POA::create_object_key (const PortableServer::ObjectId &id) +{ + // Buffer for seconds + char seconds[TAO_POA::max_space_required_for_ulong]; + // Buffer for micro seconds + char micro_seconds[TAO_POA::max_space_required_for_ulong]; + + // Convert seconds into string + ACE_OS::sprintf (seconds, + "%ld", + this->creation_time_.sec ()); + + // Convert micro seconds into string + ACE_OS::sprintf (micro_seconds, + "%ld", + this->creation_time_.usec ()); + + // Calculate the required buffer size. + // Note: 1 is for the null terminator + int buffer_size = + this->object_key_type ().length () + + TAO_POA::name_separator_length () + + ACE_OS::strlen (seconds) + + TAO_POA::name_separator_length () + + ACE_OS::strlen (micro_seconds) + + TAO_POA::name_separator_length () + + this->complete_name_.length () + + TAO_POA::name_separator_length () + + id.length () + + 1; + + // Create the buffer for the key + CORBA::Octet *buffer = TAO::ObjectKey::allocbuf (buffer_size); + + // Grab the id buffer + const char *id_buffer = TAO_POA::ObjectId_to_const_string (id); + + // Make an object key + ACE_OS::sprintf ((CORBA::String) buffer, + "%s%c%s%c%s%c%s%c%s", + this->object_key_type ().c_str (), + TAO_POA::name_separator (), + seconds, + TAO_POA::name_separator (), + micro_seconds, + TAO_POA::name_separator (), + this->complete_name_.c_str (), + TAO_POA::name_separator (), + id_buffer); + + // Create the key, giving the ownership of the buffer to the + // sequence. + return new TAO::ObjectKey (buffer_size, + buffer_size, + buffer, + CORBA::B_TRUE); +} + +int +TAO_POA::is_poa_generated_id (const PortableServer::ObjectId &id) +{ + // Grab the buffer + const char *id_buffer = TAO_POA::ObjectId_to_const_string (id); + + // Check to see if the POA name is the first part of the id + if (ACE_OS::strncmp (id_buffer, + this->name_.c_str (), + this->name_.length ()) == 0) + return 1; + else + return 0; +} + +int +TAO_POA::is_poa_generated_key (const TAO::ObjectKey &key) +{ + // Grab the buffer + const char *id_buffer = TAO_POA::ObjectKey_to_const_string (key); + + // Check to see if the POA name is the first part of the id + if (ACE_OS::strncmp (id_buffer, + this->complete_name_.c_str (), + this->complete_name_.length ()) == 0) + return 1; + else + return 0; +} + +int +TAO_POA::leaf_poa_name (const TAO_POA::String &adapter_name, + CORBA::Environment &env) +{ + // This method does not throw any exceptions + ACE_UNUSED_ARG (env); + + // Try to find the name separator + if (adapter_name.find (TAO_POA::name_separator ()) == TAO_POA::String::npos) + // If not found, the name was a leaf + return 1; + else + // If found, the name was not a leaf + return 0; +} + +void +TAO_POA::parse_poa_name (const TAO_POA::String &adapter_name, + TAO_POA::String &topmost_poa_name, + TAO_POA::String &tail_poa_name, + CORBA::Environment &env) +{ + // Try to find the name separator + int token_position = adapter_name.find (TAO_POA::name_separator ()); + + // If not found, the name was a leaf, throw exception + if (token_position == TAO_POA::String::npos) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return; + } + else + { + // If found, take the substring from 0 to token_position + int starting_at = 0; + int now_many = token_position - starting_at; + topmost_poa_name = adapter_name.substr (starting_at, + now_many); + + // Take the substring from (token_position + separator_length) + // to length + starting_at = token_position + TAO_POA::name_separator_length (); + now_many = adapter_name.length () - starting_at; + tail_poa_name = adapter_name.substr (starting_at, + now_many); + } +} + +CORBA::String +TAO_POA::the_name (CORBA::Environment &env) +{ + ACE_UNUSED_ARG (env); + + return CORBA::string_dup (this->name_.c_str ()); +} + +TAO_POA::String +TAO_POA::complete_name (void) +{ + return this->complete_name_; +} + +void +TAO_POA::set_complete_name (void) +{ + if (this->parent_ != 0) + { + this->complete_name_ += this->parent_->complete_name (); + this->complete_name_ += TAO_POA::name_separator (); + } + this->complete_name_ += this->name_; +} + +char * +TAO_POA::ObjectId_to_string (const PortableServer::ObjectId &id) +{ + // This method assumes that the id was initially placed in the octet + // sequence as a char string + + // Grab the id buffer + CORBA::String id_buffer = (CORBA::String) &id[0]; + + // Create space and copy the contents + return CORBA::string_dup (id_buffer); +} + +const char * +TAO_POA::ObjectId_to_const_string (const PortableServer::ObjectId &id) +{ + // This method assumes that the id was initially placed in the octet + // sequence as a char string + + // Grab the id buffer + return (CORBA::String) &id[0]; +} + +const char * +TAO_POA::ObjectKey_to_const_string (const TAO::ObjectKey &key) +{ + // Grab the id buffer + return (CORBA::String) &key[0]; +} + +PortableServer::ObjectId * +TAO_POA::string_to_ObjectId (const char *id) +{ + // Size of Id + CORBA::ULong id_length = ACE_OS::strlen (id) + 1; + + // Create the buffer for the Id + CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (id_length); + + // Copy contents + ACE_OS::strcpy ((CORBA::String) buffer, id); + + // Create a new ID + return new PortableServer::ObjectId (id_length, + id_length, + buffer, + CORBA::B_TRUE); +} + +PortableServer::ObjectId * +TAO_POA::wstring_to_ObjectId (const wchar_t *id) +{ + // Size of Id + CORBA::ULong id_length = ACE_OS::strlen (id) + 1; + + // Create the buffer for the Id + CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (id_length * sizeof (CORBA::WChar)); + + // Copy contents + ACE_OS::strcpy ((CORBA::WString) buffer, id); + + // Create a new ID + return new PortableServer::ObjectId (id_length, + id_length, + buffer, + CORBA::B_TRUE); +} + +wchar_t * +TAO_POA::ObjectId_to_wstring (const PortableServer::ObjectId &id) +{ + // This method assumes that the id was initially placed in the octet + // sequence as a wchar string + + // Grab the id buffer + CORBA::WString id_buffer = (CORBA::WString) &id[0]; + + // Create space and copy the contents + return CORBA::wstring_dup (id_buffer); +} + +const wchar_t * +TAO_POA::ObjectId_to_const_wstring (const PortableServer::ObjectId &id) { - *ppv = 0; + // This method assumes that the id was initially placed in the octet + // sequence as a wchar string - if (IID_POA == riid - || IID_TAO_IUnknown == riid) - *ppv = this; + // Grab the id buffer + return (CORBA::WString) &id[0]; +} + +char +TAO_POA::name_separator (void) +{ + return '/'; +} + +char +TAO_POA::id_separator (void) +{ + return ':'; +} + +CORBA::ULong +TAO_POA::name_separator_length (void) +{ + return sizeof (char); +} + +CORBA::ULong +TAO_POA::id_separator_length (void) +{ + return sizeof (char); +} + +PortableServer::ThreadPolicy_ptr +TAO_POA::create_thread_policy (PortableServer::ThreadPolicyValue value, + CORBA::Environment &env) +{ + auto_ptr<TAO_Thread_Policy> new_policy (new TAO_Thread_Policy (value)); + PortableServer::ThreadPolicy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::ThreadPolicy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation + new_policy.release (); + return result._retn (); + } +} + +PortableServer::LifespanPolicy_ptr +TAO_POA::create_lifespan_policy (PortableServer::LifespanPolicyValue value, + CORBA::Environment &env) +{ + auto_ptr<TAO_Lifespan_Policy> new_policy (new TAO_Lifespan_Policy (value)); + PortableServer::LifespanPolicy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::LifespanPolicy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation + new_policy.release (); + return result._retn (); + } +} + +PortableServer::IdUniquenessPolicy_ptr +TAO_POA::create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value, + CORBA::Environment &env) +{ + auto_ptr<TAO_Id_Uniqueness_Policy> new_policy (new TAO_Id_Uniqueness_Policy (value)); + PortableServer::IdUniquenessPolicy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::IdUniquenessPolicy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation + new_policy.release (); + return result._retn (); + } +} + +PortableServer::IdAssignmentPolicy_ptr +TAO_POA::create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value, + CORBA::Environment &env) +{ + auto_ptr<TAO_Id_Assignment_Policy> new_policy (new TAO_Id_Assignment_Policy (value)); + PortableServer::IdAssignmentPolicy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::IdAssignmentPolicy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation + new_policy.release (); + return result._retn (); + } +} + +PortableServer::ImplicitActivationPolicy_ptr +TAO_POA::create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value, + CORBA::Environment &env) +{ + auto_ptr<TAO_Implicit_Activation_Policy> new_policy (new TAO_Implicit_Activation_Policy (value)); + PortableServer::ImplicitActivationPolicy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::ImplicitActivationPolicy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation + new_policy.release (); + return result._retn (); + } +} + +PortableServer::ServantRetentionPolicy_ptr +TAO_POA::create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value, + CORBA::Environment &env) +{ + auto_ptr<TAO_Servant_Retention_Policy> new_policy (new TAO_Servant_Retention_Policy (value)); + PortableServer::ServantRetentionPolicy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::ServantRetentionPolicy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation + new_policy.release (); + return result._retn (); + } +} + +PortableServer::RequestProcessingPolicy_ptr +TAO_POA::create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value, + CORBA::Environment &env) +{ + auto_ptr<TAO_Request_Processing_Policy> new_policy (new TAO_Request_Processing_Policy (value)); + PortableServer::RequestProcessingPolicy_var result = new_policy->_this (env); + if (env.exception () != 0) + return PortableServer::RequestProcessingPolicy::_nil (); + else + { + // Make sure that the auto_ptr does not delete the + // implementation + new_policy.release (); + return result._retn (); + } +} + +CORBA::Boolean +TAO_Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent, + const char *name, + CORBA::Environment &env) +{ + // Default policies + PortableServer::PolicyList default_policies; + + // This assumes that the lock on the parent is recursive + PortableServer::POA_var child = parent->create_POA (name, + PortableServer::POAManager::_nil (), + default_policies, + env); + + if (env.exception () != 0) + return CORBA::B_FALSE; + else + { + PortableServer::AdapterActivator_var activator = this->_this (env); + if (env.exception () != 0) + { + child->destroy (CORBA::B_FALSE, + CORBA::B_FALSE, + env); + return CORBA::B_FALSE; + } + + child->the_activator (activator.in (), env); + + if (env.exception () != 0) + { + child->destroy (CORBA::B_FALSE, + CORBA::B_FALSE, + env); + return CORBA::B_FALSE; + } + + // Finally everything is fine + return CORBA::B_TRUE; + } +} + +TAO_POA_Manager::TAO_POA_Manager (void) + : state_ (HOLDING), + closing_down_ (0), + lock_ (), + poa_collection_ () +{ +} + +TAO_POA_Manager::~TAO_POA_Manager (void) +{ +} + +void +TAO_POA_Manager::activate (CORBA::Environment &env) +{ + // Lock access to the POAManager for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); + + // 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_ == INACTIVE) + { + CORBA::Exception *exception = new PortableServer::POAManager::AdapterInactive; + env.exception (exception); + return; + } + else + this->state_ = ACTIVE; +} + +void +TAO_POA_Manager::hold_requests (CORBA::Boolean wait_for_completion, + CORBA::Environment &env) +{ + // Lock access to the POAManager for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); + + // 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_ == INACTIVE) + { + CORBA::Exception *exception = new PortableServer::POAManager::AdapterInactive; + env.exception (exception); + return; + } + else + this->state_ = HOLDING; + + // If the wait_for_completion parameter is FALSE, this operation + // returns immediately after changing the state. If the parameter is + // TRUE, 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. + + ACE_UNUSED_ARG (wait_for_completion); +} + +void +TAO_POA_Manager::discard_requests (CORBA::Boolean wait_for_completion, + CORBA::Environment &env) +{ + // Lock access to the POAManager for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); + + // 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_ == INACTIVE) + { + CORBA::Exception *exception = new PortableServer::POAManager::AdapterInactive; + env.exception (exception); + return; + } + else + this->state_ = DISCARDING; + + // If the wait_for_completion parameter is FALSE, this operation + // returns immediately after changing the state. If the parameter is + // TRUE, 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. + + ACE_UNUSED_ARG (wait_for_completion); +} + +void +TAO_POA_Manager::deactivate (CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, + CORBA::Environment &env) +{ + // Lock access to the POAManager for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); + + this->closing_down_ = 1; + + // 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_ == INACTIVE) + { + CORBA::Exception *exception = new PortableServer::POAManager::AdapterInactive; + env.exception (exception); + return; + } + else + this->state_ = 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. + + for (POA_COLLECTION::iterator iterator = this->poa_collection_.begin (); + iterator != this->poa_collection_.end () && env.exception () == 0; + iterator++) + { + TAO_POA *poa = *iterator; + poa->destroy (etherealize_objects, + wait_for_completion, + env); + } + + // If the wait_for_completion parameter is FALSE, this operation + // will return immediately after changing the state. If the + // parameter is TRUE, 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 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. +} + +TAO_POA_Manager::Processing_State +TAO_POA_Manager::state (CORBA::Environment &env) +{ + // Lock access to the POAManager for the duration of this transaction + TAO_POA_READ_GUARD_RETURN (ACE_Lock, monitor, this->lock (), UNKNOWN, env); + + return this->state_; +} + +void +TAO_POA_Manager::remove_poa (TAO_POA *poa, + CORBA::Environment &env) +{ + // If we are not closing down, we must remove this poa from our + // collection. + if (!this->closing_down_) + { + // Lock access to the POAManager for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); - if (*ppv == 0) - return ResultFromScode (TAO_E_NOINTERFACE); + this->remove_poa_i (poa, + env); + } + + // If we are closing down, we are currently iterating over our poa + // collection and there is not need to remove this poa from our + // collection. +} + +void +TAO_POA_Manager::remove_poa_i (TAO_POA *poa, + CORBA::Environment &env) +{ + int result = this->poa_collection_.remove (poa); + + if (result != 0) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return; + } +} + +void +TAO_POA_Manager::register_poa (TAO_POA *poa, + CORBA::Environment &env) +{ + // Lock access to the POAManager for the duration of this transaction + TAO_POA_WRITE_GUARD (ACE_Lock, monitor, this->lock (), env); + + this->register_poa_i (poa, + env); +} + +void +TAO_POA_Manager::register_poa_i (TAO_POA *poa, + CORBA::Environment &env) +{ + int result = this->poa_collection_.insert (poa); + + if (result != 0) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return; + } +} + +ACE_Lock & +TAO_POA_Manager::lock (void) +{ + return this->lock_; +} + +TAO_POA_Manager * +TAO_POA_Manager::clone (void) +{ + return new TAO_POA_Manager; +} + +TAO_Strategy_POA::TAO_Strategy_POA (const TAO_POA::String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + CORBA::Environment &env) + : TAO_POA (adapter_name, + poa_manager, + policies, + parent, + env), + lock_ (0) +{ + this->lock_ = TAO_ORB_Core_instance ()->server_factory ()->create_poa_lock (); +} + +TAO_Strategy_POA::TAO_Strategy_POA (const TAO_POA::String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + TAO_Object_Table &active_object_map, + CORBA::Environment &env) + : TAO_POA (adapter_name, + poa_manager, + policies, + parent, + active_object_map, + env), + lock_ (0) +{ + this->lock_ = TAO_ORB_Core_instance ()->server_factory ()->create_poa_lock (); +} + +TAO_Strategy_POA::~TAO_Strategy_POA (void) +{ + delete this->lock_; +} + +TAO_POA * +TAO_Strategy_POA::clone (const TAO_POA::String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + CORBA::Environment &env) +{ + return new SELF (adapter_name, + poa_manager, + policies, + parent, + env); +} + +TAO_POA * +TAO_Strategy_POA::clone (const TAO_POA::String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + TAO_Object_Table &active_object_map, + CORBA::Environment &env) +{ + return new SELF (adapter_name, + poa_manager, + policies, + parent, + active_object_map, + env); +} + +ACE_Lock & +TAO_Strategy_POA::lock (void) +{ + return *this->lock_; +} + +TAO_Strategy_POA_Manager::TAO_Strategy_POA_Manager (void) + : TAO_POA_Manager (), + lock_ (0) +{ + this->lock_ = TAO_ORB_Core_instance ()->server_factory ()->create_poa_mgr_lock (); +} + +TAO_Strategy_POA_Manager::~TAO_Strategy_POA_Manager (void) +{ + delete this->lock_; +} + +TAO_POA_Manager * +TAO_Strategy_POA_Manager::clone (void) +{ + return new SELF; +} + +ACE_Lock & +TAO_Strategy_POA_Manager::lock (void) +{ + return *this->lock_; +} + +TAO_POA_Current::TAO_POA_Current (void) + : poa_impl_ (0), + object_id_ (0), + servant_ (0), + object_key_ (0), + cookie_ (0) +{ +} + +TAO_POA_Current::~TAO_POA_Current (void) +{ +} + +PortableServer::POA_ptr +TAO_POA_Current::get_POA (CORBA::Environment &env) +{ + if (!this->context_is_valid ()) + { + CORBA::Exception *exception = new PortableServer::Current::NoContext; + env.exception (exception); + return PortableServer::POA::_nil (); + } + + PortableServer::POA_var result = this->poa_impl_->_this (env); + if (env.exception () != 0) + return PortableServer::POA::_nil (); + else + return result._retn (); +} + +PortableServer::ObjectId * +TAO_POA_Current::get_object_id (CORBA::Environment &env) +{ + if (!this->context_is_valid ()) + { + CORBA::Exception *exception = new PortableServer::Current::NoContext; + env.exception (exception); + return 0; + } + + // Create a new one and pass it back + return new PortableServer::ObjectId (*this->object_id_); +} + +void +TAO_POA_Current::clear (void) +{ + this->poa_impl_ = 0; + this->object_id_ = 0; + this->servant_ = 0; + this->object_key_ = 0; + this->cookie_ = 0; +} + +int +TAO_POA_Current::context_is_valid (void) +{ + return + this->poa_impl_ != 0 && + this->object_id_ != 0 && + this->servant_ != 0 && + this->object_key_ != 0; +} + +void +TAO_POA_Current::POA_impl (TAO_POA *impl) +{ + this->poa_impl_ = impl; +} + +TAO_POA * +TAO_POA_Current::POA_impl (void) const +{ + return this->poa_impl_; +} + +void +TAO_POA_Current::object_id (const PortableServer::ObjectId &id) +{ + this->object_id_ = &id; +} + +const PortableServer::ObjectId & +TAO_POA_Current::object_id (void) const +{ + return *this->object_id_; +} + +void +TAO_POA_Current::object_key (const TAO::ObjectKey &key) +{ + this->object_key_ = &key; +} + +const TAO::ObjectKey & +TAO_POA_Current::object_key (void) const +{ + return *this->object_key_; +} + +void +TAO_POA_Current::servant (PortableServer::Servant servant) +{ + this->servant_ = servant; +} + +PortableServer::Servant +TAO_POA_Current::servant (void) const +{ + return this->servant_; +} + +int +TAO_POA_Current::in_upcall (void) const +{ + return (this->servant_ != 0); +} + +PortableServer::ServantLocator::Cookie +TAO_POA_Current::locator_cookie (void) const +{ + return this->cookie_; +} - (void) AddRef (); - return TAO_NOERROR; +void +TAO_POA_Current::locator_cookie (PortableServer::ServantLocator::Cookie cookie) +{ + this->cookie_ = cookie; } + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Auto_Basic_Ptr<TAO_Id_Assignment_Policy>; +template class ACE_Auto_Basic_Ptr<TAO_Id_Uniqueness_Policy>; +template class ACE_Auto_Basic_Ptr<TAO_Implicit_Activation_Policy>; +template class ACE_Auto_Basic_Ptr<TAO_Lifespan_Policy>; +template class ACE_Auto_Basic_Ptr<TAO_Object_Table_Iterator_Impl>; +template class ACE_Auto_Basic_Ptr<TAO_POA>; +template class ACE_Auto_Basic_Ptr<TAO_Request_Processing_Policy>; +template class ACE_Auto_Basic_Ptr<TAO_Servant_Retention_Policy>; +template class ACE_Auto_Basic_Ptr<TAO_Thread_Policy>; +template class ACE_Lock_Adapter<ACE_Null_Mutex>; +template class ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex>; +template class ACE_Lock_Adapter<ACE_Thread_Mutex>; +template class ACE_Map_Entry<TAO_Unbounded_Sequence<unsigned char>, TAO_ServantBase *>; +template class ACE_Map_Iterator<ACE_CString, TAO_POA *, ACE_Null_Mutex>; +template class ACE_Map_Iterator_Base<ACE_CString, TAO_POA *, ACE_Null_Mutex>; +template class ACE_Map_Manager<ACE_CString, TAO_POA *, ACE_Null_Mutex>; +template class ACE_Read_Guard<ACE_Lock>; +template class ACE_Unbounded_Set<TAO_POA *>; +template class ACE_Unbounded_Set_Iterator<TAO_POA *>; +template class ACE_Write_Guard<ACE_Lock>; +template class TAO_Object_Manager<PortableServer::Policy>; +template class TAO_Unbounded_Object_Sequence<PortableServer::Policy>; +template class auto_ptr<TAO_Id_Assignment_Policy>; +template class auto_ptr<TAO_Id_Uniqueness_Policy>; +template class auto_ptr<TAO_Implicit_Activation_Policy>; +template class auto_ptr<TAO_Lifespan_Policy>; +template class auto_ptr<TAO_Object_Table_Iterator_Impl>; +template class auto_ptr<TAO_POA>; +template class auto_ptr<TAO_Request_Processing_Policy>; +template class auto_ptr<TAO_Servant_Retention_Policy>; +template class auto_ptr<TAO_Thread_Policy>; +template class ACE_Map_Entry<ACE_CString, TAO_POA *>; +template class ACE_Map_Reverse_Iterator<ACE_CString, TAO_POA *, ACE_Null_Mutex>; +template class ACE_Node<TAO_POA *>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Id_Assignment_Policy> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Id_Uniqueness_Policy> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Implicit_Activation_Policy> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Lifespan_Policy> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Object_Table_Iterator_Impl> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_POA> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Request_Processing_Policy> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Servant_Retention_Policy> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Thread_Policy> +#pragma instantiate ACE_Lock_Adapter<ACE_Null_Mutex> +#pragma instantiate ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex> +#pragma instantiate ACE_Lock_Adapter<ACE_Thread_Mutex> +#pragma instantiate ACE_Map_Entry<TAO_Unbounded_Sequence<unsigned char>, TAO_ServantBase *> +#pragma instantiate ACE_Map_Iterator<ACE_CString, TAO_POA *, ACE_Null_Mutex> +#pragma instantiate ACE_Map_Iterator_Base<ACE_CString, TAO_POA *, ACE_Null_Mutex> +#pragma instantiate ACE_Map_Manager<ACE_CString, TAO_POA *, ACE_Null_Mutex> +#pragma instantiate ACE_Read_Guard<ACE_Lock> +#pragma instantiate ACE_Unbounded_Set<TAO_POA *> +#pragma instantiate ACE_Unbounded_Set_Iterator<TAO_POA *> +#pragma instantiate ACE_Write_Guard<ACE_Lock> +#pragma instantiate TAO_Object_Manager<PortableServer::Policy> +#pragma instantiate TAO_Unbounded_Object_Sequence<PortableServer::Policy> +#pragma instantiate auto_ptr<TAO_Id_Assignment_Policy> +#pragma instantiate auto_ptr<TAO_Id_Uniqueness_Policy> +#pragma instantiate auto_ptr<TAO_Implicit_Activation_Policy> +#pragma instantiate auto_ptr<TAO_Lifespan_Policy> +#pragma instantiate auto_ptr<TAO_Object_Table_Iterator_Impl> +#pragma instantiate auto_ptr<TAO_POA> +#pragma instantiate auto_ptr<TAO_Request_Processing_Policy> +#pragma instantiate auto_ptr<TAO_Servant_Retention_Policy> +#pragma instantiate auto_ptr<TAO_Thread_Policy> +#pragma instantiate ACE_Map_Entry<ACE_CString, TAO_POA *> +#pragma instantiate ACE_Map_Reverse_Iterator<ACE_CString, TAO_POA *, ACE_Null_Mutex> +#pragma instantiate ACE_Node<TAO_POA *> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/poa.h b/TAO/tao/poa.h index e0aa20f9c2c..360e716c4aa 100644 --- a/TAO/tao/poa.h +++ b/TAO/tao/poa.h @@ -1,263 +1,790 @@ -// This may look like C, but it's really -*- C++ -*- +// -*- C++ -*- // ============================================================================ // // = LIBRARY // TAO -// +// // = FILENAME // poa.h // // = DESCRIPTION -// (Early) POA +// POA // // = AUTHOR -// Copyright 1994-1995 by Sun Microsystems, Inc. -// +// Irfan Pyarali +// // ============================================================================ -#if !defined (TAO_POA_H) -#define TAO_POA_H +#if !defined (POA_H) +#define POA_H +// CORBA #include "tao/corba.h" -class TAO_GIOP_RequestHeader; +// Stubs +#include "tao/poaC.h" -// @@ Why does this inherit from IUnknown? This inherits from -// IUnknown because it's foolish. There's no good reason to get rid -// of it, though, until we remove this useless COM stuff. -class TAO_Export CORBA_POA : public TAO_IUnknown - // = TITLE - // The <{TAO}> Basic Object Adapter. +// Servant +#include "tao/servant_base.h" + +// Skeletons +#include "tao/poaS.h" + +// String +#include "ace/SString.h" +//#include "string" + +// Map +//#include "map" +#include "ace/Map_Manager.h" + +// Vector +//#include "vector" +#include "ace/Containers.h" + +// Locking +#include "ace/Synch.h" + +// Active Object Table +#include "tao/objtable.h" + +class TAO_POA; +class TAO_POA_Manager; + +class TAO_Export TAO_Thread_Policy : public POA_PortableServer::ThreadPolicy +{ +public: + TAO_Thread_Policy (PortableServer::ThreadPolicyValue value); + + TAO_Thread_Policy (const TAO_Thread_Policy &new_policy); + + virtual PortableServer::ThreadPolicyValue value (CORBA::Environment &env); + + virtual PortableServer::Policy_ptr copy (CORBA::Environment &env); + + virtual void destroy (CORBA::Environment &env); + +protected: + PortableServer::ThreadPolicyValue value_; +}; + +class TAO_Export TAO_Lifespan_Policy : public POA_PortableServer::LifespanPolicy +{ +public: + TAO_Lifespan_Policy (PortableServer::LifespanPolicyValue value); + + TAO_Lifespan_Policy (const TAO_Lifespan_Policy &rhs); + + virtual PortableServer::LifespanPolicyValue value (CORBA::Environment &env); + + virtual PortableServer::Policy_ptr copy (CORBA::Environment &env); + + virtual void destroy (CORBA::Environment &env); + +protected: + PortableServer::LifespanPolicyValue value_; +}; + +class TAO_Export TAO_Id_Uniqueness_Policy : public POA_PortableServer::IdUniquenessPolicy +{ +public: + TAO_Id_Uniqueness_Policy (PortableServer::IdUniquenessPolicyValue value); + + TAO_Id_Uniqueness_Policy (const TAO_Id_Uniqueness_Policy &rhs); + + virtual PortableServer::IdUniquenessPolicyValue value (CORBA::Environment &env); + + virtual PortableServer::Policy_ptr copy (CORBA::Environment &env); + + virtual void destroy (CORBA::Environment &env); + +protected: + PortableServer::IdUniquenessPolicyValue value_; +}; + +class TAO_Export TAO_Id_Assignment_Policy : public POA_PortableServer::IdAssignmentPolicy +{ +public: + TAO_Id_Assignment_Policy (PortableServer::IdAssignmentPolicyValue value); + + TAO_Id_Assignment_Policy (const TAO_Id_Assignment_Policy &rhs); + + virtual PortableServer::IdAssignmentPolicyValue value (CORBA::Environment &env); + + virtual PortableServer::Policy_ptr copy (CORBA::Environment &env); + + virtual void destroy (CORBA::Environment &env); + +protected: + PortableServer::IdAssignmentPolicyValue value_; +}; + +class TAO_Export TAO_Implicit_Activation_Policy : public POA_PortableServer::ImplicitActivationPolicy +{ +public: + TAO_Implicit_Activation_Policy (PortableServer::ImplicitActivationPolicyValue value); + + TAO_Implicit_Activation_Policy (const TAO_Implicit_Activation_Policy &rhs); + + virtual PortableServer::ImplicitActivationPolicyValue value (CORBA::Environment &env); + + virtual PortableServer::Policy_ptr copy (CORBA::Environment &env); + + virtual void destroy (CORBA::Environment &env); + +protected: + PortableServer::ImplicitActivationPolicyValue value_; +}; + +class TAO_Export TAO_Servant_Retention_Policy : public POA_PortableServer::ServantRetentionPolicy +{ +public: + TAO_Servant_Retention_Policy (PortableServer::ServantRetentionPolicyValue value); + + TAO_Servant_Retention_Policy (const TAO_Servant_Retention_Policy &rhs); + + virtual PortableServer::ServantRetentionPolicyValue value (CORBA::Environment &env); + + virtual PortableServer::Policy_ptr copy (CORBA::Environment &env); + + virtual void destroy (CORBA::Environment &env); + +protected: + PortableServer::ServantRetentionPolicyValue value_; +}; + +class TAO_Export TAO_Request_Processing_Policy : public POA_PortableServer::RequestProcessingPolicy +{ +public: + TAO_Request_Processing_Policy (PortableServer::RequestProcessingPolicyValue value); + + TAO_Request_Processing_Policy (const TAO_Request_Processing_Policy &rhs); + + virtual PortableServer::RequestProcessingPolicyValue value (CORBA::Environment &env); + + virtual PortableServer::Policy_ptr copy (CORBA::Environment &env); + + virtual void destroy (CORBA::Environment &env); + +protected: + PortableServer::RequestProcessingPolicyValue value_; +}; + +class TAO_Export TAO_POA_Policies { public: - CORBA_POA (CORBA::ORB_ptr orb_arg, - CORBA::Environment &env); - virtual ~CORBA_POA (void); - static CORBA::POA_ptr init (CORBA::ORB_ptr which_orb, - ACE_INET_Addr &addr, + TAO_POA_Policies (void); + + virtual PortableServer::ThreadPolicyValue thread (void) const; + virtual void thread (PortableServer::ThreadPolicyValue value); + + virtual PortableServer::LifespanPolicyValue lifespan (void) const; + virtual void lifespan (PortableServer::LifespanPolicyValue value); + + virtual PortableServer::IdUniquenessPolicyValue id_uniqueness (void) const; + virtual void id_uniqueness (PortableServer::IdUniquenessPolicyValue value); + + virtual PortableServer::IdAssignmentPolicyValue id_assignment (void) const; + virtual void id_assignment (PortableServer::IdAssignmentPolicyValue value); + + virtual PortableServer::ImplicitActivationPolicyValue implicit_activation (void) const; + virtual void implicit_activation (PortableServer::ImplicitActivationPolicyValue value); + + virtual PortableServer::ServantRetentionPolicyValue servant_retention (void) const; + virtual void servant_retention (PortableServer::ServantRetentionPolicyValue value); + + virtual PortableServer::RequestProcessingPolicyValue request_processing (void) const; + virtual void request_processing (PortableServer::RequestProcessingPolicyValue value); + + virtual void parse_policies (const PortableServer::PolicyList &policies, + CORBA::Environment &env); + +protected: + + virtual void parse_policy (const PortableServer::Policy_ptr policy, + CORBA::Environment &env); + + virtual int validity_check (void); + + 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_; +}; + +class TAO_Export TAO_POA : public POA_PortableServer::POA +{ +public: + + typedef ACE_CString String; + //typedef std::string String; + + virtual PortableServer::POA_ptr create_POA (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + const PortableServer::PolicyList &policies, + CORBA::Environment &env); + + virtual PortableServer::POA_ptr find_POA (const char *adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &env); + + virtual void destroy (CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, + CORBA::Environment &env); + + virtual PortableServer::ThreadPolicy_ptr create_thread_policy (PortableServer::ThreadPolicyValue value, + CORBA::Environment &env); + + virtual PortableServer::LifespanPolicy_ptr create_lifespan_policy (PortableServer::LifespanPolicyValue value, + CORBA::Environment &env); + + virtual PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value, + CORBA::Environment &env); + + virtual PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value, + CORBA::Environment &env); + + virtual PortableServer::ImplicitActivationPolicy_ptr create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value, + CORBA::Environment &env); + + virtual PortableServer::ServantRetentionPolicy_ptr create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value, + CORBA::Environment &env); + + virtual PortableServer::RequestProcessingPolicy_ptr create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value, + CORBA::Environment &env); + + virtual CORBA::String the_name (CORBA::Environment &env); + + virtual PortableServer::POA_ptr the_parent (CORBA::Environment &env); + + virtual PortableServer::POAManager_ptr the_POAManager (CORBA::Environment &env); + + virtual PortableServer::AdapterActivator_ptr the_activator (CORBA::Environment &env); + + virtual void the_activator (PortableServer::AdapterActivator_ptr adapter_activator, CORBA::Environment &env); - // NON-STANDARD CALL. According to CORBA V2.0, this functionality - // should really be <POA_ptr ORB::POA_init (argc,argv,ident)>. - // - // The current signature is residue from when this code was part of - // the SunSoft IIOP reference implementation. - // - // @@ Hum, does this still make sense now that it's in POA? - - /* virtual */ - CORBA::Object_ptr create (TAO_opaque& obj_id, - CORBA::String type_id, - CORBA::Environment& env); - // Create a reference to an object, using identifying information - // that is fully exposed to applications. (An ORB may use additional - // data internally, of course.) - // - // Object IDs are assigned and used by servers to identify objects. - // - // Type IDs are repository IDs, assigned as part of OMG-IDL - // interface definition to identify specific interfaces and their - // relationships to other OMG-IDL interfaces. It's OK to provide a - // null type ID. - // - // Clients which invoke operations using one of these references - // when the server is not active (or after the last reference to the - // POA is released) will normally see an OBJECT_NOT_EXIST exception - // reported by the ORB. If the POA is a "Named POA" the client's - // ORB will not normally return OBJECT_NOT_EXIST unless the POA - // reports that fault. - // - // NOTE: Since any given POA may have been used in the past, servers - // may need to place some data (such as a timestamp) into the object - // ID to help distinguish different incarnations of the POA. "Named - // POA" objects won't want those semantics as much as "Anonymous" - // ones. - - typedef void (CORBA_POA::*dsi_handler) (CORBA::OctetSeq &obj_id, - CORBA::ServerRequest &request, - void *context, - CORBA::Environment &env); - // @@ Please add a comment. BTW, weren't we planning to rename this - // typedef? - // @@ (ANDY) Do you remember the context of this? - - /* virtual */ - void register_dir (dsi_handler handler, - void *context, - CORBA::Environment &env); - // All invocations are handled using DSI ... slightly enhanced from - // the original CORBA 2.0 specs, to improve performance by getting - // rid of all mallocation for calls with fixed-size parameter lists. - // - // A single skeleton, also called "Dynamic Implementation Routine", - // is provided to the ORB; it is called on all requests, along with - // a pointer to context that was provided by the server. - // - // One could imagine that the DIR would recognize that the context - // is a hashtable for per-object state, keyed by the object ID. - // - // Note that in addition to the operations defined by an object's - // IDL interface specification, four operations must be supported by - // code layered above the POA. There are many ways in which these - // operations can be hidden from "application" programs, and some - // solutions are noted below. + + virtual PortableServer::ServantManager_ptr get_servant_manager (CORBA::Environment &env); + + virtual void set_servant_manager (PortableServer::ServantManager_ptr imgr, + CORBA::Environment &env); + + virtual PortableServer::Servant get_servant (CORBA::Environment &env); + + virtual void set_servant (PortableServer::Servant servant, + CORBA::Environment &env); + + virtual PortableServer::ObjectId *activate_object (PortableServer::Servant p_servant, + CORBA::Environment &env); + + virtual void activate_object_with_id (const PortableServer::ObjectId &id, + PortableServer::Servant p_servant, + CORBA::Environment &env); + + virtual void deactivate_object (const PortableServer::ObjectId &oid, + CORBA::Environment &env); + + virtual CORBA::Object_ptr create_reference (const char *intf, + CORBA::Environment &env); + + virtual CORBA::Object_ptr create_reference_with_id (const PortableServer::ObjectId &oid, + const char *intf, + CORBA::Environment &env); + virtual PortableServer::ObjectId *servant_to_id (PortableServer::Servant p_servant, + CORBA::Environment &env); + + virtual CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant, + CORBA::Environment &env); + + virtual PortableServer::Servant reference_to_servant (CORBA::Object_ptr reference, + CORBA::Environment &env); + + virtual PortableServer::ObjectId *reference_to_id (CORBA::Object_ptr reference, + CORBA::Environment &env); + + virtual PortableServer::Servant id_to_servant (const PortableServer::ObjectId &oid, + CORBA::Environment &env); + + virtual CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid, + CORBA::Environment &env); + + static char *ObjectId_to_string (const PortableServer::ObjectId &id); + + static wchar_t *ObjectId_to_wstring (const PortableServer::ObjectId &id); + + static PortableServer::ObjectId *string_to_ObjectId (const char *id); + + static PortableServer::ObjectId *wstring_to_ObjectId (const wchar_t *id); + + TAO_POA (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + CORBA::Environment &env); + + TAO_POA (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + TAO_Object_Table &active_object_map, + CORBA::Environment &env); + + virtual TAO_POA *clone (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + CORBA::Environment &env); + + virtual TAO_POA *clone (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + TAO_Object_Table &active_object_map, + CORBA::Environment &env); + + virtual ~TAO_POA (void); + + virtual void dispatch_servant (const TAO::ObjectKey &key, + CORBA::ServerRequest &req, + void *context, + CORBA::Environment &env); + + virtual int locate_servant (const TAO::ObjectKey &key, + CORBA::Environment &env); + + static char name_separator (void); + + static char id_separator (void); + + static CORBA::ULong name_separator_length (void); + + static CORBA::ULong id_separator_length (void); + +protected: + + virtual TAO_POA *create_POA (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + CORBA::Environment &env); + + virtual TAO_POA *create_POA_i (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + CORBA::Environment &env); + + virtual TAO_POA *find_POA (const String &adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &env); + + virtual TAO_POA *find_POA_i (const String &adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &env); + + virtual TAO_POA *find_POA_i_optimized (const String &adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &env); + + virtual void destroy_i (CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, + CORBA::Environment &env); + + virtual PortableServer::ServantManager_ptr get_servant_manager_i (CORBA::Environment &env); + + virtual void set_servant_manager_i (PortableServer::ServantManager_ptr imgr, + CORBA::Environment &env); + + virtual PortableServer::Servant get_servant_i (CORBA::Environment &env); + + virtual void set_servant_i (PortableServer::Servant servant, + CORBA::Environment &env); + + virtual PortableServer::ObjectId *activate_object_i (PortableServer::Servant p_servant, + CORBA::Environment &env); + + virtual void activate_object_with_id_i (const PortableServer::ObjectId &id, + PortableServer::Servant p_servant, + CORBA::Environment &env); + + virtual void deactivate_object_i (const PortableServer::ObjectId &oid, + CORBA::Environment &env); + + virtual CORBA::Object_ptr create_reference_i (const char *intf, + CORBA::Environment &env); + + virtual PortableServer::ObjectId *servant_to_id_i (PortableServer::Servant servant, + CORBA::Environment &env); + + virtual PortableServer::Servant id_to_servant_i (const PortableServer::ObjectId &oid, + CORBA::Environment &env); + + virtual CORBA::Object_ptr id_to_reference_i (const PortableServer::ObjectId &oid, + CORBA::Environment &env); + + virtual ACE_Lock &lock (void); + + virtual TAO_POA_Policies &policies (void); + + virtual TAO_Object_Table &active_object_map (void); + + virtual void delete_child (const String &child, + CORBA::Environment &env); + + virtual void delete_child_i (const String &child, + CORBA::Environment &env); + + virtual String complete_name (void); + + virtual void set_complete_name (void); + + virtual int leaf_poa_name (const String &adapter_name, + CORBA::Environment &env); + + virtual void parse_poa_name (const TAO_POA::String &adapter_name, + TAO_POA::String &topmost_poa_name, + TAO_POA::String &tail_poa_name, + CORBA::Environment &env); + + virtual PortableServer::ObjectId *create_object_id (void); + + virtual TAO::ObjectKey *create_object_key (const PortableServer::ObjectId &id); + + virtual int is_poa_generated_id (const PortableServer::ObjectId &id); + + virtual int is_poa_generated_key (const TAO::ObjectKey &key); + + virtual int parse_key (const TAO::ObjectKey &key, + String &poa_name, + PortableServer::ObjectId_out id, + CORBA::Boolean &persistent, + ACE_Time_Value &poa_creation_time); + + virtual int locate_servant_i (const TAO::ObjectKey &key, + CORBA::Environment &env); + + virtual PortableServer::Servant locate_poa_and_servant_i (const TAO::ObjectKey &key, + const char *operation, + PortableServer::ObjectId_out id, + TAO_POA *&poa_impl, + CORBA::Environment &env); + + virtual TAO_POA *locate_poa_i (const TAO::ObjectKey &key, + PortableServer::ObjectId_out id, + CORBA::Environment &env); + + virtual void dispatch_servant_i (const TAO::ObjectKey &key, + CORBA::ServerRequest &req, + void *context, + CORBA::Environment &env); + + virtual void pre_invoke (const TAO::ObjectKey &key, + const PortableServer::ObjectId &id, + PortableServer::Servant servant, + CORBA::Environment &env); + + virtual void post_invoke (PortableServer::Servant servant, + const char *operation, + CORBA::Environment &env); + + virtual CORBA::Boolean persistent (void); + + virtual const ACE_Time_Value &creation_time (void); + + virtual const String &object_key_type (void); + + static const String &persistent_key_type (void); + + static const String &transient_key_type (void); + + static const char *ObjectId_to_const_string (const PortableServer::ObjectId &id); + + static const wchar_t *ObjectId_to_const_wstring (const PortableServer::ObjectId &id); + + static const char *ObjectKey_to_const_string (const TAO::ObjectKey &key); + + String name_; + + String complete_name_; + + TAO_POA_Manager &poa_manager_; + + TAO_POA_Policies policies_; + + TAO_POA *parent_; + + TAO_Object_Table *active_object_map_; + + int delete_active_object_map_; + + PortableServer::AdapterActivator_var adapter_activator_; + + PortableServer::ServantActivator_var servant_activator_; + + PortableServer::ServantLocator_var servant_locator_; + + PortableServer::Servant default_servant_; + + typedef ACE_Map_Manager<String, TAO_POA *, ACE_Null_Mutex> CHILDREN; + + CHILDREN children_; + + ACE_Lock_Adapter<ACE_Null_Mutex> lock_; + + int closing_down_; + + CORBA::ULong counter_; + + ACE_Time_Value creation_time_; + + static const int max_space_required_for_ulong; +}; + +class TAO_Export TAO_POA_Manager : public POA_PortableServer::POAManager +{ + friend class TAO_POA; + +public: + enum Processing_State + { + ACTIVE, + DISCARDING, + HOLDING, + INACTIVE, + UNKNOWN + }; + + virtual void activate (CORBA::Environment &env); + + virtual void hold_requests (CORBA::Boolean wait_for_completion, + CORBA::Environment &env); + + virtual void discard_requests (CORBA::Boolean wait_for_completion, + CORBA::Environment &env); + + virtual void deactivate (CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, + CORBA::Environment &env); + + TAO_POA_Manager (void); + + virtual TAO_POA_Manager *clone (void); + + virtual ~TAO_POA_Manager (void); + + virtual Processing_State state (CORBA::Environment &env); + +protected: + + virtual ACE_Lock &lock (void); + + virtual void remove_poa (TAO_POA *poa, + CORBA::Environment &env); + + virtual void remove_poa_i (TAO_POA *poa, + CORBA::Environment &env); + + virtual void register_poa (TAO_POA *poa, + CORBA::Environment &env); + + virtual void register_poa_i (TAO_POA *poa, + CORBA::Environment &env); + + Processing_State state_; + + int closing_down_; + + ACE_Lock_Adapter<ACE_Null_Mutex> lock_; + + typedef ACE_Unbounded_Set<TAO_POA *> POA_COLLECTION; + + POA_COLLECTION poa_collection_; +}; + +class TAO_Export TAO_Adapter_Activator : public POA_PortableServer::AdapterActivator +{ +public: + + virtual CORBA::Boolean unknown_adapter (PortableServer::POA_ptr parent, + const char *name, + CORBA::Environment &env); +}; + +class TAO_Export TAO_Strategy_POA : public TAO_POA +{ +public: + + TAO_Strategy_POA (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + CORBA::Environment &env); + + TAO_Strategy_POA (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + TAO_Object_Table &active_object_map, + CORBA::Environment &env); + + virtual TAO_POA *clone (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + CORBA::Environment &env); + + virtual TAO_POA *clone (const String &adapter_name, + TAO_POA_Manager &poa_manager, + const TAO_POA_Policies &policies, + TAO_POA *parent, + TAO_Object_Table &active_object_map, + CORBA::Environment &env); + + virtual ~TAO_Strategy_POA (void); + +protected: + + virtual ACE_Lock &lock (void); + + ACE_Lock *lock_; + + typedef TAO_Strategy_POA SELF; +}; + +class TAO_Export TAO_Strategy_POA_Manager : public TAO_POA_Manager +{ +public: + + TAO_Strategy_POA_Manager (void); + + virtual TAO_POA_Manager *clone (void); + + virtual ~TAO_Strategy_POA_Manager (void); + +protected: + + virtual ACE_Lock &lock (void); + + ACE_Lock *lock_; + + typedef TAO_Strategy_POA_Manager SELF; +}; + +class TAO_Export TAO_POA_Current : public POA_PortableServer::Current +{ + // = TITLE // - // * "_is_a" is readily handled by skeletons, + // Implementation of the PortableServer::Current object. // - // * "_get_interface" similarly, though with more work to allow the - // IFR data structures to be extracted from skeletons. + // = DESCRIPTION // - // * "_get_implementation" is implementation-specific, a facility - // through which administrative and other information may be - // acquired. Not all systems provide consistent ways to utilize - // this facility. + // 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. // - // * "_non_existent" asks if the referred-to object still exists. - // This enables solving many "distributed garbage" problems, - // such as maintaining persistent tables keyed by references to - // objects that may no longer exist. - -#if 0 - // @@ virtual - void please_shutdown (CORBA::Environment &env); - // Please Shutdown -- reject all further incoming requests, and - // allow all currently active calls (e.g. "this one") to complete. - // This ensures that OS resources associated with this OA can be - // reclaimed even if some buggy applications code mismanages - // refcounting on this POA. - - void run (struct timeval *tvp, - CORBA::Environment &env); - // Run -- call get_request () in a loop until shutdown completes. - // Uses as much concurrency as is provided in this environment. - // Initiate shutdown if we've been idle for the specified time. - // - // This uses only the public APIs defined above; the function is - // defined here purely for convenience, to help some applications - // avoid writing that loop. -#endif /* 0 */ - - static CORBA::POA_ptr get_poa (CORBA::ORB_ptr orb, - CORBA::Environment &env); - // Get an "anonymous" POA pseudo-objref ... this is the API that - // most applications will use. It returns a POA which is not - // otherwise in use (though it may have been used in the past). - // - // Any given POA (named or otherwise) will create equivalent object - // references when POA::create () is called with the same object and - // type IDs. This is not true for two different POAs. - - static CORBA::POA_ptr get_named_poa (CORBA::ORB_ptr orb, - CORBA::String name, - CORBA::Environment &env); - // Get a "named" POA ... most applications don't use/need this API. - // - // POA names are for ORB/system bootstrapping purposes, and need not - // be shared between different systems. The scope of the name isn't - // guaranteed to include more than one system. The names themselves - // are administered using system-specific mechanisms and policies. - - CORBA::OctetSeq *get_key (CORBA::Object_ptr obj, - CORBA::Environment &env); - // NON-STANDARD CALL. When dispatching a request to an object, you - // need to be able to get the object key you used to create the - // reference. It's the main way servers distinguish two object - // references from each other. - - void dispatch (TAO_opaque &key, - CORBA::ServerRequest &req, - void *context, - CORBA::Environment &env); - // Find the object for the request and pass it up the chain. Errors - // are returned in <env>. - - virtual int bind (const TAO_opaque &key, - CORBA::Object_ptr obj); - // Registers a CORBA::Object into the object table and associates the - // key with it. Returns -1 on failure, 0 on success, 1 on - // duplicate. - - virtual int find (const TAO_opaque &key, - CORBA::Object_ptr &obj); - // Looks up an object in the object table using <{key}>. Returns - // non-negative integer on success, or -1 on failure. - - virtual CORBA::ORB_ptr orb (void) const; - // Returns pointer to the ORB with which this OA is associated. - - // = COM IUnknown Support - ULONG AddRef (void); - ULONG Release (void); - TAO_HRESULT QueryInterface (REFIID riid, void** ppv); + // 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 <set_*> operations are performed in the execution + // thread so that the proper <TAO_POA_Current> pointer is obtained + // from TSS. -private: - TAO_Object_Table *objtable_; - // Table of objects registered with this Object Adapter. +public: + // = Specification-mandated methods - CORBA::Boolean do_exit_; - // Flag set by <clean_shutdown ()>. + virtual PortableServer::POA_ptr get_POA (CORBA::Environment &env); + // Return pointer to the invoking POA. Raises the + // <CORBA::NoContext> exception. - CORBA::ORB_ptr orb_; - // Pointer to our ORB. + virtual PortableServer::ObjectId *get_object_id (CORBA::Environment &env); + // Return pointer to the object id through which this was invoked. + // This may be necessary in cases where a <Servant> is serving under + // the guise of multiple object ids. This has _out semantics Raises + // the <CORBA::NoContext> exception. - u_int call_count_; - // Used by COM stuff + // = TAO Extensions - u_int refcount_; - // Used by COM stuff + virtual void clear (void); + // Clear any prior settings made. This will make things which can + // throw the <CORBA::NoContext> exception raise it if invoked + // without a corresponding <set_*> operation. - CORBA::POA::dsi_handler skeleton_; - // Skeleton function + virtual int context_is_valid (void); + // Returns non-zero if the context is valid, i.e., if it would be + // impossible for a <CORBA::NoContext> exception to be raised. - void *context_; - // Who knows!?! + virtual void POA_impl (TAO_POA *impl); + // Set the POA implementation. - ACE_SYNCH_MUTEX lock_; - // Locks critical sections within POA code methods (was - // tcpoa_mutex). + virtual TAO_POA *POA_impl (void) const; + // Get the POA imeplemantation - ACE_SYNCH_MUTEX com_lock_; - // Locks critical sections in COM-related code (was tcpoa_lock). + virtual void object_id (const PortableServer::ObjectId &id); + // Set the object ID. - // = Copy and assignment: just say no - CORBA_POA (const CORBA_POA &src); - CORBA_POA &operator= (const CORBA_POA &src); -}; + virtual const PortableServer::ObjectId &object_id (void) const; + // Get the object ID. -struct TAO_Dispatch_Context - // = TITLE - // Structure holding information necessary for GIOP functionality. - // - // = DESCRIPTION - // Data structure passed as "context" to the GIOP code, which then - // calls back one of the two helper routines as part of handling - // any particular incoming request. -{ - CORBA::POA::dsi_handler skeleton_; - // Function pointer to skeleton glue function. - - void (*check_forward_) (CORBA::OctetSeq& key, - CORBA::Object_ptr& fwd_ref, - void* context, - CORBA::Environment& env); - // Function to check if the request should be forwarded (whatever - // that means). - - void *context_; - // Who knows...another overloading of the word "context". - // @@ Can we please try to remove this? - - CORBA::POA_ptr oa_; - // This should really be a POA_ptr, but currently it doesn't support - // the one call we need to make through here: <handle_message ()>. - - ACE_SOCK_Stream endpoint_; - // The communication endpoint from which the data needs to be read. - // NOTE!!! This type MUST match that used for POA_Handler! -}; + virtual void object_key (const TAO::ObjectKey &key); + // Set the object key. + + virtual const TAO::ObjectKey &object_key (void) const; + // Get the object key. + + virtual void servant (PortableServer::Servant servant); + // Set the servant for the current upcall. + + virtual PortableServer::Servant servant (void) const; + // Get the servant for the current upcall. + + virtual int in_upcall (void) const; + // Get whether we're in an upcall (non-zero is yes). + + virtual PortableServer::ServantLocator::Cookie locator_cookie (void) const; + // Get the Servant Locator's cookie -#endif /* TAO_POA_H */ + virtual void locator_cookie (PortableServer::ServantLocator::Cookie cookie); + // Set the Servant Locator's cookie + TAO_POA_Current (void); + // Constructor + + virtual ~TAO_POA_Current (void); + // Destructor + +private: + TAO_POA *poa_impl_; + // The POA implementation invoking an upcall + + const PortableServer::ObjectId *object_id_; + // The object ID of the current context. + + const TAO::ObjectKey *object_key_; + // The object key of the current context. + + PortableServer::ServantLocator::Cookie cookie_; + // Servant Locator's cookie + + PortableServer::Servant servant_; + // The servant for the current upcall. + + // = Hidden because we don't allow these + TAO_POA_Current (const TAO_POA_Current &); + void operator= (const TAO_POA_Current &); +}; +// Include the templates here. +#include "tao/poa_T.h" +#endif /* POA_H */ diff --git a/TAO/tao/poa.i b/TAO/tao/poa.i index 80a1e0ba437..159b19bb76a 100644 --- a/TAO/tao/poa.i +++ b/TAO/tao/poa.i @@ -1,24 +1,2 @@ -// This may look like C, but it's really -*- C++ -*- +// -*- C++ -*- -// CORBA dup/release build on top of COM's (why not). - -ACE_INLINE void -CORBA::release (CORBA::POA_ptr obj) -{ - if (obj) - obj->Release (); -} - -#if 0 -ACE_INLINE CORBA::Boolean -CORBA_POA::shutting_down (void) -{ - return do_exit_; -} -#endif /* 0 */ - -ACE_INLINE CORBA::ORB_ptr -CORBA_POA::orb (void) const -{ - return orb_; -} diff --git a/TAO/tao/poa.idl b/TAO/tao/poa.idl new file mode 100644 index 00000000000..8d131600045 --- /dev/null +++ b/TAO/tao/poa.idl @@ -0,0 +1,364 @@ +// POA related IDL from "ORB Portability Joint Submission", orbos/97-04-14, +// Section 3.4 +// +// Changes to IDL in that section: +// 1. Take out "..." in CORBA module which indicated "everything else +// in the CORBA module". +// 2. Add some definition from the full CORBA module which are needed +// for compiling the PortableServer module. +// 3. Add fake definitions of "native" since it does not yet exist +// in IDL. These fake definitions allow the rest of the module to +// compile as if "native" were indeed an IDL keyword. +// 4. Took out an extra semi-colon accidentally added during last +// editing pass +// These changes (except removal of "...") are marked with beginning and +// ending comment lines containing "****change****". + +// IDL +#pragma prefix "omg.org" +module PortableServer +{ + typedef string Identifier; + typedef string RepositoryId; + interface CurrentBase{}; + // ****change**** end definitions from CORBA needed for standalone compile + + // basic Policy definition + interface Policy + { + Policy copy( ); + void destroy( ); + }; + + typedef sequence <Policy> PolicyList; + + // forward reference + interface POA; + + native Servant; + typedef sequence<octet> ObjectId; + + exception ForwardRequest + { + Object forward_reference; + }; + + // ********************************************** + // + // Policy interfaces + // + // ********************************************** + enum ThreadPolicyValue { + ORB_CTRL_MODEL, + SINGLE_THREAD_MODEL + }; + interface ThreadPolicy : Policy + { + readonly attribute ThreadPolicyValue value; + }; + + enum LifespanPolicyValue { + TRANSIENT, + PERSISTENT + }; + interface LifespanPolicy : Policy + { + readonly attribute LifespanPolicyValue value; + }; + + enum IdUniquenessPolicyValue { + UNIQUE_ID, + MULTIPLE_ID + }; + interface IdUniquenessPolicy : Policy + { + readonly attribute IdUniquenessPolicyValue value; + }; + + enum IdAssignmentPolicyValue { + USER_ID, + SYSTEM_ID + }; + interface IdAssignmentPolicy : Policy + { + readonly attribute IdAssignmentPolicyValue value; + }; + + enum ImplicitActivationPolicyValue { + IMPLICIT_ACTIVATION, + NO_IMPLICIT_ACTIVATION + }; + interface ImplicitActivationPolicy : Policy + { + readonly attribute ImplicitActivationPolicyValue value; + }; + + enum ServantRetentionPolicyValue { + RETAIN, + NON_RETAIN + }; + interface ServantRetentionPolicy : Policy + { + readonly attribute ServantRetentionPolicyValue value; + }; + + enum RequestProcessingPolicyValue { + USE_ACTIVE_OBJECT_MAP_ONLY, + USE_DEFAULT_SERVANT, + USE_SERVANT_MANAGER + }; + interface RequestProcessingPolicy : Policy + { + readonly attribute RequestProcessingPolicyValue value; + }; + + // ************************************************** + // + // POAManager interface + // + // ************************************************** + + interface POAManager + { + exception AdapterInactive{}; + + void activate() + raises(AdapterInactive); + void hold_requests(in boolean wait_for_completion) + raises(AdapterInactive); + void discard_requests(in boolean wait_for_completion) + raises(AdapterInactive); + // ****change**** begin take out semi-colon after parameter list in 97-04-14 + void deactivate( in boolean etherealize_objects, + in boolean wait_for_completion) + raises(AdapterInactive); + // ****change**** end take out semi-colon after parameter list in 97-04-14 + }; + + // ************************************************** + // + // AdapterActivator interface + // + // ************************************************** + + interface AdapterActivator + { + boolean unknown_adapter(in POA parent, in string name); + }; + + // ************************************************** + // + // ServantManager interface + // + // ************************************************** + + interface ServantManager + { }; + + interface ServantActivator : ServantManager { + 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 ); + }; + + interface ServantLocator : ServantManager { + native Cookie; + + Servant preinvoke( + in ObjectId oid, + in POA adapter, + in Identifier operation, + out Cookie the_cookie ) + raises (ForwardRequest); + + void postinvoke( + in ObjectId oid, + in POA adapter, + in Identifier operation, + in Cookie the_cookie, + in Servant the_servant ); + }; + + + // ************************************************** + // + // POA interface + // + // ************************************************** + + interface POA + { + exception AdapterAlreadyExists {}; + exception AdapterInactive {}; + 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 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 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 RepositoryId intf ) + raises (WrongPolicy); + + Object create_reference_with_id ( + in ObjectId oid, + in 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, WrongAdapter, 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 + // + // ************************************************** + + interface Current : CurrentBase + { + exception NoContext { }; + + POA get_POA() raises (NoContext); + ObjectId get_object_id() raises (NoContext); + }; + +}; diff --git a/TAO/tao/poaC.cpp b/TAO/tao/poaC.cpp new file mode 100644 index 00000000000..0613457001f --- /dev/null +++ b/TAO/tao/poaC.cpp @@ -0,0 +1,2939 @@ +// ****** 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 + +#include "tao/corba.h" +#include "poaC.h" +#include "poaS.h" + +#if !defined (__ACE_INLINE__) +#include "poaC.i" +#endif // !defined INLINE + +static const CORBA::Long _oc_PortableServer_Identifier[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 34, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f49, 0x64656e74, 0x69666965, 0x723a312e, 0x30000000, // repository ID = IDL:PortableServer/Identifier:1.0 + 11, 0x4964656e, 0x74696669, 0x65720000, // name = Identifier + CORBA::tk_string, + 0, // string length +}; +static CORBA::TypeCode _tc__tc_PortableServer_Identifier (CORBA::tk_alias, sizeof (_oc_PortableServer_Identifier), (unsigned char *) &_oc_PortableServer_Identifier, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_Identifier = &_tc__tc_PortableServer_Identifier; + +static const CORBA::Long _oc_PortableServer_RepositoryId[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 36, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f52, 0x65706f73, 0x69746f72, 0x7949643a, 0x312e3000, // repository ID = IDL:PortableServer/RepositoryId:1.0 + 13, 0x5265706f, 0x7369746f, 0x72794964, 0x0, // name = RepositoryId + CORBA::tk_string, + 0, // string length +}; +static CORBA::TypeCode _tc__tc_PortableServer_RepositoryId (CORBA::tk_alias, sizeof (_oc_PortableServer_RepositoryId), (unsigned char *) &_oc_PortableServer_RepositoryId, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_RepositoryId = &_tc__tc_PortableServer_RepositoryId; + +PortableServer::CurrentBase_ptr PortableServer::CurrentBase::_duplicate (PortableServer::CurrentBase_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::CurrentBase_ptr PortableServer::CurrentBase::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::CurrentBase::_nil (); + if (!obj->_is_a ("IDL:PortableServer/CurrentBase:1.0", env)) + return PortableServer::CurrentBase::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::CurrentBase_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::CurrentBase::_nil (); + + new_obj = new PortableServer::CurrentBase (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::CurrentBase::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/CurrentBase:1.0"); + return new POA_PortableServer::_tao_collocated_CurrentBase( + ACE_reinterpret_cast(POA_PortableServer::CurrentBase_ptr, servant), + stub + ); +} + +PortableServer::CurrentBase_ptr PortableServer::CurrentBase::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::CurrentBase::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::CurrentBase::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::CurrentBase::_nil (); + else // narrow it + return PortableServer::CurrentBase::_narrow (objref, env); +} + +CORBA::Boolean PortableServer::CurrentBase::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/CurrentBase:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_CurrentBase[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 35, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f43, 0x75727265, 0x6e744261, 0x73653a31, 0x2e300000, // repository ID = IDL:PortableServer/CurrentBase:1.0 + 12, 0x43757272, 0x656e7442, 0x61736500, // name = CurrentBase, +}; +static CORBA::TypeCode _tc__tc_PortableServer_CurrentBase (CORBA::tk_objref, sizeof (_oc_PortableServer_CurrentBase), (unsigned char *) &_oc_PortableServer_CurrentBase, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_CurrentBase = &_tc__tc_PortableServer_CurrentBase; + +PortableServer::Policy_ptr PortableServer::Policy::_duplicate (PortableServer::Policy_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::Policy_ptr PortableServer::Policy::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::Policy::_nil (); + if (!obj->_is_a ("IDL:PortableServer/Policy:1.0", env)) + return PortableServer::Policy::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::Policy_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::Policy::_nil (); + + new_obj = new PortableServer::Policy (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::Policy::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/Policy:1.0"); + return new POA_PortableServer::_tao_collocated_Policy( + ACE_reinterpret_cast(POA_PortableServer::Policy_ptr, servant), + stub + ); +} + +PortableServer::Policy_ptr PortableServer::Policy::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::Policy::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::Policy::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::Policy::_nil (); + else // narrow it + return PortableServer::Policy::_narrow (objref, env); +} + +static const TAO_Param_Data PortableServer_Policy_copy_paramdata [] = +{ + {PortableServer::_tc_Policy, PARAM_RETURN, 0} +}; + +static const TAO_Call_Data PortableServer_Policy_copy_calldata = +{"copy", 1, 1, PortableServer_Policy_copy_paramdata, 0, 0}; + +PortableServer::Policy_ptr PortableServer::Policy::copy (CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::Policy::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_Policy_copy_calldata, &retval); + return PortableServer::Policy::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_Policy_destroy_paramdata [] = +{ + {CORBA::_tc_void, PARAM_RETURN, 0} +}; + +static const TAO_Call_Data PortableServer_Policy_destroy_calldata = +{"destroy", 1, 1, PortableServer_Policy_destroy_paramdata, 0, 0}; + +void PortableServer::Policy::destroy (CORBA::Environment &env) +{ + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_Policy_destroy_calldata, 0); + return; // no value + +} + +CORBA::Boolean PortableServer::Policy::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_Policy[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 30, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/Policy:1.0 + 7, 0x506f6c69, 0x63790000, // name = Policy, +}; +static CORBA::TypeCode _tc__tc_PortableServer_Policy (CORBA::tk_objref, sizeof (_oc_PortableServer_Policy), (unsigned char *) &_oc_PortableServer_Policy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_Policy = &_tc__tc_PortableServer_Policy; + + +#if !defined (_PORTABLESERVER__TAO_SEQ_POLICY_CS_) +#define _PORTABLESERVER__TAO_SEQ_POLICY_CS_ + +static const CORBA::Long _oc_PortableServer__tao_seq_Policy[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + CORBA::tk_objref, // typecode kind + 60, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + 30, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/Policy:1.0 + 7, 0x506f6c69, 0x63790000, // name = Policy, + 0, +}; +static CORBA::TypeCode _tc__tc_PortableServer__tao_seq_Policy (CORBA::tk_sequence, sizeof (_oc_PortableServer__tao_seq_Policy), (unsigned char *) &_oc_PortableServer__tao_seq_Policy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc__tao_seq_Policy = &_tc__tc_PortableServer__tao_seq_Policy; + + +#endif // end #if !defined + +static const CORBA::Long _oc_PortableServer_PolicyList[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 34, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x6f6c6963, 0x794c6973, 0x743a312e, 0x30000000, // repository ID = IDL:PortableServer/PolicyList:1.0 + 11, 0x506f6c69, 0x63794c69, 0x73740000, // name = PolicyList + CORBA::tk_sequence, // typecode kind + 68, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + CORBA::tk_objref, // typecode kind + 60, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + 30, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/Policy:1.0 + 7, 0x506f6c69, 0x63790000, // name = Policy, + 0, +}; +static CORBA::TypeCode _tc__tc_PortableServer_PolicyList (CORBA::tk_alias, sizeof (_oc_PortableServer_PolicyList), (unsigned char *) &_oc_PortableServer_PolicyList, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_PolicyList = &_tc__tc_PortableServer_PolicyList; + + +#if !defined (_PORTABLESERVER__TAO_SEQ_OCTET_CS_) +#define _PORTABLESERVER__TAO_SEQ_OCTET_CS_ + +static const CORBA::Long _oc_PortableServer__tao_seq_Octet[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + CORBA::tk_octet, + + 0, +}; +static CORBA::TypeCode _tc__tc_PortableServer__tao_seq_Octet (CORBA::tk_sequence, sizeof (_oc_PortableServer__tao_seq_Octet), (unsigned char *) &_oc_PortableServer__tao_seq_Octet, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc__tao_seq_Octet = &_tc__tc_PortableServer__tao_seq_Octet; + + +#endif // end #if !defined + +static const CORBA::Long _oc_PortableServer_ObjectId[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 32, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f4f, 0x626a6563, 0x7449643a, 0x312e3000, // repository ID = IDL:PortableServer/ObjectId:1.0 + 9, 0x4f626a65, 0x63744964, 0x0, // name = ObjectId + CORBA::tk_sequence, // typecode kind + 12, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + CORBA::tk_octet, + + 0, +}; +static CORBA::TypeCode _tc__tc_PortableServer_ObjectId (CORBA::tk_alias, sizeof (_oc_PortableServer_ObjectId), (unsigned char *) &_oc_PortableServer_ObjectId, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ObjectId = &_tc__tc_PortableServer_ObjectId; + +// copy constructor +PortableServer::ForwardRequest::ForwardRequest(const PortableServer::ForwardRequest &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + this->forward_reference = _tao_excp.forward_reference; +} + +// assignment operator +PortableServer::ForwardRequest& +PortableServer::ForwardRequest::operator= (const PortableServer::ForwardRequest &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + this->forward_reference = _tao_excp.forward_reference; + return *this; +} + +// special constructor +PortableServer::ForwardRequest::ForwardRequest(const CORBA::Object_ptr &_tao_forward_reference) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::_tc_ForwardRequest)) +{ + this->forward_reference = _tao_forward_reference; +} + +// narrow +PortableServer::ForwardRequest_ptr +PortableServer::ForwardRequest::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/ForwardRequest:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::ForwardRequest_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_ForwardRequest[] = +{ + 0, // byte order + 38, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f46, 0x6f727761, 0x72645265, 0x71756573, 0x743a312e, 0x30000000, // repository ID = IDL:PortableServer/ForwardRequest:1.0 + 15, 0x466f7277, 0x61726452, 0x65717565, 0x73740000, // name = ForwardRequest + 1, // member count + 18, 0x666f7277, 0x6172645f, 0x72656665, 0x72656e63, 0x65000000, // name = forward_reference + }; +static CORBA::TypeCode _tc__tc_PortableServer_ForwardRequest (CORBA::tk_struct, sizeof (_oc_PortableServer_ForwardRequest), (unsigned char *) &_oc_PortableServer_ForwardRequest, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ForwardRequest = &_tc__tc_PortableServer_ForwardRequest; + + +static const CORBA::Long _oc_PortableServer_ThreadPolicyValue[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 41, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f54, 0x68726561, 0x64506f6c, 0x69637956, 0x616c7565, 0x3a312e30, 0x0, // repository ID = IDL:PortableServer/ThreadPolicyValue:1.0 + 18, 0x54687265, 0x6164506f, 0x6c696379, 0x56616c75, 0x65000000, // name = ThreadPolicyValue + 2, // member count + 15, 0x4f52425f, 0x4354524c, 0x5f4d4f44, 0x454c0000, // name = ORB_CTRL_MODEL + 20, 0x53494e47, 0x4c455f54, 0x48524541, 0x445f4d4f, 0x44454c00, // name = SINGLE_THREAD_MODEL +}; +static CORBA::TypeCode _tc__tc_PortableServer_ThreadPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_ThreadPolicyValue), (unsigned char *) &_oc_PortableServer_ThreadPolicyValue, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ThreadPolicyValue = &_tc__tc_PortableServer_ThreadPolicyValue; + +PortableServer::ThreadPolicy_ptr PortableServer::ThreadPolicy::_duplicate (PortableServer::ThreadPolicy_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::ThreadPolicy_ptr PortableServer::ThreadPolicy::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::ThreadPolicy::_nil (); + if (!obj->_is_a ("IDL:PortableServer/ThreadPolicy:1.0", env)) + return PortableServer::ThreadPolicy::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::ThreadPolicy_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::ThreadPolicy::_nil (); + + new_obj = new PortableServer::ThreadPolicy (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::ThreadPolicy::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/ThreadPolicy:1.0"); + return new POA_PortableServer::_tao_collocated_ThreadPolicy( + ACE_reinterpret_cast(POA_PortableServer::ThreadPolicy_ptr, servant), + stub + ); +} + +PortableServer::ThreadPolicy_ptr PortableServer::ThreadPolicy::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::ThreadPolicy::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ThreadPolicy::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::ThreadPolicy::_nil (); + else // narrow it + return PortableServer::ThreadPolicy::_narrow (objref, env); +} + +static const TAO_Param_Data _get_PortableServer_ThreadPolicy_value_paramdata [] = +{ + {PortableServer::_tc_ThreadPolicyValue, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_ThreadPolicy_value_calldata = +{"_get_value", 1, 1, _get_PortableServer_ThreadPolicy_value_paramdata, 0, 0}; + +PortableServer::ThreadPolicyValue PortableServer::ThreadPolicy::value(CORBA::Environment &env) +{ + PortableServer::ThreadPolicyValue retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return retval; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_ThreadPolicy_value_calldata, &retval); + return retval; + +} + +CORBA::Boolean PortableServer::ThreadPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ThreadPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_ThreadPolicy[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 36, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f54, 0x68726561, 0x64506f6c, 0x6963793a, 0x312e3000, // repository ID = IDL:PortableServer/ThreadPolicy:1.0 + 13, 0x54687265, 0x6164506f, 0x6c696379, 0x0, // name = ThreadPolicy, +}; +static CORBA::TypeCode _tc__tc_PortableServer_ThreadPolicy (CORBA::tk_objref, sizeof (_oc_PortableServer_ThreadPolicy), (unsigned char *) &_oc_PortableServer_ThreadPolicy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ThreadPolicy = &_tc__tc_PortableServer_ThreadPolicy; + + +static const CORBA::Long _oc_PortableServer_LifespanPolicyValue[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 43, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f4c, 0x69666573, 0x70616e50, 0x6f6c6963, 0x7956616c, 0x75653a31, 0x2e300000, // repository ID = IDL:PortableServer/LifespanPolicyValue:1.0 + 20, 0x4c696665, 0x7370616e, 0x506f6c69, 0x63795661, 0x6c756500, // name = LifespanPolicyValue + 2, // member count + 10, 0x5452414e, 0x5349454e, 0x54000000, // name = TRANSIENT + 11, 0x50455253, 0x49535445, 0x4e540000, // name = PERSISTENT +}; +static CORBA::TypeCode _tc__tc_PortableServer_LifespanPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_LifespanPolicyValue), (unsigned char *) &_oc_PortableServer_LifespanPolicyValue, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_LifespanPolicyValue = &_tc__tc_PortableServer_LifespanPolicyValue; + +PortableServer::LifespanPolicy_ptr PortableServer::LifespanPolicy::_duplicate (PortableServer::LifespanPolicy_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::LifespanPolicy_ptr PortableServer::LifespanPolicy::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::LifespanPolicy::_nil (); + if (!obj->_is_a ("IDL:PortableServer/LifespanPolicy:1.0", env)) + return PortableServer::LifespanPolicy::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::LifespanPolicy_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::LifespanPolicy::_nil (); + + new_obj = new PortableServer::LifespanPolicy (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::LifespanPolicy::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/LifespanPolicy:1.0"); + return new POA_PortableServer::_tao_collocated_LifespanPolicy( + ACE_reinterpret_cast(POA_PortableServer::LifespanPolicy_ptr, servant), + stub + ); +} + +PortableServer::LifespanPolicy_ptr PortableServer::LifespanPolicy::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::LifespanPolicy::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::LifespanPolicy::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::LifespanPolicy::_nil (); + else // narrow it + return PortableServer::LifespanPolicy::_narrow (objref, env); +} + +static const TAO_Param_Data _get_PortableServer_LifespanPolicy_value_paramdata [] = +{ + {PortableServer::_tc_LifespanPolicyValue, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_LifespanPolicy_value_calldata = +{"_get_value", 1, 1, _get_PortableServer_LifespanPolicy_value_paramdata, 0, 0}; + +PortableServer::LifespanPolicyValue PortableServer::LifespanPolicy::value(CORBA::Environment &env) +{ + PortableServer::LifespanPolicyValue retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return retval; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_LifespanPolicy_value_calldata, &retval); + return retval; + +} + +CORBA::Boolean PortableServer::LifespanPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/LifespanPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_LifespanPolicy[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 38, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f4c, 0x69666573, 0x70616e50, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/LifespanPolicy:1.0 + 15, 0x4c696665, 0x7370616e, 0x506f6c69, 0x63790000, // name = LifespanPolicy, +}; +static CORBA::TypeCode _tc__tc_PortableServer_LifespanPolicy (CORBA::tk_objref, sizeof (_oc_PortableServer_LifespanPolicy), (unsigned char *) &_oc_PortableServer_LifespanPolicy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_LifespanPolicy = &_tc__tc_PortableServer_LifespanPolicy; + + +static const CORBA::Long _oc_PortableServer_IdUniquenessPolicyValue[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 47, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f49, 0x64556e69, 0x7175656e, 0x65737350, 0x6f6c6963, 0x7956616c, 0x75653a31, 0x2e300000, // repository ID = IDL:PortableServer/IdUniquenessPolicyValue:1.0 + 24, 0x4964556e, 0x69717565, 0x6e657373, 0x506f6c69, 0x63795661, 0x6c756500, // name = IdUniquenessPolicyValue + 2, // member count + 10, 0x554e4951, 0x55455f49, 0x44000000, // name = UNIQUE_ID + 12, 0x4d554c54, 0x49504c45, 0x5f494400, // name = MULTIPLE_ID +}; +static CORBA::TypeCode _tc__tc_PortableServer_IdUniquenessPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_IdUniquenessPolicyValue), (unsigned char *) &_oc_PortableServer_IdUniquenessPolicyValue, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_IdUniquenessPolicyValue = &_tc__tc_PortableServer_IdUniquenessPolicyValue; + +PortableServer::IdUniquenessPolicy_ptr PortableServer::IdUniquenessPolicy::_duplicate (PortableServer::IdUniquenessPolicy_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::IdUniquenessPolicy_ptr PortableServer::IdUniquenessPolicy::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::IdUniquenessPolicy::_nil (); + if (!obj->_is_a ("IDL:PortableServer/IdUniquenessPolicy:1.0", env)) + return PortableServer::IdUniquenessPolicy::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::IdUniquenessPolicy_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::IdUniquenessPolicy::_nil (); + + new_obj = new PortableServer::IdUniquenessPolicy (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::IdUniquenessPolicy::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/IdUniquenessPolicy:1.0"); + return new POA_PortableServer::_tao_collocated_IdUniquenessPolicy( + ACE_reinterpret_cast(POA_PortableServer::IdUniquenessPolicy_ptr, servant), + stub + ); +} + +PortableServer::IdUniquenessPolicy_ptr PortableServer::IdUniquenessPolicy::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::IdUniquenessPolicy::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::IdUniquenessPolicy::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::IdUniquenessPolicy::_nil (); + else // narrow it + return PortableServer::IdUniquenessPolicy::_narrow (objref, env); +} + +static const TAO_Param_Data _get_PortableServer_IdUniquenessPolicy_value_paramdata [] = +{ + {PortableServer::_tc_IdUniquenessPolicyValue, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_IdUniquenessPolicy_value_calldata = +{"_get_value", 1, 1, _get_PortableServer_IdUniquenessPolicy_value_paramdata, 0, 0}; + +PortableServer::IdUniquenessPolicyValue PortableServer::IdUniquenessPolicy::value(CORBA::Environment &env) +{ + PortableServer::IdUniquenessPolicyValue retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return retval; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_IdUniquenessPolicy_value_calldata, &retval); + return retval; + +} + +CORBA::Boolean PortableServer::IdUniquenessPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/IdUniquenessPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_IdUniquenessPolicy[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 42, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f49, 0x64556e69, 0x7175656e, 0x65737350, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/IdUniquenessPolicy:1.0 + 19, 0x4964556e, 0x69717565, 0x6e657373, 0x506f6c69, 0x63790000, // name = IdUniquenessPolicy, +}; +static CORBA::TypeCode _tc__tc_PortableServer_IdUniquenessPolicy (CORBA::tk_objref, sizeof (_oc_PortableServer_IdUniquenessPolicy), (unsigned char *) &_oc_PortableServer_IdUniquenessPolicy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_IdUniquenessPolicy = &_tc__tc_PortableServer_IdUniquenessPolicy; + + +static const CORBA::Long _oc_PortableServer_IdAssignmentPolicyValue[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 47, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f49, 0x64417373, 0x69676e6d, 0x656e7450, 0x6f6c6963, 0x7956616c, 0x75653a31, 0x2e300000, // repository ID = IDL:PortableServer/IdAssignmentPolicyValue:1.0 + 24, 0x49644173, 0x7369676e, 0x6d656e74, 0x506f6c69, 0x63795661, 0x6c756500, // name = IdAssignmentPolicyValue + 2, // member count + 8, 0x55534552, 0x5f494400, // name = USER_ID + 10, 0x53595354, 0x454d5f49, 0x44000000, // name = SYSTEM_ID +}; +static CORBA::TypeCode _tc__tc_PortableServer_IdAssignmentPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_IdAssignmentPolicyValue), (unsigned char *) &_oc_PortableServer_IdAssignmentPolicyValue, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_IdAssignmentPolicyValue = &_tc__tc_PortableServer_IdAssignmentPolicyValue; + +PortableServer::IdAssignmentPolicy_ptr PortableServer::IdAssignmentPolicy::_duplicate (PortableServer::IdAssignmentPolicy_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::IdAssignmentPolicy_ptr PortableServer::IdAssignmentPolicy::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::IdAssignmentPolicy::_nil (); + if (!obj->_is_a ("IDL:PortableServer/IdAssignmentPolicy:1.0", env)) + return PortableServer::IdAssignmentPolicy::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::IdAssignmentPolicy_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::IdAssignmentPolicy::_nil (); + + new_obj = new PortableServer::IdAssignmentPolicy (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::IdAssignmentPolicy::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/IdAssignmentPolicy:1.0"); + return new POA_PortableServer::_tao_collocated_IdAssignmentPolicy( + ACE_reinterpret_cast(POA_PortableServer::IdAssignmentPolicy_ptr, servant), + stub + ); +} + +PortableServer::IdAssignmentPolicy_ptr PortableServer::IdAssignmentPolicy::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::IdAssignmentPolicy::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::IdAssignmentPolicy::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::IdAssignmentPolicy::_nil (); + else // narrow it + return PortableServer::IdAssignmentPolicy::_narrow (objref, env); +} + +static const TAO_Param_Data _get_PortableServer_IdAssignmentPolicy_value_paramdata [] = +{ + {PortableServer::_tc_IdAssignmentPolicyValue, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_IdAssignmentPolicy_value_calldata = +{"_get_value", 1, 1, _get_PortableServer_IdAssignmentPolicy_value_paramdata, 0, 0}; + +PortableServer::IdAssignmentPolicyValue PortableServer::IdAssignmentPolicy::value(CORBA::Environment &env) +{ + PortableServer::IdAssignmentPolicyValue retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return retval; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_IdAssignmentPolicy_value_calldata, &retval); + return retval; + +} + +CORBA::Boolean PortableServer::IdAssignmentPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/IdAssignmentPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_IdAssignmentPolicy[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 42, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f49, 0x64417373, 0x69676e6d, 0x656e7450, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/IdAssignmentPolicy:1.0 + 19, 0x49644173, 0x7369676e, 0x6d656e74, 0x506f6c69, 0x63790000, // name = IdAssignmentPolicy, +}; +static CORBA::TypeCode _tc__tc_PortableServer_IdAssignmentPolicy (CORBA::tk_objref, sizeof (_oc_PortableServer_IdAssignmentPolicy), (unsigned char *) &_oc_PortableServer_IdAssignmentPolicy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_IdAssignmentPolicy = &_tc__tc_PortableServer_IdAssignmentPolicy; + + +static const CORBA::Long _oc_PortableServer_ImplicitActivationPolicyValue[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 53, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f49, 0x6d706c69, 0x63697441, 0x63746976, 0x6174696f, 0x6e506f6c, 0x69637956, 0x616c7565, 0x3a312e30, 0x0, // repository ID = IDL:PortableServer/ImplicitActivationPolicyValue:1.0 + 30, 0x496d706c, 0x69636974, 0x41637469, 0x76617469, 0x6f6e506f, 0x6c696379, 0x56616c75, 0x65000000, // name = ImplicitActivationPolicyValue + 2, // member count + 20, 0x494d504c, 0x49434954, 0x5f414354, 0x49564154, 0x494f4e00, // name = IMPLICIT_ACTIVATION + 23, 0x4e4f5f49, 0x4d504c49, 0x4349545f, 0x41435449, 0x56415449, 0x4f4e0000, // name = NO_IMPLICIT_ACTIVATION +}; +static CORBA::TypeCode _tc__tc_PortableServer_ImplicitActivationPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_ImplicitActivationPolicyValue), (unsigned char *) &_oc_PortableServer_ImplicitActivationPolicyValue, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ImplicitActivationPolicyValue = &_tc__tc_PortableServer_ImplicitActivationPolicyValue; + +PortableServer::ImplicitActivationPolicy_ptr PortableServer::ImplicitActivationPolicy::_duplicate (PortableServer::ImplicitActivationPolicy_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::ImplicitActivationPolicy_ptr PortableServer::ImplicitActivationPolicy::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::ImplicitActivationPolicy::_nil (); + if (!obj->_is_a ("IDL:PortableServer/ImplicitActivationPolicy:1.0", env)) + return PortableServer::ImplicitActivationPolicy::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::ImplicitActivationPolicy_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::ImplicitActivationPolicy::_nil (); + + new_obj = new PortableServer::ImplicitActivationPolicy (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::ImplicitActivationPolicy::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/ImplicitActivationPolicy:1.0"); + return new POA_PortableServer::_tao_collocated_ImplicitActivationPolicy( + ACE_reinterpret_cast(POA_PortableServer::ImplicitActivationPolicy_ptr, servant), + stub + ); +} + +PortableServer::ImplicitActivationPolicy_ptr PortableServer::ImplicitActivationPolicy::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::ImplicitActivationPolicy::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ImplicitActivationPolicy::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::ImplicitActivationPolicy::_nil (); + else // narrow it + return PortableServer::ImplicitActivationPolicy::_narrow (objref, env); +} + +static const TAO_Param_Data _get_PortableServer_ImplicitActivationPolicy_value_paramdata [] = +{ + {PortableServer::_tc_ImplicitActivationPolicyValue, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_ImplicitActivationPolicy_value_calldata = +{"_get_value", 1, 1, _get_PortableServer_ImplicitActivationPolicy_value_paramdata, 0, 0}; + +PortableServer::ImplicitActivationPolicyValue PortableServer::ImplicitActivationPolicy::value(CORBA::Environment &env) +{ + PortableServer::ImplicitActivationPolicyValue retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return retval; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_ImplicitActivationPolicy_value_calldata, &retval); + return retval; + +} + +CORBA::Boolean PortableServer::ImplicitActivationPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ImplicitActivationPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_ImplicitActivationPolicy[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 48, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f49, 0x6d706c69, 0x63697441, 0x63746976, 0x6174696f, 0x6e506f6c, 0x6963793a, 0x312e3000, // repository ID = IDL:PortableServer/ImplicitActivationPolicy:1.0 + 25, 0x496d706c, 0x69636974, 0x41637469, 0x76617469, 0x6f6e506f, 0x6c696379, 0x0, // name = ImplicitActivationPolicy, +}; +static CORBA::TypeCode _tc__tc_PortableServer_ImplicitActivationPolicy (CORBA::tk_objref, sizeof (_oc_PortableServer_ImplicitActivationPolicy), (unsigned char *) &_oc_PortableServer_ImplicitActivationPolicy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ImplicitActivationPolicy = &_tc__tc_PortableServer_ImplicitActivationPolicy; + + +static const CORBA::Long _oc_PortableServer_ServantRetentionPolicyValue[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 51, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f53, 0x65727661, 0x6e745265, 0x74656e74, 0x696f6e50, 0x6f6c6963, 0x7956616c, 0x75653a31, 0x2e300000, // repository ID = IDL:PortableServer/ServantRetentionPolicyValue:1.0 + 28, 0x53657276, 0x616e7452, 0x6574656e, 0x74696f6e, 0x506f6c69, 0x63795661, 0x6c756500, // name = ServantRetentionPolicyValue + 2, // member count + 7, 0x52455441, 0x494e0000, // name = RETAIN + 11, 0x4e4f4e5f, 0x52455441, 0x494e0000, // name = NON_RETAIN +}; +static CORBA::TypeCode _tc__tc_PortableServer_ServantRetentionPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_ServantRetentionPolicyValue), (unsigned char *) &_oc_PortableServer_ServantRetentionPolicyValue, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ServantRetentionPolicyValue = &_tc__tc_PortableServer_ServantRetentionPolicyValue; + +PortableServer::ServantRetentionPolicy_ptr PortableServer::ServantRetentionPolicy::_duplicate (PortableServer::ServantRetentionPolicy_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::ServantRetentionPolicy_ptr PortableServer::ServantRetentionPolicy::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::ServantRetentionPolicy::_nil (); + if (!obj->_is_a ("IDL:PortableServer/ServantRetentionPolicy:1.0", env)) + return PortableServer::ServantRetentionPolicy::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::ServantRetentionPolicy_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::ServantRetentionPolicy::_nil (); + + new_obj = new PortableServer::ServantRetentionPolicy (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::ServantRetentionPolicy::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/ServantRetentionPolicy:1.0"); + return new POA_PortableServer::_tao_collocated_ServantRetentionPolicy( + ACE_reinterpret_cast(POA_PortableServer::ServantRetentionPolicy_ptr, servant), + stub + ); +} + +PortableServer::ServantRetentionPolicy_ptr PortableServer::ServantRetentionPolicy::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::ServantRetentionPolicy::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ServantRetentionPolicy::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::ServantRetentionPolicy::_nil (); + else // narrow it + return PortableServer::ServantRetentionPolicy::_narrow (objref, env); +} + +static const TAO_Param_Data _get_PortableServer_ServantRetentionPolicy_value_paramdata [] = +{ + {PortableServer::_tc_ServantRetentionPolicyValue, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_ServantRetentionPolicy_value_calldata = +{"_get_value", 1, 1, _get_PortableServer_ServantRetentionPolicy_value_paramdata, 0, 0}; + +PortableServer::ServantRetentionPolicyValue PortableServer::ServantRetentionPolicy::value(CORBA::Environment &env) +{ + PortableServer::ServantRetentionPolicyValue retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return retval; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_ServantRetentionPolicy_value_calldata, &retval); + return retval; + +} + +CORBA::Boolean PortableServer::ServantRetentionPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantRetentionPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_ServantRetentionPolicy[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 46, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f53, 0x65727661, 0x6e745265, 0x74656e74, 0x696f6e50, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/ServantRetentionPolicy:1.0 + 23, 0x53657276, 0x616e7452, 0x6574656e, 0x74696f6e, 0x506f6c69, 0x63790000, // name = ServantRetentionPolicy, +}; +static CORBA::TypeCode _tc__tc_PortableServer_ServantRetentionPolicy (CORBA::tk_objref, sizeof (_oc_PortableServer_ServantRetentionPolicy), (unsigned char *) &_oc_PortableServer_ServantRetentionPolicy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ServantRetentionPolicy = &_tc__tc_PortableServer_ServantRetentionPolicy; + + +static const CORBA::Long _oc_PortableServer_RequestProcessingPolicyValue[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 52, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f52, 0x65717565, 0x73745072, 0x6f636573, 0x73696e67, 0x506f6c69, 0x63795661, 0x6c75653a, 0x312e3000, // repository ID = IDL:PortableServer/RequestProcessingPolicyValue:1.0 + 29, 0x52657175, 0x65737450, 0x726f6365, 0x7373696e, 0x67506f6c, 0x69637956, 0x616c7565, 0x0, // name = RequestProcessingPolicyValue + 3, // member count + 27, 0x5553455f, 0x41435449, 0x56455f4f, 0x424a4543, 0x545f4d41, 0x505f4f4e, 0x4c590000, // name = USE_ACTIVE_OBJECT_MAP_ONLY + 20, 0x5553455f, 0x44454641, 0x554c545f, 0x53455256, 0x414e5400, // name = USE_DEFAULT_SERVANT + 20, 0x5553455f, 0x53455256, 0x414e545f, 0x4d414e41, 0x47455200, // name = USE_SERVANT_MANAGER +}; +static CORBA::TypeCode _tc__tc_PortableServer_RequestProcessingPolicyValue (CORBA::tk_enum, sizeof (_oc_PortableServer_RequestProcessingPolicyValue), (unsigned char *) &_oc_PortableServer_RequestProcessingPolicyValue, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_RequestProcessingPolicyValue = &_tc__tc_PortableServer_RequestProcessingPolicyValue; + +PortableServer::RequestProcessingPolicy_ptr PortableServer::RequestProcessingPolicy::_duplicate (PortableServer::RequestProcessingPolicy_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::RequestProcessingPolicy_ptr PortableServer::RequestProcessingPolicy::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::RequestProcessingPolicy::_nil (); + if (!obj->_is_a ("IDL:PortableServer/RequestProcessingPolicy:1.0", env)) + return PortableServer::RequestProcessingPolicy::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::RequestProcessingPolicy_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::RequestProcessingPolicy::_nil (); + + new_obj = new PortableServer::RequestProcessingPolicy (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::RequestProcessingPolicy::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/RequestProcessingPolicy:1.0"); + return new POA_PortableServer::_tao_collocated_RequestProcessingPolicy( + ACE_reinterpret_cast(POA_PortableServer::RequestProcessingPolicy_ptr, servant), + stub + ); +} + +PortableServer::RequestProcessingPolicy_ptr PortableServer::RequestProcessingPolicy::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::RequestProcessingPolicy::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::RequestProcessingPolicy::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::RequestProcessingPolicy::_nil (); + else // narrow it + return PortableServer::RequestProcessingPolicy::_narrow (objref, env); +} + +static const TAO_Param_Data _get_PortableServer_RequestProcessingPolicy_value_paramdata [] = +{ + {PortableServer::_tc_RequestProcessingPolicyValue, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_RequestProcessingPolicy_value_calldata = +{"_get_value", 1, 1, _get_PortableServer_RequestProcessingPolicy_value_paramdata, 0, 0}; + +PortableServer::RequestProcessingPolicyValue PortableServer::RequestProcessingPolicy::value(CORBA::Environment &env) +{ + PortableServer::RequestProcessingPolicyValue retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return retval; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_RequestProcessingPolicy_value_calldata, &retval); + return retval; + +} + +CORBA::Boolean PortableServer::RequestProcessingPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/RequestProcessingPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_RequestProcessingPolicy[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 47, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f52, 0x65717565, 0x73745072, 0x6f636573, 0x73696e67, 0x506f6c69, 0x63793a31, 0x2e300000, // repository ID = IDL:PortableServer/RequestProcessingPolicy:1.0 + 24, 0x52657175, 0x65737450, 0x726f6365, 0x7373696e, 0x67506f6c, 0x69637900, // name = RequestProcessingPolicy, +}; +static CORBA::TypeCode _tc__tc_PortableServer_RequestProcessingPolicy (CORBA::tk_objref, sizeof (_oc_PortableServer_RequestProcessingPolicy), (unsigned char *) &_oc_PortableServer_RequestProcessingPolicy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_RequestProcessingPolicy = &_tc__tc_PortableServer_RequestProcessingPolicy; + +PortableServer::POAManager_ptr PortableServer::POAManager::_duplicate (PortableServer::POAManager_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::POAManager_ptr PortableServer::POAManager::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::POAManager::_nil (); + if (!obj->_is_a ("IDL:PortableServer/POAManager:1.0", env)) + return PortableServer::POAManager::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::POAManager_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::POAManager::_nil (); + + new_obj = new PortableServer::POAManager (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::POAManager::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/POAManager:1.0"); + return new POA_PortableServer::_tao_collocated_POAManager( + ACE_reinterpret_cast(POA_PortableServer::POAManager_ptr, servant), + stub + ); +} + +PortableServer::POAManager_ptr PortableServer::POAManager::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::POAManager::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::POAManager::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::POAManager::_nil (); + else // narrow it + return PortableServer::POAManager::_narrow (objref, env); +} + +// copy constructor +PortableServer::POAManager::AdapterInactive::AdapterInactive(const PortableServer::POAManager::AdapterInactive &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POAManager::AdapterInactive& +PortableServer::POAManager::AdapterInactive::operator= (const PortableServer::POAManager::AdapterInactive &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POAManager::AdapterInactive_ptr +PortableServer::POAManager::AdapterInactive::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POAManager/AdapterInactive:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POAManager::AdapterInactive_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POAManager_AdapterInactive[] = +{ + 0, // byte order + 50, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f414d61, 0x6e616765, 0x722f4164, 0x61707465, 0x72496e61, 0x63746976, 0x653a312e, 0x30000000, // repository ID = IDL:PortableServer/POAManager/AdapterInactive:1.0 + 16, 0x41646170, 0x74657249, 0x6e616374, 0x69766500, // name = AdapterInactive + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POAManager_AdapterInactive (CORBA::tk_struct, sizeof (_oc_PortableServer_POAManager_AdapterInactive), (unsigned char *) &_oc_PortableServer_POAManager_AdapterInactive, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POAManager::_tc_AdapterInactive = &_tc__tc_PortableServer_POAManager_AdapterInactive; + +static const TAO_Param_Data PortableServer_POAManager_activate_paramdata [] = +{ + {CORBA::_tc_void, PARAM_RETURN, 0} +}; + +static const TAO_Call_Data PortableServer_POAManager_activate_calldata = +{"activate", 1, 1, PortableServer_POAManager_activate_paramdata, 0, 0}; + +void PortableServer::POAManager::activate (CORBA::Environment &env) +{ + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POAManager_activate_calldata, 0); + return; // no value + +} + +static const TAO_Param_Data PortableServer_POAManager_hold_requests_paramdata [] = +{ + {CORBA::_tc_void, PARAM_RETURN, 0}, + {CORBA::_tc_boolean, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POAManager_hold_requests_calldata = +{"hold_requests", 1, 2, PortableServer_POAManager_hold_requests_paramdata, 0, 0}; + +void PortableServer::POAManager::hold_requests (CORBA::Boolean wait_for_completion, CORBA::Environment &env) +{ + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POAManager_hold_requests_calldata, 0, &wait_for_completion); + return; // no value + +} + +static const TAO_Param_Data PortableServer_POAManager_discard_requests_paramdata [] = +{ + {CORBA::_tc_void, PARAM_RETURN, 0}, + {CORBA::_tc_boolean, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POAManager_discard_requests_calldata = +{"discard_requests", 1, 2, PortableServer_POAManager_discard_requests_paramdata, 0, 0}; + +void PortableServer::POAManager::discard_requests (CORBA::Boolean wait_for_completion, CORBA::Environment &env) +{ + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POAManager_discard_requests_calldata, 0, &wait_for_completion); + return; // no value + +} + +static const TAO_Param_Data PortableServer_POAManager_deactivate_paramdata [] = +{ + {CORBA::_tc_void, PARAM_RETURN, 0}, + {CORBA::_tc_boolean, PARAM_IN, 0}, + {CORBA::_tc_boolean, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POAManager_deactivate_calldata = +{"deactivate", 1, 3, PortableServer_POAManager_deactivate_paramdata, 0, 0}; + +void PortableServer::POAManager::deactivate (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion, CORBA::Environment &env) +{ + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POAManager_deactivate_calldata, 0, ðerealize_objects, &wait_for_completion); + return; // no value + +} + +CORBA::Boolean PortableServer::POAManager::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/POAManager:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_POAManager[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 34, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f414d61, 0x6e616765, 0x723a312e, 0x30000000, // repository ID = IDL:PortableServer/POAManager:1.0 + 11, 0x504f414d, 0x616e6167, 0x65720000, // name = POAManager, +}; +static CORBA::TypeCode _tc__tc_PortableServer_POAManager (CORBA::tk_objref, sizeof (_oc_PortableServer_POAManager), (unsigned char *) &_oc_PortableServer_POAManager, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_POAManager = &_tc__tc_PortableServer_POAManager; + +PortableServer::AdapterActivator_ptr PortableServer::AdapterActivator::_duplicate (PortableServer::AdapterActivator_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::AdapterActivator_ptr PortableServer::AdapterActivator::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::AdapterActivator::_nil (); + if (!obj->_is_a ("IDL:PortableServer/AdapterActivator:1.0", env)) + return PortableServer::AdapterActivator::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::AdapterActivator_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::AdapterActivator::_nil (); + + new_obj = new PortableServer::AdapterActivator (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::AdapterActivator::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/AdapterActivator:1.0"); + return new POA_PortableServer::_tao_collocated_AdapterActivator( + ACE_reinterpret_cast(POA_PortableServer::AdapterActivator_ptr, servant), + stub + ); +} + +PortableServer::AdapterActivator_ptr PortableServer::AdapterActivator::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::AdapterActivator::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::AdapterActivator::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::AdapterActivator::_nil (); + else // narrow it + return PortableServer::AdapterActivator::_narrow (objref, env); +} + +static const TAO_Param_Data PortableServer_AdapterActivator_unknown_adapter_paramdata [] = +{ + {CORBA::_tc_boolean, PARAM_RETURN, 0}, + {PortableServer::_tc_POA, PARAM_IN, 0}, + {CORBA::_tc_string, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_AdapterActivator_unknown_adapter_calldata = +{"unknown_adapter", 1, 3, PortableServer_AdapterActivator_unknown_adapter_paramdata, 0, 0}; + +CORBA::Boolean PortableServer::AdapterActivator::unknown_adapter (PortableServer::POA_ptr parent, const char *name, CORBA::Environment &env) +{ + CORBA::Boolean retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return retval; + } + this->Release (); // QueryInterface has bumped up our refcount + CORBA::Object_ptr _tao_base_parent = parent; // cast it + istub->do_call (env, &PortableServer_AdapterActivator_unknown_adapter_calldata, &retval, &_tao_base_parent, &name); + return retval; + +} + +CORBA::Boolean PortableServer::AdapterActivator::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/AdapterActivator:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_AdapterActivator[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 40, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f41, 0x64617074, 0x65724163, 0x74697661, 0x746f723a, 0x312e3000, // repository ID = IDL:PortableServer/AdapterActivator:1.0 + 17, 0x41646170, 0x74657241, 0x63746976, 0x61746f72, 0x0, // name = AdapterActivator, +}; +static CORBA::TypeCode _tc__tc_PortableServer_AdapterActivator (CORBA::tk_objref, sizeof (_oc_PortableServer_AdapterActivator), (unsigned char *) &_oc_PortableServer_AdapterActivator, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_AdapterActivator = &_tc__tc_PortableServer_AdapterActivator; + +PortableServer::ServantManager_ptr PortableServer::ServantManager::_duplicate (PortableServer::ServantManager_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::ServantManager_ptr PortableServer::ServantManager::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::ServantManager::_nil (); + if (!obj->_is_a ("IDL:PortableServer/ServantManager:1.0", env)) + return PortableServer::ServantManager::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::ServantManager_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::ServantManager::_nil (); + + new_obj = new PortableServer::ServantManager (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::ServantManager::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/ServantManager:1.0"); + return new POA_PortableServer::_tao_collocated_ServantManager( + ACE_reinterpret_cast(POA_PortableServer::ServantManager_ptr, servant), + stub + ); +} + +PortableServer::ServantManager_ptr PortableServer::ServantManager::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::ServantManager::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ServantManager::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::ServantManager::_nil (); + else // narrow it + return PortableServer::ServantManager::_narrow (objref, env); +} + +CORBA::Boolean PortableServer::ServantManager::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantManager:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_ServantManager[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 38, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f53, 0x65727661, 0x6e744d61, 0x6e616765, 0x723a312e, 0x30000000, // repository ID = IDL:PortableServer/ServantManager:1.0 + 15, 0x53657276, 0x616e744d, 0x616e6167, 0x65720000, // name = ServantManager, +}; +static CORBA::TypeCode _tc__tc_PortableServer_ServantManager (CORBA::tk_objref, sizeof (_oc_PortableServer_ServantManager), (unsigned char *) &_oc_PortableServer_ServantManager, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ServantManager = &_tc__tc_PortableServer_ServantManager; + +PortableServer::ServantActivator_ptr PortableServer::ServantActivator::_duplicate (PortableServer::ServantActivator_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::ServantActivator_ptr PortableServer::ServantActivator::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::ServantActivator::_nil (); + if (!obj->_is_a ("IDL:PortableServer/ServantActivator:1.0", env)) + return PortableServer::ServantActivator::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::ServantActivator_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::ServantActivator::_nil (); + + new_obj = new PortableServer::ServantActivator (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::ServantActivator::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/ServantActivator:1.0"); + return new POA_PortableServer::_tao_collocated_ServantActivator( + ACE_reinterpret_cast(POA_PortableServer::ServantActivator_ptr, servant), + stub + ); +} + +PortableServer::ServantActivator_ptr PortableServer::ServantActivator::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::ServantActivator::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ServantActivator::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::ServantActivator::_nil (); + else // narrow it + return PortableServer::ServantActivator::_narrow (objref, env); +} + +PortableServer::Servant PortableServer::ServantActivator::incarnate (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return 0; + +} + +void PortableServer::ServantActivator::etherealize (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, PortableServer::Servant serv, CORBA::Boolean cleanup_in_progress, CORBA::Boolean remaining_activations, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return; + +} + +CORBA::Boolean PortableServer::ServantActivator::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantActivator:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantManager:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_ServantActivator[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 40, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f53, 0x65727661, 0x6e744163, 0x74697661, 0x746f723a, 0x312e3000, // repository ID = IDL:PortableServer/ServantActivator:1.0 + 17, 0x53657276, 0x616e7441, 0x63746976, 0x61746f72, 0x0, // name = ServantActivator, +}; +static CORBA::TypeCode _tc__tc_PortableServer_ServantActivator (CORBA::tk_objref, sizeof (_oc_PortableServer_ServantActivator), (unsigned char *) &_oc_PortableServer_ServantActivator, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ServantActivator = &_tc__tc_PortableServer_ServantActivator; + +PortableServer::ServantLocator_ptr PortableServer::ServantLocator::_duplicate (PortableServer::ServantLocator_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::ServantLocator_ptr PortableServer::ServantLocator::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::ServantLocator::_nil (); + if (!obj->_is_a ("IDL:PortableServer/ServantLocator:1.0", env)) + return PortableServer::ServantLocator::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::ServantLocator_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::ServantLocator::_nil (); + + new_obj = new PortableServer::ServantLocator (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::ServantLocator::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/ServantLocator:1.0"); + return new POA_PortableServer::_tao_collocated_ServantLocator( + ACE_reinterpret_cast(POA_PortableServer::ServantLocator_ptr, servant), + stub + ); +} + +PortableServer::ServantLocator_ptr PortableServer::ServantLocator::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::ServantLocator::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ServantLocator::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::ServantLocator::_nil (); + else // narrow it + return PortableServer::ServantLocator::_narrow (objref, env); +} + +PortableServer::Servant PortableServer::ServantLocator::preinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, const char *operation, PortableServer::ServantLocator::Cookie & the_cookie, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return 0; + +} + +void PortableServer::ServantLocator::postinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, const char *operation, PortableServer::ServantLocator::Cookie the_cookie, PortableServer::Servant the_servant, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return; + +} + +CORBA::Boolean PortableServer::ServantLocator::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantLocator:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantManager:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_ServantLocator[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 38, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f53, 0x65727661, 0x6e744c6f, 0x6361746f, 0x723a312e, 0x30000000, // repository ID = IDL:PortableServer/ServantLocator:1.0 + 15, 0x53657276, 0x616e744c, 0x6f636174, 0x6f720000, // name = ServantLocator, +}; +static CORBA::TypeCode _tc__tc_PortableServer_ServantLocator (CORBA::tk_objref, sizeof (_oc_PortableServer_ServantLocator), (unsigned char *) &_oc_PortableServer_ServantLocator, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_ServantLocator = &_tc__tc_PortableServer_ServantLocator; + +PortableServer::POA_ptr PortableServer::POA::_duplicate (PortableServer::POA_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::POA_ptr PortableServer::POA::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::POA::_nil (); + if (!obj->_is_a ("IDL:PortableServer/POA:1.0", env)) + return PortableServer::POA::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::POA_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::POA::_nil (); + + new_obj = new PortableServer::POA (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::POA::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/POA:1.0"); + return new POA_PortableServer::_tao_collocated_POA( + ACE_reinterpret_cast(POA_PortableServer::POA_ptr, servant), + stub + ); +} + +PortableServer::POA_ptr PortableServer::POA::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::POA::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::POA::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::POA::_nil (); + else // narrow it + return PortableServer::POA::_narrow (objref, env); +} + +// copy constructor +PortableServer::POA::AdapterAlreadyExists::AdapterAlreadyExists(const PortableServer::POA::AdapterAlreadyExists &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::AdapterAlreadyExists& +PortableServer::POA::AdapterAlreadyExists::operator= (const PortableServer::POA::AdapterAlreadyExists &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::AdapterAlreadyExists_ptr +PortableServer::POA::AdapterAlreadyExists::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/AdapterAlreadyExists:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::AdapterAlreadyExists_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_AdapterAlreadyExists[] = +{ + 0, // byte order + 48, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f41, 0x64617074, 0x6572416c, 0x72656164, 0x79457869, 0x7374733a, 0x312e3000, // repository ID = IDL:PortableServer/POA/AdapterAlreadyExists:1.0 + 21, 0x41646170, 0x74657241, 0x6c726561, 0x64794578, 0x69737473, 0x0, // name = AdapterAlreadyExists + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_AdapterAlreadyExists (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_AdapterAlreadyExists), (unsigned char *) &_oc_PortableServer_POA_AdapterAlreadyExists, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_AdapterAlreadyExists = &_tc__tc_PortableServer_POA_AdapterAlreadyExists; + +// copy constructor +PortableServer::POA::AdapterInactive::AdapterInactive(const PortableServer::POA::AdapterInactive &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::AdapterInactive& +PortableServer::POA::AdapterInactive::operator= (const PortableServer::POA::AdapterInactive &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::AdapterInactive_ptr +PortableServer::POA::AdapterInactive::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/AdapterInactive:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::AdapterInactive_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_AdapterInactive[] = +{ + 0, // byte order + 43, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f41, 0x64617074, 0x6572496e, 0x61637469, 0x76653a31, 0x2e300000, // repository ID = IDL:PortableServer/POA/AdapterInactive:1.0 + 16, 0x41646170, 0x74657249, 0x6e616374, 0x69766500, // name = AdapterInactive + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_AdapterInactive (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_AdapterInactive), (unsigned char *) &_oc_PortableServer_POA_AdapterInactive, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_AdapterInactive = &_tc__tc_PortableServer_POA_AdapterInactive; + +// copy constructor +PortableServer::POA::AdapterNonExistent::AdapterNonExistent(const PortableServer::POA::AdapterNonExistent &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::AdapterNonExistent& +PortableServer::POA::AdapterNonExistent::operator= (const PortableServer::POA::AdapterNonExistent &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::AdapterNonExistent_ptr +PortableServer::POA::AdapterNonExistent::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/AdapterNonExistent:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::AdapterNonExistent_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_AdapterNonExistent[] = +{ + 0, // byte order + 46, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f41, 0x64617074, 0x65724e6f, 0x6e457869, 0x7374656e, 0x743a312e, 0x30000000, // repository ID = IDL:PortableServer/POA/AdapterNonExistent:1.0 + 19, 0x41646170, 0x7465724e, 0x6f6e4578, 0x69737465, 0x6e740000, // name = AdapterNonExistent + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_AdapterNonExistent (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_AdapterNonExistent), (unsigned char *) &_oc_PortableServer_POA_AdapterNonExistent, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_AdapterNonExistent = &_tc__tc_PortableServer_POA_AdapterNonExistent; + +// copy constructor +PortableServer::POA::InvalidPolicy::InvalidPolicy(const PortableServer::POA::InvalidPolicy &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + this->index = _tao_excp.index; +} + +// assignment operator +PortableServer::POA::InvalidPolicy& +PortableServer::POA::InvalidPolicy::operator= (const PortableServer::POA::InvalidPolicy &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + this->index = _tao_excp.index; + return *this; +} + +// special constructor +PortableServer::POA::InvalidPolicy::InvalidPolicy(const CORBA::UShort _tao_index) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_InvalidPolicy)) +{ + this->index = _tao_index; +} + +// narrow +PortableServer::POA::InvalidPolicy_ptr +PortableServer::POA::InvalidPolicy::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/InvalidPolicy:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::InvalidPolicy_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_InvalidPolicy[] = +{ + 0, // byte order + 41, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f49, 0x6e76616c, 0x6964506f, 0x6c696379, 0x3a312e30, 0x0, // repository ID = IDL:PortableServer/POA/InvalidPolicy:1.0 + 14, 0x496e7661, 0x6c696450, 0x6f6c6963, 0x79000000, // name = InvalidPolicy + 1, // member count + 6, 0x696e6465, 0x78000000, // name = index + CORBA::tk_ushort, + +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_InvalidPolicy (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_InvalidPolicy), (unsigned char *) &_oc_PortableServer_POA_InvalidPolicy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_InvalidPolicy = &_tc__tc_PortableServer_POA_InvalidPolicy; + +// copy constructor +PortableServer::POA::NoServant::NoServant(const PortableServer::POA::NoServant &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::NoServant& +PortableServer::POA::NoServant::operator= (const PortableServer::POA::NoServant &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::NoServant_ptr +PortableServer::POA::NoServant::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/NoServant:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::NoServant_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_NoServant[] = +{ + 0, // byte order + 37, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f4e, 0x6f536572, 0x76616e74, 0x3a312e30, 0x0, // repository ID = IDL:PortableServer/POA/NoServant:1.0 + 10, 0x4e6f5365, 0x7276616e, 0x74000000, // name = NoServant + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_NoServant (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_NoServant), (unsigned char *) &_oc_PortableServer_POA_NoServant, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_NoServant = &_tc__tc_PortableServer_POA_NoServant; + +// copy constructor +PortableServer::POA::ObjectAlreadyActive::ObjectAlreadyActive(const PortableServer::POA::ObjectAlreadyActive &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::ObjectAlreadyActive& +PortableServer::POA::ObjectAlreadyActive::operator= (const PortableServer::POA::ObjectAlreadyActive &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::ObjectAlreadyActive_ptr +PortableServer::POA::ObjectAlreadyActive::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/ObjectAlreadyActive:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::ObjectAlreadyActive_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_ObjectAlreadyActive[] = +{ + 0, // byte order + 47, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f4f, 0x626a6563, 0x74416c72, 0x65616479, 0x41637469, 0x76653a31, 0x2e300000, // repository ID = IDL:PortableServer/POA/ObjectAlreadyActive:1.0 + 20, 0x4f626a65, 0x6374416c, 0x72656164, 0x79416374, 0x69766500, // name = ObjectAlreadyActive + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_ObjectAlreadyActive (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_ObjectAlreadyActive), (unsigned char *) &_oc_PortableServer_POA_ObjectAlreadyActive, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_ObjectAlreadyActive = &_tc__tc_PortableServer_POA_ObjectAlreadyActive; + +// copy constructor +PortableServer::POA::ObjectNotActive::ObjectNotActive(const PortableServer::POA::ObjectNotActive &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::ObjectNotActive& +PortableServer::POA::ObjectNotActive::operator= (const PortableServer::POA::ObjectNotActive &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::ObjectNotActive_ptr +PortableServer::POA::ObjectNotActive::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/ObjectNotActive:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::ObjectNotActive_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_ObjectNotActive[] = +{ + 0, // byte order + 43, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f4f, 0x626a6563, 0x744e6f74, 0x41637469, 0x76653a31, 0x2e300000, // repository ID = IDL:PortableServer/POA/ObjectNotActive:1.0 + 16, 0x4f626a65, 0x63744e6f, 0x74416374, 0x69766500, // name = ObjectNotActive + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_ObjectNotActive (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_ObjectNotActive), (unsigned char *) &_oc_PortableServer_POA_ObjectNotActive, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_ObjectNotActive = &_tc__tc_PortableServer_POA_ObjectNotActive; + +// copy constructor +PortableServer::POA::ServantAlreadyActive::ServantAlreadyActive(const PortableServer::POA::ServantAlreadyActive &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::ServantAlreadyActive& +PortableServer::POA::ServantAlreadyActive::operator= (const PortableServer::POA::ServantAlreadyActive &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::ServantAlreadyActive_ptr +PortableServer::POA::ServantAlreadyActive::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/ServantAlreadyActive:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::ServantAlreadyActive_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_ServantAlreadyActive[] = +{ + 0, // byte order + 48, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f53, 0x65727661, 0x6e74416c, 0x72656164, 0x79416374, 0x6976653a, 0x312e3000, // repository ID = IDL:PortableServer/POA/ServantAlreadyActive:1.0 + 21, 0x53657276, 0x616e7441, 0x6c726561, 0x64794163, 0x74697665, 0x0, // name = ServantAlreadyActive + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_ServantAlreadyActive (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_ServantAlreadyActive), (unsigned char *) &_oc_PortableServer_POA_ServantAlreadyActive, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_ServantAlreadyActive = &_tc__tc_PortableServer_POA_ServantAlreadyActive; + +// copy constructor +PortableServer::POA::ServantNotActive::ServantNotActive(const PortableServer::POA::ServantNotActive &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::ServantNotActive& +PortableServer::POA::ServantNotActive::operator= (const PortableServer::POA::ServantNotActive &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::ServantNotActive_ptr +PortableServer::POA::ServantNotActive::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/ServantNotActive:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::ServantNotActive_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_ServantNotActive[] = +{ + 0, // byte order + 44, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f53, 0x65727661, 0x6e744e6f, 0x74416374, 0x6976653a, 0x312e3000, // repository ID = IDL:PortableServer/POA/ServantNotActive:1.0 + 17, 0x53657276, 0x616e744e, 0x6f744163, 0x74697665, 0x0, // name = ServantNotActive + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_ServantNotActive (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_ServantNotActive), (unsigned char *) &_oc_PortableServer_POA_ServantNotActive, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_ServantNotActive = &_tc__tc_PortableServer_POA_ServantNotActive; + +// copy constructor +PortableServer::POA::WrongAdapter::WrongAdapter(const PortableServer::POA::WrongAdapter &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::WrongAdapter& +PortableServer::POA::WrongAdapter::operator= (const PortableServer::POA::WrongAdapter &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::WrongAdapter_ptr +PortableServer::POA::WrongAdapter::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/WrongAdapter:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::WrongAdapter_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_WrongAdapter[] = +{ + 0, // byte order + 40, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f57, 0x726f6e67, 0x41646170, 0x7465723a, 0x312e3000, // repository ID = IDL:PortableServer/POA/WrongAdapter:1.0 + 13, 0x57726f6e, 0x67416461, 0x70746572, 0x0, // name = WrongAdapter + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_WrongAdapter (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_WrongAdapter), (unsigned char *) &_oc_PortableServer_POA_WrongAdapter, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_WrongAdapter = &_tc__tc_PortableServer_POA_WrongAdapter; + +// copy constructor +PortableServer::POA::WrongPolicy::WrongPolicy(const PortableServer::POA::WrongPolicy &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::POA::WrongPolicy& +PortableServer::POA::WrongPolicy::operator= (const PortableServer::POA::WrongPolicy &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::POA::WrongPolicy_ptr +PortableServer::POA::WrongPolicy::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/POA/WrongPolicy:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::POA::WrongPolicy_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_POA_WrongPolicy[] = +{ + 0, // byte order + 39, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f412f57, 0x726f6e67, 0x506f6c69, 0x63793a31, 0x2e300000, // repository ID = IDL:PortableServer/POA/WrongPolicy:1.0 + 12, 0x57726f6e, 0x67506f6c, 0x69637900, // name = WrongPolicy + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA_WrongPolicy (CORBA::tk_struct, sizeof (_oc_PortableServer_POA_WrongPolicy), (unsigned char *) &_oc_PortableServer_POA_WrongPolicy, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::POA::_tc_WrongPolicy = &_tc__tc_PortableServer_POA_WrongPolicy; + +static const TAO_Param_Data PortableServer_POA_create_POA_paramdata [] = +{ + {PortableServer::_tc_POA, PARAM_RETURN, 0}, + {CORBA::_tc_string, PARAM_IN, 0}, + {PortableServer::_tc_POAManager, PARAM_IN, 0}, + {PortableServer::_tc_PolicyList, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_POA_calldata = +{"create_POA", 1, 4, PortableServer_POA_create_POA_paramdata, 0, 0}; + +PortableServer::POA_ptr PortableServer::POA::create_POA (const char *adapter_name, PortableServer::POAManager_ptr a_POAManager, const PortableServer::PolicyList &policies, CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::POA::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + CORBA::Object_ptr _tao_base_a_POAManager = a_POAManager; // cast it + istub->do_call (env, &PortableServer_POA_create_POA_calldata, &retval, &adapter_name, &_tao_base_a_POAManager, &policies); + return PortableServer::POA::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_POA_find_POA_paramdata [] = +{ + {PortableServer::_tc_POA, PARAM_RETURN, 0}, + {CORBA::_tc_string, PARAM_IN, 0}, + {CORBA::_tc_boolean, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_find_POA_calldata = +{"find_POA", 1, 3, PortableServer_POA_find_POA_paramdata, 0, 0}; + +PortableServer::POA_ptr PortableServer::POA::find_POA (const char *adapter_name, CORBA::Boolean activate_it, CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::POA::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_find_POA_calldata, &retval, &adapter_name, &activate_it); + return PortableServer::POA::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_POA_destroy_paramdata [] = +{ + {CORBA::_tc_void, PARAM_RETURN, 0}, + {CORBA::_tc_boolean, PARAM_IN, 0}, + {CORBA::_tc_boolean, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_destroy_calldata = +{"destroy", 1, 3, PortableServer_POA_destroy_paramdata, 0, 0}; + +void PortableServer::POA::destroy (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion, CORBA::Environment &env) +{ + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_destroy_calldata, 0, ðerealize_objects, &wait_for_completion); + return; // no value + +} + +static const TAO_Param_Data PortableServer_POA_create_thread_policy_paramdata [] = +{ + {PortableServer::_tc_ThreadPolicy, PARAM_RETURN, 0}, + {PortableServer::_tc_ThreadPolicyValue, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_thread_policy_calldata = +{"create_thread_policy", 1, 2, PortableServer_POA_create_thread_policy_paramdata, 0, 0}; + +PortableServer::ThreadPolicy_ptr PortableServer::POA::create_thread_policy (PortableServer::ThreadPolicyValue value, CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ThreadPolicy::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_create_thread_policy_calldata, &retval, &value); + return PortableServer::ThreadPolicy::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_POA_create_lifespan_policy_paramdata [] = +{ + {PortableServer::_tc_LifespanPolicy, PARAM_RETURN, 0}, + {PortableServer::_tc_LifespanPolicyValue, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_lifespan_policy_calldata = +{"create_lifespan_policy", 1, 2, PortableServer_POA_create_lifespan_policy_paramdata, 0, 0}; + +PortableServer::LifespanPolicy_ptr PortableServer::POA::create_lifespan_policy (PortableServer::LifespanPolicyValue value, CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::LifespanPolicy::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_create_lifespan_policy_calldata, &retval, &value); + return PortableServer::LifespanPolicy::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_POA_create_id_uniqueness_policy_paramdata [] = +{ + {PortableServer::_tc_IdUniquenessPolicy, PARAM_RETURN, 0}, + {PortableServer::_tc_IdUniquenessPolicyValue, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_id_uniqueness_policy_calldata = +{"create_id_uniqueness_policy", 1, 2, PortableServer_POA_create_id_uniqueness_policy_paramdata, 0, 0}; + +PortableServer::IdUniquenessPolicy_ptr PortableServer::POA::create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value, CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::IdUniquenessPolicy::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_create_id_uniqueness_policy_calldata, &retval, &value); + return PortableServer::IdUniquenessPolicy::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_POA_create_id_assignment_policy_paramdata [] = +{ + {PortableServer::_tc_IdAssignmentPolicy, PARAM_RETURN, 0}, + {PortableServer::_tc_IdAssignmentPolicyValue, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_id_assignment_policy_calldata = +{"create_id_assignment_policy", 1, 2, PortableServer_POA_create_id_assignment_policy_paramdata, 0, 0}; + +PortableServer::IdAssignmentPolicy_ptr PortableServer::POA::create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value, CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::IdAssignmentPolicy::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_create_id_assignment_policy_calldata, &retval, &value); + return PortableServer::IdAssignmentPolicy::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_POA_create_implicit_activation_policy_paramdata [] = +{ + {PortableServer::_tc_ImplicitActivationPolicy, PARAM_RETURN, 0}, + {PortableServer::_tc_ImplicitActivationPolicyValue, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_implicit_activation_policy_calldata = +{"create_implicit_activation_policy", 1, 2, PortableServer_POA_create_implicit_activation_policy_paramdata, 0, 0}; + +PortableServer::ImplicitActivationPolicy_ptr PortableServer::POA::create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value, CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ImplicitActivationPolicy::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_create_implicit_activation_policy_calldata, &retval, &value); + return PortableServer::ImplicitActivationPolicy::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_POA_create_servant_retention_policy_paramdata [] = +{ + {PortableServer::_tc_ServantRetentionPolicy, PARAM_RETURN, 0}, + {PortableServer::_tc_ServantRetentionPolicyValue, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_servant_retention_policy_calldata = +{"create_servant_retention_policy", 1, 2, PortableServer_POA_create_servant_retention_policy_paramdata, 0, 0}; + +PortableServer::ServantRetentionPolicy_ptr PortableServer::POA::create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value, CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ServantRetentionPolicy::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_create_servant_retention_policy_calldata, &retval, &value); + return PortableServer::ServantRetentionPolicy::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_POA_create_request_processing_policy_paramdata [] = +{ + {PortableServer::_tc_RequestProcessingPolicy, PARAM_RETURN, 0}, + {PortableServer::_tc_RequestProcessingPolicyValue, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_request_processing_policy_calldata = +{"create_request_processing_policy", 1, 2, PortableServer_POA_create_request_processing_policy_paramdata, 0, 0}; + +PortableServer::RequestProcessingPolicy_ptr PortableServer::POA::create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value, CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::RequestProcessingPolicy::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_create_request_processing_policy_calldata, &retval, &value); + return PortableServer::RequestProcessingPolicy::_narrow (retval, env); + +} + +static const TAO_Param_Data _get_PortableServer_POA_the_name_paramdata [] = +{ + {CORBA::_tc_string, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_POA_the_name_calldata = +{"_get_the_name", 1, 1, _get_PortableServer_POA_the_name_paramdata, 0, 0}; + +char * PortableServer::POA::the_name(CORBA::Environment &env) +{ + char *retval = 0; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return 0; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_POA_the_name_calldata, &retval); + return retval; + +} + +static const TAO_Param_Data _get_PortableServer_POA_the_parent_paramdata [] = +{ + {PortableServer::_tc_POA, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_POA_the_parent_calldata = +{"_get_the_parent", 1, 1, _get_PortableServer_POA_the_parent_paramdata, 0, 0}; + +PortableServer::POA_ptr PortableServer::POA::the_parent(CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::POA::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_POA_the_parent_calldata, &retval); + return PortableServer::POA::_narrow (retval, env); + +} + +static const TAO_Param_Data _get_PortableServer_POA_the_POAManager_paramdata [] = +{ + {PortableServer::_tc_POAManager, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_POA_the_POAManager_calldata = +{"_get_the_POAManager", 1, 1, _get_PortableServer_POA_the_POAManager_paramdata, 0, 0}; + +PortableServer::POAManager_ptr PortableServer::POA::the_POAManager(CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::POAManager::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_POA_the_POAManager_calldata, &retval); + return PortableServer::POAManager::_narrow (retval, env); + +} + +static const TAO_Param_Data _get_PortableServer_POA_the_activator_paramdata [] = +{ + {PortableServer::_tc_AdapterActivator, PARAM_RETURN, 0}}; + +static const TAO_Call_Data _get_PortableServer_POA_the_activator_calldata = +{"_get_the_activator", 1, 1, _get_PortableServer_POA_the_activator_paramdata, 0, 0}; + +PortableServer::AdapterActivator_ptr PortableServer::POA::the_activator(CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::AdapterActivator::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &_get_PortableServer_POA_the_activator_calldata, &retval); + return PortableServer::AdapterActivator::_narrow (retval, env); + +} + +static const TAO_Param_Data _set_PortableServer_POA_the_activator_paramdata [] = +{ + {CORBA::_tc_void, PARAM_RETURN, 0}, + {PortableServer::_tc_AdapterActivator, PARAM_IN, 0} +}; + +static const TAO_Call_Data _set_PortableServer_POA_the_activator_calldata = +{"_set_the_activator", 1, 2, _set_PortableServer_POA_the_activator_paramdata, 0, 0}; + +void PortableServer::POA::the_activator(PortableServer::AdapterActivator_ptr the_activator, CORBA::Environment &env) +{ + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return; + } + this->Release (); // QueryInterface has bumped up our refcount + CORBA::Object_ptr _tao_base_the_activator = the_activator; // cast it + istub->do_call (env, &_set_PortableServer_POA_the_activator_calldata, 0, &_tao_base_the_activator); + +} + +static const TAO_Param_Data PortableServer_POA_get_servant_manager_paramdata [] = +{ + {PortableServer::_tc_ServantManager, PARAM_RETURN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_get_servant_manager_calldata = +{"get_servant_manager", 1, 1, PortableServer_POA_get_servant_manager_paramdata, 0, 0}; + +PortableServer::ServantManager_ptr PortableServer::POA::get_servant_manager (CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::ServantManager::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_get_servant_manager_calldata, &retval); + return PortableServer::ServantManager::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_POA_set_servant_manager_paramdata [] = +{ + {CORBA::_tc_void, PARAM_RETURN, 0}, + {PortableServer::_tc_ServantManager, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_set_servant_manager_calldata = +{"set_servant_manager", 1, 2, PortableServer_POA_set_servant_manager_paramdata, 0, 0}; + +void PortableServer::POA::set_servant_manager (PortableServer::ServantManager_ptr imgr, CORBA::Environment &env) +{ + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return; + } + this->Release (); // QueryInterface has bumped up our refcount + CORBA::Object_ptr _tao_base_imgr = imgr; // cast it + istub->do_call (env, &PortableServer_POA_set_servant_manager_calldata, 0, &_tao_base_imgr); + return; // no value + +} + +PortableServer::Servant PortableServer::POA::get_servant (CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return 0; + +} + +void PortableServer::POA::set_servant (PortableServer::Servant p_servant, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return; + +} + +PortableServer::ObjectId * PortableServer::POA::activate_object (PortableServer::Servant p_servant, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return 0; + +} + +void PortableServer::POA::activate_object_with_id (const PortableServer::ObjectId &id, PortableServer::Servant p_servant, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return; + +} + +static const TAO_Param_Data PortableServer_POA_deactivate_object_paramdata [] = +{ + {CORBA::_tc_void, PARAM_RETURN, 0}, + {PortableServer::_tc_ObjectId, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_deactivate_object_calldata = +{"deactivate_object", 1, 2, PortableServer_POA_deactivate_object_paramdata, 0, 0}; + +void PortableServer::POA::deactivate_object (const PortableServer::ObjectId &oid, CORBA::Environment &env) +{ + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_deactivate_object_calldata, 0, &oid); + return; // no value + +} + +static const TAO_Param_Data PortableServer_POA_create_reference_paramdata [] = +{ + {CORBA::_tc_Object, PARAM_RETURN, 0}, + {PortableServer::_tc_RepositoryId, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_reference_calldata = +{"create_reference", 1, 2, PortableServer_POA_create_reference_paramdata, 0, 0}; + +CORBA::Object_ptr PortableServer::POA::create_reference (const char *intf, CORBA::Environment &env) +{ + CORBA::Object_ptr retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return 0; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_create_reference_calldata, &retval, &intf); + return retval; + +} + +static const TAO_Param_Data PortableServer_POA_create_reference_with_id_paramdata [] = +{ + {CORBA::_tc_Object, PARAM_RETURN, 0}, + {PortableServer::_tc_ObjectId, PARAM_IN, 0}, + {PortableServer::_tc_RepositoryId, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_create_reference_with_id_calldata = +{"create_reference_with_id", 1, 3, PortableServer_POA_create_reference_with_id_paramdata, 0, 0}; + +CORBA::Object_ptr PortableServer::POA::create_reference_with_id (const PortableServer::ObjectId &oid, const char *intf, CORBA::Environment &env) +{ + CORBA::Object_ptr retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return 0; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_create_reference_with_id_calldata, &retval, &oid, &intf); + return retval; + +} + +PortableServer::ObjectId * PortableServer::POA::servant_to_id (PortableServer::Servant p_servant, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return 0; + +} + +CORBA::Object_ptr PortableServer::POA::servant_to_reference (PortableServer::Servant p_servant, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return 0; + +} + +PortableServer::Servant PortableServer::POA::reference_to_servant (CORBA::Object_ptr reference, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return 0; + +} + +static const TAO_Param_Data PortableServer_POA_reference_to_id_paramdata [] = +{ + {PortableServer::_tc_ObjectId, PARAM_RETURN, sizeof (PortableServer::ObjectId)}, + {CORBA::_tc_Object, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_reference_to_id_calldata = +{"reference_to_id", 1, 2, PortableServer_POA_reference_to_id_paramdata, 0, 0}; + +PortableServer::ObjectId * PortableServer::POA::reference_to_id (CORBA::Object_ptr reference, CORBA::Environment &env) +{ + PortableServer::ObjectId *retval = 0; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return 0; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_reference_to_id_calldata, &retval, &reference); + return retval; + +} + +PortableServer::Servant PortableServer::POA::id_to_servant (const PortableServer::ObjectId &oid, CORBA::Environment &env) +{ + env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); + return 0; + +} + +static const TAO_Param_Data PortableServer_POA_id_to_reference_paramdata [] = +{ + {CORBA::_tc_Object, PARAM_RETURN, 0}, + {PortableServer::_tc_ObjectId, PARAM_IN, 0} +}; + +static const TAO_Call_Data PortableServer_POA_id_to_reference_calldata = +{"id_to_reference", 1, 2, PortableServer_POA_id_to_reference_paramdata, 0, 0}; + +CORBA::Object_ptr PortableServer::POA::id_to_reference (const PortableServer::ObjectId &oid, CORBA::Environment &env) +{ + CORBA::Object_ptr retval; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return 0; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_POA_id_to_reference_calldata, &retval, &oid); + return retval; + +} + +CORBA::Boolean PortableServer::POA::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/POA:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_POA[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 27, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x4f413a31, 0x2e300000, // repository ID = IDL:PortableServer/POA:1.0 + 4, 0x504f4100, // name = POA, +}; +static CORBA::TypeCode _tc__tc_PortableServer_POA (CORBA::tk_objref, sizeof (_oc_PortableServer_POA), (unsigned char *) &_oc_PortableServer_POA, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_POA = &_tc__tc_PortableServer_POA; + +PortableServer::Current_ptr PortableServer::Current::_duplicate (PortableServer::Current_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->AddRef (); + + return obj; +} // end of _duplicate + +PortableServer::Current_ptr PortableServer::Current::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &env + ) +{ + if (CORBA::is_nil (obj)) + return PortableServer::Current::_nil (); + if (!obj->_is_a ("IDL:PortableServer/Current:1.0", env)) + return PortableServer::Current::_nil (); + if (!obj->_is_collocated () || !obj->_servant()) + { + STUB_Object *istub; + PortableServer::Current_ptr new_obj; // to be returned + if (obj->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + return PortableServer::Current::_nil (); + + new_obj = new PortableServer::Current (istub); // construct obj ref using the stub object + return new_obj; + } // end of if + + STUB_Object *stub = obj->_servant ()->_create_stub (env); + if (env.exception () != 0) + return PortableServer::Current::_nil (); + void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/Current:1.0"); + return new POA_PortableServer::_tao_collocated_Current( + ACE_reinterpret_cast(POA_PortableServer::Current_ptr, servant), + stub + ); +} + +PortableServer::Current_ptr PortableServer::Current::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) +{ + CORBA::Object_ptr objref = CORBA::Object::_nil (); + IIOP_Object *data = new IIOP_Object (host, port, key); + if (!data) return PortableServer::Current::_nil (); + // get the object_ptr using Query Interface + if (data->QueryInterface (IID_CORBA_Object, (void **)&objref) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::Current::_nil (); + } + data->Release (); // QueryInterface had bumped up our count + if (CORBA::is_nil (objref)) + return PortableServer::Current::_nil (); + else // narrow it + return PortableServer::Current::_narrow (objref, env); +} + +// copy constructor +PortableServer::Current::NoContext::NoContext(const PortableServer::Current::NoContext &_tao_excp) + :CORBA_UserException (CORBA::TypeCode::_duplicate (_tao_excp.type ())) +{ + } + +// assignment operator +PortableServer::Current::NoContext& +PortableServer::Current::NoContext::operator= (const PortableServer::Current::NoContext &_tao_excp) +{ + this->type_ = CORBA::TypeCode::_duplicate (_tao_excp.type ()); + return *this; +} + +// narrow +PortableServer::Current::NoContext_ptr +PortableServer::Current::NoContext::_narrow(CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:PortableServer/Current/NoContext:1.0", exc->id ())) // same type + return ACE_dynamic_cast (PortableServer::Current::NoContext_ptr, exc); + else + return 0; +} + +static const CORBA::Long _oc_PortableServer_Current_NoContext[] = +{ + 0, // byte order + 41, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f43, 0x75727265, 0x6e742f4e, 0x6f436f6e, 0x74657874, 0x3a312e30, 0x0, // repository ID = IDL:PortableServer/Current/NoContext:1.0 + 10, 0x4e6f436f, 0x6e746578, 0x74000000, // name = NoContext + 0, // member count +}; +static CORBA::TypeCode _tc__tc_PortableServer_Current_NoContext (CORBA::tk_struct, sizeof (_oc_PortableServer_Current_NoContext), (unsigned char *) &_oc_PortableServer_Current_NoContext, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::Current::_tc_NoContext = &_tc__tc_PortableServer_Current_NoContext; + +static const TAO_Param_Data PortableServer_Current_get_POA_paramdata [] = +{ + {PortableServer::_tc_POA, PARAM_RETURN, 0} +}; + +static const TAO_Call_Data PortableServer_Current_get_POA_calldata = +{"get_POA", 1, 1, PortableServer_Current_get_POA_paramdata, 0, 0}; + +PortableServer::POA_ptr PortableServer::Current::get_POA (CORBA::Environment &env) +{ + CORBA::Object_ptr retval = CORBA::Object::_nil (); + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return PortableServer::POA::_nil (); + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_Current_get_POA_calldata, &retval); + return PortableServer::POA::_narrow (retval, env); + +} + +static const TAO_Param_Data PortableServer_Current_get_object_id_paramdata [] = +{ + {PortableServer::_tc_ObjectId, PARAM_RETURN, sizeof (PortableServer::ObjectId)} +}; + +static const TAO_Call_Data PortableServer_Current_get_object_id_calldata = +{"get_object_id", 1, 1, PortableServer_Current_get_object_id_paramdata, 0, 0}; + +PortableServer::ObjectId * PortableServer::Current::get_object_id (CORBA::Environment &env) +{ + PortableServer::ObjectId *retval = 0; + STUB_Object *istub; + + if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) + { + env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); + return 0; + } + this->Release (); // QueryInterface has bumped up our refcount + istub->do_call (env, &PortableServer_Current_get_object_id_calldata, &retval); + return retval; + +} + +CORBA::Boolean PortableServer::Current::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Current:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/CurrentBase:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return 1; // success using local knowledge + else + return this->CORBA_Object::_is_a (value, _tao_environment); // remote call +} + +static const CORBA::Long _oc_PortableServer_Current[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 31, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f43, 0x75727265, 0x6e743a31, 0x2e300000, // repository ID = IDL:PortableServer/Current:1.0 + 8, 0x43757272, 0x656e7400, // name = Current, +}; +static CORBA::TypeCode _tc__tc_PortableServer_Current (CORBA::tk_objref, sizeof (_oc_PortableServer_Current), (unsigned char *) &_oc_PortableServer_Current, CORBA::B_FALSE); +CORBA::TypeCode_ptr PortableServer::_tc_Current = &_tc__tc_PortableServer_Current; + +char * +PortableServer::ObjectId_to_string (const PortableServer::ObjectId &id) +{ + return TAO_POA::ObjectId_to_string (id); +} + +wchar_t * +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 wchar_t *id) +{ + return TAO_POA::wstring_to_ObjectId (id); +} + + diff --git a/TAO/tao/poaC.h b/TAO/tao/poaC.h new file mode 100644 index 00000000000..9a2457fc919 --- /dev/null +++ b/TAO/tao/poaC.h @@ -0,0 +1,2330 @@ +// ****** 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 + +#if !defined (_TAO_IDL_POAC_H_) +#define _TAO_IDL_POAC_H_ + +class TAO_ServantBase; +class TAO_Local_ServantBase; +class TAO_DynamicImplementation; + +class TAO_Export PortableServer{ +public: + + typedef TAO_ServantBase ServantBase; + typedef ServantBase *Servant; + + typedef TAO_Local_ServantBase LocalServantBase; + typedef TAO_DynamicImplementation DynamicImplementation; + + typedef CORBA::String Identifier; + typedef CORBA::String_var Identifier_var; + typedef CORBA::String_out Identifier_out; + + static CORBA::TypeCode_ptr _tc_Identifier; + + typedef CORBA::String RepositoryId; + typedef CORBA::String_var RepositoryId_var; + typedef CORBA::String_out RepositoryId_out; + + static CORBA::TypeCode_ptr _tc_RepositoryId; + + +#if !defined (_PORTABLESERVER_CURRENTBASE___PTR_CH_) +#define _PORTABLESERVER_CURRENTBASE___PTR_CH_ + +class CurrentBase; + typedef CurrentBase *CurrentBase_ptr; + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_CURRENTBASE___VAR_CH_) +#define _PORTABLESERVER_CURRENTBASE___VAR_CH_ + + class TAO_Export CurrentBase_var + { + public: + CurrentBase_var (void); // default constructor + CurrentBase_var (CurrentBase_ptr); + CurrentBase_var (const CurrentBase_var &); // copy constructor + ~CurrentBase_var (void); // destructor + + CurrentBase_var &operator= (CurrentBase_ptr); + CurrentBase_var &operator= (const CurrentBase_var &); + CurrentBase_ptr operator-> (void) const; + + operator const CurrentBase_ptr &() const; + operator CurrentBase_ptr &(); + // in, inout, out, _retn + CurrentBase_ptr in (void) const; + CurrentBase_ptr &inout (void); + CurrentBase_ptr &out (void); + CurrentBase_ptr _retn (void); + CurrentBase_ptr ptr (void) const; + + private: + CurrentBase_ptr ptr_; + }; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_CURRENTBASE___OUT_CH_) +#define _PORTABLESERVER_CURRENTBASE___OUT_CH_ + + class TAO_Export CurrentBase_out + { + public: + CurrentBase_out (CurrentBase_ptr &); + CurrentBase_out (CurrentBase_var &); + CurrentBase_out (CurrentBase_out &); + CurrentBase_out &operator= (CurrentBase_out &); + CurrentBase_out &operator= (const CurrentBase_var &); + CurrentBase_out &operator= (CurrentBase_ptr); + operator CurrentBase_ptr &(); + CurrentBase_ptr &ptr (void); + CurrentBase_ptr operator-> (void); + + private: + CurrentBase_ptr &ptr_; + }; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_CURRENTBASE_CH_) +#define _PORTABLESERVER_CURRENTBASE_CH_ + + class TAO_Export CurrentBase: public virtual CORBA::Object + { + public: + // the static operations + static CurrentBase_ptr _duplicate (CurrentBase_ptr obj); + static CurrentBase_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static CurrentBase_ptr _nil (void); + static CurrentBase_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + CurrentBase ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~CurrentBase (void); + private: + CurrentBase (const CurrentBase&); + void operator= (const CurrentBase&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_CurrentBase; + + +#if !defined (_PORTABLESERVER_POLICY___PTR_CH_) +#define _PORTABLESERVER_POLICY___PTR_CH_ + +class Policy; + typedef Policy *Policy_ptr; + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POLICY___VAR_CH_) +#define _PORTABLESERVER_POLICY___VAR_CH_ + + class TAO_Export Policy_var + { + public: + Policy_var (void); // default constructor + Policy_var (Policy_ptr); + Policy_var (const Policy_var &); // copy constructor + ~Policy_var (void); // destructor + + Policy_var &operator= (Policy_ptr); + Policy_var &operator= (const Policy_var &); + Policy_ptr operator-> (void) const; + + operator const Policy_ptr &() const; + operator Policy_ptr &(); + // in, inout, out, _retn + Policy_ptr in (void) const; + Policy_ptr &inout (void); + Policy_ptr &out (void); + Policy_ptr _retn (void); + Policy_ptr ptr (void) const; + + private: + Policy_ptr ptr_; + }; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POLICY___OUT_CH_) +#define _PORTABLESERVER_POLICY___OUT_CH_ + + class TAO_Export Policy_out + { + public: + Policy_out (Policy_ptr &); + Policy_out (Policy_var &); + Policy_out (Policy_out &); + Policy_out &operator= (Policy_out &); + Policy_out &operator= (const Policy_var &); + Policy_out &operator= (Policy_ptr); + operator Policy_ptr &(); + Policy_ptr &ptr (void); + Policy_ptr operator-> (void); + + private: + Policy_ptr &ptr_; + }; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POLICY_CH_) +#define _PORTABLESERVER_POLICY_CH_ + + class TAO_Export Policy: public virtual CORBA::Object + { + public: + // the static operations + static Policy_ptr _duplicate (Policy_ptr obj); + static Policy_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static Policy_ptr _nil (void); + static Policy_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual Policy_ptr copy (CORBA::Environment &env); + virtual void destroy (CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + Policy ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~Policy (void); + private: + Policy (const Policy&); + void operator= (const Policy&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_Policy; + + +#if !defined (_PORTABLESERVER__TAO_SEQ_POLICY_CH_) +#define _PORTABLESERVER__TAO_SEQ_POLICY_CH_ + + // ************************************************************* + // _tao_seq_Policy + // ************************************************************* + + typedef TAO_Unbounded_Object_Sequence<Policy > _tao_seq_Policy; + typedef _tao_seq_Policy* _tao_seq_Policy_ptr; + static CORBA::TypeCode_ptr _tc__tao_seq_Policy; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER__TAO_SEQ_POLICY___VAR_CH_) +#define _PORTABLESERVER__TAO_SEQ_POLICY___VAR_CH_ + +// ************************************************************* + // class PortableServer::_tao_seq_Policy_var + // ************************************************************* + + class TAO_Export _tao_seq_Policy_var + { + public: + _tao_seq_Policy_var (void); // default constructor + _tao_seq_Policy_var (_tao_seq_Policy *); + _tao_seq_Policy_var (const _tao_seq_Policy_var &); // copy constructor + ~_tao_seq_Policy_var (void); // destructor + + _tao_seq_Policy_var &operator= (_tao_seq_Policy *); + _tao_seq_Policy_var &operator= (const _tao_seq_Policy_var &); + _tao_seq_Policy *operator-> (void); + const _tao_seq_Policy *operator-> (void) const; + + operator const _tao_seq_Policy &() const; + operator _tao_seq_Policy &(); + operator _tao_seq_Policy &() const; + TAO_Object_Manager <Policy > operator[] (CORBA::ULong index); + // in, inout, out, _retn + const _tao_seq_Policy &in (void) const; + _tao_seq_Policy &inout (void); + _tao_seq_Policy *&out (void); + _tao_seq_Policy *_retn (void); + _tao_seq_Policy *ptr (void) const; + + private: + _tao_seq_Policy *ptr_; + }; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER__TAO_SEQ_POLICY___OUT_CH_) +#define _PORTABLESERVER__TAO_SEQ_POLICY___OUT_CH_ + + class TAO_Export _tao_seq_Policy_out + { + public: + _tao_seq_Policy_out (_tao_seq_Policy *&); + _tao_seq_Policy_out (_tao_seq_Policy_var &); + _tao_seq_Policy_out (_tao_seq_Policy_out &); + _tao_seq_Policy_out &operator= (_tao_seq_Policy_out &); + _tao_seq_Policy_out &operator= (_tao_seq_Policy *); + operator _tao_seq_Policy *&(); + _tao_seq_Policy *&ptr (void); + _tao_seq_Policy *operator-> (void); + TAO_Object_Manager <Policy > operator[] (CORBA::ULong index); + + private: + _tao_seq_Policy *&ptr_; + // assignment from T_var not allowed + void operator= (const _tao_seq_Policy_var &); + }; + + +#endif // end #if !defined + + typedef _tao_seq_Policy PolicyList; + typedef _tao_seq_Policy_var PolicyList_var; + typedef _tao_seq_Policy_out PolicyList_out; + + static CORBA::TypeCode_ptr _tc_PolicyList; + + 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: + POA_var (void); // default constructor + POA_var (POA_ptr); + 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_; + }; + + +#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 (POA_out &); + POA_out &operator= (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__TAO_SEQ_OCTET_CH_) +#define _PORTABLESERVER__TAO_SEQ_OCTET_CH_ + + // ************************************************************* + // _tao_seq_Octet + // ************************************************************* + + typedef TAO_Unbounded_Sequence<CORBA::Octet > _tao_seq_Octet; + typedef _tao_seq_Octet* _tao_seq_Octet_ptr; + static CORBA::TypeCode_ptr _tc__tao_seq_Octet; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER__TAO_SEQ_OCTET___VAR_CH_) +#define _PORTABLESERVER__TAO_SEQ_OCTET___VAR_CH_ + +// ************************************************************* + // class PortableServer::_tao_seq_Octet_var + // ************************************************************* + + class TAO_Export _tao_seq_Octet_var + { + public: + _tao_seq_Octet_var (void); // default constructor + _tao_seq_Octet_var (_tao_seq_Octet *); + _tao_seq_Octet_var (const _tao_seq_Octet_var &); // copy constructor + ~_tao_seq_Octet_var (void); // destructor + + _tao_seq_Octet_var &operator= (_tao_seq_Octet *); + _tao_seq_Octet_var &operator= (const _tao_seq_Octet_var &); + _tao_seq_Octet *operator-> (void); + const _tao_seq_Octet *operator-> (void) const; + + operator const _tao_seq_Octet &() const; + operator _tao_seq_Octet &(); + operator _tao_seq_Octet &() const; + CORBA::Octet &operator[] (CORBA::ULong index); + // in, inout, out, _retn + const _tao_seq_Octet &in (void) const; + _tao_seq_Octet &inout (void); + _tao_seq_Octet *&out (void); + _tao_seq_Octet *_retn (void); + _tao_seq_Octet *ptr (void) const; + + private: + _tao_seq_Octet *ptr_; + }; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER__TAO_SEQ_OCTET___OUT_CH_) +#define _PORTABLESERVER__TAO_SEQ_OCTET___OUT_CH_ + + class TAO_Export _tao_seq_Octet_out + { + public: + _tao_seq_Octet_out (_tao_seq_Octet *&); + _tao_seq_Octet_out (_tao_seq_Octet_var &); + _tao_seq_Octet_out (_tao_seq_Octet_out &); + _tao_seq_Octet_out &operator= (_tao_seq_Octet_out &); + _tao_seq_Octet_out &operator= (_tao_seq_Octet *); + operator _tao_seq_Octet *&(); + _tao_seq_Octet *&ptr (void); + _tao_seq_Octet *operator-> (void); + CORBA::Octet &operator[] (CORBA::ULong index); + + private: + _tao_seq_Octet *&ptr_; + // assignment from T_var not allowed + void operator= (const _tao_seq_Octet_var &); + }; + + +#endif // end #if !defined + + typedef _tao_seq_Octet ObjectId; + typedef _tao_seq_Octet_var ObjectId_var; + typedef _tao_seq_Octet_out ObjectId_out; + + static CORBA::TypeCode_ptr _tc_ObjectId; + + +#if !defined (_PORTABLESERVER_FORWARDREQUEST___PTR_CH_) +#define _PORTABLESERVER_FORWARDREQUEST___PTR_CH_ + + class ForwardRequest; + typedef ForwardRequest *ForwardRequest_ptr; + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_FORWARDREQUEST_CH_) +#define _PORTABLESERVER_FORWARDREQUEST_CH_ + + class TAO_Export ForwardRequest : public CORBA::UserException + { + public: + ForwardRequest (void); // default ctor + ForwardRequest (const ForwardRequest &); // copy ctor + ~ForwardRequest(void); // dtor + ForwardRequest(const CORBA::Object_ptr&); + ForwardRequest &operator= (const ForwardRequest &); + static ForwardRequest *_narrow (CORBA::Exception *); + CORBA::Object_var forward_reference; + }; + static CORBA::TypeCode_ptr _tc_ForwardRequest; + + +#endif // end #if !defined + + enum ThreadPolicyValue + { + ORB_CTRL_MODEL, + SINGLE_THREAD_MODEL + }; + typedef ThreadPolicyValue &ThreadPolicyValue_out; + static 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: + ThreadPolicy_var (void); // default constructor + ThreadPolicy_var (ThreadPolicy_ptr); + 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_; + }; + + +#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 (ThreadPolicy_out &); + ThreadPolicy_out &operator= (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 Policy + { + public: + // the static operations + static ThreadPolicy_ptr _duplicate (ThreadPolicy_ptr obj); + static ThreadPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static ThreadPolicy_ptr _nil (void); + static ThreadPolicy_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual ThreadPolicyValue value (CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + ThreadPolicy ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~ThreadPolicy (void); + private: + ThreadPolicy (const ThreadPolicy&); + void operator= (const ThreadPolicy&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_ThreadPolicy; + + enum LifespanPolicyValue + { + TRANSIENT, + PERSISTENT + }; + typedef LifespanPolicyValue &LifespanPolicyValue_out; + static 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: + LifespanPolicy_var (void); // default constructor + LifespanPolicy_var (LifespanPolicy_ptr); + 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_; + }; + + +#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 (LifespanPolicy_out &); + LifespanPolicy_out &operator= (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 Policy + { + public: + // the static operations + static LifespanPolicy_ptr _duplicate (LifespanPolicy_ptr obj); + static LifespanPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static LifespanPolicy_ptr _nil (void); + static LifespanPolicy_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual LifespanPolicyValue value (CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + LifespanPolicy ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~LifespanPolicy (void); + private: + LifespanPolicy (const LifespanPolicy&); + void operator= (const LifespanPolicy&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_LifespanPolicy; + + enum IdUniquenessPolicyValue + { + UNIQUE_ID, + MULTIPLE_ID + }; + typedef IdUniquenessPolicyValue &IdUniquenessPolicyValue_out; + static 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: + IdUniquenessPolicy_var (void); // default constructor + IdUniquenessPolicy_var (IdUniquenessPolicy_ptr); + 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_; + }; + + +#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 (IdUniquenessPolicy_out &); + IdUniquenessPolicy_out &operator= (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 Policy + { + public: + // the static operations + static IdUniquenessPolicy_ptr _duplicate (IdUniquenessPolicy_ptr obj); + static IdUniquenessPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static IdUniquenessPolicy_ptr _nil (void); + static IdUniquenessPolicy_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual IdUniquenessPolicyValue value (CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + IdUniquenessPolicy ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~IdUniquenessPolicy (void); + private: + IdUniquenessPolicy (const IdUniquenessPolicy&); + void operator= (const IdUniquenessPolicy&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_IdUniquenessPolicy; + + enum IdAssignmentPolicyValue + { + USER_ID, + SYSTEM_ID + }; + typedef IdAssignmentPolicyValue &IdAssignmentPolicyValue_out; + static 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: + IdAssignmentPolicy_var (void); // default constructor + IdAssignmentPolicy_var (IdAssignmentPolicy_ptr); + 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_; + }; + + +#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 (IdAssignmentPolicy_out &); + IdAssignmentPolicy_out &operator= (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 Policy + { + public: + // the static operations + static IdAssignmentPolicy_ptr _duplicate (IdAssignmentPolicy_ptr obj); + static IdAssignmentPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static IdAssignmentPolicy_ptr _nil (void); + static IdAssignmentPolicy_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual IdAssignmentPolicyValue value (CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + IdAssignmentPolicy ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~IdAssignmentPolicy (void); + private: + IdAssignmentPolicy (const IdAssignmentPolicy&); + void operator= (const IdAssignmentPolicy&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_IdAssignmentPolicy; + + enum ImplicitActivationPolicyValue + { + IMPLICIT_ACTIVATION, + NO_IMPLICIT_ACTIVATION + }; + typedef ImplicitActivationPolicyValue &ImplicitActivationPolicyValue_out; + static 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: + ImplicitActivationPolicy_var (void); // default constructor + ImplicitActivationPolicy_var (ImplicitActivationPolicy_ptr); + 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_; + }; + + +#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 (ImplicitActivationPolicy_out &); + ImplicitActivationPolicy_out &operator= (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 Policy + { + public: + // the static operations + static ImplicitActivationPolicy_ptr _duplicate (ImplicitActivationPolicy_ptr obj); + static ImplicitActivationPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static ImplicitActivationPolicy_ptr _nil (void); + static ImplicitActivationPolicy_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual ImplicitActivationPolicyValue value (CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + ImplicitActivationPolicy ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~ImplicitActivationPolicy (void); + private: + ImplicitActivationPolicy (const ImplicitActivationPolicy&); + void operator= (const ImplicitActivationPolicy&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_ImplicitActivationPolicy; + + enum ServantRetentionPolicyValue + { + RETAIN, + NON_RETAIN + }; + typedef ServantRetentionPolicyValue &ServantRetentionPolicyValue_out; + static 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: + ServantRetentionPolicy_var (void); // default constructor + ServantRetentionPolicy_var (ServantRetentionPolicy_ptr); + 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_; + }; + + +#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 (ServantRetentionPolicy_out &); + ServantRetentionPolicy_out &operator= (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 Policy + { + public: + // the static operations + static ServantRetentionPolicy_ptr _duplicate (ServantRetentionPolicy_ptr obj); + static ServantRetentionPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static ServantRetentionPolicy_ptr _nil (void); + static ServantRetentionPolicy_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual ServantRetentionPolicyValue value (CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + ServantRetentionPolicy ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~ServantRetentionPolicy (void); + private: + ServantRetentionPolicy (const ServantRetentionPolicy&); + void operator= (const ServantRetentionPolicy&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_ServantRetentionPolicy; + + enum RequestProcessingPolicyValue + { + USE_ACTIVE_OBJECT_MAP_ONLY, + USE_DEFAULT_SERVANT, + USE_SERVANT_MANAGER + }; + typedef RequestProcessingPolicyValue &RequestProcessingPolicyValue_out; + static 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: + RequestProcessingPolicy_var (void); // default constructor + RequestProcessingPolicy_var (RequestProcessingPolicy_ptr); + 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_; + }; + + +#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 (RequestProcessingPolicy_out &); + RequestProcessingPolicy_out &operator= (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 Policy + { + public: + // the static operations + static RequestProcessingPolicy_ptr _duplicate (RequestProcessingPolicy_ptr obj); + static RequestProcessingPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static RequestProcessingPolicy_ptr _nil (void); + static RequestProcessingPolicy_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual RequestProcessingPolicyValue value (CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + RequestProcessingPolicy ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~RequestProcessingPolicy (void); + private: + RequestProcessingPolicy (const RequestProcessingPolicy&); + void operator= (const RequestProcessingPolicy&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_RequestProcessingPolicy; + + +#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: + POAManager_var (void); // default constructor + POAManager_var (POAManager_ptr); + 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_; + }; + + +#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 (POAManager_out &); + POAManager_out &operator= (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: + // the static operations + static POAManager_ptr _duplicate (POAManager_ptr obj); + static POAManager_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static POAManager_ptr _nil (void); + static POAManager_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + +#if !defined (_PORTABLESERVER_POAMANAGER_ADAPTERINACTIVE___PTR_CH_) +#define _PORTABLESERVER_POAMANAGER_ADAPTERINACTIVE___PTR_CH_ + + class AdapterInactive; + typedef AdapterInactive *AdapterInactive_ptr; + +#endif // end #if !defined + + +#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); // dtor + AdapterInactive &operator= (const AdapterInactive &); + static AdapterInactive *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_AdapterInactive; + + +#endif // end #if !defined + + virtual void activate (CORBA::Environment &env); + virtual void hold_requests (CORBA::Boolean wait_for_completion, CORBA::Environment &env); + virtual void discard_requests (CORBA::Boolean wait_for_completion, CORBA::Environment &env); + virtual void deactivate (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion, CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + POAManager ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~POAManager (void); + private: + POAManager (const POAManager&); + void operator= (const POAManager&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_POAManager; + + +#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: + AdapterActivator_var (void); // default constructor + AdapterActivator_var (AdapterActivator_ptr); + 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_; + }; + + +#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 (AdapterActivator_out &); + AdapterActivator_out &operator= (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: + // the static operations + static AdapterActivator_ptr _duplicate (AdapterActivator_ptr obj); + static AdapterActivator_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static AdapterActivator_ptr _nil (void); + static AdapterActivator_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual CORBA::Boolean unknown_adapter (POA_ptr parent, const char *name, CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + AdapterActivator ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~AdapterActivator (void); + private: + AdapterActivator (const AdapterActivator&); + void operator= (const AdapterActivator&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_AdapterActivator; + + +#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: + ServantManager_var (void); // default constructor + ServantManager_var (ServantManager_ptr); + 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_; + }; + + +#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 (ServantManager_out &); + ServantManager_out &operator= (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: + // the static operations + static ServantManager_ptr _duplicate (ServantManager_ptr obj); + static ServantManager_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static ServantManager_ptr _nil (void); + static ServantManager_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + ServantManager ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~ServantManager (void); + private: + ServantManager (const ServantManager&); + void operator= (const ServantManager&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_ServantManager; + + +#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: + ServantActivator_var (void); // default constructor + ServantActivator_var (ServantActivator_ptr); + 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_; + }; + + +#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 (ServantActivator_out &); + ServantActivator_out &operator= (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: + // the static operations + static ServantActivator_ptr _duplicate (ServantActivator_ptr obj); + static ServantActivator_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static ServantActivator_ptr _nil (void); + static ServantActivator_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual Servant incarnate (const ObjectId &oid, POA_ptr adapter, CORBA::Environment &env); + virtual void etherealize (const ObjectId &oid, POA_ptr adapter, Servant serv, CORBA::Boolean cleanup_in_progress, CORBA::Boolean remaining_activations, CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + ServantActivator ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~ServantActivator (void); + private: + ServantActivator (const ServantActivator&); + void operator= (const ServantActivator&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_ServantActivator; + + +#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: + ServantLocator_var (void); // default constructor + ServantLocator_var (ServantLocator_ptr); + 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_; + }; + + +#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 (ServantLocator_out &); + ServantLocator_out &operator= (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; + + // the static operations + static ServantLocator_ptr _duplicate (ServantLocator_ptr obj); + static ServantLocator_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static ServantLocator_ptr _nil (void); + static ServantLocator_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + virtual Servant preinvoke (const ObjectId &oid, POA_ptr adapter, const char *operation, Cookie & the_cookie, CORBA::Environment &env); + virtual void postinvoke (const ObjectId &oid, POA_ptr adapter, const char *operation, Cookie the_cookie, Servant the_servant, CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + ServantLocator ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~ServantLocator (void); + private: + ServantLocator (const ServantLocator&); + void operator= (const ServantLocator&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_ServantLocator; + + +#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: + POA_var (void); // default constructor + POA_var (POA_ptr); + 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_; + }; + + +#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 (POA_out &); + POA_out &operator= (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: + // the static operations + static POA_ptr _duplicate (POA_ptr obj); + static POA_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static POA_ptr _nil (void); + static POA_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + +#if !defined (_PORTABLESERVER_POA_ADAPTERALREADYEXISTS___PTR_CH_) +#define _PORTABLESERVER_POA_ADAPTERALREADYEXISTS___PTR_CH_ + + class AdapterAlreadyExists; + typedef AdapterAlreadyExists *AdapterAlreadyExists_ptr; + +#endif // end #if !defined + + +#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); // dtor + AdapterAlreadyExists &operator= (const AdapterAlreadyExists &); + static AdapterAlreadyExists *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_AdapterAlreadyExists; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_ADAPTERINACTIVE___PTR_CH_) +#define _PORTABLESERVER_POA_ADAPTERINACTIVE___PTR_CH_ + + class AdapterInactive; + typedef AdapterInactive *AdapterInactive_ptr; + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_ADAPTERINACTIVE_CH_) +#define _PORTABLESERVER_POA_ADAPTERINACTIVE_CH_ + + class TAO_Export AdapterInactive : public CORBA::UserException + { + public: + AdapterInactive (void); // default ctor + AdapterInactive (const AdapterInactive &); // copy ctor + ~AdapterInactive(void); // dtor + AdapterInactive &operator= (const AdapterInactive &); + static AdapterInactive *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_AdapterInactive; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_ADAPTERNONEXISTENT___PTR_CH_) +#define _PORTABLESERVER_POA_ADAPTERNONEXISTENT___PTR_CH_ + + class AdapterNonExistent; + typedef AdapterNonExistent *AdapterNonExistent_ptr; + +#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); // dtor + AdapterNonExistent &operator= (const AdapterNonExistent &); + static AdapterNonExistent *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_AdapterNonExistent; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_INVALIDPOLICY___PTR_CH_) +#define _PORTABLESERVER_POA_INVALIDPOLICY___PTR_CH_ + + class InvalidPolicy; + typedef InvalidPolicy *InvalidPolicy_ptr; + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_INVALIDPOLICY_CH_) +#define _PORTABLESERVER_POA_INVALIDPOLICY_CH_ + + class TAO_Export InvalidPolicy : public CORBA::UserException + { + public: + InvalidPolicy (void); // default ctor + InvalidPolicy (const InvalidPolicy &); // copy ctor + ~InvalidPolicy(void); // dtor + InvalidPolicy(const CORBA::UShort); + InvalidPolicy &operator= (const InvalidPolicy &); + static InvalidPolicy *_narrow (CORBA::Exception *); + CORBA::UShort index; + }; + static CORBA::TypeCode_ptr _tc_InvalidPolicy; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_NOSERVANT___PTR_CH_) +#define _PORTABLESERVER_POA_NOSERVANT___PTR_CH_ + + class NoServant; + typedef NoServant *NoServant_ptr; + +#endif // end #if !defined + + +#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); // dtor + NoServant &operator= (const NoServant &); + static NoServant *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_NoServant; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_OBJECTALREADYACTIVE___PTR_CH_) +#define _PORTABLESERVER_POA_OBJECTALREADYACTIVE___PTR_CH_ + + class ObjectAlreadyActive; + typedef ObjectAlreadyActive *ObjectAlreadyActive_ptr; + +#endif // end #if !defined + + +#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); // dtor + ObjectAlreadyActive &operator= (const ObjectAlreadyActive &); + static ObjectAlreadyActive *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_ObjectAlreadyActive; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_OBJECTNOTACTIVE___PTR_CH_) +#define _PORTABLESERVER_POA_OBJECTNOTACTIVE___PTR_CH_ + + class ObjectNotActive; + typedef ObjectNotActive *ObjectNotActive_ptr; + +#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); // dtor + ObjectNotActive &operator= (const ObjectNotActive &); + static ObjectNotActive *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_ObjectNotActive; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_SERVANTALREADYACTIVE___PTR_CH_) +#define _PORTABLESERVER_POA_SERVANTALREADYACTIVE___PTR_CH_ + + class ServantAlreadyActive; + typedef ServantAlreadyActive *ServantAlreadyActive_ptr; + +#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); // dtor + ServantAlreadyActive &operator= (const ServantAlreadyActive &); + static ServantAlreadyActive *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_ServantAlreadyActive; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_SERVANTNOTACTIVE___PTR_CH_) +#define _PORTABLESERVER_POA_SERVANTNOTACTIVE___PTR_CH_ + + class ServantNotActive; + typedef ServantNotActive *ServantNotActive_ptr; + +#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); // dtor + ServantNotActive &operator= (const ServantNotActive &); + static ServantNotActive *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_ServantNotActive; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_WRONGADAPTER___PTR_CH_) +#define _PORTABLESERVER_POA_WRONGADAPTER___PTR_CH_ + + class WrongAdapter; + typedef WrongAdapter *WrongAdapter_ptr; + +#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); // dtor + WrongAdapter &operator= (const WrongAdapter &); + static WrongAdapter *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_WrongAdapter; + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POA_WRONGPOLICY___PTR_CH_) +#define _PORTABLESERVER_POA_WRONGPOLICY___PTR_CH_ + + class WrongPolicy; + typedef WrongPolicy *WrongPolicy_ptr; + +#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); // dtor + WrongPolicy &operator= (const WrongPolicy &); + static WrongPolicy *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_WrongPolicy; + + +#endif // end #if !defined + + virtual POA_ptr create_POA (const char *adapter_name, POAManager_ptr a_POAManager, const PolicyList &policies, CORBA::Environment &env); + virtual POA_ptr find_POA (const char *adapter_name, CORBA::Boolean activate_it, CORBA::Environment &env); + virtual void destroy (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion, CORBA::Environment &env); + virtual ThreadPolicy_ptr create_thread_policy (ThreadPolicyValue value, CORBA::Environment &env); + virtual LifespanPolicy_ptr create_lifespan_policy (LifespanPolicyValue value, CORBA::Environment &env); + virtual IdUniquenessPolicy_ptr create_id_uniqueness_policy (IdUniquenessPolicyValue value, CORBA::Environment &env); + virtual IdAssignmentPolicy_ptr create_id_assignment_policy (IdAssignmentPolicyValue value, CORBA::Environment &env); + virtual ImplicitActivationPolicy_ptr create_implicit_activation_policy (ImplicitActivationPolicyValue value, CORBA::Environment &env); + virtual ServantRetentionPolicy_ptr create_servant_retention_policy (ServantRetentionPolicyValue value, CORBA::Environment &env); + virtual RequestProcessingPolicy_ptr create_request_processing_policy (RequestProcessingPolicyValue value, CORBA::Environment &env); + virtual char * the_name (CORBA::Environment &env); + virtual POA_ptr the_parent (CORBA::Environment &env); + virtual POAManager_ptr the_POAManager (CORBA::Environment &env); + virtual AdapterActivator_ptr the_activator (CORBA::Environment &env); + virtual void the_activator(AdapterActivator_ptr the_activator, CORBA::Environment &env); + virtual ServantManager_ptr get_servant_manager (CORBA::Environment &env); + virtual void set_servant_manager (ServantManager_ptr imgr, CORBA::Environment &env); + virtual Servant get_servant (CORBA::Environment &env); + virtual void set_servant (Servant p_servant, CORBA::Environment &env); + virtual ObjectId * activate_object (Servant p_servant, CORBA::Environment &env); + virtual void activate_object_with_id (const ObjectId &id, Servant p_servant, CORBA::Environment &env); + virtual void deactivate_object (const ObjectId &oid, CORBA::Environment &env); + virtual CORBA::Object_ptr create_reference (const char *intf, CORBA::Environment &env); + virtual CORBA::Object_ptr create_reference_with_id (const ObjectId &oid, const char *intf, CORBA::Environment &env); + virtual ObjectId * servant_to_id (Servant p_servant, CORBA::Environment &env); + virtual CORBA::Object_ptr servant_to_reference (Servant p_servant, CORBA::Environment &env); + virtual Servant reference_to_servant (CORBA::Object_ptr reference, CORBA::Environment &env); + virtual ObjectId * reference_to_id (CORBA::Object_ptr reference, CORBA::Environment &env); + virtual Servant id_to_servant (const ObjectId &oid, CORBA::Environment &env); + virtual CORBA::Object_ptr id_to_reference (const ObjectId &oid, CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + POA ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~POA (void); + private: + POA (const POA&); + void operator= (const POA&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_POA; + + +#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: + Current_var (void); // default constructor + Current_var (Current_ptr); + 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_; + }; + + +#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 (Current_out &); + Current_out &operator= (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 CurrentBase + { + public: + // the static operations + static Current_ptr _duplicate (Current_ptr obj); + static Current_ptr _narrow (CORBA::Object_ptr obj, CORBA::Environment &env); + static Current_ptr _nil (void); + static Current_ptr _bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env); + + +#if !defined (_PORTABLESERVER_CURRENT_NOCONTEXT___PTR_CH_) +#define _PORTABLESERVER_CURRENT_NOCONTEXT___PTR_CH_ + + class NoContext; + typedef NoContext *NoContext_ptr; + +#endif // end #if !defined + + +#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); // dtor + NoContext &operator= (const NoContext &); + static NoContext *_narrow (CORBA::Exception *); + }; + static CORBA::TypeCode_ptr _tc_NoContext; + + +#endif // end #if !defined + + virtual POA_ptr get_POA (CORBA::Environment &env); + virtual ObjectId * get_object_id (CORBA::Environment &env); + virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA::Environment &env); + protected: + Current ( + STUB_Object *objref = 0, + TAO_ServantBase *servant = 0, + CORBA::Boolean collocated = CORBA::B_FALSE + ); + public: + virtual ~Current (void); + private: + Current (const Current&); + void operator= (const Current&); + }; + + +#endif // end #if !defined + + static CORBA::TypeCode_ptr _tc_Current; + + static char *ObjectId_to_string (const PortableServer::ObjectId &id); + static wchar_t *ObjectId_to_wstring (const PortableServer::ObjectId &id); + static PortableServer::ObjectId *string_to_ObjectId (const char *id); + static PortableServer::ObjectId *wstring_to_ObjectId (const wchar_t *id); + +}; + + +#if defined (__ACE_INLINE__) +#include "poaC.i" +#endif // defined INLINE + + +#endif // if !defined diff --git a/TAO/tao/poaC.i b/TAO/tao/poaC.i new file mode 100644 index 00000000000..1e91f098883 --- /dev/null +++ b/TAO/tao/poaC.i @@ -0,0 +1,3897 @@ +// ****** 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 + +ACE_INLINE +PortableServer::CurrentBase::CurrentBase( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::CurrentBase::~CurrentBase (void) // destructor +{} + +ACE_INLINE PortableServer::CurrentBase_ptr +PortableServer::CurrentBase::_nil (void) +{ + return (PortableServer::CurrentBase_ptr)0; +} + + +#if !defined (_PORTABLESERVER_CURRENTBASE___VAR_CI_) +#define _PORTABLESERVER_CURRENTBASE___VAR_CI_ + +// ************************************************************* +// Inline operations for class PortableServer::CurrentBase_var +// ************************************************************* + +ACE_INLINE +PortableServer::CurrentBase_var::CurrentBase_var (void) // default constructor + : ptr_ (PortableServer::CurrentBase::_nil ()) +{} + +ACE_INLINE +PortableServer::CurrentBase_var::CurrentBase_var (PortableServer::CurrentBase_ptr p) + : ptr_ (p) +{} + +ACE_INLINE PortableServer::CurrentBase_ptr +PortableServer::CurrentBase_var::ptr (void) const +{ + return this->ptr_; +} + +ACE_INLINE +PortableServer::CurrentBase_var::CurrentBase_var (const PortableServer::CurrentBase_var &p) // copy constructor + : ptr_ (PortableServer::CurrentBase::_duplicate (p.ptr ())) +{} + +ACE_INLINE +PortableServer::CurrentBase_var::~CurrentBase_var (void) // destructor +{ + CORBA::release (this->ptr_); +} + +ACE_INLINE PortableServer::CurrentBase_var & +PortableServer::CurrentBase_var::operator= (PortableServer::CurrentBase_ptr p) +{ + CORBA::release (this->ptr_); + this->ptr_ = p; + return *this; +} + +ACE_INLINE PortableServer::CurrentBase_var & +PortableServer::CurrentBase_var::operator= (const PortableServer::CurrentBase_var &p) +{ + if (this != &p) + { + CORBA::release (this->ptr_); + this->ptr_ = PortableServer::CurrentBase::_duplicate (p.ptr ()); + } + return *this; +} + +ACE_INLINE +PortableServer::CurrentBase_var::operator const PortableServer::CurrentBase_ptr &() const // cast +{ + return this->ptr_; +} + +ACE_INLINE +PortableServer::CurrentBase_var::operator PortableServer::CurrentBase_ptr &() // cast +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::CurrentBase_ptr +PortableServer::CurrentBase_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::CurrentBase_ptr +PortableServer::CurrentBase_var::in (void) const +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::CurrentBase_ptr & +PortableServer::CurrentBase_var::inout (void) +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::CurrentBase_ptr & +PortableServer::CurrentBase_var::out (void) +{ + CORBA::release (this->ptr_); + this->ptr_ = PortableServer::CurrentBase::_nil (); + return this->ptr_; +} + +ACE_INLINE PortableServer::CurrentBase_ptr +PortableServer::CurrentBase_var::_retn (void) +{ + // yield ownership of managed obj reference + PortableServer::CurrentBase_ptr val = this->ptr_; + this->ptr_ = PortableServer::CurrentBase::_nil (); + return val; +} + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_CURRENTBASE___OUT_CI_) +#define _PORTABLESERVER_CURRENTBASE___OUT_CI_ + +// ************************************************************* +// Inline operations for class PortableServer::CurrentBase_out +// ************************************************************* + +ACE_INLINE +PortableServer::CurrentBase_out::CurrentBase_out (PortableServer::CurrentBase_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::CurrentBase::_nil (); +} + +ACE_INLINE +PortableServer::CurrentBase_out::CurrentBase_out (PortableServer::CurrentBase_var &p) // constructor from _var + : ptr_ (p.out ()) +{ + CORBA::release (this->ptr_); + this->ptr_ = PortableServer::CurrentBase::_nil (); +} + +ACE_INLINE +PortableServer::CurrentBase_out::CurrentBase_out (PortableServer::CurrentBase_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::CurrentBase_out & +PortableServer::CurrentBase_out::operator= (PortableServer::CurrentBase_out &p) +{ + this->ptr_ = p.ptr_; + return *this; +} + +ACE_INLINE PortableServer::CurrentBase_out & +PortableServer::CurrentBase_out::operator= (const PortableServer::CurrentBase_var &p) +{ + this->ptr_ = PortableServer::CurrentBase::_duplicate (p.ptr ()); + return *this; +} + +ACE_INLINE PortableServer::CurrentBase_out & +PortableServer::CurrentBase_out::operator= (PortableServer::CurrentBase_ptr p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +PortableServer::CurrentBase_out::operator PortableServer::CurrentBase_ptr &() // cast +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::CurrentBase_ptr & +PortableServer::CurrentBase_out::ptr (void) // ptr +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::CurrentBase_ptr +PortableServer::CurrentBase_out::operator-> (void) +{ + return this->ptr_; +} + + +#endif // end #if !defined + +ACE_INLINE +PortableServer::Policy::Policy( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::Policy::~Policy (void) // destructor +{} + +ACE_INLINE PortableServer::Policy_ptr +PortableServer::Policy::_nil (void) +{ + return (PortableServer::Policy_ptr)0; +} + + +#if !defined (_PORTABLESERVER_POLICY___VAR_CI_) +#define _PORTABLESERVER_POLICY___VAR_CI_ + +// ************************************************************* +// Inline operations for class PortableServer::Policy_var +// ************************************************************* + +ACE_INLINE +PortableServer::Policy_var::Policy_var (void) // default constructor + : ptr_ (PortableServer::Policy::_nil ()) +{} + +ACE_INLINE +PortableServer::Policy_var::Policy_var (PortableServer::Policy_ptr p) + : ptr_ (p) +{} + +ACE_INLINE PortableServer::Policy_ptr +PortableServer::Policy_var::ptr (void) const +{ + return this->ptr_; +} + +ACE_INLINE +PortableServer::Policy_var::Policy_var (const PortableServer::Policy_var &p) // copy constructor + : ptr_ (PortableServer::Policy::_duplicate (p.ptr ())) +{} + +ACE_INLINE +PortableServer::Policy_var::~Policy_var (void) // destructor +{ + CORBA::release (this->ptr_); +} + +ACE_INLINE PortableServer::Policy_var & +PortableServer::Policy_var::operator= (PortableServer::Policy_ptr p) +{ + CORBA::release (this->ptr_); + this->ptr_ = p; + return *this; +} + +ACE_INLINE PortableServer::Policy_var & +PortableServer::Policy_var::operator= (const PortableServer::Policy_var &p) +{ + if (this != &p) + { + CORBA::release (this->ptr_); + this->ptr_ = PortableServer::Policy::_duplicate (p.ptr ()); + } + return *this; +} + +ACE_INLINE +PortableServer::Policy_var::operator const PortableServer::Policy_ptr &() const // cast +{ + return this->ptr_; +} + +ACE_INLINE +PortableServer::Policy_var::operator PortableServer::Policy_ptr &() // cast +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::Policy_ptr +PortableServer::Policy_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::Policy_ptr +PortableServer::Policy_var::in (void) const +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::Policy_ptr & +PortableServer::Policy_var::inout (void) +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::Policy_ptr & +PortableServer::Policy_var::out (void) +{ + CORBA::release (this->ptr_); + this->ptr_ = PortableServer::Policy::_nil (); + return this->ptr_; +} + +ACE_INLINE PortableServer::Policy_ptr +PortableServer::Policy_var::_retn (void) +{ + // yield ownership of managed obj reference + PortableServer::Policy_ptr val = this->ptr_; + this->ptr_ = PortableServer::Policy::_nil (); + return val; +} + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER_POLICY___OUT_CI_) +#define _PORTABLESERVER_POLICY___OUT_CI_ + +// ************************************************************* +// Inline operations for class PortableServer::Policy_out +// ************************************************************* + +ACE_INLINE +PortableServer::Policy_out::Policy_out (PortableServer::Policy_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::Policy::_nil (); +} + +ACE_INLINE +PortableServer::Policy_out::Policy_out (PortableServer::Policy_var &p) // constructor from _var + : ptr_ (p.out ()) +{ + CORBA::release (this->ptr_); + this->ptr_ = PortableServer::Policy::_nil (); +} + +ACE_INLINE +PortableServer::Policy_out::Policy_out (PortableServer::Policy_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::Policy_out & +PortableServer::Policy_out::operator= (PortableServer::Policy_out &p) +{ + this->ptr_ = p.ptr_; + return *this; +} + +ACE_INLINE PortableServer::Policy_out & +PortableServer::Policy_out::operator= (const PortableServer::Policy_var &p) +{ + this->ptr_ = PortableServer::Policy::_duplicate (p.ptr ()); + return *this; +} + +ACE_INLINE PortableServer::Policy_out & +PortableServer::Policy_out::operator= (PortableServer::Policy_ptr p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +PortableServer::Policy_out::operator PortableServer::Policy_ptr &() // cast +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::Policy_ptr & +PortableServer::Policy_out::ptr (void) // ptr +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::Policy_ptr +PortableServer::Policy_out::operator-> (void) +{ + return this->ptr_; +} + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER__TAO_SEQ_POLICY___VAR_CI_) +#define _PORTABLESERVER__TAO_SEQ_POLICY___VAR_CI_ + +// ************************************************************* +// Inline operations for class PortableServer::_tao_seq_Policy_var +// ************************************************************* + +ACE_INLINE +PortableServer::_tao_seq_Policy_var::_tao_seq_Policy_var (void) // default constructor + : ptr_ (0) +{} + +ACE_INLINE +PortableServer::_tao_seq_Policy_var::_tao_seq_Policy_var (PortableServer::_tao_seq_Policy *p) + : ptr_ (p) +{} + +ACE_INLINE +PortableServer::_tao_seq_Policy_var::_tao_seq_Policy_var (const PortableServer::_tao_seq_Policy_var &p) // copy constructor +{ + if (p.ptr_) + this->ptr_ = new PortableServer::_tao_seq_Policy(*p.ptr_); + else + this->ptr_ = 0; +} + +ACE_INLINE +PortableServer::_tao_seq_Policy_var::~_tao_seq_Policy_var (void) // destructor +{ + delete this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Policy_var & +PortableServer::_tao_seq_Policy_var::operator= (PortableServer::_tao_seq_Policy *p) +{ + delete this->ptr_; + this->ptr_ = p; + return *this; +} + +ACE_INLINE PortableServer::_tao_seq_Policy_var & +PortableServer::_tao_seq_Policy_var::operator= (const PortableServer::_tao_seq_Policy_var &p) // deep copy +{ + if (this != &p) + { + delete this->ptr_; + this->ptr_ = new PortableServer::_tao_seq_Policy (*p.ptr_); + } + return *this; +} + +ACE_INLINE const PortableServer::_tao_seq_Policy * +PortableServer::_tao_seq_Policy_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Policy * +PortableServer::_tao_seq_Policy_var::operator-> (void) +{ + return this->ptr_; +} + +ACE_INLINE +PortableServer::_tao_seq_Policy_var::operator const PortableServer::_tao_seq_Policy &() const // cast +{ + return *this->ptr_; +} + +ACE_INLINE +PortableServer::_tao_seq_Policy_var::operator PortableServer::_tao_seq_Policy &() // cast +{ + return *this->ptr_; +} + +ACE_INLINE +PortableServer::_tao_seq_Policy_var::operator PortableServer::_tao_seq_Policy &() const// cast +{ + return *this->ptr_; +} + +ACE_INLINE TAO_Object_Manager <PortableServer::Policy > +PortableServer::_tao_seq_Policy_var::operator[] (CORBA::ULong index) +{ + return this->ptr_->operator[] (index); +} + +ACE_INLINE const PortableServer::_tao_seq_Policy & +PortableServer::_tao_seq_Policy_var::in (void) const +{ + return *this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Policy & +PortableServer::_tao_seq_Policy_var::inout (void) +{ + return *this->ptr_; +} + +// mapping for variable size +ACE_INLINE PortableServer::_tao_seq_Policy *& +PortableServer::_tao_seq_Policy_var::out (void) +{ + delete this->ptr_; + this->ptr_ = 0; + return this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Policy * +PortableServer::_tao_seq_Policy_var::_retn (void) +{ + PortableServer::_tao_seq_Policy *tmp = this->ptr_; + this->ptr_ = 0; + return tmp; +} + +ACE_INLINE PortableServer::_tao_seq_Policy * +PortableServer::_tao_seq_Policy_var::ptr (void) const +{ + return this->ptr_; +} + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER__TAO_SEQ_POLICY___OUT_CI_) +#define _PORTABLESERVER__TAO_SEQ_POLICY___OUT_CI_ + +// ************************************************************* +// Inline operations for class PortableServer::_tao_seq_Policy_out +// ************************************************************* + +ACE_INLINE +PortableServer::_tao_seq_Policy_out::_tao_seq_Policy_out (PortableServer::_tao_seq_Policy *&p) + : ptr_ (p) +{ + this->ptr_ = 0; +} + +ACE_INLINE +PortableServer::_tao_seq_Policy_out::_tao_seq_Policy_out (PortableServer::_tao_seq_Policy_var &p) // constructor from _var + : ptr_ (p.out ()) +{ + delete this->ptr_; + this->ptr_ = 0; +} + +ACE_INLINE +PortableServer::_tao_seq_Policy_out::_tao_seq_Policy_out (PortableServer::_tao_seq_Policy_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::_tao_seq_Policy_out & +PortableServer::_tao_seq_Policy_out::operator= (PortableServer::_tao_seq_Policy_out &p) +{ + this->ptr_ = p.ptr_; + return *this; +} + +ACE_INLINE PortableServer::_tao_seq_Policy_out & +PortableServer::_tao_seq_Policy_out::operator= (PortableServer::_tao_seq_Policy *p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +PortableServer::_tao_seq_Policy_out::operator PortableServer::_tao_seq_Policy *&() // cast +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Policy *& +PortableServer::_tao_seq_Policy_out::ptr (void) // ptr +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Policy * +PortableServer::_tao_seq_Policy_out::operator-> (void) +{ + return this->ptr_; +} + +ACE_INLINE TAO_Object_Manager <PortableServer::Policy > +PortableServer::_tao_seq_Policy_out::operator[] (CORBA::ULong index) +{ + return this->ptr_->operator[] (index); +} + + +#endif // end #if !defined + + +#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_var::POA_var (PortableServer::POA_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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 (PortableServer::POA_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::POA_out & +PortableServer::POA_out::operator= (PortableServer::POA_out &p) +{ + this->ptr_ = 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 (_PORTABLESERVER__TAO_SEQ_OCTET___VAR_CI_) +#define _PORTABLESERVER__TAO_SEQ_OCTET___VAR_CI_ + +// ************************************************************* +// Inline operations for class PortableServer::_tao_seq_Octet_var +// ************************************************************* + +ACE_INLINE +PortableServer::_tao_seq_Octet_var::_tao_seq_Octet_var (void) // default constructor + : ptr_ (0) +{} + +ACE_INLINE +PortableServer::_tao_seq_Octet_var::_tao_seq_Octet_var (PortableServer::_tao_seq_Octet *p) + : ptr_ (p) +{} + +ACE_INLINE +PortableServer::_tao_seq_Octet_var::_tao_seq_Octet_var (const PortableServer::_tao_seq_Octet_var &p) // copy constructor +{ + if (p.ptr_) + this->ptr_ = new PortableServer::_tao_seq_Octet(*p.ptr_); + else + this->ptr_ = 0; +} + +ACE_INLINE +PortableServer::_tao_seq_Octet_var::~_tao_seq_Octet_var (void) // destructor +{ + delete this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Octet_var & +PortableServer::_tao_seq_Octet_var::operator= (PortableServer::_tao_seq_Octet *p) +{ + delete this->ptr_; + this->ptr_ = p; + return *this; +} + +ACE_INLINE PortableServer::_tao_seq_Octet_var & +PortableServer::_tao_seq_Octet_var::operator= (const PortableServer::_tao_seq_Octet_var &p) // deep copy +{ + if (this != &p) + { + delete this->ptr_; + this->ptr_ = new PortableServer::_tao_seq_Octet (*p.ptr_); + } + return *this; +} + +ACE_INLINE const PortableServer::_tao_seq_Octet * +PortableServer::_tao_seq_Octet_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Octet * +PortableServer::_tao_seq_Octet_var::operator-> (void) +{ + return this->ptr_; +} + +ACE_INLINE +PortableServer::_tao_seq_Octet_var::operator const PortableServer::_tao_seq_Octet &() const // cast +{ + return *this->ptr_; +} + +ACE_INLINE +PortableServer::_tao_seq_Octet_var::operator PortableServer::_tao_seq_Octet &() // cast +{ + return *this->ptr_; +} + +ACE_INLINE +PortableServer::_tao_seq_Octet_var::operator PortableServer::_tao_seq_Octet &() const// cast +{ + return *this->ptr_; +} + +ACE_INLINE CORBA::Octet & +PortableServer::_tao_seq_Octet_var::operator[] (CORBA::ULong index) +{ + return this->ptr_->operator[] (index); +} + +ACE_INLINE const PortableServer::_tao_seq_Octet & +PortableServer::_tao_seq_Octet_var::in (void) const +{ + return *this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Octet & +PortableServer::_tao_seq_Octet_var::inout (void) +{ + return *this->ptr_; +} + +// mapping for variable size +ACE_INLINE PortableServer::_tao_seq_Octet *& +PortableServer::_tao_seq_Octet_var::out (void) +{ + delete this->ptr_; + this->ptr_ = 0; + return this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Octet * +PortableServer::_tao_seq_Octet_var::_retn (void) +{ + PortableServer::_tao_seq_Octet *tmp = this->ptr_; + this->ptr_ = 0; + return tmp; +} + +ACE_INLINE PortableServer::_tao_seq_Octet * +PortableServer::_tao_seq_Octet_var::ptr (void) const +{ + return this->ptr_; +} + + +#endif // end #if !defined + + +#if !defined (_PORTABLESERVER__TAO_SEQ_OCTET___OUT_CI_) +#define _PORTABLESERVER__TAO_SEQ_OCTET___OUT_CI_ + +// ************************************************************* +// Inline operations for class PortableServer::_tao_seq_Octet_out +// ************************************************************* + +ACE_INLINE +PortableServer::_tao_seq_Octet_out::_tao_seq_Octet_out (PortableServer::_tao_seq_Octet *&p) + : ptr_ (p) +{ + this->ptr_ = 0; +} + +ACE_INLINE +PortableServer::_tao_seq_Octet_out::_tao_seq_Octet_out (PortableServer::_tao_seq_Octet_var &p) // constructor from _var + : ptr_ (p.out ()) +{ + delete this->ptr_; + this->ptr_ = 0; +} + +ACE_INLINE +PortableServer::_tao_seq_Octet_out::_tao_seq_Octet_out (PortableServer::_tao_seq_Octet_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::_tao_seq_Octet_out & +PortableServer::_tao_seq_Octet_out::operator= (PortableServer::_tao_seq_Octet_out &p) +{ + this->ptr_ = p.ptr_; + return *this; +} + +ACE_INLINE PortableServer::_tao_seq_Octet_out & +PortableServer::_tao_seq_Octet_out::operator= (PortableServer::_tao_seq_Octet *p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +PortableServer::_tao_seq_Octet_out::operator PortableServer::_tao_seq_Octet *&() // cast +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Octet *& +PortableServer::_tao_seq_Octet_out::ptr (void) // ptr +{ + return this->ptr_; +} + +ACE_INLINE PortableServer::_tao_seq_Octet * +PortableServer::_tao_seq_Octet_out::operator-> (void) +{ + return this->ptr_; +} + +ACE_INLINE CORBA::Octet & +PortableServer::_tao_seq_Octet_out::operator[] (CORBA::ULong index) +{ + return this->ptr_->operator[] (index); +} + + +#endif // end #if !defined + +// ************************************************************* +// Inline operations for exception PortableServer::ForwardRequest +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::ForwardRequest::ForwardRequest (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::_tc_ForwardRequest)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::ForwardRequest::~ForwardRequest (void) +{ +} + +ACE_INLINE +PortableServer::ThreadPolicy::ThreadPolicy( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::ThreadPolicy::~ThreadPolicy (void) // destructor +{} + +ACE_INLINE PortableServer::ThreadPolicy_ptr +PortableServer::ThreadPolicy::_nil (void) +{ + return (PortableServer::ThreadPolicy_ptr)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_ (PortableServer::ThreadPolicy::_nil ()) +{} + +ACE_INLINE +PortableServer::ThreadPolicy_var::ThreadPolicy_var (PortableServer::ThreadPolicy_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::ThreadPolicy_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::ThreadPolicy::_nil (); +} + +ACE_INLINE +PortableServer::ThreadPolicy_out::ThreadPolicy_out (PortableServer::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 (PortableServer::ThreadPolicy_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::ThreadPolicy_out & +PortableServer::ThreadPolicy_out::operator= (PortableServer::ThreadPolicy_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::LifespanPolicy::LifespanPolicy( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::LifespanPolicy::~LifespanPolicy (void) // destructor +{} + +ACE_INLINE PortableServer::LifespanPolicy_ptr +PortableServer::LifespanPolicy::_nil (void) +{ + return (PortableServer::LifespanPolicy_ptr)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_ (PortableServer::LifespanPolicy::_nil ()) +{} + +ACE_INLINE +PortableServer::LifespanPolicy_var::LifespanPolicy_var (PortableServer::LifespanPolicy_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::LifespanPolicy_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::LifespanPolicy::_nil (); +} + +ACE_INLINE +PortableServer::LifespanPolicy_out::LifespanPolicy_out (PortableServer::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 (PortableServer::LifespanPolicy_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::LifespanPolicy_out & +PortableServer::LifespanPolicy_out::operator= (PortableServer::LifespanPolicy_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::IdUniquenessPolicy::IdUniquenessPolicy( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::IdUniquenessPolicy::~IdUniquenessPolicy (void) // destructor +{} + +ACE_INLINE PortableServer::IdUniquenessPolicy_ptr +PortableServer::IdUniquenessPolicy::_nil (void) +{ + return (PortableServer::IdUniquenessPolicy_ptr)0; +} + + +#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_ (PortableServer::IdUniquenessPolicy::_nil ()) +{} + +ACE_INLINE +PortableServer::IdUniquenessPolicy_var::IdUniquenessPolicy_var (PortableServer::IdUniquenessPolicy_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::IdUniquenessPolicy_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::IdUniquenessPolicy::_nil (); +} + +ACE_INLINE +PortableServer::IdUniquenessPolicy_out::IdUniquenessPolicy_out (PortableServer::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 (PortableServer::IdUniquenessPolicy_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::IdUniquenessPolicy_out & +PortableServer::IdUniquenessPolicy_out::operator= (PortableServer::IdUniquenessPolicy_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::IdAssignmentPolicy::IdAssignmentPolicy( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::IdAssignmentPolicy::~IdAssignmentPolicy (void) // destructor +{} + +ACE_INLINE PortableServer::IdAssignmentPolicy_ptr +PortableServer::IdAssignmentPolicy::_nil (void) +{ + return (PortableServer::IdAssignmentPolicy_ptr)0; +} + + +#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_ (PortableServer::IdAssignmentPolicy::_nil ()) +{} + +ACE_INLINE +PortableServer::IdAssignmentPolicy_var::IdAssignmentPolicy_var (PortableServer::IdAssignmentPolicy_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::IdAssignmentPolicy_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::IdAssignmentPolicy::_nil (); +} + +ACE_INLINE +PortableServer::IdAssignmentPolicy_out::IdAssignmentPolicy_out (PortableServer::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 (PortableServer::IdAssignmentPolicy_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::IdAssignmentPolicy_out & +PortableServer::IdAssignmentPolicy_out::operator= (PortableServer::IdAssignmentPolicy_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::ImplicitActivationPolicy::ImplicitActivationPolicy( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::ImplicitActivationPolicy::~ImplicitActivationPolicy (void) // destructor +{} + +ACE_INLINE PortableServer::ImplicitActivationPolicy_ptr +PortableServer::ImplicitActivationPolicy::_nil (void) +{ + return (PortableServer::ImplicitActivationPolicy_ptr)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_ (PortableServer::ImplicitActivationPolicy::_nil ()) +{} + +ACE_INLINE +PortableServer::ImplicitActivationPolicy_var::ImplicitActivationPolicy_var (PortableServer::ImplicitActivationPolicy_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::ImplicitActivationPolicy_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::ImplicitActivationPolicy::_nil (); +} + +ACE_INLINE +PortableServer::ImplicitActivationPolicy_out::ImplicitActivationPolicy_out (PortableServer::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 (PortableServer::ImplicitActivationPolicy_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::ImplicitActivationPolicy_out & +PortableServer::ImplicitActivationPolicy_out::operator= (PortableServer::ImplicitActivationPolicy_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::ServantRetentionPolicy::ServantRetentionPolicy( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::ServantRetentionPolicy::~ServantRetentionPolicy (void) // destructor +{} + +ACE_INLINE PortableServer::ServantRetentionPolicy_ptr +PortableServer::ServantRetentionPolicy::_nil (void) +{ + return (PortableServer::ServantRetentionPolicy_ptr)0; +} + + +#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_ (PortableServer::ServantRetentionPolicy::_nil ()) +{} + +ACE_INLINE +PortableServer::ServantRetentionPolicy_var::ServantRetentionPolicy_var (PortableServer::ServantRetentionPolicy_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::ServantRetentionPolicy_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::ServantRetentionPolicy::_nil (); +} + +ACE_INLINE +PortableServer::ServantRetentionPolicy_out::ServantRetentionPolicy_out (PortableServer::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 (PortableServer::ServantRetentionPolicy_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::ServantRetentionPolicy_out & +PortableServer::ServantRetentionPolicy_out::operator= (PortableServer::ServantRetentionPolicy_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::RequestProcessingPolicy::RequestProcessingPolicy( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::RequestProcessingPolicy::~RequestProcessingPolicy (void) // destructor +{} + +ACE_INLINE PortableServer::RequestProcessingPolicy_ptr +PortableServer::RequestProcessingPolicy::_nil (void) +{ + return (PortableServer::RequestProcessingPolicy_ptr)0; +} + + +#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_ (PortableServer::RequestProcessingPolicy::_nil ()) +{} + +ACE_INLINE +PortableServer::RequestProcessingPolicy_var::RequestProcessingPolicy_var (PortableServer::RequestProcessingPolicy_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::RequestProcessingPolicy_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::RequestProcessingPolicy::_nil (); +} + +ACE_INLINE +PortableServer::RequestProcessingPolicy_out::RequestProcessingPolicy_out (PortableServer::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 (PortableServer::RequestProcessingPolicy_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::RequestProcessingPolicy_out & +PortableServer::RequestProcessingPolicy_out::operator= (PortableServer::RequestProcessingPolicy_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::POAManager::POAManager( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::POAManager::~POAManager (void) // destructor +{} + +ACE_INLINE PortableServer::POAManager_ptr +PortableServer::POAManager::_nil (void) +{ + return (PortableServer::POAManager_ptr)0; +} + + +#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_ (PortableServer::POAManager::_nil ()) +{} + +ACE_INLINE +PortableServer::POAManager_var::POAManager_var (PortableServer::POAManager_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::POAManager_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::POAManager::_nil (); +} + +ACE_INLINE +PortableServer::POAManager_out::POAManager_out (PortableServer::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 (PortableServer::POAManager_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::POAManager_out & +PortableServer::POAManager_out::operator= (PortableServer::POAManager_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +// ************************************************************* +// Inline operations for exception PortableServer::POAManager::AdapterInactive +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POAManager::AdapterInactive::AdapterInactive (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POAManager::_tc_AdapterInactive)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POAManager::AdapterInactive::~AdapterInactive (void) +{ +} + +ACE_INLINE +PortableServer::AdapterActivator::AdapterActivator( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::AdapterActivator::~AdapterActivator (void) // destructor +{} + +ACE_INLINE PortableServer::AdapterActivator_ptr +PortableServer::AdapterActivator::_nil (void) +{ + return (PortableServer::AdapterActivator_ptr)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_ (PortableServer::AdapterActivator::_nil ()) +{} + +ACE_INLINE +PortableServer::AdapterActivator_var::AdapterActivator_var (PortableServer::AdapterActivator_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::AdapterActivator_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::AdapterActivator::_nil (); +} + +ACE_INLINE +PortableServer::AdapterActivator_out::AdapterActivator_out (PortableServer::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 (PortableServer::AdapterActivator_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::AdapterActivator_out & +PortableServer::AdapterActivator_out::operator= (PortableServer::AdapterActivator_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::ServantManager::ServantManager( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::ServantManager::~ServantManager (void) // destructor +{} + +ACE_INLINE PortableServer::ServantManager_ptr +PortableServer::ServantManager::_nil (void) +{ + return (PortableServer::ServantManager_ptr)0; +} + + +#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_ (PortableServer::ServantManager::_nil ()) +{} + +ACE_INLINE +PortableServer::ServantManager_var::ServantManager_var (PortableServer::ServantManager_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::ServantManager_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::ServantManager::_nil (); +} + +ACE_INLINE +PortableServer::ServantManager_out::ServantManager_out (PortableServer::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 (PortableServer::ServantManager_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::ServantManager_out & +PortableServer::ServantManager_out::operator= (PortableServer::ServantManager_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::ServantActivator::ServantActivator( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::ServantActivator::~ServantActivator (void) // destructor +{} + +ACE_INLINE PortableServer::ServantActivator_ptr +PortableServer::ServantActivator::_nil (void) +{ + return (PortableServer::ServantActivator_ptr)0; +} + + +#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_ (PortableServer::ServantActivator::_nil ()) +{} + +ACE_INLINE +PortableServer::ServantActivator_var::ServantActivator_var (PortableServer::ServantActivator_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::ServantActivator_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::ServantActivator::_nil (); +} + +ACE_INLINE +PortableServer::ServantActivator_out::ServantActivator_out (PortableServer::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 (PortableServer::ServantActivator_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::ServantActivator_out & +PortableServer::ServantActivator_out::operator= (PortableServer::ServantActivator_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::ServantLocator::ServantLocator( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::ServantLocator::~ServantLocator (void) // destructor +{} + +ACE_INLINE PortableServer::ServantLocator_ptr +PortableServer::ServantLocator::_nil (void) +{ + return (PortableServer::ServantLocator_ptr)0; +} + + +#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_ (PortableServer::ServantLocator::_nil ()) +{} + +ACE_INLINE +PortableServer::ServantLocator_var::ServantLocator_var (PortableServer::ServantLocator_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::ServantLocator_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::ServantLocator::_nil (); +} + +ACE_INLINE +PortableServer::ServantLocator_out::ServantLocator_out (PortableServer::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 (PortableServer::ServantLocator_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::ServantLocator_out & +PortableServer::ServantLocator_out::operator= (PortableServer::ServantLocator_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +ACE_INLINE +PortableServer::POA::POA( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::POA::~POA (void) // destructor +{} + +ACE_INLINE PortableServer::POA_ptr +PortableServer::POA::_nil (void) +{ + return (PortableServer::POA_ptr)0; +} + + +#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_var::POA_var (PortableServer::POA_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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 (PortableServer::POA_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::POA_out & +PortableServer::POA_out::operator= (PortableServer::POA_out &p) +{ + this->ptr_ = 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 + +// ************************************************************* +// Inline operations for exception PortableServer::POA::AdapterAlreadyExists +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::AdapterAlreadyExists::AdapterAlreadyExists (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_AdapterAlreadyExists)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::AdapterAlreadyExists::~AdapterAlreadyExists (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::AdapterInactive +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::AdapterInactive::AdapterInactive (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_AdapterInactive)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::AdapterInactive::~AdapterInactive (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::AdapterNonExistent +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::AdapterNonExistent::AdapterNonExistent (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_AdapterNonExistent)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::AdapterNonExistent::~AdapterNonExistent (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::InvalidPolicy +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::InvalidPolicy::InvalidPolicy (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_InvalidPolicy)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::InvalidPolicy::~InvalidPolicy (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::NoServant +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::NoServant::NoServant (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_NoServant)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::NoServant::~NoServant (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::ObjectAlreadyActive +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::ObjectAlreadyActive::ObjectAlreadyActive (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_ObjectAlreadyActive)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::ObjectAlreadyActive::~ObjectAlreadyActive (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::ObjectNotActive +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::ObjectNotActive::ObjectNotActive (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_ObjectNotActive)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::ObjectNotActive::~ObjectNotActive (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::ServantAlreadyActive +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::ServantAlreadyActive::ServantAlreadyActive (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_ServantAlreadyActive)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::ServantAlreadyActive::~ServantAlreadyActive (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::ServantNotActive +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::ServantNotActive::ServantNotActive (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_ServantNotActive)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::ServantNotActive::~ServantNotActive (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::WrongAdapter +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::WrongAdapter::WrongAdapter (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_WrongAdapter)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::WrongAdapter::~WrongAdapter (void) +{ +} + +// ************************************************************* +// Inline operations for exception PortableServer::POA::WrongPolicy +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::POA::WrongPolicy::WrongPolicy (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::POA::_tc_WrongPolicy)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::POA::WrongPolicy::~WrongPolicy (void) +{ +} + +ACE_INLINE +PortableServer::Current::Current( + STUB_Object *objref, + TAO_ServantBase *servant, + CORBA::Boolean collocated + ) + : ACE_CORBA_1 (Object) (objref, servant, collocated) +{} + +ACE_INLINE +PortableServer::Current::~Current (void) // destructor +{} + +ACE_INLINE PortableServer::Current_ptr +PortableServer::Current::_nil (void) +{ + return (PortableServer::Current_ptr)0; +} + + +#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_ (PortableServer::Current::_nil ()) +{} + +ACE_INLINE +PortableServer::Current_var::Current_var (PortableServer::Current_ptr p) + : ptr_ (p) +{} + +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 + : ptr_ (PortableServer::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= (PortableServer::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 (PortableServer::Current_ptr &p) + : ptr_ (p) +{ + this->ptr_ = PortableServer::Current::_nil (); +} + +ACE_INLINE +PortableServer::Current_out::Current_out (PortableServer::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 (PortableServer::Current_out &p) // copy constructor + : ptr_ (p.ptr_) +{} + +ACE_INLINE PortableServer::Current_out & +PortableServer::Current_out::operator= (PortableServer::Current_out &p) +{ + this->ptr_ = 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= (PortableServer::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 + +// ************************************************************* +// Inline operations for exception PortableServer::Current::NoContext +// ************************************************************* + +// default constructor +ACE_INLINE +PortableServer::Current::NoContext::NoContext (void) + : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::Current::_tc_NoContext)) +{ +} + +// destructor - all members are of self managing types +ACE_INLINE +PortableServer::Current::NoContext::~NoContext (void) +{ +} + diff --git a/TAO/tao/poaS.cpp b/TAO/tao/poaS.cpp new file mode 100644 index 00000000000..07c5abec71a --- /dev/null +++ b/TAO/tao/poaS.cpp @@ -0,0 +1,3266 @@ +// ****** 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 + +#include "tao/corba.h" +#include "poaS.h" + +#if !defined (__ACE_INLINE__) +#include "poaS.i" +#endif // !defined INLINE + +static const TAO_operation_db_entry PortableServer_CurrentBase_operations [] = { + {"_is_a", &POA_PortableServer::CurrentBase::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_CurrentBase_optable (PortableServer_CurrentBase_operations, 1, 2); +// skeleton constructor +POA_PortableServer::CurrentBase::CurrentBase (void) +{ + this->optable_ = &tao_PortableServer_CurrentBase_optable; +} + +void POA_PortableServer::CurrentBase::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::CurrentBase_ptr impl = (POA_PortableServer::CurrentBase_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::CurrentBase::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/CurrentBase:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::CurrentBase::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/CurrentBase:1.0") == 0) + return ACE_static_cast (POA_PortableServer::CurrentBase_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_PortableServer::CurrentBase::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::CurrentBase::_interface_repository_id (void) const +{ + return "IDL:PortableServer/CurrentBase:1.0"; +} + +POA_PortableServer::_tao_collocated_CurrentBase::_tao_collocated_CurrentBase ( + POA_PortableServer::CurrentBase_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, CurrentBase) (stub, servant, CORBA::B_TRUE), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::CurrentBase_ptr POA_PortableServer::_tao_collocated_CurrentBase::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_CurrentBase::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + + +PortableServer::CurrentBase* +POA_PortableServer::CurrentBase::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_CurrentBase (this, stub); +} + +static const TAO_operation_db_entry PortableServer_Policy_operations [] = { + {"copy", &POA_PortableServer::Policy::copy_skel}, + {"destroy", &POA_PortableServer::Policy::destroy_skel}, + {"_is_a", &POA_PortableServer::Policy::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_Policy_optable (PortableServer_Policy_operations, 3, 6); +// skeleton constructor +POA_PortableServer::Policy::Policy (void) +{ + this->optable_ = &tao_PortableServer_Policy_optable; +} + +void POA_PortableServer::Policy::copy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::Policy_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (0, nvlist); // initialize a list + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->copy(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_Policy, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::Policy::destroy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::Policy_ptr) _tao_object_reference; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (0, nvlist); // initialize a list + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + impl->destroy(_tao_environment); + +} + +void POA_PortableServer::Policy::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::Policy_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::Policy::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::Policy::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/Policy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::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_PortableServer::Policy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::Policy::_interface_repository_id (void) const +{ + return "IDL:PortableServer/Policy:1.0"; +} + +POA_PortableServer::_tao_collocated_Policy::_tao_collocated_Policy ( + POA_PortableServer::Policy_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, Policy) (stub, servant, CORBA::B_TRUE), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::Policy_ptr POA_PortableServer::_tao_collocated_Policy::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_Policy::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::Policy_ptr POA_PortableServer::_tao_collocated_Policy::copy ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->copy ( + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_Policy::destroy ( + CORBA::Environment &_tao_environment + ) +{ + this->servant_->destroy ( + _tao_environment + ); +} + + +PortableServer::Policy* +POA_PortableServer::Policy::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_Policy (this, stub); +} + +static const TAO_operation_db_entry PortableServer_ThreadPolicy_operations [] = { + {"_get_value", &POA_PortableServer::ThreadPolicy::_get_value_skel}, + {"copy", &POA_PortableServer::ThreadPolicy::copy_skel}, + {"destroy", &POA_PortableServer::ThreadPolicy::destroy_skel}, + {"_is_a", &POA_PortableServer::ThreadPolicy::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_ThreadPolicy_optable (PortableServer_ThreadPolicy_operations, 4, 8); +// skeleton constructor +POA_PortableServer::ThreadPolicy::ThreadPolicy (void) +{ + this->optable_ = &tao_PortableServer_ThreadPolicy_optable; +} + +void POA_PortableServer::ThreadPolicy::_get_value_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::ThreadPolicy_ptr impl = (POA_PortableServer::ThreadPolicy_ptr) _tao_object_reference; + CORBA::Any *result; + PortableServer::ThreadPolicyValue *retval = new PortableServer::ThreadPolicyValue; + // this method has no incoming parameters. Nothing to parse + *retval = impl->value(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_ThreadPolicyValue, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::ThreadPolicy::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::ThreadPolicy_ptr impl = (POA_PortableServer::ThreadPolicy_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::ThreadPolicy::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ThreadPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::ThreadPolicy::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/ThreadPolicy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::ThreadPolicy_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/Policy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::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_PortableServer::ThreadPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::ThreadPolicy::_interface_repository_id (void) const +{ + return "IDL:PortableServer/ThreadPolicy:1.0"; +} + +POA_PortableServer::_tao_collocated_ThreadPolicy::_tao_collocated_ThreadPolicy ( + POA_PortableServer::ThreadPolicy_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, ThreadPolicy) (stub, servant, CORBA::B_TRUE), + _tao_collocated_Policy (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::ThreadPolicy_ptr POA_PortableServer::_tao_collocated_ThreadPolicy::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_ThreadPolicy::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::ThreadPolicyValue +POA_PortableServer::_tao_collocated_ThreadPolicy::value ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->value(_tao_environment); +} + +PortableServer::ThreadPolicy* +POA_PortableServer::ThreadPolicy::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_ThreadPolicy (this, stub); +} + +static const TAO_operation_db_entry PortableServer_LifespanPolicy_operations [] = { + {"_get_value", &POA_PortableServer::LifespanPolicy::_get_value_skel}, + {"copy", &POA_PortableServer::LifespanPolicy::copy_skel}, + {"destroy", &POA_PortableServer::LifespanPolicy::destroy_skel}, + {"_is_a", &POA_PortableServer::LifespanPolicy::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_LifespanPolicy_optable (PortableServer_LifespanPolicy_operations, 4, 8); +// skeleton constructor +POA_PortableServer::LifespanPolicy::LifespanPolicy (void) +{ + this->optable_ = &tao_PortableServer_LifespanPolicy_optable; +} + +void POA_PortableServer::LifespanPolicy::_get_value_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::LifespanPolicy_ptr impl = (POA_PortableServer::LifespanPolicy_ptr) _tao_object_reference; + CORBA::Any *result; + PortableServer::LifespanPolicyValue *retval = new PortableServer::LifespanPolicyValue; + // this method has no incoming parameters. Nothing to parse + *retval = impl->value(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_LifespanPolicyValue, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::LifespanPolicy::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::LifespanPolicy_ptr impl = (POA_PortableServer::LifespanPolicy_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::LifespanPolicy::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/LifespanPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::LifespanPolicy::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/LifespanPolicy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::LifespanPolicy_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/Policy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::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_PortableServer::LifespanPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::LifespanPolicy::_interface_repository_id (void) const +{ + return "IDL:PortableServer/LifespanPolicy:1.0"; +} + +POA_PortableServer::_tao_collocated_LifespanPolicy::_tao_collocated_LifespanPolicy ( + POA_PortableServer::LifespanPolicy_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, LifespanPolicy) (stub, servant, CORBA::B_TRUE), + _tao_collocated_Policy (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::LifespanPolicy_ptr POA_PortableServer::_tao_collocated_LifespanPolicy::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_LifespanPolicy::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::LifespanPolicyValue +POA_PortableServer::_tao_collocated_LifespanPolicy::value ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->value(_tao_environment); +} + +PortableServer::LifespanPolicy* +POA_PortableServer::LifespanPolicy::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_LifespanPolicy (this, stub); +} + +static const TAO_operation_db_entry PortableServer_IdUniquenessPolicy_operations [] = { + {"_get_value", &POA_PortableServer::IdUniquenessPolicy::_get_value_skel}, + {"copy", &POA_PortableServer::IdUniquenessPolicy::copy_skel}, + {"destroy", &POA_PortableServer::IdUniquenessPolicy::destroy_skel}, + {"_is_a", &POA_PortableServer::IdUniquenessPolicy::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_IdUniquenessPolicy_optable (PortableServer_IdUniquenessPolicy_operations, 4, 8); +// skeleton constructor +POA_PortableServer::IdUniquenessPolicy::IdUniquenessPolicy (void) +{ + this->optable_ = &tao_PortableServer_IdUniquenessPolicy_optable; +} + +void POA_PortableServer::IdUniquenessPolicy::_get_value_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::IdUniquenessPolicy_ptr impl = (POA_PortableServer::IdUniquenessPolicy_ptr) _tao_object_reference; + CORBA::Any *result; + PortableServer::IdUniquenessPolicyValue *retval = new PortableServer::IdUniquenessPolicyValue; + // this method has no incoming parameters. Nothing to parse + *retval = impl->value(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_IdUniquenessPolicyValue, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::IdUniquenessPolicy::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::IdUniquenessPolicy_ptr impl = (POA_PortableServer::IdUniquenessPolicy_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::IdUniquenessPolicy::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/IdUniquenessPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::IdUniquenessPolicy::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/IdUniquenessPolicy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::IdUniquenessPolicy_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/Policy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::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_PortableServer::IdUniquenessPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::IdUniquenessPolicy::_interface_repository_id (void) const +{ + return "IDL:PortableServer/IdUniquenessPolicy:1.0"; +} + +POA_PortableServer::_tao_collocated_IdUniquenessPolicy::_tao_collocated_IdUniquenessPolicy ( + POA_PortableServer::IdUniquenessPolicy_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, IdUniquenessPolicy) (stub, servant, CORBA::B_TRUE), + _tao_collocated_Policy (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::IdUniquenessPolicy_ptr POA_PortableServer::_tao_collocated_IdUniquenessPolicy::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_IdUniquenessPolicy::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::IdUniquenessPolicyValue +POA_PortableServer::_tao_collocated_IdUniquenessPolicy::value ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->value(_tao_environment); +} + +PortableServer::IdUniquenessPolicy* +POA_PortableServer::IdUniquenessPolicy::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_IdUniquenessPolicy (this, stub); +} + +static const TAO_operation_db_entry PortableServer_IdAssignmentPolicy_operations [] = { + {"_get_value", &POA_PortableServer::IdAssignmentPolicy::_get_value_skel}, + {"copy", &POA_PortableServer::IdAssignmentPolicy::copy_skel}, + {"destroy", &POA_PortableServer::IdAssignmentPolicy::destroy_skel}, + {"_is_a", &POA_PortableServer::IdAssignmentPolicy::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_IdAssignmentPolicy_optable (PortableServer_IdAssignmentPolicy_operations, 4, 8); +// skeleton constructor +POA_PortableServer::IdAssignmentPolicy::IdAssignmentPolicy (void) +{ + this->optable_ = &tao_PortableServer_IdAssignmentPolicy_optable; +} + +void POA_PortableServer::IdAssignmentPolicy::_get_value_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::IdAssignmentPolicy_ptr impl = (POA_PortableServer::IdAssignmentPolicy_ptr) _tao_object_reference; + CORBA::Any *result; + PortableServer::IdAssignmentPolicyValue *retval = new PortableServer::IdAssignmentPolicyValue; + // this method has no incoming parameters. Nothing to parse + *retval = impl->value(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_IdAssignmentPolicyValue, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::IdAssignmentPolicy::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::IdAssignmentPolicy_ptr impl = (POA_PortableServer::IdAssignmentPolicy_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::IdAssignmentPolicy::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/IdAssignmentPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::IdAssignmentPolicy::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/IdAssignmentPolicy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::IdAssignmentPolicy_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/Policy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::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_PortableServer::IdAssignmentPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::IdAssignmentPolicy::_interface_repository_id (void) const +{ + return "IDL:PortableServer/IdAssignmentPolicy:1.0"; +} + +POA_PortableServer::_tao_collocated_IdAssignmentPolicy::_tao_collocated_IdAssignmentPolicy ( + POA_PortableServer::IdAssignmentPolicy_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, IdAssignmentPolicy) (stub, servant, CORBA::B_TRUE), + _tao_collocated_Policy (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::IdAssignmentPolicy_ptr POA_PortableServer::_tao_collocated_IdAssignmentPolicy::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_IdAssignmentPolicy::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::IdAssignmentPolicyValue +POA_PortableServer::_tao_collocated_IdAssignmentPolicy::value ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->value(_tao_environment); +} + +PortableServer::IdAssignmentPolicy* +POA_PortableServer::IdAssignmentPolicy::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_IdAssignmentPolicy (this, stub); +} + +static const TAO_operation_db_entry PortableServer_ImplicitActivationPolicy_operations [] = { + {"_get_value", &POA_PortableServer::ImplicitActivationPolicy::_get_value_skel}, + {"copy", &POA_PortableServer::ImplicitActivationPolicy::copy_skel}, + {"destroy", &POA_PortableServer::ImplicitActivationPolicy::destroy_skel}, + {"_is_a", &POA_PortableServer::ImplicitActivationPolicy::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_ImplicitActivationPolicy_optable (PortableServer_ImplicitActivationPolicy_operations, 4, 8); +// skeleton constructor +POA_PortableServer::ImplicitActivationPolicy::ImplicitActivationPolicy (void) +{ + this->optable_ = &tao_PortableServer_ImplicitActivationPolicy_optable; +} + +void POA_PortableServer::ImplicitActivationPolicy::_get_value_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::ImplicitActivationPolicy_ptr impl = (POA_PortableServer::ImplicitActivationPolicy_ptr) _tao_object_reference; + CORBA::Any *result; + PortableServer::ImplicitActivationPolicyValue *retval = new PortableServer::ImplicitActivationPolicyValue; + // this method has no incoming parameters. Nothing to parse + *retval = impl->value(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_ImplicitActivationPolicyValue, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::ImplicitActivationPolicy::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::ImplicitActivationPolicy_ptr impl = (POA_PortableServer::ImplicitActivationPolicy_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::ImplicitActivationPolicy::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ImplicitActivationPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::ImplicitActivationPolicy::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/ImplicitActivationPolicy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::ImplicitActivationPolicy_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/Policy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::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_PortableServer::ImplicitActivationPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::ImplicitActivationPolicy::_interface_repository_id (void) const +{ + return "IDL:PortableServer/ImplicitActivationPolicy:1.0"; +} + +POA_PortableServer::_tao_collocated_ImplicitActivationPolicy::_tao_collocated_ImplicitActivationPolicy ( + POA_PortableServer::ImplicitActivationPolicy_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, ImplicitActivationPolicy) (stub, servant, CORBA::B_TRUE), + _tao_collocated_Policy (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::ImplicitActivationPolicy_ptr POA_PortableServer::_tao_collocated_ImplicitActivationPolicy::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_ImplicitActivationPolicy::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::ImplicitActivationPolicyValue +POA_PortableServer::_tao_collocated_ImplicitActivationPolicy::value ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->value(_tao_environment); +} + +PortableServer::ImplicitActivationPolicy* +POA_PortableServer::ImplicitActivationPolicy::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_ImplicitActivationPolicy (this, stub); +} + +static const TAO_operation_db_entry PortableServer_ServantRetentionPolicy_operations [] = { + {"_get_value", &POA_PortableServer::ServantRetentionPolicy::_get_value_skel}, + {"copy", &POA_PortableServer::ServantRetentionPolicy::copy_skel}, + {"destroy", &POA_PortableServer::ServantRetentionPolicy::destroy_skel}, + {"_is_a", &POA_PortableServer::ServantRetentionPolicy::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_ServantRetentionPolicy_optable (PortableServer_ServantRetentionPolicy_operations, 4, 8); +// skeleton constructor +POA_PortableServer::ServantRetentionPolicy::ServantRetentionPolicy (void) +{ + this->optable_ = &tao_PortableServer_ServantRetentionPolicy_optable; +} + +void POA_PortableServer::ServantRetentionPolicy::_get_value_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::ServantRetentionPolicy_ptr impl = (POA_PortableServer::ServantRetentionPolicy_ptr) _tao_object_reference; + CORBA::Any *result; + PortableServer::ServantRetentionPolicyValue *retval = new PortableServer::ServantRetentionPolicyValue; + // this method has no incoming parameters. Nothing to parse + *retval = impl->value(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_ServantRetentionPolicyValue, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::ServantRetentionPolicy::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::ServantRetentionPolicy_ptr impl = (POA_PortableServer::ServantRetentionPolicy_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::ServantRetentionPolicy::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantRetentionPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::ServantRetentionPolicy::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/ServantRetentionPolicy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::ServantRetentionPolicy_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/Policy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::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_PortableServer::ServantRetentionPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::ServantRetentionPolicy::_interface_repository_id (void) const +{ + return "IDL:PortableServer/ServantRetentionPolicy:1.0"; +} + +POA_PortableServer::_tao_collocated_ServantRetentionPolicy::_tao_collocated_ServantRetentionPolicy ( + POA_PortableServer::ServantRetentionPolicy_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, ServantRetentionPolicy) (stub, servant, CORBA::B_TRUE), + _tao_collocated_Policy (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::ServantRetentionPolicy_ptr POA_PortableServer::_tao_collocated_ServantRetentionPolicy::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_ServantRetentionPolicy::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::ServantRetentionPolicyValue +POA_PortableServer::_tao_collocated_ServantRetentionPolicy::value ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->value(_tao_environment); +} + +PortableServer::ServantRetentionPolicy* +POA_PortableServer::ServantRetentionPolicy::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_ServantRetentionPolicy (this, stub); +} + +static const TAO_operation_db_entry PortableServer_RequestProcessingPolicy_operations [] = { + {"_get_value", &POA_PortableServer::RequestProcessingPolicy::_get_value_skel}, + {"copy", &POA_PortableServer::RequestProcessingPolicy::copy_skel}, + {"destroy", &POA_PortableServer::RequestProcessingPolicy::destroy_skel}, + {"_is_a", &POA_PortableServer::RequestProcessingPolicy::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_RequestProcessingPolicy_optable (PortableServer_RequestProcessingPolicy_operations, 4, 8); +// skeleton constructor +POA_PortableServer::RequestProcessingPolicy::RequestProcessingPolicy (void) +{ + this->optable_ = &tao_PortableServer_RequestProcessingPolicy_optable; +} + +void POA_PortableServer::RequestProcessingPolicy::_get_value_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::RequestProcessingPolicy_ptr impl = (POA_PortableServer::RequestProcessingPolicy_ptr) _tao_object_reference; + CORBA::Any *result; + PortableServer::RequestProcessingPolicyValue *retval = new PortableServer::RequestProcessingPolicyValue; + // this method has no incoming parameters. Nothing to parse + *retval = impl->value(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_RequestProcessingPolicyValue, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::RequestProcessingPolicy::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::RequestProcessingPolicy_ptr impl = (POA_PortableServer::RequestProcessingPolicy_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::RequestProcessingPolicy::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/RequestProcessingPolicy:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::RequestProcessingPolicy::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/RequestProcessingPolicy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::RequestProcessingPolicy_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/Policy:1.0") == 0) + return ACE_static_cast (POA_PortableServer::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_PortableServer::RequestProcessingPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::RequestProcessingPolicy::_interface_repository_id (void) const +{ + return "IDL:PortableServer/RequestProcessingPolicy:1.0"; +} + +POA_PortableServer::_tao_collocated_RequestProcessingPolicy::_tao_collocated_RequestProcessingPolicy ( + POA_PortableServer::RequestProcessingPolicy_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, RequestProcessingPolicy) (stub, servant, CORBA::B_TRUE), + _tao_collocated_Policy (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::RequestProcessingPolicy_ptr POA_PortableServer::_tao_collocated_RequestProcessingPolicy::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_RequestProcessingPolicy::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::RequestProcessingPolicyValue +POA_PortableServer::_tao_collocated_RequestProcessingPolicy::value ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->value(_tao_environment); +} + +PortableServer::RequestProcessingPolicy* +POA_PortableServer::RequestProcessingPolicy::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_RequestProcessingPolicy (this, stub); +} + +static const TAO_operation_db_entry PortableServer_POAManager_operations [] = { + {"activate", &POA_PortableServer::POAManager::activate_skel}, + {"hold_requests", &POA_PortableServer::POAManager::hold_requests_skel}, + {"discard_requests", &POA_PortableServer::POAManager::discard_requests_skel}, + {"deactivate", &POA_PortableServer::POAManager::deactivate_skel}, + {"_is_a", &POA_PortableServer::POAManager::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_POAManager_optable (PortableServer_POAManager_operations, 5, 10); +// skeleton constructor +POA_PortableServer::POAManager::POAManager (void) +{ + this->optable_ = &tao_PortableServer_POAManager_optable; +} + +void POA_PortableServer::POAManager::activate_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POAManager_ptr impl = (POA_PortableServer::POAManager_ptr) _tao_object_reference; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (0, nvlist); // initialize a list + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + impl->activate(_tao_environment); + +} + +void POA_PortableServer::POAManager::hold_requests_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POAManager_ptr impl = (POA_PortableServer::POAManager_ptr) _tao_object_reference; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + CORBA::Boolean wait_for_completion; + (void) nvlist->add_item ("wait_for_completion", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_boolean, &wait_for_completion, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + impl->hold_requests(wait_for_completion, _tao_environment); + +} + +void POA_PortableServer::POAManager::discard_requests_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POAManager_ptr impl = (POA_PortableServer::POAManager_ptr) _tao_object_reference; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + CORBA::Boolean wait_for_completion; + (void) nvlist->add_item ("wait_for_completion", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_boolean, &wait_for_completion, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + impl->discard_requests(wait_for_completion, _tao_environment); + +} + +void POA_PortableServer::POAManager::deactivate_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POAManager_ptr impl = (POA_PortableServer::POAManager_ptr) _tao_object_reference; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (2, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + CORBA::Boolean etherealize_objects; + (void) nvlist->add_item ("etherealize_objects", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_boolean, ðerealize_objects, 0, _tao_environment); // ORB does not own + CORBA::Boolean wait_for_completion; + (void) nvlist->add_item ("wait_for_completion", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_boolean, &wait_for_completion, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + impl->deactivate(etherealize_objects, wait_for_completion, _tao_environment); + +} + +void POA_PortableServer::POAManager::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::POAManager_ptr impl = (POA_PortableServer::POAManager_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::POAManager::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/POAManager:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::POAManager::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/POAManager:1.0") == 0) + return ACE_static_cast (POA_PortableServer::POAManager_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_PortableServer::POAManager::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::POAManager::_interface_repository_id (void) const +{ + return "IDL:PortableServer/POAManager:1.0"; +} + +POA_PortableServer::_tao_collocated_POAManager::_tao_collocated_POAManager ( + POA_PortableServer::POAManager_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, POAManager) (stub, servant, CORBA::B_TRUE), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::POAManager_ptr POA_PortableServer::_tao_collocated_POAManager::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_POAManager::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_POAManager::activate ( + CORBA::Environment &_tao_environment + ) +{ + this->servant_->activate ( + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_POAManager::hold_requests ( + CORBA::Boolean wait_for_completion, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->hold_requests ( + wait_for_completion, + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_POAManager::discard_requests ( + CORBA::Boolean wait_for_completion, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->discard_requests ( + wait_for_completion, + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_POAManager::deactivate ( + CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->deactivate ( + etherealize_objects, + wait_for_completion, + _tao_environment + ); +} + + +PortableServer::POAManager* +POA_PortableServer::POAManager::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_POAManager (this, stub); +} + +static const TAO_operation_db_entry PortableServer_AdapterActivator_operations [] = { + {"unknown_adapter", &POA_PortableServer::AdapterActivator::unknown_adapter_skel}, + {"_is_a", &POA_PortableServer::AdapterActivator::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_AdapterActivator_optable (PortableServer_AdapterActivator_operations, 2, 4); +// skeleton constructor +POA_PortableServer::AdapterActivator::AdapterActivator (void) +{ + this->optable_ = &tao_PortableServer_AdapterActivator_optable; +} + +void POA_PortableServer::AdapterActivator::unknown_adapter_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::AdapterActivator_ptr impl = (POA_PortableServer::AdapterActivator_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Boolean *retval = new CORBA::Boolean; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (2, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::POA_ptr parent; + CORBA::Object_ptr _tao_base_parent; + (void) nvlist->add_item ("parent", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_POA, &_tao_base_parent, 0, _tao_environment); // ORB does not own + char *name; + (void) nvlist->add_item ("name", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_string, &name, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + parent = PortableServer::POA::_narrow (_tao_base_parent, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->unknown_adapter(parent, name, _tao_environment); + CORBA::release (parent); + CORBA::release (_tao_base_parent); + CORBA::string_free (name); + result = new CORBA::Any (CORBA::_tc_boolean, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::AdapterActivator::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::AdapterActivator_ptr impl = (POA_PortableServer::AdapterActivator_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::AdapterActivator::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/AdapterActivator:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::AdapterActivator::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/AdapterActivator:1.0") == 0) + return ACE_static_cast (POA_PortableServer::AdapterActivator_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_PortableServer::AdapterActivator::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::AdapterActivator::_interface_repository_id (void) const +{ + return "IDL:PortableServer/AdapterActivator:1.0"; +} + +POA_PortableServer::_tao_collocated_AdapterActivator::_tao_collocated_AdapterActivator ( + POA_PortableServer::AdapterActivator_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, AdapterActivator) (stub, servant, CORBA::B_TRUE), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::AdapterActivator_ptr POA_PortableServer::_tao_collocated_AdapterActivator::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_AdapterActivator::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_AdapterActivator::unknown_adapter ( + PortableServer::POA_ptr parent, + const char* name, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->unknown_adapter ( + parent, + name, + _tao_environment + ); +} + + +PortableServer::AdapterActivator* +POA_PortableServer::AdapterActivator::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_AdapterActivator (this, stub); +} + +static const TAO_operation_db_entry PortableServer_ServantManager_operations [] = { + {"_is_a", &POA_PortableServer::ServantManager::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_ServantManager_optable (PortableServer_ServantManager_operations, 1, 2); +// skeleton constructor +POA_PortableServer::ServantManager::ServantManager (void) +{ + this->optable_ = &tao_PortableServer_ServantManager_optable; +} + +void POA_PortableServer::ServantManager::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::ServantManager_ptr impl = (POA_PortableServer::ServantManager_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::ServantManager::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantManager:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::ServantManager::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/ServantManager:1.0") == 0) + return ACE_static_cast (POA_PortableServer::ServantManager_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_PortableServer::ServantManager::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::ServantManager::_interface_repository_id (void) const +{ + return "IDL:PortableServer/ServantManager:1.0"; +} + +POA_PortableServer::_tao_collocated_ServantManager::_tao_collocated_ServantManager ( + POA_PortableServer::ServantManager_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, ServantManager) (stub, servant, CORBA::B_TRUE), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::ServantManager_ptr POA_PortableServer::_tao_collocated_ServantManager::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_ServantManager::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + + +PortableServer::ServantManager* +POA_PortableServer::ServantManager::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_ServantManager (this, stub); +} + +static const TAO_operation_db_entry PortableServer_ServantActivator_operations [] = { + {"incarnate", &POA_PortableServer::ServantActivator::incarnate_skel}, + {"etherealize", &POA_PortableServer::ServantActivator::etherealize_skel}, + {"_is_a", &POA_PortableServer::ServantActivator::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_ServantActivator_optable (PortableServer_ServantActivator_operations, 3, 6); +// skeleton constructor +POA_PortableServer::ServantActivator::ServantActivator (void) +{ + this->optable_ = &tao_PortableServer_ServantActivator_optable; +} + +void POA_PortableServer::ServantActivator::incarnate_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::ServantActivator::etherealize_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::ServantActivator::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::ServantActivator_ptr impl = (POA_PortableServer::ServantActivator_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::ServantActivator::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantActivator:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantManager:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::ServantActivator::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/ServantActivator:1.0") == 0) + return ACE_static_cast (POA_PortableServer::ServantActivator_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/ServantManager:1.0") == 0) + return ACE_static_cast (POA_PortableServer::ServantManager_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_PortableServer::ServantActivator::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::ServantActivator::_interface_repository_id (void) const +{ + return "IDL:PortableServer/ServantActivator:1.0"; +} + +POA_PortableServer::_tao_collocated_ServantActivator::_tao_collocated_ServantActivator ( + POA_PortableServer::ServantActivator_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, ServantActivator) (stub, servant, CORBA::B_TRUE), + _tao_collocated_ServantManager (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::ServantActivator_ptr POA_PortableServer::_tao_collocated_ServantActivator::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_ServantActivator::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::Servant POA_PortableServer::_tao_collocated_ServantActivator::incarnate ( + const PortableServer::ObjectId & oid, + PortableServer::POA_ptr adapter, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->incarnate ( + oid, + adapter, + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_ServantActivator::etherealize ( + const PortableServer::ObjectId & oid, + PortableServer::POA_ptr adapter, + PortableServer::Servant serv, + CORBA::Boolean cleanup_in_progress, + CORBA::Boolean remaining_activations, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->etherealize ( + oid, + adapter, + serv, + cleanup_in_progress, + remaining_activations, + _tao_environment + ); +} + + +PortableServer::ServantActivator* +POA_PortableServer::ServantActivator::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_ServantActivator (this, stub); +} + +static const TAO_operation_db_entry PortableServer_ServantLocator_operations [] = { + {"preinvoke", &POA_PortableServer::ServantLocator::preinvoke_skel}, + {"postinvoke", &POA_PortableServer::ServantLocator::postinvoke_skel}, + {"_is_a", &POA_PortableServer::ServantLocator::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_ServantLocator_optable (PortableServer_ServantLocator_operations, 3, 6); +// skeleton constructor +POA_PortableServer::ServantLocator::ServantLocator (void) +{ + this->optable_ = &tao_PortableServer_ServantLocator_optable; +} + +void POA_PortableServer::ServantLocator::preinvoke_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::ServantLocator::postinvoke_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::ServantLocator::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::ServantLocator_ptr impl = (POA_PortableServer::ServantLocator_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::ServantLocator::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantLocator:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/ServantManager:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::ServantLocator::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/ServantLocator:1.0") == 0) + return ACE_static_cast (POA_PortableServer::ServantLocator_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/ServantManager:1.0") == 0) + return ACE_static_cast (POA_PortableServer::ServantManager_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_PortableServer::ServantLocator::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::ServantLocator::_interface_repository_id (void) const +{ + return "IDL:PortableServer/ServantLocator:1.0"; +} + +POA_PortableServer::_tao_collocated_ServantLocator::_tao_collocated_ServantLocator ( + POA_PortableServer::ServantLocator_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, ServantLocator) (stub, servant, CORBA::B_TRUE), + _tao_collocated_ServantManager (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::ServantLocator_ptr POA_PortableServer::_tao_collocated_ServantLocator::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_ServantLocator::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::Servant POA_PortableServer::_tao_collocated_ServantLocator::preinvoke ( + const PortableServer::ObjectId & oid, + PortableServer::POA_ptr adapter, + const char * operation, + PortableServer::ServantLocator::Cookie & the_cookie, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->preinvoke ( + oid, + adapter, + operation, + the_cookie, + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_ServantLocator::postinvoke ( + const PortableServer::ObjectId & oid, + PortableServer::POA_ptr adapter, + const char * operation, + PortableServer::ServantLocator::Cookie the_cookie, + PortableServer::Servant the_servant, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->postinvoke ( + oid, + adapter, + operation, + the_cookie, + the_servant, + _tao_environment + ); +} + + +PortableServer::ServantLocator* +POA_PortableServer::ServantLocator::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_ServantLocator (this, stub); +} + +static const TAO_operation_db_entry PortableServer_POA_operations [] = { + {"create_POA", &POA_PortableServer::POA::create_POA_skel}, + {"find_POA", &POA_PortableServer::POA::find_POA_skel}, + {"destroy", &POA_PortableServer::POA::destroy_skel}, + {"create_thread_policy", &POA_PortableServer::POA::create_thread_policy_skel}, + {"create_lifespan_policy", &POA_PortableServer::POA::create_lifespan_policy_skel}, + {"create_id_uniqueness_policy", &POA_PortableServer::POA::create_id_uniqueness_policy_skel}, + {"create_id_assignment_policy", &POA_PortableServer::POA::create_id_assignment_policy_skel}, + {"create_implicit_activation_policy", &POA_PortableServer::POA::create_implicit_activation_policy_skel}, + {"create_servant_retention_policy", &POA_PortableServer::POA::create_servant_retention_policy_skel}, + {"create_request_processing_policy", &POA_PortableServer::POA::create_request_processing_policy_skel}, + {"_get_the_name", &POA_PortableServer::POA::_get_the_name_skel}, + {"_get_the_parent", &POA_PortableServer::POA::_get_the_parent_skel}, + {"_get_the_POAManager", &POA_PortableServer::POA::_get_the_POAManager_skel}, + {"_get_the_activator", &POA_PortableServer::POA::_get_the_activator_skel}, + {"_set_the_activator", &POA_PortableServer::POA::_set_the_activator_skel}, + {"get_servant_manager", &POA_PortableServer::POA::get_servant_manager_skel}, + {"set_servant_manager", &POA_PortableServer::POA::set_servant_manager_skel}, + {"get_servant", &POA_PortableServer::POA::get_servant_skel}, + {"set_servant", &POA_PortableServer::POA::set_servant_skel}, + {"activate_object", &POA_PortableServer::POA::activate_object_skel}, + {"activate_object_with_id", &POA_PortableServer::POA::activate_object_with_id_skel}, + {"deactivate_object", &POA_PortableServer::POA::deactivate_object_skel}, + {"create_reference", &POA_PortableServer::POA::create_reference_skel}, + {"create_reference_with_id", &POA_PortableServer::POA::create_reference_with_id_skel}, + {"servant_to_id", &POA_PortableServer::POA::servant_to_id_skel}, + {"servant_to_reference", &POA_PortableServer::POA::servant_to_reference_skel}, + {"reference_to_servant", &POA_PortableServer::POA::reference_to_servant_skel}, + {"reference_to_id", &POA_PortableServer::POA::reference_to_id_skel}, + {"id_to_servant", &POA_PortableServer::POA::id_to_servant_skel}, + {"id_to_reference", &POA_PortableServer::POA::id_to_reference_skel}, + {"_is_a", &POA_PortableServer::POA::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_POA_optable (PortableServer_POA_operations, 31, 62); +// skeleton constructor +POA_PortableServer::POA::POA (void) +{ + this->optable_ = &tao_PortableServer_POA_optable; +} + +void POA_PortableServer::POA::create_POA_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (3, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + char *adapter_name; + (void) nvlist->add_item ("adapter_name", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_string, &adapter_name, 0, _tao_environment); // ORB does not own + PortableServer::POAManager_ptr a_POAManager; + CORBA::Object_ptr _tao_base_a_POAManager; + (void) nvlist->add_item ("a_POAManager", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_POAManager, &_tao_base_a_POAManager, 0, _tao_environment); // ORB does not own + PortableServer::PolicyList policies; + (void) nvlist->add_item ("policies", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_PolicyList, &policies, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + a_POAManager = PortableServer::POAManager::_narrow (_tao_base_a_POAManager, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_POA(adapter_name, a_POAManager, policies, _tao_environment); + CORBA::string_free (adapter_name); + CORBA::release (a_POAManager); + CORBA::release (_tao_base_a_POAManager); + result = new CORBA::Any (PortableServer::_tc_POA, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::find_POA_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (2, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + char *adapter_name; + (void) nvlist->add_item ("adapter_name", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_string, &adapter_name, 0, _tao_environment); // ORB does not own + CORBA::Boolean activate_it; + (void) nvlist->add_item ("activate_it", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_boolean, &activate_it, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->find_POA(adapter_name, activate_it, _tao_environment); + CORBA::string_free (adapter_name); + result = new CORBA::Any (PortableServer::_tc_POA, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::destroy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (2, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + CORBA::Boolean etherealize_objects; + (void) nvlist->add_item ("etherealize_objects", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_boolean, ðerealize_objects, 0, _tao_environment); // ORB does not own + CORBA::Boolean wait_for_completion; + (void) nvlist->add_item ("wait_for_completion", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_boolean, &wait_for_completion, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + impl->destroy(etherealize_objects, wait_for_completion, _tao_environment); + +} + +void POA_PortableServer::POA::create_thread_policy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::ThreadPolicyValue value; + (void) nvlist->add_item ("value", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_ThreadPolicyValue, &value, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_thread_policy(value, _tao_environment); + result = new CORBA::Any (PortableServer::_tc_ThreadPolicy, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::create_lifespan_policy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::LifespanPolicyValue value; + (void) nvlist->add_item ("value", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_LifespanPolicyValue, &value, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_lifespan_policy(value, _tao_environment); + result = new CORBA::Any (PortableServer::_tc_LifespanPolicy, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::create_id_uniqueness_policy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::IdUniquenessPolicyValue value; + (void) nvlist->add_item ("value", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_IdUniquenessPolicyValue, &value, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_id_uniqueness_policy(value, _tao_environment); + result = new CORBA::Any (PortableServer::_tc_IdUniquenessPolicy, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::create_id_assignment_policy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::IdAssignmentPolicyValue value; + (void) nvlist->add_item ("value", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_IdAssignmentPolicyValue, &value, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_id_assignment_policy(value, _tao_environment); + result = new CORBA::Any (PortableServer::_tc_IdAssignmentPolicy, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::create_implicit_activation_policy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::ImplicitActivationPolicyValue value; + (void) nvlist->add_item ("value", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_ImplicitActivationPolicyValue, &value, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_implicit_activation_policy(value, _tao_environment); + result = new CORBA::Any (PortableServer::_tc_ImplicitActivationPolicy, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::create_servant_retention_policy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::ServantRetentionPolicyValue value; + (void) nvlist->add_item ("value", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_ServantRetentionPolicyValue, &value, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_servant_retention_policy(value, _tao_environment); + result = new CORBA::Any (PortableServer::_tc_ServantRetentionPolicy, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::create_request_processing_policy_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::RequestProcessingPolicyValue value; + (void) nvlist->add_item ("value", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_RequestProcessingPolicyValue, &value, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_request_processing_policy(value, _tao_environment); + result = new CORBA::Any (PortableServer::_tc_RequestProcessingPolicy, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::_get_the_name_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + char **retval = new char*; + // this method has no incoming parameters. Nothing to parse + *retval = impl->the_name(_tao_environment); + result = new CORBA::Any (CORBA::_tc_string, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::POA::_get_the_parent_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // this method has no incoming parameters. Nothing to parse + *retval = impl->the_parent(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_POA, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::POA::_get_the_POAManager_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // this method has no incoming parameters. Nothing to parse + *retval = impl->the_POAManager(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_POAManager, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::POA::_get_the_activator_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // this method has no incoming parameters. Nothing to parse + *retval = impl->the_activator(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_AdapterActivator, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); +} + +void POA_PortableServer::POA::_set_the_activator_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void * /*context*/, CORBA::Environment &_tao_environment) +{ + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr)_tao_object_reference; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + PortableServer::AdapterActivator_ptr the_activator; + CORBA::Object_ptr _tao_base_the_activator; + (void) nvlist->add_item ("the_activator", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_AdapterActivator, &_tao_base_the_activator, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + the_activator = PortableServer::AdapterActivator::_narrow (_tao_base_the_activator, _tao_environment); + if (_tao_environment.exception ()) return; + impl->the_activator(the_activator, _tao_environment); + CORBA::release (the_activator); + CORBA::release (_tao_base_the_activator); + +} + +void POA_PortableServer::POA::get_servant_manager_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (0, nvlist); // initialize a list + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->get_servant_manager(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_ServantManager, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::set_servant_manager_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::ServantManager_ptr imgr; + CORBA::Object_ptr _tao_base_imgr; + (void) nvlist->add_item ("imgr", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_ServantManager, &_tao_base_imgr, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + imgr = PortableServer::ServantManager::_narrow (_tao_base_imgr, _tao_environment); + if (_tao_environment.exception ()) return; + impl->set_servant_manager(imgr, _tao_environment); + CORBA::release (imgr); + CORBA::release (_tao_base_imgr); + +} + +void POA_PortableServer::POA::get_servant_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::POA::set_servant_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::POA::activate_object_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::POA::activate_object_with_id_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::POA::deactivate_object_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::ObjectId oid; + (void) nvlist->add_item ("oid", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_ObjectId, &oid, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + impl->deactivate_object(oid, _tao_environment); + +} + +void POA_PortableServer::POA::create_reference_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + char *intf; + (void) nvlist->add_item ("intf", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_RepositoryId, &intf, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_reference(intf, _tao_environment); + CORBA::string_free (intf); + result = new CORBA::Any (CORBA::_tc_Object, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::create_reference_with_id_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (2, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::ObjectId oid; + (void) nvlist->add_item ("oid", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_ObjectId, &oid, 0, _tao_environment); // ORB does not own + char *intf; + (void) nvlist->add_item ("intf", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_RepositoryId, &intf, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->create_reference_with_id(oid, intf, _tao_environment); + CORBA::string_free (intf); + result = new CORBA::Any (CORBA::_tc_Object, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::servant_to_id_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::POA::servant_to_reference_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::POA::reference_to_servant_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::POA::reference_to_id_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + PortableServer::ObjectId *retval; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + CORBA::Object_ptr reference; + (void) nvlist->add_item ("reference", CORBA::ARG_IN, _tao_environment)->value ()->replace (CORBA::_tc_Object, &reference, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + retval = impl->reference_to_id(reference, _tao_environment); + CORBA::release (reference); + result = new CORBA::Any (PortableServer::_tc_ObjectId, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::id_to_servant_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + _tao_environment.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); +} + +void POA_PortableServer::POA::id_to_reference_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (1, nvlist); // initialize a list + // add each argument according to the in, out, inout semantics + PortableServer::ObjectId oid; + (void) nvlist->add_item ("oid", CORBA::ARG_IN, _tao_environment)->value ()->replace (PortableServer::_tc_ObjectId, &oid, 0, _tao_environment); // ORB does not own + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->id_to_reference(oid, _tao_environment); + result = new CORBA::Any (CORBA::_tc_Object, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::POA::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::POA_ptr impl = (POA_PortableServer::POA_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::POA::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/POA:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::POA::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/POA:1.0") == 0) + return ACE_static_cast (POA_PortableServer::POA_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_PortableServer::POA::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::POA::_interface_repository_id (void) const +{ + return "IDL:PortableServer/POA:1.0"; +} + +POA_PortableServer::_tao_collocated_POA::_tao_collocated_POA ( + POA_PortableServer::POA_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, POA) (stub, servant, CORBA::B_TRUE), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::POA_ptr POA_PortableServer::_tao_collocated_POA::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_POA::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::POA_ptr POA_PortableServer::_tao_collocated_POA::create_POA ( + const char* adapter_name, + PortableServer::POAManager_ptr a_POAManager, + const PortableServer::PolicyList & policies, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_POA ( + adapter_name, + a_POAManager, + policies, + _tao_environment + ); +} + +PortableServer::POA_ptr POA_PortableServer::_tao_collocated_POA::find_POA ( + const char* adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->find_POA ( + adapter_name, + activate_it, + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_POA::destroy ( + CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->destroy ( + etherealize_objects, + wait_for_completion, + _tao_environment + ); +} + +PortableServer::ThreadPolicy_ptr POA_PortableServer::_tao_collocated_POA::create_thread_policy ( + PortableServer::ThreadPolicyValue value, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_thread_policy ( + value, + _tao_environment + ); +} + +PortableServer::LifespanPolicy_ptr POA_PortableServer::_tao_collocated_POA::create_lifespan_policy ( + PortableServer::LifespanPolicyValue value, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_lifespan_policy ( + value, + _tao_environment + ); +} + +PortableServer::IdUniquenessPolicy_ptr POA_PortableServer::_tao_collocated_POA::create_id_uniqueness_policy ( + PortableServer::IdUniquenessPolicyValue value, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_id_uniqueness_policy ( + value, + _tao_environment + ); +} + +PortableServer::IdAssignmentPolicy_ptr POA_PortableServer::_tao_collocated_POA::create_id_assignment_policy ( + PortableServer::IdAssignmentPolicyValue value, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_id_assignment_policy ( + value, + _tao_environment + ); +} + +PortableServer::ImplicitActivationPolicy_ptr POA_PortableServer::_tao_collocated_POA::create_implicit_activation_policy ( + PortableServer::ImplicitActivationPolicyValue value, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_implicit_activation_policy ( + value, + _tao_environment + ); +} + +PortableServer::ServantRetentionPolicy_ptr POA_PortableServer::_tao_collocated_POA::create_servant_retention_policy ( + PortableServer::ServantRetentionPolicyValue value, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_servant_retention_policy ( + value, + _tao_environment + ); +} + +PortableServer::RequestProcessingPolicy_ptr POA_PortableServer::_tao_collocated_POA::create_request_processing_policy ( + PortableServer::RequestProcessingPolicyValue value, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_request_processing_policy ( + value, + _tao_environment + ); +} + +char* +POA_PortableServer::_tao_collocated_POA::the_name ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->the_name(_tao_environment); +} +PortableServer::POA_ptr +POA_PortableServer::_tao_collocated_POA::the_parent ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->the_parent(_tao_environment); +} +PortableServer::POAManager_ptr +POA_PortableServer::_tao_collocated_POA::the_POAManager ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->the_POAManager(_tao_environment); +} +PortableServer::AdapterActivator_ptr +POA_PortableServer::_tao_collocated_POA::the_activator ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->the_activator(_tao_environment); +} + +void POA_PortableServer::_tao_collocated_POA::the_activator ( + PortableServer::AdapterActivator_ptr _tao_value, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->the_activator ( + _tao_value, + _tao_environment + ); +} + +PortableServer::ServantManager_ptr POA_PortableServer::_tao_collocated_POA::get_servant_manager ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->get_servant_manager ( + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_POA::set_servant_manager ( + PortableServer::ServantManager_ptr imgr, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->set_servant_manager ( + imgr, + _tao_environment + ); +} + +PortableServer::Servant POA_PortableServer::_tao_collocated_POA::get_servant ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->get_servant ( + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_POA::set_servant ( + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->set_servant ( + p_servant, + _tao_environment + ); +} + +PortableServer::ObjectId * POA_PortableServer::_tao_collocated_POA::activate_object ( + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->activate_object ( + p_servant, + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_POA::activate_object_with_id ( + const PortableServer::ObjectId & id, + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->activate_object_with_id ( + id, + p_servant, + _tao_environment + ); +} + +void POA_PortableServer::_tao_collocated_POA::deactivate_object ( + const PortableServer::ObjectId & oid, + CORBA::Environment &_tao_environment + ) +{ + this->servant_->deactivate_object ( + oid, + _tao_environment + ); +} + +CORBA::Object_ptr POA_PortableServer::_tao_collocated_POA::create_reference ( + const char *intf, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_reference ( + intf, + _tao_environment + ); +} + +CORBA::Object_ptr POA_PortableServer::_tao_collocated_POA::create_reference_with_id ( + const PortableServer::ObjectId & oid, + const char *intf, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->create_reference_with_id ( + oid, + intf, + _tao_environment + ); +} + +PortableServer::ObjectId * POA_PortableServer::_tao_collocated_POA::servant_to_id ( + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->servant_to_id ( + p_servant, + _tao_environment + ); +} + +CORBA::Object_ptr POA_PortableServer::_tao_collocated_POA::servant_to_reference ( + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->servant_to_reference ( + p_servant, + _tao_environment + ); +} + +PortableServer::Servant POA_PortableServer::_tao_collocated_POA::reference_to_servant ( + CORBA::Object_ptr reference, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->reference_to_servant ( + reference, + _tao_environment + ); +} + +PortableServer::ObjectId * POA_PortableServer::_tao_collocated_POA::reference_to_id ( + CORBA::Object_ptr reference, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->reference_to_id ( + reference, + _tao_environment + ); +} + +PortableServer::Servant POA_PortableServer::_tao_collocated_POA::id_to_servant ( + const PortableServer::ObjectId & oid, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->id_to_servant ( + oid, + _tao_environment + ); +} + +CORBA::Object_ptr POA_PortableServer::_tao_collocated_POA::id_to_reference ( + const PortableServer::ObjectId & oid, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->id_to_reference ( + oid, + _tao_environment + ); +} + + +PortableServer::POA* +POA_PortableServer::POA::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_POA (this, stub); +} + +static const TAO_operation_db_entry PortableServer_Current_operations [] = { + {"get_POA", &POA_PortableServer::Current::get_POA_skel}, + {"get_object_id", &POA_PortableServer::Current::get_object_id_skel}, + {"_is_a", &POA_PortableServer::Current::_is_a_skel} +}; + +TAO_Dynamic_Hash_OpTable tao_PortableServer_Current_optable (PortableServer_Current_operations, 3, 6); +// skeleton constructor +POA_PortableServer::Current::Current (void) +{ + this->optable_ = &tao_PortableServer_Current_optable; +} + +void POA_PortableServer::Current::get_POA_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::Current_ptr impl = (POA_PortableServer::Current_ptr) _tao_object_reference; + CORBA::Any *result; + CORBA::Object_ptr *retval = new CORBA::Object_ptr; + *retval = CORBA::Object::_nil (); + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (0, nvlist); // initialize a list + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + *retval = impl->get_POA(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_POA, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::Current::get_object_id_skel (CORBA::ServerRequest &_tao_server_request, void *_tao_object_reference, void *context, CORBA::Environment &_tao_environment) +{ + ACE_UNUSED_ARG (context); + CORBA::NVList_ptr nvlist; + POA_PortableServer::Current_ptr impl = (POA_PortableServer::Current_ptr) _tao_object_reference; + CORBA::Any *result; + PortableServer::ObjectId *retval; + // create an NV list and populate it with typecodes + _tao_server_request.orb ()->create_list (0, nvlist); // initialize a list + // parse the arguments + _tao_server_request.params (nvlist, _tao_environment); + if (_tao_environment.exception ()) return; + retval = impl->get_object_id(_tao_environment); + result = new CORBA::Any (PortableServer::_tc_ObjectId, retval, 1); // ORB owns + _tao_server_request.result (result, _tao_environment); + +} + +void POA_PortableServer::Current::_is_a_skel ( + CORBA::ServerRequest &req, + void * _tao_object_reference, + void * /*context*/, + CORBA::Environment &_tao_environment + ) +{ + CORBA::NVList_ptr nvlist; + CORBA::NamedValue_ptr nv; + CORBA::Any temp_value (CORBA::_tc_string); + CORBA::Any *any; + CORBA::Boolean *retval = new CORBA::Boolean; + CORBA::String value; + + req.orb()->create_list (0, nvlist); + nv = nvlist->add_value (0, temp_value, CORBA::ARG_IN, _tao_environment); + req.params (nvlist, _tao_environment); // parse the args + if (_tao_environment.exception () != 0) return; + value = *(CORBA::String *)nv->value ()->value (); + POA_PortableServer::Current_ptr impl = (POA_PortableServer::Current_ptr) _tao_object_reference; + *retval = impl->_is_a (value, _tao_environment); + if (_tao_environment.exception () != 0) return; + any = new CORBA::Any (CORBA::_tc_boolean, retval, CORBA::B_TRUE); + req.result (any, _tao_environment); +} + +CORBA::Boolean POA_PortableServer::Current::_is_a ( + const char* value, + CORBA::Environment &_tao_environment + ) +{ + if ( + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Current:1.0")) || + (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/CurrentBase:1.0")) || + (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) + return CORBA::B_TRUE; + else + return CORBA::B_FALSE; +} + +void* POA_PortableServer::Current::_downcast ( + const char* logical_type_id + ) +{ + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/Current:1.0") == 0) + return ACE_static_cast (POA_PortableServer::Current_ptr, this); + if (ACE_OS::strcmp (logical_type_id, "IDL:PortableServer/CurrentBase:1.0") == 0) + return ACE_static_cast (POA_PortableServer::CurrentBase_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_PortableServer::Current::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) +{ + TAO_Skeleton skel; // pointer to skeleton for operation + CORBA::String opname = req.op_name (); // retrieve operation name + // find the skeleton corresponding to this opname + if (this->_find (opname, skel) == -1) + { + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); + } +else + skel (req, this, context, env); +} + +const char* POA_PortableServer::Current::_interface_repository_id (void) const +{ + return "IDL:PortableServer/Current:1.0"; +} + +POA_PortableServer::_tao_collocated_Current::_tao_collocated_Current ( + POA_PortableServer::Current_ptr servant, + STUB_Object *stub + ) + : ACE_NESTED_CLASS (PortableServer, Current) (stub, servant, CORBA::B_TRUE), + _tao_collocated_CurrentBase (servant, stub), + CORBA_Object (stub, servant, CORBA::B_TRUE), + servant_ (servant) +{ +} + +POA_PortableServer::Current_ptr POA_PortableServer::_tao_collocated_Current::_get_servant (void) const +{ + return this->servant_; +} + +CORBA::Boolean POA_PortableServer::_tao_collocated_Current::_is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->_is_a ( + logical_type_id, + _tao_environment + ); +} + +PortableServer::POA_ptr POA_PortableServer::_tao_collocated_Current::get_POA ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->get_POA ( + _tao_environment + ); +} + +PortableServer::ObjectId * POA_PortableServer::_tao_collocated_Current::get_object_id ( + CORBA::Environment &_tao_environment + ) +{ + return this->servant_->get_object_id ( + _tao_environment + ); +} + + +PortableServer::Current* +POA_PortableServer::Current::_this (CORBA_Environment &_env) +{ + STUB_Object *stub = this->_create_stub (_env); + if (_env.exception () != 0) + return 0; + return new POA_PortableServer::_tao_collocated_Current (this, stub); +} + diff --git a/TAO/tao/poaS.h b/TAO/tao/poaS.h new file mode 100644 index 00000000000..df00ea827e5 --- /dev/null +++ b/TAO/tao/poaS.h @@ -0,0 +1,1169 @@ +// ****** 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 + +#if !defined (_TAO_IDL_POAS_H_) +#define _TAO_IDL_POAS_H_ + +#include "poaC.h" + +class POA_PortableServer +{ +public: + class CurrentBase; + typedef CurrentBase *CurrentBase_ptr; + class CurrentBase : public virtual PortableServer::LocalServantBase + { + protected: + CurrentBase (void); + public: + virtual ~CurrentBase (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::CurrentBase *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_CURRENTBASE___COLLOCATED_SH_) +#define _PORTABLESERVER_CURRENTBASE___COLLOCATED_SH_ + + class _tao_collocated_CurrentBase : public virtual PortableServer::CurrentBase + { + public: + _tao_collocated_CurrentBase ( + CurrentBase_ptr servant, + STUB_Object *stub + ); + CurrentBase_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + + private: + CurrentBase_ptr servant_; + }; + + +#endif // end #if !defined + + + class Policy; + typedef Policy *Policy_ptr; + class Policy : public virtual PortableServer::LocalServantBase + { + protected: + Policy (void); + public: + virtual ~Policy (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::Policy_ptr copy ( CORBA::Environment &env) = 0; // pure virtual + static void copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void destroy ( CORBA::Environment &env) = 0; // pure virtual + static void destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::Policy *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_POLICY___COLLOCATED_SH_) +#define _PORTABLESERVER_POLICY___COLLOCATED_SH_ + + class _tao_collocated_Policy : public virtual PortableServer::Policy + { + public: + _tao_collocated_Policy ( + Policy_ptr servant, + STUB_Object *stub + ); + Policy_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::Policy_ptr copy ( + CORBA::Environment &_tao_environment + ); + virtual void destroy ( + CORBA::Environment &_tao_environment + ); + + private: + Policy_ptr servant_; + }; + + +#endif // end #if !defined + + + class ThreadPolicy; + typedef ThreadPolicy *ThreadPolicy_ptr; + class ThreadPolicy : public virtual Policy + { + protected: + ThreadPolicy (void); + public: + virtual ~ThreadPolicy (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::ThreadPolicyValue value (CORBA::Environment &env) = 0; + static void _get_value_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + static void copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::ThreadPolicy *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_THREADPOLICY___COLLOCATED_SH_) +#define _PORTABLESERVER_THREADPOLICY___COLLOCATED_SH_ + + class _tao_collocated_ThreadPolicy : public virtual PortableServer::ThreadPolicy, + public virtual _tao_collocated_Policy + { + public: + _tao_collocated_ThreadPolicy ( + ThreadPolicy_ptr servant, + STUB_Object *stub + ); + ThreadPolicy_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ThreadPolicyValue value ( + CORBA::Environment &env + ); + + private: + ThreadPolicy_ptr servant_; + }; + + +#endif // end #if !defined + + + class LifespanPolicy; + typedef LifespanPolicy *LifespanPolicy_ptr; + class LifespanPolicy : public virtual Policy + { + protected: + LifespanPolicy (void); + public: + virtual ~LifespanPolicy (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::LifespanPolicyValue value (CORBA::Environment &env) = 0; + static void _get_value_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + static void copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::LifespanPolicy *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_LIFESPANPOLICY___COLLOCATED_SH_) +#define _PORTABLESERVER_LIFESPANPOLICY___COLLOCATED_SH_ + + class _tao_collocated_LifespanPolicy : public virtual PortableServer::LifespanPolicy, + public virtual _tao_collocated_Policy + { + public: + _tao_collocated_LifespanPolicy ( + LifespanPolicy_ptr servant, + STUB_Object *stub + ); + LifespanPolicy_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::LifespanPolicyValue value ( + CORBA::Environment &env + ); + + private: + LifespanPolicy_ptr servant_; + }; + + +#endif // end #if !defined + + + class IdUniquenessPolicy; + typedef IdUniquenessPolicy *IdUniquenessPolicy_ptr; + class IdUniquenessPolicy : public virtual Policy + { + protected: + IdUniquenessPolicy (void); + public: + virtual ~IdUniquenessPolicy (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::IdUniquenessPolicyValue value (CORBA::Environment &env) = 0; + static void _get_value_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + static void copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::IdUniquenessPolicy *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_IDUNIQUENESSPOLICY___COLLOCATED_SH_) +#define _PORTABLESERVER_IDUNIQUENESSPOLICY___COLLOCATED_SH_ + + class _tao_collocated_IdUniquenessPolicy : public virtual PortableServer::IdUniquenessPolicy, + public virtual _tao_collocated_Policy + { + public: + _tao_collocated_IdUniquenessPolicy ( + IdUniquenessPolicy_ptr servant, + STUB_Object *stub + ); + IdUniquenessPolicy_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::IdUniquenessPolicyValue value ( + CORBA::Environment &env + ); + + private: + IdUniquenessPolicy_ptr servant_; + }; + + +#endif // end #if !defined + + + class IdAssignmentPolicy; + typedef IdAssignmentPolicy *IdAssignmentPolicy_ptr; + class IdAssignmentPolicy : public virtual Policy + { + protected: + IdAssignmentPolicy (void); + public: + virtual ~IdAssignmentPolicy (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::IdAssignmentPolicyValue value (CORBA::Environment &env) = 0; + static void _get_value_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + static void copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::IdAssignmentPolicy *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_IDASSIGNMENTPOLICY___COLLOCATED_SH_) +#define _PORTABLESERVER_IDASSIGNMENTPOLICY___COLLOCATED_SH_ + + class _tao_collocated_IdAssignmentPolicy : public virtual PortableServer::IdAssignmentPolicy, + public virtual _tao_collocated_Policy + { + public: + _tao_collocated_IdAssignmentPolicy ( + IdAssignmentPolicy_ptr servant, + STUB_Object *stub + ); + IdAssignmentPolicy_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::IdAssignmentPolicyValue value ( + CORBA::Environment &env + ); + + private: + IdAssignmentPolicy_ptr servant_; + }; + + +#endif // end #if !defined + + + class ImplicitActivationPolicy; + typedef ImplicitActivationPolicy *ImplicitActivationPolicy_ptr; + class ImplicitActivationPolicy : public virtual Policy + { + protected: + ImplicitActivationPolicy (void); + public: + virtual ~ImplicitActivationPolicy (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::ImplicitActivationPolicyValue value (CORBA::Environment &env) = 0; + static void _get_value_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + static void copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::ImplicitActivationPolicy *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_IMPLICITACTIVATIONPOLICY___COLLOCATED_SH_) +#define _PORTABLESERVER_IMPLICITACTIVATIONPOLICY___COLLOCATED_SH_ + + class _tao_collocated_ImplicitActivationPolicy : public virtual PortableServer::ImplicitActivationPolicy, + public virtual _tao_collocated_Policy + { + public: + _tao_collocated_ImplicitActivationPolicy ( + ImplicitActivationPolicy_ptr servant, + STUB_Object *stub + ); + ImplicitActivationPolicy_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ImplicitActivationPolicyValue value ( + CORBA::Environment &env + ); + + private: + ImplicitActivationPolicy_ptr servant_; + }; + + +#endif // end #if !defined + + + class ServantRetentionPolicy; + typedef ServantRetentionPolicy *ServantRetentionPolicy_ptr; + class ServantRetentionPolicy : public virtual Policy + { + protected: + ServantRetentionPolicy (void); + public: + virtual ~ServantRetentionPolicy (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::ServantRetentionPolicyValue value (CORBA::Environment &env) = 0; + static void _get_value_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + static void copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::ServantRetentionPolicy *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_SERVANTRETENTIONPOLICY___COLLOCATED_SH_) +#define _PORTABLESERVER_SERVANTRETENTIONPOLICY___COLLOCATED_SH_ + + class _tao_collocated_ServantRetentionPolicy : public virtual PortableServer::ServantRetentionPolicy, + public virtual _tao_collocated_Policy + { + public: + _tao_collocated_ServantRetentionPolicy ( + ServantRetentionPolicy_ptr servant, + STUB_Object *stub + ); + ServantRetentionPolicy_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ServantRetentionPolicyValue value ( + CORBA::Environment &env + ); + + private: + ServantRetentionPolicy_ptr servant_; + }; + + +#endif // end #if !defined + + + class RequestProcessingPolicy; + typedef RequestProcessingPolicy *RequestProcessingPolicy_ptr; + class RequestProcessingPolicy : public virtual Policy + { + protected: + RequestProcessingPolicy (void); + public: + virtual ~RequestProcessingPolicy (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::RequestProcessingPolicyValue value (CORBA::Environment &env) = 0; + static void _get_value_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + static void copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::RequestProcessingPolicy *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_REQUESTPROCESSINGPOLICY___COLLOCATED_SH_) +#define _PORTABLESERVER_REQUESTPROCESSINGPOLICY___COLLOCATED_SH_ + + class _tao_collocated_RequestProcessingPolicy : public virtual PortableServer::RequestProcessingPolicy, + public virtual _tao_collocated_Policy + { + public: + _tao_collocated_RequestProcessingPolicy ( + RequestProcessingPolicy_ptr servant, + STUB_Object *stub + ); + RequestProcessingPolicy_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::RequestProcessingPolicyValue value ( + CORBA::Environment &env + ); + + private: + RequestProcessingPolicy_ptr servant_; + }; + + +#endif // end #if !defined + + + class POAManager; + typedef POAManager *POAManager_ptr; + class POAManager : public virtual PortableServer::LocalServantBase + { + protected: + POAManager (void); + public: + virtual ~POAManager (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual void activate ( CORBA::Environment &env) = 0; // pure virtual + static void activate_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void hold_requests (CORBA::Boolean wait_for_completion, CORBA::Environment &env) = 0; // pure virtual + static void hold_requests_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void discard_requests (CORBA::Boolean wait_for_completion, CORBA::Environment &env) = 0; // pure virtual + static void discard_requests_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void deactivate (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion, CORBA::Environment &env) = 0; // pure virtual + static void deactivate_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::POAManager *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_POAMANAGER___COLLOCATED_SH_) +#define _PORTABLESERVER_POAMANAGER___COLLOCATED_SH_ + + class _tao_collocated_POAManager : public virtual PortableServer::POAManager + { + public: + _tao_collocated_POAManager ( + POAManager_ptr servant, + STUB_Object *stub + ); + POAManager_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual void activate ( + CORBA::Environment &_tao_environment + ); + virtual void hold_requests ( + CORBA::Boolean wait_for_completion, + CORBA::Environment &_tao_environment + ); + virtual void discard_requests ( + CORBA::Boolean wait_for_completion, + CORBA::Environment &_tao_environment + ); + virtual void deactivate ( + CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, + CORBA::Environment &_tao_environment + ); + + private: + POAManager_ptr servant_; + }; + + +#endif // end #if !defined + + + class AdapterActivator; + typedef AdapterActivator *AdapterActivator_ptr; + class TAO_Export AdapterActivator : public virtual PortableServer::LocalServantBase + { + protected: + AdapterActivator (void); + public: + virtual ~AdapterActivator (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual CORBA::Boolean unknown_adapter (PortableServer::POA_ptr parent, const char *name, CORBA::Environment &env) = 0; // pure virtual + static void unknown_adapter_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::AdapterActivator *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_ADAPTERACTIVATOR___COLLOCATED_SH_) +#define _PORTABLESERVER_ADAPTERACTIVATOR___COLLOCATED_SH_ + + class _tao_collocated_AdapterActivator : public virtual PortableServer::AdapterActivator + { + public: + _tao_collocated_AdapterActivator ( + AdapterActivator_ptr servant, + STUB_Object *stub + ); + AdapterActivator_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual CORBA::Boolean unknown_adapter ( + PortableServer::POA_ptr parent, + const char* name, + CORBA::Environment &_tao_environment + ); + + private: + AdapterActivator_ptr servant_; + }; + + +#endif // end #if !defined + + + class ServantManager; + typedef ServantManager *ServantManager_ptr; + class TAO_Export ServantManager : public virtual PortableServer::LocalServantBase + { + protected: + ServantManager (void); + public: + virtual ~ServantManager (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::ServantManager *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_SERVANTMANAGER___COLLOCATED_SH_) +#define _PORTABLESERVER_SERVANTMANAGER___COLLOCATED_SH_ + + class _tao_collocated_ServantManager : public virtual PortableServer::ServantManager + { + public: + _tao_collocated_ServantManager ( + ServantManager_ptr servant, + STUB_Object *stub + ); + ServantManager_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + + private: + ServantManager_ptr servant_; + }; + + +#endif // end #if !defined + + + class ServantActivator; + typedef ServantActivator *ServantActivator_ptr; + class TAO_Export ServantActivator : public virtual ServantManager + { + protected: + ServantActivator (void); + public: + virtual ~ServantActivator (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::Servant incarnate (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, CORBA::Environment &env) = 0; // pure virtual + static void incarnate_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void etherealize (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, PortableServer::Servant serv, CORBA::Boolean cleanup_in_progress, CORBA::Boolean remaining_activations, CORBA::Environment &env) = 0; // pure virtual + static void etherealize_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::ServantActivator *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_SERVANTACTIVATOR___COLLOCATED_SH_) +#define _PORTABLESERVER_SERVANTACTIVATOR___COLLOCATED_SH_ + + class _tao_collocated_ServantActivator : public virtual PortableServer::ServantActivator, + public virtual _tao_collocated_ServantManager + { + public: + _tao_collocated_ServantActivator ( + ServantActivator_ptr servant, + STUB_Object *stub + ); + ServantActivator_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::Servant incarnate ( + const PortableServer::ObjectId & oid, + PortableServer::POA_ptr adapter, + CORBA::Environment &_tao_environment + ); + virtual void etherealize ( + const PortableServer::ObjectId & oid, + PortableServer::POA_ptr adapter, + PortableServer::Servant serv, + CORBA::Boolean cleanup_in_progress, + CORBA::Boolean remaining_activations, + CORBA::Environment &_tao_environment + ); + + private: + ServantActivator_ptr servant_; + }; + + +#endif // end #if !defined + + + class ServantLocator; + typedef ServantLocator *ServantLocator_ptr; + class TAO_Export ServantLocator : public virtual ServantManager + { + protected: + ServantLocator (void); + public: + virtual ~ServantLocator (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::Servant preinvoke (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr adapter, + const char *operation, + PortableServer::ServantLocator::Cookie & the_cookie, + CORBA::Environment &env) = 0; // pure virtual + static void preinvoke_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void postinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, const char *operation, PortableServer::ServantLocator::Cookie the_cookie, PortableServer::Servant the_servant, CORBA::Environment &env) = 0; // pure virtual + static void postinvoke_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::ServantLocator *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_SERVANTLOCATOR___COLLOCATED_SH_) +#define _PORTABLESERVER_SERVANTLOCATOR___COLLOCATED_SH_ + + class _tao_collocated_ServantLocator : public virtual PortableServer::ServantLocator, + public virtual _tao_collocated_ServantManager + { + public: + _tao_collocated_ServantLocator ( + ServantLocator_ptr servant, + STUB_Object *stub + ); + ServantLocator_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::Servant preinvoke ( + const PortableServer::ObjectId & oid, + PortableServer::POA_ptr adapter, + const char * operation, + PortableServer::ServantLocator::Cookie & the_cookie, + CORBA::Environment &_tao_environment + ); + virtual void postinvoke ( + const PortableServer::ObjectId & oid, + PortableServer::POA_ptr adapter, + const char * operation, + PortableServer::ServantLocator::Cookie the_cookie, + PortableServer::Servant the_servant, + CORBA::Environment &_tao_environment + ); + + private: + ServantLocator_ptr servant_; + }; + + +#endif // end #if !defined + + + class POA; + typedef POA *POA_ptr; + class POA : public virtual PortableServer::LocalServantBase + { + protected: + POA (void); + public: + virtual ~POA (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::POA_ptr create_POA (const char *adapter_name, PortableServer::POAManager_ptr a_POAManager, const PortableServer::PolicyList &policies, CORBA::Environment &env) = 0; // pure virtual + static void create_POA_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::POA_ptr find_POA (const char *adapter_name, CORBA::Boolean activate_it, CORBA::Environment &env) = 0; // pure virtual + static void find_POA_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void destroy (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion, CORBA::Environment &env) = 0; // pure virtual + static void destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::ThreadPolicy_ptr create_thread_policy (PortableServer::ThreadPolicyValue value, CORBA::Environment &env) = 0; // pure virtual + static void create_thread_policy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::LifespanPolicy_ptr create_lifespan_policy (PortableServer::LifespanPolicyValue value, CORBA::Environment &env) = 0; // pure virtual + static void create_lifespan_policy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value, CORBA::Environment &env) = 0; // pure virtual + static void create_id_uniqueness_policy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value, CORBA::Environment &env) = 0; // pure virtual + static void create_id_assignment_policy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::ImplicitActivationPolicy_ptr create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value, CORBA::Environment &env) = 0; // pure virtual + static void create_implicit_activation_policy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::ServantRetentionPolicy_ptr create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value, CORBA::Environment &env) = 0; // pure virtual + static void create_servant_retention_policy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::RequestProcessingPolicy_ptr create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value, CORBA::Environment &env) = 0; // pure virtual + static void create_request_processing_policy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual char * the_name (CORBA::Environment &env) = 0; + static void _get_the_name_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::POA_ptr the_parent (CORBA::Environment &env) = 0; + static void _get_the_parent_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::POAManager_ptr the_POAManager (CORBA::Environment &env) = 0; + static void _get_the_POAManager_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::AdapterActivator_ptr the_activator (CORBA::Environment &env) = 0; + static void _get_the_activator_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void the_activator(PortableServer::AdapterActivator_ptr the_activator, CORBA::Environment &env) = 0; + static void _set_the_activator_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::ServantManager_ptr get_servant_manager ( CORBA::Environment &env) = 0; // pure virtual + static void get_servant_manager_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void set_servant_manager (PortableServer::ServantManager_ptr imgr, CORBA::Environment &env) = 0; // pure virtual + static void set_servant_manager_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::Servant get_servant ( CORBA::Environment &env) = 0; // pure virtual + static void get_servant_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void set_servant (PortableServer::Servant p_servant, CORBA::Environment &env) = 0; // pure virtual + static void set_servant_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::ObjectId * activate_object (PortableServer::Servant p_servant, CORBA::Environment &env) = 0; // pure virtual + static void activate_object_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void activate_object_with_id (const PortableServer::ObjectId &id, PortableServer::Servant p_servant, CORBA::Environment &env) = 0; // pure virtual + static void activate_object_with_id_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual void deactivate_object (const PortableServer::ObjectId &oid, CORBA::Environment &env) = 0; // pure virtual + static void deactivate_object_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual CORBA::Object_ptr create_reference (const char *intf, CORBA::Environment &env) = 0; // pure virtual + static void create_reference_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual CORBA::Object_ptr create_reference_with_id (const PortableServer::ObjectId &oid, const char *intf, CORBA::Environment &env) = 0; // pure virtual + static void create_reference_with_id_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::ObjectId * servant_to_id (PortableServer::Servant p_servant, CORBA::Environment &env) = 0; // pure virtual + static void servant_to_id_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant, CORBA::Environment &env) = 0; // pure virtual + static void servant_to_reference_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::Servant reference_to_servant (CORBA::Object_ptr reference, CORBA::Environment &env) = 0; // pure virtual + static void reference_to_servant_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::ObjectId * reference_to_id (CORBA::Object_ptr reference, CORBA::Environment &env) = 0; // pure virtual + static void reference_to_id_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::Servant id_to_servant (const PortableServer::ObjectId &oid, CORBA::Environment &env) = 0; // pure virtual + static void id_to_servant_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid, CORBA::Environment &env) = 0; // pure virtual + static void id_to_reference_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::POA *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_POA___COLLOCATED_SH_) +#define _PORTABLESERVER_POA___COLLOCATED_SH_ + + class _tao_collocated_POA : public virtual PortableServer::POA + { + public: + _tao_collocated_POA ( + POA_ptr servant, + STUB_Object *stub + ); + POA_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::POA_ptr create_POA ( + const char* adapter_name, + PortableServer::POAManager_ptr a_POAManager, + const PortableServer::PolicyList & policies, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::POA_ptr find_POA ( + const char* adapter_name, + CORBA::Boolean activate_it, + CORBA::Environment &_tao_environment + ); + virtual void destroy ( + CORBA::Boolean etherealize_objects, + CORBA::Boolean wait_for_completion, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ThreadPolicy_ptr create_thread_policy ( + PortableServer::ThreadPolicyValue value, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::LifespanPolicy_ptr create_lifespan_policy ( + PortableServer::LifespanPolicyValue value, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy ( + PortableServer::IdUniquenessPolicyValue value, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy ( + PortableServer::IdAssignmentPolicyValue value, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ImplicitActivationPolicy_ptr create_implicit_activation_policy ( + PortableServer::ImplicitActivationPolicyValue value, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ServantRetentionPolicy_ptr create_servant_retention_policy ( + PortableServer::ServantRetentionPolicyValue value, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::RequestProcessingPolicy_ptr create_request_processing_policy ( + PortableServer::RequestProcessingPolicyValue value, + CORBA::Environment &_tao_environment + ); + virtual char* the_name ( + CORBA::Environment &env + ); + virtual PortableServer::POA_ptr the_parent ( + CORBA::Environment &env + ); + virtual PortableServer::POAManager_ptr the_POAManager ( + CORBA::Environment &env + ); + virtual PortableServer::AdapterActivator_ptr the_activator ( + CORBA::Environment &env + ); + virtual void the_activator (PortableServer::AdapterActivator_ptr _tao_value, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ServantManager_ptr get_servant_manager ( + CORBA::Environment &_tao_environment + ); + virtual void set_servant_manager ( + PortableServer::ServantManager_ptr imgr, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::Servant get_servant ( + CORBA::Environment &_tao_environment + ); + virtual void set_servant ( + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ObjectId * activate_object ( + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ); + virtual void activate_object_with_id ( + const PortableServer::ObjectId & id, + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ); + virtual void deactivate_object ( + const PortableServer::ObjectId & oid, + CORBA::Environment &_tao_environment + ); + virtual CORBA::Object_ptr create_reference ( + const char *intf, + CORBA::Environment &_tao_environment + ); + virtual CORBA::Object_ptr create_reference_with_id ( + const PortableServer::ObjectId & oid, + const char *intf, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ObjectId * servant_to_id ( + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ); + virtual CORBA::Object_ptr servant_to_reference ( + PortableServer::Servant p_servant, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::Servant reference_to_servant ( + CORBA::Object_ptr reference, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ObjectId * reference_to_id ( + CORBA::Object_ptr reference, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::Servant id_to_servant ( + const PortableServer::ObjectId & oid, + CORBA::Environment &_tao_environment + ); + virtual CORBA::Object_ptr id_to_reference ( + const PortableServer::ObjectId & oid, + CORBA::Environment &_tao_environment + ); + + private: + POA_ptr servant_; + }; + + +#endif // end #if !defined + + + class Current; + typedef Current *Current_ptr; + class Current : public virtual CurrentBase + { + protected: + Current (void); + public: + virtual ~Current (void); + virtual CORBA::Boolean _is_a ( + const char* logical_type_id, + CORBA::Environment &_tao_environment); + virtual void* _downcast ( + const char* logical_type_id + ); + virtual PortableServer::POA_ptr get_POA ( CORBA::Environment &env) = 0; // pure virtual + static void get_POA_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + virtual PortableServer::ObjectId * get_object_id ( CORBA::Environment &env) = 0; // pure virtual + static void get_object_id_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env); + + static void _is_a_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &_tao_enviroment); + + virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env); + + PortableServer::Current *_this (CORBA::Environment &_tao_environment); + virtual const char* _interface_repository_id (void) const; + }; + + +#if !defined (_PORTABLESERVER_CURRENT___COLLOCATED_SH_) +#define _PORTABLESERVER_CURRENT___COLLOCATED_SH_ + + class _tao_collocated_Current : public virtual PortableServer::Current, + public virtual _tao_collocated_CurrentBase + { + public: + _tao_collocated_Current ( + Current_ptr servant, + STUB_Object *stub + ); + Current_ptr _get_servant (void) const; + virtual CORBA::Boolean _is_a ( + const char *logical_type_id, + CORBA::Environment &_tao_environment + ); + virtual PortableServer::POA_ptr get_POA ( + CORBA::Environment &_tao_environment + ); + virtual PortableServer::ObjectId * get_object_id ( + CORBA::Environment &_tao_environment + ); + + private: + Current_ptr servant_; + }; + + +#endif // end #if !defined + + +}; + + +#if defined (__ACE_INLINE__) +#include "poaS.i" +#endif // defined INLINE + + +#endif // if !defined diff --git a/TAO/tao/poaS.i b/TAO/tao/poaS.i new file mode 100644 index 00000000000..781dfd5d1b7 --- /dev/null +++ b/TAO/tao/poaS.i @@ -0,0 +1,157 @@ +// ****** 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 + +// skeleton destructor +ACE_INLINE +POA_PortableServer::CurrentBase::~CurrentBase (void) +{ +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::Policy::~Policy (void) +{ +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::ThreadPolicy::~ThreadPolicy (void) +{ +} +ACE_INLINE void POA_PortableServer::ThreadPolicy::copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::ThreadPolicy_ptr) obj; + POA_PortableServer::Policy::copy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +ACE_INLINE void POA_PortableServer::ThreadPolicy::destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::ThreadPolicy_ptr) obj; + POA_PortableServer::Policy::destroy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::LifespanPolicy::~LifespanPolicy (void) +{ +} +ACE_INLINE void POA_PortableServer::LifespanPolicy::copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::LifespanPolicy_ptr) obj; + POA_PortableServer::Policy::copy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +ACE_INLINE void POA_PortableServer::LifespanPolicy::destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::LifespanPolicy_ptr) obj; + POA_PortableServer::Policy::destroy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::IdUniquenessPolicy::~IdUniquenessPolicy (void) +{ +} +ACE_INLINE void POA_PortableServer::IdUniquenessPolicy::copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::IdUniquenessPolicy_ptr) obj; + POA_PortableServer::Policy::copy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +ACE_INLINE void POA_PortableServer::IdUniquenessPolicy::destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::IdUniquenessPolicy_ptr) obj; + POA_PortableServer::Policy::destroy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::IdAssignmentPolicy::~IdAssignmentPolicy (void) +{ +} +ACE_INLINE void POA_PortableServer::IdAssignmentPolicy::copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::IdAssignmentPolicy_ptr) obj; + POA_PortableServer::Policy::copy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +ACE_INLINE void POA_PortableServer::IdAssignmentPolicy::destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::IdAssignmentPolicy_ptr) obj; + POA_PortableServer::Policy::destroy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::ImplicitActivationPolicy::~ImplicitActivationPolicy (void) +{ +} +ACE_INLINE void POA_PortableServer::ImplicitActivationPolicy::copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::ImplicitActivationPolicy_ptr) obj; + POA_PortableServer::Policy::copy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +ACE_INLINE void POA_PortableServer::ImplicitActivationPolicy::destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::ImplicitActivationPolicy_ptr) obj; + POA_PortableServer::Policy::destroy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::ServantRetentionPolicy::~ServantRetentionPolicy (void) +{ +} +ACE_INLINE void POA_PortableServer::ServantRetentionPolicy::copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::ServantRetentionPolicy_ptr) obj; + POA_PortableServer::Policy::copy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +ACE_INLINE void POA_PortableServer::ServantRetentionPolicy::destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::ServantRetentionPolicy_ptr) obj; + POA_PortableServer::Policy::destroy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::RequestProcessingPolicy::~RequestProcessingPolicy (void) +{ +} +ACE_INLINE void POA_PortableServer::RequestProcessingPolicy::copy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::RequestProcessingPolicy_ptr) obj; + POA_PortableServer::Policy::copy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +ACE_INLINE void POA_PortableServer::RequestProcessingPolicy::destroy_skel (CORBA::ServerRequest &req, void *obj, void *context, CORBA::Environment &env) +{ + POA_PortableServer::Policy_ptr impl = (POA_PortableServer::RequestProcessingPolicy_ptr) obj; + POA_PortableServer::Policy::destroy_skel (req, (POA_PortableServer::Policy_ptr) impl, context, env); +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::POAManager::~POAManager (void) +{ +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::AdapterActivator::~AdapterActivator (void) +{ +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::ServantManager::~ServantManager (void) +{ +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::ServantActivator::~ServantActivator (void) +{ +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::ServantLocator::~ServantLocator (void) +{ +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::POA::~POA (void) +{ +} +// skeleton destructor +ACE_INLINE +POA_PortableServer::Current::~Current (void) +{ +} diff --git a/TAO/tao/poa_T.cpp b/TAO/tao/poa_T.cpp new file mode 100644 index 00000000000..f81093139b1 --- /dev/null +++ b/TAO/tao/poa_T.cpp @@ -0,0 +1,94 @@ +#if !defined (POA_T_CPP) +#define POA_T_CPP + +#include "tao/poa_T.h" + +template <class ACE_LOCKING_MECHANISM> +TAO_Locked_POA<ACE_LOCKING_MECHANISM>::TAO_Locked_POA (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + TAO_POA_Policies &policies, + PortableServer::POA_ptr parent, + CORBA::Environment &env) + : TAO_POA (adapter_name, + poa_manager, + policies, + parent, + env) +{ +} + +template <class ACE_LOCKING_MECHANISM> +TAO_Locked_POA<ACE_LOCKING_MECHANISM>::TAO_Locked_POA (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + TAO_POA_Policies &policies, + PortableServer::POA_ptr parent, + TAO_Object_Table &active_object_table, + CORBA::Environment &env) + : TAO_POA (adapter_name, + poa_manager, + policies, + parent, + active_object_table, + env) +{ +} + + +template <class ACE_LOCKING_MECHANISM> TAO_POA * +TAO_Locked_POA<ACE_LOCKING_MECHANISM>::clone (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + TAO_POA_Policies &policies, + PortableServer::POA_ptr parent, + CORBA::Environment &env) +{ + return new SELF (adapter_name, + poa_manager, + policies, + parent, + env); +} + + +template <class ACE_LOCKING_MECHANISM> TAO_POA * +TAO_Locked_POA<ACE_LOCKING_MECHANISM>::clone (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + TAO_POA_Policies &policies, + PortableServer::POA_ptr parent, + TAO_Object_Table &active_object_table, + CORBA::Environment &env) +{ + return new SELF (adapter_name, + poa_manager, + policies, + parent, + active_object_table, + env); +} + + +template <class ACE_LOCKING_MECHANISM> ACE_Lock & +TAO_Locked_POA<ACE_LOCKING_MECHANISM>::lock (void) +{ + return this->lock_; +} + +template <class ACE_LOCKING_MECHANISM> +TAO_Locked_POA_Manager<ACE_LOCKING_MECHANISM>::TAO_Locked_POA_Manager (void) + : TAO_POA_Manager () +{ +} + + +template <class ACE_LOCKING_MECHANISM> TAO_POA_Manager * +TAO_Locked_POA_Manager<ACE_LOCKING_MECHANISM>::clone (void) +{ + return new SELF; +} + +template <class ACE_LOCKING_MECHANISM> ACE_Lock & +TAO_Locked_POA_Manager<ACE_LOCKING_MECHANISM>::lock (void) +{ + return this->lock_; +} + +#endif /* POA_T_CPP */ diff --git a/TAO/tao/poa_T.h b/TAO/tao/poa_T.h new file mode 100644 index 00000000000..a125aa77d5b --- /dev/null +++ b/TAO/tao/poa_T.h @@ -0,0 +1,73 @@ +#if !defined (POA_T_H) +#define POA_T_H + +#include "tao/poa.h" + +template <class ACE_LOCKING_MECHANISM> +class TAO_Locked_POA : public TAO_POA +{ +public: + + TAO_Locked_POA (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + TAO_POA_Policies &policies, + PortableServer::POA_ptr parent, + CORBA::Environment &env); + + TAO_Locked_POA (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + TAO_POA_Policies &policies, + PortableServer::POA_ptr parent, + TAO_Object_Table &active_object_table, + CORBA::Environment &env); + + virtual TAO_POA *clone (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + TAO_POA_Policies &policies, + PortableServer::POA_ptr parent, + CORBA::Environment &env); + + virtual TAO_POA *clone (const char *adapter_name, + PortableServer::POAManager_ptr poa_manager, + TAO_POA_Policies &policies, + PortableServer::POA_ptr parent, + TAO_Object_Table &active_object_table, + CORBA::Environment &env); + +protected: + + virtual ACE_Lock &lock (void); + + ACE_Lock_Adapter<ACE_LOCKING_MECHANISM> lock_; + + typedef TAO_Locked_POA<ACE_LOCKING_MECHANISM> SELF; +}; + +template <class ACE_LOCKING_MECHANISM> +class TAO_Locked_POA_Manager : public TAO_POA_Manager +{ +public: + + TAO_Locked_POA_Manager (void); + + virtual TAO_POA_Manager *clone (void); + +protected: + + virtual ACE_Lock &lock (void); + + ACE_Lock_Adapter<ACE_LOCKING_MECHANISM> lock_; + + typedef TAO_Locked_POA_Manager<ACE_LOCKING_MECHANISM> SELF; +}; + + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "tao/poa_T.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("poa_T.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + +#endif /* POA_T_H */ diff --git a/TAO/tao/poa_macros.h b/TAO/tao/poa_macros.h new file mode 100644 index 00000000000..b46ae1a10f8 --- /dev/null +++ b/TAO/tao/poa_macros.h @@ -0,0 +1,47 @@ +// Convenient macro for testing for deadlock, as well as for detecting +// when mutexes fail. +#define TAO_POA_WRITE_GUARD(MUTEX,OBJ,LOCK,ENV) \ + do { \ + ACE_Write_Guard<MUTEX> OBJ (LOCK); \ + if (OBJ.locked () == 0) \ + { \ + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); \ + ENV.exception (exception); \ + return; \ + } \ + } \ + while (0); +#define TAO_POA_READ_GUARD(MUTEX,OBJ,LOCK,ENV) \ + do { \ + ACE_Read_Guard<MUTEX> OBJ (LOCK); \ + if (OBJ.locked () == 0) \ + { \ + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); \ + ENV.exception (exception); \ + return; \ + } \ + } \ + while (0); +#define TAO_POA_WRITE_GUARD_RETURN(MUTEX,OBJ,LOCK,RETURN,ENV) \ + do { \ + ACE_Write_Guard<MUTEX> OBJ (LOCK); \ + if (OBJ.locked () == 0) \ + { \ + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); \ + ENV.exception (exception); \ + return RETURN; \ + } \ + } \ + while (0); +#define TAO_POA_READ_GUARD_RETURN(MUTEX,OBJ,LOCK,RETURN,ENV) \ + do { \ + ACE_Read_Guard<MUTEX> OBJ (LOCK); \ + if (OBJ.locked () == 0) \ + { \ + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); \ + ENV.exception (exception); \ + return RETURN; \ + } \ + } \ + while (0); + diff --git a/TAO/tao/servant_base.cpp b/TAO/tao/servant_base.cpp new file mode 100644 index 00000000000..f7f197b51b6 --- /dev/null +++ b/TAO/tao/servant_base.cpp @@ -0,0 +1,209 @@ +// +// $Id$ +// +#include "tao/corba.h" + +TAO_ServantBase::TAO_ServantBase (void) + : optable_ (0), + parent_ (0) +{ +} + +TAO_ServantBase::TAO_ServantBase (const TAO_ServantBase &) +{ +} + +TAO_ServantBase & +TAO_ServantBase::operator= (const TAO_ServantBase &) +{ + return *this; +} + +TAO_ServantBase::~TAO_ServantBase (void) +{ +} + +PortableServer::POA_ptr +TAO_ServantBase::_default_POA (CORBA::Environment &env) +{ + TAO_POA *poa = TAO_ORB_Core_instance ()->root_poa (); + PortableServer::POA_var result = poa->_this (env); + if (env.exception () != 0) + return PortableServer::POA::_nil (); + else + return result._retn (); +} + +CORBA::Boolean +TAO_ServantBase::_is_a (const char* logical_type_id, + CORBA::Environment &env) +{ + if (ACE_OS::strcmp (logical_type_id, CORBA::_tc_Object->id (env)) == 0) + { + return CORBA::B_TRUE; + } + return CORBA::B_FALSE; +} + +void +TAO_ServantBase::_set_parent (TAO_IUnknown *p) +{ + this->parent_ = p; + ACE_ASSERT (this->parent_ != 0); +} + +TAO_IUnknown * +TAO_ServantBase::_get_parent (void) const +{ + return this->parent_; +} + +int +TAO_ServantBase::_find (const CORBA::String &opname, + TAO_Skeleton& skelfunc) +{ + return optable_->find (opname, skelfunc); +} + +int +TAO_ServantBase::_bind (const CORBA::String &opname, + const TAO_Skeleton skel_ptr) +{ + return optable_->bind (opname, skel_ptr); +} + +void +TAO_ServantBase::_dispatch (CORBA::ServerRequest &req, + void *context, + CORBA::Environment &env) +{ + // XXXASG - we should check here if the call was for _non_existant, else + // issue an error. For the time being we issue an error + CORBA::String opname = req.op_name (); + ACE_UNUSED_ARG (context); + + // Something really bad happened: the operation was not + // found in the object, fortunately there is a standard + // exception for that purpose. + env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO)); + ACE_ERROR ((LM_ERROR, + "Cannot find operation <%s> in object\n", + opname)); +} + +STUB_Object * +TAO_ServantBase::_create_stub (CORBA_Environment &env) +{ + STUB_Object *stub; + + TAO_ORB_Core *orb_core = TAO_ORB_Core_instance (); + TAO_POA_Current *poa_current = orb_core->poa_current (); + if (poa_current->in_upcall () && this == poa_current->servant ()) + { + stub = new IIOP_Object (CORBA::string_copy (this->_interface_repository_id ()), + IIOP::Profile (orb_core->orb_params ()->addr (), + poa_current->object_key ())); + } + else + { + PortableServer::POA_var poa = this->_default_POA (env); + if (env.exception () != 0) + return 0; + + CORBA::Object_var object = poa->servant_to_reference (this, env); + if (env.exception () != 0) + return 0; + + TAO::ObjectKey_var object_key = object->key (env); + stub = new IIOP_Object (CORBA::string_copy (this->_interface_repository_id ()), + IIOP::Profile (orb_core->orb_params ()->addr (), + object_key.in ())); + } + + return stub; +} + +STUB_Object * +TAO_Local_ServantBase::_create_stub (CORBA_Environment &env) +{ + // Note the use of a fake key and no registration with POAs + return new IIOP_Object (CORBA::string_copy (this->_interface_repository_id ()), + IIOP::Profile (TAO_ORB_Core_instance ()->orb_params ()->addr (), + "0")); +} + +CORBA::Object_ptr +TAO_DynamicImplementation::_this (CORBA::Environment &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. + STUB_Object *stub = this->_create_stub (env); + if (env.exception () != 0) + return CORBA::Object::_nil (); + + // Create a object + return new CORBA::Object (stub, this, CORBA::B_TRUE); +} + +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; +} + +STUB_Object * +TAO_DynamicImplementation::_create_stub (CORBA::Environment &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_ORB_Core *orb_core = TAO_ORB_Core_instance (); + TAO_POA_Current *poa_current = orb_core->poa_current (); + if (!poa_current->in_upcall () || this != poa_current->servant ()) + { + CORBA::Exception *exception = new PortableServer::POA::WrongPolicy; + env.exception (exception); + return 0; + } + + PortableServer::POA_var poa = poa_current->get_POA (env); + if (env.exception () != 0) + return 0; + + // CORBA::RepositoryId interface = this->_primary_interface (poa_current->object_id (), + // poa.in (), + // env); + PortableServer::RepositoryId interface = this->_primary_interface (poa_current->object_id (), + poa.in (), + env); + if (env.exception () != 0) + return 0; + + return new IIOP_Object (interface, + IIOP::Profile (orb_core->orb_params ()->addr (), + poa_current->object_key ())); +} + +void +TAO_DynamicImplementation::_dispatch (CORBA::ServerRequest &request, + void *context, + CORBA::Environment &env) +{ + ACE_UNUSED_ARG (context); + + // Delegate to user + this->invoke (&request, env); +} diff --git a/TAO/tao/servant_base.h b/TAO/tao/servant_base.h new file mode 100644 index 00000000000..4efae8dcc01 --- /dev/null +++ b/TAO/tao/servant_base.h @@ -0,0 +1,149 @@ +// +// $Id$ +// +#if !defined (SERVANT_BASE_H) +#define SERVANT_BASE_H + +class TAO_Export TAO_ServantBase +{ + // = TITLE + // Base class for skeletons and servants. + // + // = DESCRIPTION + // The POA spec requires that all servants inherit from this + // class. + // + + friend class TAO_POA; + +public: + virtual ~TAO_ServantBase (void); + // destructor + + TAO_ServantBase &operator= (const TAO_ServantBase &); + // assignment operator. + + virtual PortableServer::POA_ptr _default_POA (CORBA::Environment &env); + + virtual void *_downcast (const char *repository_id) = 0; + // Get the correct vtable + + virtual STUB_Object *_create_stub (CORBA_Environment &env); + // 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. + + void _set_parent (TAO_IUnknown *p); + // Set the "parent" in the QueryInterface hierarchy. + // @@ TODO use a conformant name; since it is an + // internal (implementation) method its name should start with '_' + + virtual CORBA::Boolean _is_a (const char* logical_type_id, + CORBA::Environment &env); + // Local implementation of the CORBA::Object::_is_a method. + + virtual void _dispatch (CORBA::ServerRequest &request, + void *context, + CORBA::Environment &env); + // 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 <request>. + // @@ TODO use a conformant name; since it is an + // internal (implementation) method its name should start with '_' + + virtual int _find (const CORBA::String &opname, + TAO_Skeleton &skelfunc); + // Find an operation in the operation table. + // @@ TODO use a conformant name; since it is an + // internal (implementation) method its name should start with '_' + + virtual int _bind (const CORBA::String &opname, + const TAO_Skeleton skel_ptr); + // Register a CORBA IDL operation name. + // @@ TODO use a conformant name; since it is an + // internal (implementation) method its name should start with '_' + + TAO_IUnknown *_get_parent (void) const; + // Get the "parent" in the QueryInterface hierarchy. + + virtual const char *_interface_repository_id (void) const = 0; + // Get this interface's repository id + +protected: + TAO_Operation_Table *optable_; + // The operation table for this servant, it is initialized by the + // most derived class. + + TAO_IUnknown *parent_; + // @@ TODO find out why is this here.... +}; + +class TAO_Export TAO_Local_ServantBase : public TAO_ServantBase +{ + // = TITLE + // Base class for local skeletons and servants. + // +protected: + STUB_Object *_create_stub (CORBA_Environment &env); + // This is an auxiliar method for _this(). Make sure *not* to + // register with the default POA +}; + +// Base class for DSI +class TAO_DynamicImplementation : public virtual TAO_ServantBase +{ + // + // = DESCRIPTION + // + // It is expected that the invoke() 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 &env) = 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 &env) = 0; + + virtual PortableServer::RepositoryId _primary_interface (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr poa, + CORBA::Environment &env) = 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 &env); + // 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 STUB_Object *_create_stub (CORBA_Environment &env); + // This is an auxiliar method for _this() and _narrow(). + + virtual void _dispatch (CORBA::ServerRequest &request, + void *context, + CORBA::Environment &env); + // Turns around and calls invoke +}; + +#endif /* SERVANT_BASE_H */ diff --git a/TAO/tao/server_factory.cpp b/TAO/tao/server_factory.cpp index d05ea48f402..cbc9617c63c 100644 --- a/TAO/tao/server_factory.cpp +++ b/TAO/tao/server_factory.cpp @@ -53,12 +53,24 @@ TAO_Server_Strategy_Factory::scheduling_strategy (void) return 0; } -TAO_Object_Table * +TAO_Object_Table_Impl * TAO_Server_Strategy_Factory::create_object_table (void) { return 0; } +ACE_Lock * +TAO_Server_Strategy_Factory::create_poa_lock (void) +{ + return 0; +} + +ACE_Lock * +TAO_Server_Strategy_Factory::create_poa_mgr_lock (void) +{ + return 0; +} + #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Creation_Strategy<TAO_Server_Connection_Handler>; template class ACE_Acceptor<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; diff --git a/TAO/tao/server_factory.h b/TAO/tao/server_factory.h index 3eb4d7a61f2..655507991be 100644 --- a/TAO/tao/server_factory.h +++ b/TAO/tao/server_factory.h @@ -63,8 +63,14 @@ public: virtual SCHEDULING_STRATEGY *scheduling_strategy (void); // Return the scheduling strategy used. - virtual TAO_Object_Table *create_object_table (void); + virtual TAO_Object_Table_Impl *create_object_table (void); // Return a new key-->object table + + virtual ACE_Lock *create_poa_lock (void); + // Return a new lock for use in locking the POA. + + virtual ACE_Lock *create_poa_mgr_lock (void); + // Return a new lock for use in locking the POA Manager. }; #endif /* TAO_SERVER_FACTORY_H */ diff --git a/TAO/tao/svrrqst.cpp b/TAO/tao/svrrqst.cpp index 714955d476d..37065758997 100644 --- a/TAO/tao/svrrqst.cpp +++ b/TAO/tao/svrrqst.cpp @@ -16,7 +16,7 @@ DEFINE_GUID (IID_CORBA_ServerRequest, IIOP_ServerRequest::IIOP_ServerRequest (CDR *msg, CORBA::ORB_ptr the_orb, - CORBA::POA_ptr the_poa) + TAO_POA *the_poa) : incoming_ (msg), params_ (0), retval_ (0), @@ -219,7 +219,7 @@ IIOP_ServerRequest::orb (void) return orb_; } -CORBA::POA_ptr +TAO_POA * IIOP_ServerRequest::oa (void) { return poa_; diff --git a/TAO/tao/svrrqst.h b/TAO/tao/svrrqst.h index 4460c470c2d..de479d75e81 100644 --- a/TAO/tao/svrrqst.h +++ b/TAO/tao/svrrqst.h @@ -24,6 +24,8 @@ #if !defined (TAO_SVRRQST_H) #define TAO_SVRRQST_H +class TAO_POA; + class TAO_Export CORBA_ServerRequest : public TAO_IUnknown // = TITLE // XXX this is currently in an intermediate state; this is not @@ -67,7 +69,7 @@ public: virtual CORBA::Principal_ptr caller (void) = 0; virtual CORBA::Object_ptr target (void) = 0; virtual CORBA::String op_name (void) = 0; - virtual CORBA::POA_ptr oa (void) = 0; + virtual TAO_POA *oa (void) = 0; virtual CORBA::ORB_ptr orb (void) = 0; }; @@ -80,7 +82,7 @@ public: IIOP_ServerRequest (CDR *msg, CORBA::ORB_ptr the_orb, - CORBA::POA_ptr the_poa); + TAO_POA *the_poa); virtual ~IIOP_ServerRequest (void); @@ -101,7 +103,7 @@ public: CORBA::Principal_ptr caller (void); CORBA::Object_ptr target (void); CORBA::ORB_ptr orb (void); - CORBA::POA_ptr oa (void); + TAO_POA *oa (void); // Stuff required for COM IUnknown support @@ -132,7 +134,7 @@ private: CORBA::ORB_ptr orb_; // The ORB with which this server request is associated. - CORBA::POA_ptr poa_; + TAO_POA *poa_; // The object adapter with whicih this server request is associated. }; diff --git a/TAO/taoconfig.mk b/TAO/taoconfig.mk new file mode 100644 index 00000000000..dd5628d0a45 --- /dev/null +++ b/TAO/taoconfig.mk @@ -0,0 +1,16 @@ +#---------------------------------------------------------------------------- +# $Id$ +# +# Common makefile definitions for all applications +# +#---------------------------------------------------------------------------- + +ifndef TAO_ROOT +TAO_ROOT = $(ACE_ROOT)/TAO +endif + +LDFLAGS := $(patsubst -L$(ACE_ROOT)/ace, -L$(TAO_ROOT)/tao -L$(ACE_ROOT)/ace, $(LDFLAGS)) +CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H + +clean: + -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state diff --git a/TAO/tests/Cubit/TAO/DII_Cubit/Makefile b/TAO/tests/Cubit/TAO/DII_Cubit/Makefile index d8868023a64..1016e9635ff 100644 --- a/TAO/tests/Cubit/TAO/DII_Cubit/Makefile +++ b/TAO/tests/Cubit/TAO/DII_Cubit/Makefile @@ -41,18 +41,13 @@ include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU #include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +include $(TAO_ROOT)/taoconfig.mk # Local modifications to variables imported by includes above. #LDFLAGS += -L../../../proto/lib #CPPFLAGS += -I../../../proto/include -DUSE_ACE_EVENT_HANDLING -DDEBUG -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif -TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE DCFLAGS = -g OCFLAGS = -LDFLAGS += -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H svr: $(addprefix $(VDIR),$(CUBIT_SVR_OBJS)) $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/Makefile b/TAO/tests/Cubit/TAO/IDL_Cubit/Makefile index 608cba34505..396b2f46575 100644 --- a/TAO/tests/Cubit/TAO/IDL_Cubit/Makefile +++ b/TAO/tests/Cubit/TAO/IDL_Cubit/Makefile @@ -9,7 +9,7 @@ # Local macros #---------------------------------------------------------------------------- -LDLIBS = -lTAO +LDLIBS = -lTAO IDL_SRC = cubitC.cpp cubitS.cpp PROG_SRCS = $(IDL_SRC) svr.cpp clnt.cpp tmplinst.cpp @@ -17,7 +17,7 @@ PROG_SRCS = $(IDL_SRC) svr.cpp clnt.cpp tmplinst.cpp LSRC = $(PROG_SRCS) CUBIT_SVR_OBJS = cubitC.o cubitS.o svr.o cubit_i.o tmplinst.o -CUBIT_CLT_OBJS = cubitC.o clnt.o tmplinst.o +CUBIT_CLT_OBJS = cubitC.o cubitS.o clnt.o tmplinst.o BIN = svr clnt BUILD = $(BIN) @@ -30,21 +30,17 @@ VBIN = $(BIN:%=%$(VAR)) include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(TAO_ROOT)/rules.tao.GNU include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU #include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +include $(TAO_ROOT)/taoconfig.mk -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif -TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE DCFLAGS = -g -LDFLAGS += -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H -$(IDL_SRC): cubit.idl - $(TAO_ROOT)/TAO_IDL/tao_idl cubit.idl +#$(IDL_SRC): cubit.idl +# $(TAO_ROOT)/TAO_IDL/tao_idl cubit.idl svr: $(addprefix $(VDIR),$(CUBIT_SVR_OBJS)) $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) @@ -80,11 +76,12 @@ check: $(TESTS) @./clnt -n250 -O `cat obj.5` -x @echo '' -clean: - -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state +#clean: +# -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state realclean: clean -/bin/rm -rf cubitC.* cubitS.* + # DO NOT DELETE THIS LINE -- g++dep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/clnt.cpp b/TAO/tests/Cubit/TAO/IDL_Cubit/clnt.cpp index d96f6d8740e..fdec90f5a97 100644 --- a/TAO/tests/Cubit/TAO/IDL_Cubit/clnt.cpp +++ b/TAO/tests/Cubit/TAO/IDL_Cubit/clnt.cpp @@ -28,21 +28,14 @@ #define quote(x) #x Cubit_Client::Cubit_Client (void) - : cubit_factory_key_ ("factory"), + : cubit_factory_key_ (0), cubit_key_ ("key0"), - hostname_ (ACE_DEFAULT_SERVER_HOST), loop_count_ (250), exit_later_ (0), - factory_ (Cubit_Factory::_nil ()), - objref_ (CORBA::Object::_nil ()), cubit_ (Cubit::_nil ()), - orb_ptr_ (0), call_count_ (0), error_count_ (0) { - ACE_Env_Value<CORBA::UShort> defport(quote(TAO_DEFAULT_SERVER_PORT), - TAO_DEFAULT_SERVER_PORT); - portnum_ = defport; } // Simple function that returns the substraction of 117 from the @@ -59,7 +52,7 @@ Cubit_Client::func (u_int i) int Cubit_Client::parse_args (void) { - ACE_Get_Opt get_opts (argc_, argv_, "dn:h:p:k:x"); + ACE_Get_Opt get_opts (argc_, argv_, "dn:f:k:x"); int c; while ((c = get_opts ()) != -1) @@ -71,13 +64,10 @@ Cubit_Client::parse_args (void) case 'n': // loop count loop_count_ = (u_int) ACE_OS::atoi (get_opts.optarg); break; - case 'h': - hostname_ = ACE_OS::strdup (get_opts.optarg); - break; - case 'p': - portnum_ = ACE_OS::atoi (get_opts.optarg); - break; - case 'k': // stringified objref + case 'f': + cubit_factory_key_ = ACE_OS::strdup (get_opts.optarg); + break; + case 'k': cubit_key_ = ACE_OS::strdup (get_opts.optarg); break; case 'x': @@ -89,9 +79,8 @@ Cubit_Client::parse_args (void) "usage: %s" " [-d]" " [-n loopcount]" + " [-f cubit_factory-obj-ref-key]" " [-k cubit-obj-ref-key]" - " [-h hostname]" - " [-p port]" " [-x]" "\n", this->argv_ [0]), @@ -670,10 +659,12 @@ Cubit_Client::run (void) Cubit_Client::~Cubit_Client (void) { // Free resources - CORBA::release (this->orb_ptr_); - CORBA::release (this->objref_); - CORBA::release (this->factory_); CORBA::release (this->cubit_); + + if (this->cubit_factory_key_ != 0) + ACE_OS::free (this->cubit_factory_key_); + if (this->cubit_key_ != 0) + ACE_OS::free (this->cubit_key_); } int @@ -682,76 +673,62 @@ Cubit_Client::init (int argc, char **argv) this->argc_ = argc; this->argv_ = argv; - // Retrieve the ORB. - this->orb_ptr_ = CORBA::ORB_init (this->argc_, - this->argv_, - "internet", - this->env_); + TAO_TRY + { + // Retrieve the ORB. + this->orb_ = CORBA::ORB_init (this->argc_, + this->argv_, + "internet", + TAO_TRY_ENV); + TAO_CHECK_ENV; - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; + // Parse command line and verify parameters. + if (this->parse_args () == -1) + return -1; - if (this->env_.exception () != 0) - { - this->env_.print_exception ("ORB initialization"); - return -1; - } + if (this->cubit_factory_key_ == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "%s: no cubit factory key specified\n", + this->argv_[0]), + -1); - if (this->cubit_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: must specify an object reference using -k <key>\n", - this->argv_[0]), - -1); - // Retrieve a factory objref. - this->objref_ = Cubit_Factory::_bind (this->hostname_, - this->portnum_, - this->cubit_factory_key_, - this->env_); + CORBA::Object_var factory_object = + this->orb_->string_to_object (this->cubit_factory_key_, + TAO_TRY_ENV); + TAO_CHECK_ENV; - if (this->env_.exception () != 0) - { - this->env_.print_exception ("Cubit_Factory::_bind"); - return -1; - } + this->factory_ = + Cubit_Factory::_narrow (factory_object, TAO_TRY_ENV); + TAO_CHECK_ENV; - if (CORBA::is_nil (this->objref_) == CORBA::B_TRUE) - ACE_ERROR_RETURN ((LM_ERROR, - " _bind returned null object for key (%s), host (%s), port (%d)\n", - this->cubit_factory_key_, - this->hostname_, - this->portnum_), - -1); - - // Narrow the CORBA::Object reference to the stub object, checking - // the type along the way using _is_a. There is really no need to - // narrow <objref> because <_bind> will return us the - // <Cubit_Factory> pointer. However, we do it so that we can - // explicitly test the _narrow function. - this->factory_ = Cubit_Factory::_narrow (this->objref_, this->env_); - //CORBA::release (this->objref_); - this->objref_->Release (); - - if (this->factory_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to narrow object reference to a Cubit_Factory_ptr.\n"), - -1); - - // Now retrieve the Cubit obj ref corresponding to the key. - this->cubit_ = - this->factory_->make_cubit (this->cubit_key_, this->env_); + if (CORBA::is_nil (this->factory_.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "invalid factory key <%s>\n", + this->cubit_factory_key_), + -1); + } - if (this->env_.exception () != 0) + ACE_DEBUG ((LM_DEBUG, "Factory received OK\n")); + + // Now retrieve the Cubit obj ref corresponding to the key. + this->cubit_ = + this->factory_->make_cubit (this->cubit_key_, + TAO_TRY_ENV); + TAO_CHECK_ENV; + + if (CORBA::is_nil (this->cubit_)) + ACE_ERROR_RETURN ((LM_ERROR, + "null cubit objref returned by factory\n"), + -1); + } + TAO_CATCHANY { - this->env_.print_exception ("string2object"); + TAO_TRY_ENV.print_exception ("Cubit::init"); return -1; } - - if (CORBA::is_nil (this->cubit_)) - ACE_ERROR_RETURN ((LM_ERROR, - "null cubit objref returned by factory\n"), - -1); + TAO_ENDTRY; return 0; } @@ -765,8 +742,8 @@ main (int argc, char **argv) if (cubit_client.init (argc, argv) == -1) return 1; - else - return cubit_client.run (); + + return cubit_client.run (); } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/clnt.h b/TAO/tests/Cubit/TAO/IDL_Cubit/clnt.h index 8c7c5ee3f8a..2ba3f7e50b8 100644 --- a/TAO/tests/Cubit/TAO/IDL_Cubit/clnt.h +++ b/TAO/tests/Cubit/TAO/IDL_Cubit/clnt.h @@ -85,37 +85,28 @@ private: char **argv_; // arguments from command line. - const char *cubit_factory_key_; + char *cubit_factory_key_; // Key of factory obj ref. char *cubit_key_; // Key of the obj ref to be retrieved via the factory. - char *hostname_; - // Hostname of server. - - CORBA::UShort portnum_; - // default port number of server. - u_int loop_count_; // Number of times to do the cube operations. int exit_later_; // Flag to tell server to not exit immediately - Cubit_Factory_ptr factory_; + Cubit_Factory_var factory_; // factory pointer for cubit. - CORBA::Object_ptr objref_; - // storage of the factory objref - CORBA::Environment env_; // Environment variable Cubit_ptr cubit_; // Cubit obj ref - CORBA::ORB_ptr orb_ptr_; + CORBA::ORB_var orb_; // Remember our orb u_int call_count_; diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/cubit_i.cpp b/TAO/tests/Cubit/TAO/IDL_Cubit/cubit_i.cpp index 0e057ae5815..5092f41b31e 100644 --- a/TAO/tests/Cubit/TAO/IDL_Cubit/cubit_i.cpp +++ b/TAO/tests/Cubit/TAO/IDL_Cubit/cubit_i.cpp @@ -14,61 +14,31 @@ // ============================================================================ #include "tao/corba.h" +#include "ace/Auto_Ptr.h" #include "cubit_i.h" // Constructor -Cubit_Factory_i::Cubit_Factory_i (const char *key, int numobjs) - : POA_Cubit_Factory (key) +Cubit_Factory_i::Cubit_Factory_i (void) { - // Create implementation object with user specified key. - - this->numobjs_ = numobjs; - this->my_cubit_ = new Cubit_i_ptr [this->numobjs_]; - - static char obj_str [MAXNAMELEN]; - - for (u_int i = 0; i < this->numobjs_; i++) - { - ACE_OS::memset (obj_str, '\0', MAXNAMELEN); - ACE_OS::sprintf (obj_str, "key%d", i); - - my_cubit_[i] = new Cubit_i (obj_str); - - if (my_cubit_[i] == 0) - ACE_ERROR ((LM_ERROR, - " (%P|%t) Unable to create implementation object%d\n", - i)); - - } } // Destructor Cubit_Factory_i::~Cubit_Factory_i (void) { - delete [] this->my_cubit_; } Cubit_ptr -Cubit_Factory_i::make_cubit (const char *key, CORBA::Environment &env) +Cubit_Factory_i::make_cubit (const char *, + CORBA::Environment &env) { - for (size_t i = 0; i < this->numobjs_; i++) - { - const char *obj_str = this->my_cubit_[i]->_get_name (env); - - // Keys matched. - if (!ACE_OS::strcmp (obj_str, key)) - return Cubit::_duplicate (this->my_cubit_ [i]); - } - - return Cubit::_nil (); + return my_cubit_._this (env); } // Constructor -Cubit_i::Cubit_i (const char *obj_name) - : POA_Cubit (obj_name) +Cubit_i::Cubit_i (const char *) { } @@ -135,16 +105,16 @@ Cubit_i::cube_union (const Cubit::oneof &values, ACE_UNUSED_ARG (env); switch (values._d ()) { - case e_0th: + case Cubit::e_0th: temp.o (values.o () * values.o () * values.o ()); break; - case e_1st: + case Cubit::e_1st: temp.s (values.s () * values.s () * values.s ()); break; - case e_2nd: + case Cubit::e_2nd: temp.l (values.l () * values.l () * values.l ()); break; - case e_3rd: + case Cubit::e_3rd: default: temp._d (values._d ()); // set the discriminant // use the read/write accessor diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/cubit_i.h b/TAO/tests/Cubit/TAO/IDL_Cubit/cubit_i.h index c62db28337b..800283c268e 100644 --- a/TAO/tests/Cubit/TAO/IDL_Cubit/cubit_i.h +++ b/TAO/tests/Cubit/TAO/IDL_Cubit/cubit_i.h @@ -82,7 +82,7 @@ class Cubit_Factory_i: public POA_Cubit_Factory // factory object returning the cubit objrefs { public: - Cubit_Factory_i (const char *key, int numobjs); + Cubit_Factory_i (void); // constructor ~Cubit_Factory_i (void); @@ -92,8 +92,7 @@ public: // make the cubit object whose key is "key" private: - Cubit_i_ptr *my_cubit_; - u_int numobjs_; + Cubit_i my_cubit_; }; #endif /* _CUBIT_I_HH */ diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/svr.cpp b/TAO/tests/Cubit/TAO/IDL_Cubit/svr.cpp index c716c0b1467..7b82c142e95 100644 --- a/TAO/tests/Cubit/TAO/IDL_Cubit/svr.cpp +++ b/TAO/tests/Cubit/TAO/IDL_Cubit/svr.cpp @@ -55,63 +55,97 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - CORBA::Environment env; - char *orb_name = "internet"; - - CORBA::ORB_ptr orb_ptr = CORBA::ORB_init (argc, argv, orb_name, env); - - if (env.exception () != 0) + TAO_TRY { - env.print_exception ("ORB init"); - return 1; + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, TAO_TRY_ENV); + TAO_CHECK_ENV; + + // Initialize the Object Adapter + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + if (CORBA::is_nil(poa_object.in())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object, TAO_TRY_ENV); + TAO_CHECK_ENV; + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); + TAO_CHECK_ENV; + + PortableServer::PolicyList policies (2); + policies.length (2); + policies[0] = + root_poa->create_id_assignment_policy (PortableServer::USER_ID, + TAO_TRY_ENV); + policies[1] = + root_poa->create_lifespan_policy (PortableServer::PERSISTENT, + TAO_TRY_ENV); + + // We use a different POA, otherwise the user would have to + // change the object key each time it invokes the server. + PortableServer::POA_var good_poa = + root_poa->create_POA ("RootPOA_is_BAD", + poa_manager.in (), + policies, + TAO_TRY_ENV); + TAO_CHECK_ENV; + + // Parse remaining command line and verify parameters. + parse_args (argc, argv); + + // create a factory implementation + Cubit_Factory_i factory_impl; + + PortableServer::ObjectId_var id = + PortableServer::string_to_ObjectId ("factory"); + good_poa->activate_object_with_id (id.in (), + &factory_impl, + TAO_TRY_ENV); + TAO_CHECK_ENV; + + if (TAO_debug_level > 0) + { + CORBA::Object_var obj = + good_poa->id_to_reference (id.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + CORBA::String_var str = + orb->object_to_string (obj.in (), + TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, + "The IOR is: <%s>\n", str.in ())); + } + + poa_manager->activate (TAO_TRY_ENV); + TAO_CHECK_ENV; + + // Handle requests for this object until we're killed, or one of + // the methods asks us to exit. + if (orb->run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); + + root_poa->destroy (CORBA::B_TRUE, + CORBA::B_TRUE, + TAO_TRY_ENV); + TAO_CHECK_ENV } - - // Initialize the Object Adapter - CORBA::POA_ptr oa_ptr = orb_ptr->POA_init (argc, argv, "POA"); - - if (oa_ptr == 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - // Parse remaining command line and verify parameters. - parse_args (argc, argv); - - // create a factory implementation - Cubit_Factory_ptr factory; - - ACE_NEW_RETURN (factory, Cubit_Factory_i ("factory", num_of_objs), 1); - - if (TAO_debug_level > 0) + TAO_CATCH (CORBA::SystemException, sysex) { - // Stringify the objref we'll be implementing, and print it to - // stdout. Someone will take that string and give it to a - // client. Then release the object. - - CORBA::String str; - - str = orb_ptr->object_to_string (factory, env); - - if (env.exception () != 0) - { - env.print_exception ("object2string"); - return 1; - } - - ACE_OS::puts ((char *) str); - ACE_OS::fflush (stdout); - //dmsg1 ("Object Created at: '%ul'", obj); - dmsg1 ("listening as object '%s'", str); + TAO_TRY_ENV.print_exception ("System Exception"); + return -1; } - - // Handle requests for this object until we're killed, or one of the - // methods asks us to exit. - if (orb_ptr->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); - - // Free resources - CORBA::release (oa_ptr); - CORBA::release (orb_ptr); + TAO_CATCH (CORBA::UserException, userex) + { + TAO_TRY_ENV.print_exception ("User Exception"); + return -1; + } + TAO_ENDTRY; return 0; } diff --git a/TAO/tests/Makefile b/TAO/tests/Makefile index 77a74e3b28c..f88d505c6d0 100644 --- a/TAO/tests/Makefile +++ b/TAO/tests/Makefile @@ -8,7 +8,10 @@ # Local macros #---------------------------------------------------------------------------- -DIRS = Cubit \ +DIRS = \ + Cubit \ + POA \ + Param_Test \ Thruput # The following test hasn't been updated yet diff --git a/TAO/tests/POA/Explicit_Activation/Explicit_Activation.dsw b/TAO/tests/POA/Explicit_Activation/Explicit_Activation.dsw new file mode 100644 index 00000000000..293f7320fc8 --- /dev/null +++ b/TAO/tests/POA/Explicit_Activation/Explicit_Activation.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "server"=.\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/tests/POA/Explicit_Activation/server.cpp b/TAO/tests/POA/Explicit_Activation/server.cpp new file mode 100644 index 00000000000..6dec3921a4a --- /dev/null +++ b/TAO/tests/POA/Explicit_Activation/server.cpp @@ -0,0 +1,159 @@ +#include "ace/streams.h" +#include "MyFooServant.h" + +int +main (int argc, char **argv) +{ + CORBA::Environment env; + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB_init"); + return -1; + } + + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj, env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::the_POAManager"); + return -1; + } + + // CORBA::PolicyList policies (2); + PortableServer::PolicyList policies (2); + policies.length (2); + policies[0] = root_poa->create_id_assignment_policy (PortableServer::USER_ID, env); + policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT, env); + + ACE_CString name = "firstPOA"; + PortableServer::POA_var first_poa = root_poa->create_POA (name.c_str (), + poa_manager.in (), + policies, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + + for (CORBA::ULong i = 0; + i < policies.length () && env.exception () == 0; + ++i) + { + PortableServer::Policy_ptr policy = policies[i]; + policy->destroy (env); + } + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + + MyFooServant first_foo_impl (root_poa, 27); + MyFooServant second_foo_impl (first_poa, 28); + + PortableServer::ObjectId_var first_oid = root_poa->activate_object (&first_foo_impl, env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::activate_object"); + return -1; + } + + Foo_var first_foo = first_foo_impl._this (env); + if (env.exception () != 0) + { + env.print_exception ("POA_Foo::_this"); + return -1; + } + + PortableServer::ObjectId_var second_oid = PortableServer::string_to_ObjectId ("secondFoo"); + first_poa->activate_object_with_id (second_oid.in (), + &second_foo_impl, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::activate_object_with_id"); + return -1; + } + + Foo_var second_foo = second_foo_impl._this (env); + if (env.exception () != 0) + { + env.print_exception ("POA_Foo::_this"); + return -1; + } + + PortableServer::ObjectId_var third_oid = PortableServer::string_to_ObjectId ("thirdFoo"); + CORBA::Object_var third_foo = first_poa->create_reference_with_id (third_oid.in (), "IDL:Foo:1.0", env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_reference_with_id"); + return -1; + } + + CORBA::String_var first_ior = orb->object_to_string (first_foo, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB::object_to_string"); + return -1; + } + + CORBA::String_var second_ior = orb->object_to_string (second_foo, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB::object_to_string"); + return -1; + } + + CORBA::String_var third_ior = orb->object_to_string (third_foo, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB::object_to_string"); + return -1; + } + + cout << first_ior.in () << endl; + cout << second_ior.in () << endl; + cout << third_ior.in () << endl; + + MyFooServant third_foo_impl (first_poa, 29); + first_poa->activate_object_with_id (third_oid.in (), + &third_foo_impl, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::activate_object_with_id"); + return -1; + } + + poa_manager->activate (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POAManager::activate"); + return -1; + } + + if (orb->run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1); + + root_poa->destroy (CORBA::B_TRUE, + CORBA::B_TRUE, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::destroy"); + return -1; + } + + return 0; +} diff --git a/TAO/tests/POA/Explicit_Activation/server.dsp b/TAO/tests/POA/Explicit_Activation/server.dsp new file mode 100644 index 00000000000..0421abf651e --- /dev/null +++ b/TAO/tests/POA/Explicit_Activation/server.dsp @@ -0,0 +1,91 @@ +# Microsoft Developer Studio Project File - Name="server" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=server - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak" CFG="server - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "server - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "server - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "server - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /I "..\..\..\.." /I "..\Generic_Servant\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 tao.lib ace.lib ..\Generic_Servant\server.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "server - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /I "..\..\..\.." /I "..\Generic_Servant\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 tao.lib aced.lib ..\Generic_Servant\server.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "server - Win32 Release"
+# Name "server - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\server.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/tests/POA/Explicit_Activation/svc.conf b/TAO/tests/POA/Explicit_Activation/svc.conf new file mode 100644 index 00000000000..43c6a486c92 --- /dev/null +++ b/TAO/tests/POA/Explicit_Activation/svc.conf @@ -0,0 +1,49 @@ +# $Id$ +# +# This file contains a sample ACE_Service_Config configuration +# file specifying the strategy factories utilized by an application +# using TAO. There are currently only two possible factories: +# Client_Strategy_Factory and Server_Strategy_Factory. These names +# must be used as the second argument to their corresponding line, +# because that's what the ORB uses to find the desired factory. +# +# Note that there are two unordinary characteristics of the way *this* +# file is set up: +# - both client and server strategies are specified in the same +# file, which would only make sense for co-located clients & servers +# - both of the factories are actually sourced out of libTAO.so +# (TAO.DLL on Win32), and they would normally be in a separate +# dll from the TAO ORB Core. +# +# The options which can be passed to the Resource Factory are: +# +# -ORBresources <which> +# where <which> can be 'global' to specify globally-held resources, +# or 'tss' to specify thread-specific resources. +# +# The options which can be passed to the Client are: +# <none currently> +# +# The options which can be passed to the Server are: +# +# -ORBconcurrency <which> +# where <which> can be 'thread-per-connection' to specify +# use of the ACE_Threaded_Strategy concurrency strategy, +# or 'reactive' to specify use of the ACE_Reactive_Strategy +# concurrency strategy. +# +# -ORBthreadflags <flags> +# specifies the default thread flags to use, where <flags> is a +# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP, +# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid +# on every platform. +# +# -ORBdemuxstrategy <which> +# where <which> can be one of 'dynamic', 'linear', 'active', or 'user', +# and specifies the type of object lookup strategy used internally. +# -ORBtablesize <unsigned> +# specifies the size of the object table +# +dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global" +dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() +dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128" diff --git a/TAO/tests/POA/FindPOA/FindPOA.cpp b/TAO/tests/POA/FindPOA/FindPOA.cpp new file mode 100644 index 00000000000..c907a58f650 --- /dev/null +++ b/TAO/tests/POA/FindPOA/FindPOA.cpp @@ -0,0 +1,120 @@ +#include "ace/streams.h" +#include "tao/corba.h" + +int +main (int argc, char **argv) +{ + CORBA::Environment env; + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB_init"); + return -1; + } + + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in(), env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + TAO_Adapter_Activator activator_impl; + PortableServer::AdapterActivator_var activator = activator_impl._this (env); + if (env.exception () != 0) + { + env.print_exception ("TAO_Adapter_Activator::_this"); + return -1; + } + + root_poa->the_activator (activator.in (), env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::the_activator"); + return -1; + } + + ACE_CString name = "firstPOA"; + PortableServer::POA_var first_poa = root_poa->find_POA (name.c_str (), + CORBA::B_TRUE, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::find_POA"); + return -1; + } + + name += TAO_POA::name_separator (); + name += "secondPOA"; + PortableServer::POA_var second_poa = root_poa->find_POA (name.c_str (), + CORBA::B_TRUE, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::find_POA"); + return -1; + } + + name = "thirdPOA"; + name += TAO_POA::name_separator (); + name += "forthPOA"; + name += TAO_POA::name_separator (); + name += "fifthPOA"; + + PortableServer::POA_var fifth_poa = root_poa->find_POA (name.c_str (), + CORBA::B_TRUE, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::find_POA"); + return -1; + } + + CORBA::String_var root_poa_name = root_poa->the_name (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + CORBA::String_var first_poa_name = first_poa->the_name (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + CORBA::String_var second_poa_name = second_poa->the_name (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + CORBA::String_var fifth_poa_name = fifth_poa->the_name (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + cout << root_poa_name.in () << endl; + cout << first_poa_name.in () << endl; + cout << second_poa_name.in () << endl; + cout << fifth_poa_name.in () << endl; + + // This should destroy all its children + root_poa->destroy (CORBA::B_TRUE, + CORBA::B_TRUE, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::destroy"); + return -1; + } + + return 0; +} diff --git a/TAO/tests/POA/FindPOA/FindPOA.dsp b/TAO/tests/POA/FindPOA/FindPOA.dsp new file mode 100644 index 00000000000..77859c2e61d --- /dev/null +++ b/TAO/tests/POA/FindPOA/FindPOA.dsp @@ -0,0 +1,91 @@ +# Microsoft Developer Studio Project File - Name="FindPOA" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=FindPOA - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "FindPOA.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "FindPOA.mak" CFG="FindPOA - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "FindPOA - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "FindPOA - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "FindPOA - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 tao.lib aced.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "FindPOA - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 tao.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "FindPOA - Win32 Release"
+# Name "FindPOA - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\FindPOA.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/tests/POA/FindPOA/FindPOA.dsw b/TAO/tests/POA/FindPOA/FindPOA.dsw new file mode 100644 index 00000000000..f63bde91efd --- /dev/null +++ b/TAO/tests/POA/FindPOA/FindPOA.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "FindPOA"=.\FindPOA.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/tests/POA/FindPOA/Makefile b/TAO/tests/POA/FindPOA/Makefile new file mode 100644 index 00000000000..731b7853b13 --- /dev/null +++ b/TAO/tests/POA/FindPOA/Makefile @@ -0,0 +1,45 @@ +# +# $Id$ +# + +BIN = FindPOA + +LSRC = $(addsuffix .cpp,$(BIN)) + +CPPFLAGS += -I$(TAO_ROOT) + +LDLIBS = -lTAO +LDFLAGS += -L$(TAO_ROOT)/tao + +VLDLIBS = $(LDLIBS:%=%$(VAR)) + +BUILD = $(VBIN) + +INSTALL = + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(TAO_ROOT)/rules.tao.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU + +ifndef TAO_ROOT +TAO_ROOT = $(ACE_ROOT)/TAO +endif + +#---------------------------------------------------------------------------- +# Dependencies +#---------------------------------------------------------------------------- + +# DO NOT DELETE THIS LINE -- g++dep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. + + + +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/tests/POA/Generic_Servant/Foo.idl b/TAO/tests/POA/Generic_Servant/Foo.idl new file mode 100644 index 00000000000..9e248115e9c --- /dev/null +++ b/TAO/tests/POA/Generic_Servant/Foo.idl @@ -0,0 +1,4 @@ +interface Foo +{ + long doit(); +}; diff --git a/TAO/tests/POA/Generic_Servant/Generic_Servant.dsw b/TAO/tests/POA/Generic_Servant/Generic_Servant.dsw new file mode 100644 index 00000000000..f6006d20cb7 --- /dev/null +++ b/TAO/tests/POA/Generic_Servant/Generic_Servant.dsw @@ -0,0 +1,41 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "client"=.\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "server"=.\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/tests/POA/Generic_Servant/MyFooServant.cpp b/TAO/tests/POA/Generic_Servant/MyFooServant.cpp new file mode 100644 index 00000000000..91f748c1900 --- /dev/null +++ b/TAO/tests/POA/Generic_Servant/MyFooServant.cpp @@ -0,0 +1,25 @@ +#include "MyFooServant.h" + +MyFooServant::MyFooServant (PortableServer::POA_ptr poa, + CORBA::Long value) + : poa_ (PortableServer::POA::_duplicate (poa)), + value_ (value) +{ +} + +MyFooServant::~MyFooServant (void) +{ +} + +PortableServer::POA_ptr +MyFooServant::_default_POA (CORBA::Environment &env) +{ + return PortableServer::POA::_duplicate (this->poa_); +} + +CORBA::Long +MyFooServant::doit (CORBA::Environment &env) +{ + return this->value_; +} + diff --git a/TAO/tests/POA/Generic_Servant/MyFooServant.h b/TAO/tests/POA/Generic_Servant/MyFooServant.h new file mode 100644 index 00000000000..3b7502cb466 --- /dev/null +++ b/TAO/tests/POA/Generic_Servant/MyFooServant.h @@ -0,0 +1,23 @@ +#if !defined (MYFOOSERVANT_H) +#define MYFOOSERVANT_H + +#include "FooS.h" + +class MyFooServant : public POA_Foo +{ +public: + MyFooServant (PortableServer::POA_ptr poa, + CORBA::Long value); + + virtual ~MyFooServant (void); + + virtual PortableServer::POA_ptr _default_POA (CORBA::Environment &env); + + virtual CORBA::Long doit (CORBA::Environment &env); + +protected: + PortableServer::POA_var poa_; + CORBA::Long value_; +}; + +#endif /* MYFOOSERVANT_H */ diff --git a/TAO/tests/POA/Generic_Servant/client.cpp b/TAO/tests/POA/Generic_Servant/client.cpp new file mode 100644 index 00000000000..e307cae1552 --- /dev/null +++ b/TAO/tests/POA/Generic_Servant/client.cpp @@ -0,0 +1,78 @@ +#include "ace/streams.h" +#include "ace/Get_Opt.h" +#include "FooC.h" + +char *ior = 0; + +static int +parse_args (int argc, char **argv) +{ + ACE_Get_Opt get_opts (argc, argv, "k:"); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.optarg; + break; + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s" + "-k IOR" + "\n", + argv [0]), + -1); + } + + if (ior == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Please specify the IOR for the servant"), -1); + + // Indicates successful parsing of command line. + return 0; +} + +int +main (int argc, char **argv) +{ + CORBA::Environment env; + + CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv, 0, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB_init"); + return -1; + } + + parse_args (argc, argv); + + CORBA::Object_var object = orb->string_to_object (ior, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB::string_to_object"); + return -1; + } + + Foo_var foo = Foo::_narrow (object.in (), env); + if (env.exception () != 0) + { + env.print_exception ("Foo::_bind"); + return -1; + } + + CORBA::Long result = foo->doit (env); + if (env.exception () != 0) + { + env.print_exception ("Foo::doit"); + return -1; + } + + cout << result << endl; + + CORBA::release (orb); + + return 0; +} + diff --git a/TAO/tests/POA/Generic_Servant/client.dsp b/TAO/tests/POA/Generic_Servant/client.dsp new file mode 100644 index 00000000000..87dfc4c3983 --- /dev/null +++ b/TAO/tests/POA/Generic_Servant/client.dsp @@ -0,0 +1,99 @@ +# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=client - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "client.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "client.mak" CFG="client - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "client - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib tao.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "client - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "client__"
+# PROP BASE Intermediate_Dir "client__"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 tao.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "client - Win32 Release"
+# Name "client - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\FooC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\FooS.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/tests/POA/Generic_Servant/server.dsp b/TAO/tests/POA/Generic_Servant/server.dsp new file mode 100644 index 00000000000..48a9adfa460 --- /dev/null +++ b/TAO/tests/POA/Generic_Servant/server.dsp @@ -0,0 +1,90 @@ +# Microsoft Developer Studio Project File - Name="server" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=server - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak" CFG="server - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "server - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "server - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+
+!IF "$(CFG)" == "server - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "server - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF
+
+# Begin Target
+
+# Name "server - Win32 Release"
+# Name "server - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\FooC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\FooS.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\MyFooServant.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/tests/POA/Makefile b/TAO/tests/POA/Makefile new file mode 100644 index 00000000000..e71ba4edacc --- /dev/null +++ b/TAO/tests/POA/Makefile @@ -0,0 +1,30 @@ +#---------------------------------------------------------------------------- +# @(#)Makefile 1.1 10/18/96 +# +# Makefile for the TAO tests +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Local macros +#---------------------------------------------------------------------------- + +DIRS = Explicit_Activation \ + FindPOA \ + Generic_Servant \ + NewPOA \ + On_Demand_Activation \ + RootPOA + +# The following test hasn't been updated yet +# Demux_Test + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU + diff --git a/TAO/tests/POA/NewPOA/Makefile b/TAO/tests/POA/NewPOA/Makefile new file mode 100644 index 00000000000..eece9f148e9 --- /dev/null +++ b/TAO/tests/POA/NewPOA/Makefile @@ -0,0 +1,45 @@ +# +# $Id$ +# + +BIN = NewPOA + +LSRC = $(addsuffix .cpp,$(BIN)) + +CPPFLAGS += -I$(TAO_ROOT) + +LDLIBS = -lTAO +LDFLAGS += -L$(TAO_ROOT)/tao + +VLDLIBS = $(LDLIBS:%=%$(VAR)) + +BUILD = $(VBIN) + +INSTALL = + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(TAO_ROOT)/rules.tao.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU + +ifndef TAO_ROOT +TAO_ROOT = $(ACE_ROOT)/TAO +endif + +#---------------------------------------------------------------------------- +# Dependencies +#---------------------------------------------------------------------------- + +# DO NOT DELETE THIS LINE -- g++dep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. + + + +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/tests/POA/NewPOA/NewPOA.cpp b/TAO/tests/POA/NewPOA/NewPOA.cpp new file mode 100644 index 00000000000..628b6f52041 --- /dev/null +++ b/TAO/tests/POA/NewPOA/NewPOA.cpp @@ -0,0 +1,127 @@ +#include "ace/streams.h" +#include "tao/corba.h" + +int +main (int argc, char **argv) +{ + CORBA::Environment env; + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB_init"); + return -1; + } + + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in(), env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + // CORBA::PolicyList policies (2); + PortableServer::PolicyList policies (2); + policies.length (2); + policies[0] = root_poa->create_thread_policy (PortableServer::ORB_CTRL_MODEL, env); + policies[1] = root_poa->create_lifespan_policy (PortableServer::TRANSIENT, env); + + ACE_CString name = "firstPOA"; + PortableServer::POA_var first_poa = root_poa->create_POA (name.c_str (), + PortableServer::POAManager::_nil(), + policies, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + + name += TAO_POA::name_separator (); + name += "secondPOA"; + PortableServer::POA_var second_poa = root_poa->create_POA (name.c_str (), + PortableServer::POAManager::_nil(), + policies, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + + name = "thirdPOA"; + name += TAO_POA::name_separator (); + name += "forthPOA"; + name += TAO_POA::name_separator (); + name += "fifthPOA"; + + PortableServer::POA_var fifth_poa = root_poa->create_POA (name.c_str (), + PortableServer::POAManager::_nil(), + policies, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + + for (CORBA::ULong i = 0; + i < policies.length () && env.exception () == 0; + ++i) + { + PortableServer::Policy_ptr policy = policies[i]; + policy->destroy (env); + } + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + + CORBA::String_var root_poa_name = root_poa->the_name (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + CORBA::String_var first_poa_name = first_poa->the_name (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + CORBA::String_var second_poa_name = second_poa->the_name (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + CORBA::String_var fifth_poa_name = fifth_poa->the_name (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + cout << root_poa_name.in () << endl; + cout << first_poa_name.in () << endl; + cout << second_poa_name.in () << endl; + cout << fifth_poa_name.in () << endl; + + // This should destroy all its children + root_poa->destroy (CORBA::B_TRUE, + CORBA::B_TRUE, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::destroy"); + return -1; + } + + return 0; +} diff --git a/TAO/tests/POA/NewPOA/NewPOA.dsp b/TAO/tests/POA/NewPOA/NewPOA.dsp new file mode 100644 index 00000000000..8ebd8d2b115 --- /dev/null +++ b/TAO/tests/POA/NewPOA/NewPOA.dsp @@ -0,0 +1,91 @@ +# Microsoft Developer Studio Project File - Name="NewPOA" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=NewPOA - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "NewPOA.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "NewPOA.mak" CFG="NewPOA - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "NewPOA - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "NewPOA - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "NewPOA - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib tao.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "NewPOA - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 tao.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "NewPOA - Win32 Release"
+# Name "NewPOA - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\NewPOA.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/tests/POA/NewPOA/NewPOA.dsw b/TAO/tests/POA/NewPOA/NewPOA.dsw new file mode 100644 index 00000000000..e7ce2ae3196 --- /dev/null +++ b/TAO/tests/POA/NewPOA/NewPOA.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "NewPOA"=.\NewPOA.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/tests/POA/On_Demand_Activation/On_Demand_Activation.dsw b/TAO/tests/POA/On_Demand_Activation/On_Demand_Activation.dsw new file mode 100644 index 00000000000..293f7320fc8 --- /dev/null +++ b/TAO/tests/POA/On_Demand_Activation/On_Demand_Activation.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "server"=.\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/tests/POA/On_Demand_Activation/Servant_Activator.cpp b/TAO/tests/POA/On_Demand_Activation/Servant_Activator.cpp new file mode 100644 index 00000000000..ddecaad4177 --- /dev/null +++ b/TAO/tests/POA/On_Demand_Activation/Servant_Activator.cpp @@ -0,0 +1,33 @@ +#include "Servant_Activator.h" +#include "MyFooServant.h" + +PortableServer::Servant +MyFooServantActivator::incarnate (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr poa, + CORBA::Environment &env) +{ + CORBA::String_var s = PortableServer::ObjectId_to_string (oid); + if (ACE_OS::strstr (s.in (), "Foo") != 0) + { + return new MyFooServant (poa, 27); + } + else + { + CORBA::Exception *exception = new CORBA::OBJECT_NOT_EXIST (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; + } +} + +void +MyFooServantActivator::etherealize (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr poa, + PortableServer::Servant servant, + CORBA::Boolean cleanup_in_progress, + CORBA::Boolean remaining_activations, + CORBA::Environment &env) +{ + if (remaining_activations == CORBA::B_FALSE) + delete servant; +} + diff --git a/TAO/tests/POA/On_Demand_Activation/Servant_Activator.h b/TAO/tests/POA/On_Demand_Activation/Servant_Activator.h new file mode 100644 index 00000000000..1792284649b --- /dev/null +++ b/TAO/tests/POA/On_Demand_Activation/Servant_Activator.h @@ -0,0 +1,17 @@ +#include "tao/corba.h" + +class MyFooServantActivator : public POA_PortableServer::ServantActivator +{ +public: + virtual PortableServer::Servant incarnate (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr poa, + CORBA::Environment &env); + + virtual void etherealize (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr adapter, + PortableServer::Servant servant, + CORBA::Boolean cleanup_in_progress, + CORBA::Boolean remaining_activations, + CORBA::Environment &env); +}; + diff --git a/TAO/tests/POA/On_Demand_Activation/Servant_Locator.cpp b/TAO/tests/POA/On_Demand_Activation/Servant_Locator.cpp new file mode 100644 index 00000000000..6b5df82f885 --- /dev/null +++ b/TAO/tests/POA/On_Demand_Activation/Servant_Locator.cpp @@ -0,0 +1,43 @@ +#include "Servant_Locator.h" +#include "MyFooServant.h" + +MyFooServantLocator::MyFooServantLocator (void) + : counter_ (0) +{ +} + + +PortableServer::Servant +MyFooServantLocator::preinvoke (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr poa, + const char *operation, + PortableServer::ServantLocator::Cookie &cookie, + CORBA::Environment &env) +{ + CORBA::String_var s = PortableServer::ObjectId_to_string (oid); + if (ACE_OS::strstr (s.in (), "Foo") != 0) + { + PortableServer::Servant servant = new MyFooServant (poa, ++this->counter_); + cookie = servant; + return servant; + } + else + { + CORBA::Exception *exception = new CORBA::OBJECT_NOT_EXIST (CORBA::COMPLETED_NO); + env.exception (exception); + return 0; + } +} + +void +MyFooServantLocator::postinvoke (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr poa, + const char *operation, + PortableServer::ServantLocator::Cookie cookie, + PortableServer::Servant servant, + CORBA::Environment &env) +{ + PortableServer::Servant my_servant = (PortableServer::Servant) cookie; + ACE_ASSERT (servant == my_servant); + delete servant; +} diff --git a/TAO/tests/POA/On_Demand_Activation/Servant_Locator.h b/TAO/tests/POA/On_Demand_Activation/Servant_Locator.h new file mode 100644 index 00000000000..6abfb278eb5 --- /dev/null +++ b/TAO/tests/POA/On_Demand_Activation/Servant_Locator.h @@ -0,0 +1,24 @@ +#include "tao/corba.h" + +class MyFooServantLocator : public POA_PortableServer::ServantLocator +{ +public: + MyFooServantLocator (void); + + virtual PortableServer::Servant preinvoke (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr adapter, + const char *operation, + PortableServer::ServantLocator::Cookie &the_cookie, + CORBA::Environment &env); + + virtual void postinvoke (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr adapter, + const char *operation, + PortableServer::ServantLocator::Cookie the_cookie, + PortableServer::Servant the_servant, + CORBA::Environment &env); +private: + + int counter_; +}; + diff --git a/TAO/tests/POA/On_Demand_Activation/server.cpp b/TAO/tests/POA/On_Demand_Activation/server.cpp new file mode 100644 index 00000000000..a167064d1a2 --- /dev/null +++ b/TAO/tests/POA/On_Demand_Activation/server.cpp @@ -0,0 +1,186 @@ +#include "ace/streams.h" +#include "Servant_Activator.h" +#include "Servant_Locator.h" + +int +main (int argc, char **argv) +{ + CORBA::Environment env; + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB_init"); + return -1; + } + + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj, env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::the_POAManager"); + return -1; + } + + PortableServer::POA_var first_poa; + { + // CORBA::PolicyList policies (4); + PortableServer::PolicyList policies (4); + policies.length (4); + policies[0] = root_poa->create_id_assignment_policy (PortableServer::USER_ID, env); + policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT, env); + policies[2] = root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER, env); + policies[3] = root_poa->create_servant_retention_policy (PortableServer::RETAIN, env); + + ACE_CString name = "firstPOA"; + first_poa = root_poa->create_POA (name.c_str (), + poa_manager.in (), + policies, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + + for (CORBA::ULong i = 0; + i < policies.length () && env.exception () == 0; + ++i) + { + PortableServer::Policy_ptr policy = policies[i]; + policy->destroy (env); + } + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + } + + PortableServer::POA_var second_poa; + { + // CORBA::PolicyList policies (4); + PortableServer::PolicyList policies (4); + policies.length (4); + policies[0] = root_poa->create_id_assignment_policy (PortableServer::USER_ID, env); + policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT, env); + policies[2] = root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER, env); + policies[3] = root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN, env); + + ACE_CString name = "secondPOA"; + second_poa = root_poa->create_POA (name.c_str (), + poa_manager.in (), + policies, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + + for (CORBA::ULong i = 0; + i < policies.length () && env.exception () == 0; + ++i) + { + PortableServer::Policy_ptr policy = policies[i]; + policy->destroy (env); + } + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_POA"); + return -1; + } + } + + MyFooServantActivator servant_activator_impl; + PortableServer::ServantActivator_var servant_activator = servant_activator_impl._this (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POAManager::_this"); + return -1; + } + + first_poa->set_servant_manager (servant_activator.in (), env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POAManager::set_servant_manager"); + return -1; + } + + PortableServer::ObjectId_var first_foo_oid = PortableServer::string_to_ObjectId ("firstFoo"); + CORBA::Object_var first_foo = first_poa->create_reference_with_id (first_foo_oid.in (), "IDL:Foo:1.0", env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_reference_with_id"); + return -1; + } + + MyFooServantLocator servant_locator_impl; + PortableServer::ServantLocator_var servant_locator = servant_locator_impl._this (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POAManager::_this"); + return -1; + } + + second_poa->set_servant_manager (servant_locator.in (), env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POAManager::set_servant_manager"); + return -1; + } + + PortableServer::ObjectId_var second_foo_oid = PortableServer::string_to_ObjectId ("secondFoo"); + CORBA::Object_var second_foo = second_poa->create_reference_with_id (second_foo_oid.in (), "IDL:Foo:1.0", env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::create_reference_with_id"); + return -1; + } + + CORBA::String_var first_foo_ior = orb->object_to_string (first_foo, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB::object_to_string"); + return -1; + } + + CORBA::String_var second_foo_ior = orb->object_to_string (second_foo, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB::object_to_string"); + return -1; + } + + cout << first_foo_ior.in () << endl; + cout << second_foo_ior.in () << endl; + + poa_manager->activate (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POAManager::activate"); + return -1; + } + + if (orb->run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1); + + root_poa->destroy (CORBA::B_TRUE, + CORBA::B_TRUE, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::destroy"); + return -1; + } + + return 0; +} diff --git a/TAO/tests/POA/On_Demand_Activation/server.dsp b/TAO/tests/POA/On_Demand_Activation/server.dsp new file mode 100644 index 00000000000..2d22f5a98a9 --- /dev/null +++ b/TAO/tests/POA/On_Demand_Activation/server.dsp @@ -0,0 +1,99 @@ +# Microsoft Developer Studio Project File - Name="server" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=server - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak" CFG="server - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "server - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "server - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "server - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /I "..\..\..\.." /I "..\Generic_Servant\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 tao.lib ace.lib ..\Generic_Servant\server.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "server - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /I "..\..\..\.." /I "..\Generic_Servant\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 tao.lib aced.lib ..\Generic_Servant\server.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "server - Win32 Release"
+# Name "server - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\Servant_Activator.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Servant_Locator.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\server.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/tests/POA/On_Demand_Activation/svc.conf b/TAO/tests/POA/On_Demand_Activation/svc.conf new file mode 100644 index 00000000000..43c6a486c92 --- /dev/null +++ b/TAO/tests/POA/On_Demand_Activation/svc.conf @@ -0,0 +1,49 @@ +# $Id$ +# +# This file contains a sample ACE_Service_Config configuration +# file specifying the strategy factories utilized by an application +# using TAO. There are currently only two possible factories: +# Client_Strategy_Factory and Server_Strategy_Factory. These names +# must be used as the second argument to their corresponding line, +# because that's what the ORB uses to find the desired factory. +# +# Note that there are two unordinary characteristics of the way *this* +# file is set up: +# - both client and server strategies are specified in the same +# file, which would only make sense for co-located clients & servers +# - both of the factories are actually sourced out of libTAO.so +# (TAO.DLL on Win32), and they would normally be in a separate +# dll from the TAO ORB Core. +# +# The options which can be passed to the Resource Factory are: +# +# -ORBresources <which> +# where <which> can be 'global' to specify globally-held resources, +# or 'tss' to specify thread-specific resources. +# +# The options which can be passed to the Client are: +# <none currently> +# +# The options which can be passed to the Server are: +# +# -ORBconcurrency <which> +# where <which> can be 'thread-per-connection' to specify +# use of the ACE_Threaded_Strategy concurrency strategy, +# or 'reactive' to specify use of the ACE_Reactive_Strategy +# concurrency strategy. +# +# -ORBthreadflags <flags> +# specifies the default thread flags to use, where <flags> is a +# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP, +# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid +# on every platform. +# +# -ORBdemuxstrategy <which> +# where <which> can be one of 'dynamic', 'linear', 'active', or 'user', +# and specifies the type of object lookup strategy used internally. +# -ORBtablesize <unsigned> +# specifies the size of the object table +# +dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global" +dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() +dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128" diff --git a/TAO/tests/POA/RootPOA/Makefile b/TAO/tests/POA/RootPOA/Makefile new file mode 100644 index 00000000000..66687935b3b --- /dev/null +++ b/TAO/tests/POA/RootPOA/Makefile @@ -0,0 +1,44 @@ +# +# $Id$ +# + +BIN = RootPOA + +LSRC = $(addsuffix .cpp,$(BIN)) + +CPPFLAGS += -I$(TAO_ROOT) + +LDLIBS = -lTAO +LDFLAGS += -L$(TAO_ROOT)/tao + +VLDLIBS = $(LDLIBS:%=%$(VAR)) + +BUILD = $(VBIN) + +INSTALL = + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU + +ifndef TAO_ROOT +TAO_ROOT = $(ACE_ROOT)/TAO +endif + +#---------------------------------------------------------------------------- +# Dependencies +#---------------------------------------------------------------------------- + +# DO NOT DELETE THIS LINE -- g++dep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. + + + +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/tests/POA/RootPOA/RootPOA.cpp b/TAO/tests/POA/RootPOA/RootPOA.cpp new file mode 100644 index 00000000000..40acaf4b170 --- /dev/null +++ b/TAO/tests/POA/RootPOA/RootPOA.cpp @@ -0,0 +1,44 @@ +#include "ace/streams.h" +#include "tao/corba.h" + +int +main (int argc, char **argv) +{ + CORBA::Environment env; + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, env); + if (env.exception () != 0) + { + env.print_exception ("CORBA::ORB_init"); + return -1; + } + + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in(), env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + CORBA::String_var poa_name = root_poa->the_name (env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::_narrow"); + return -1; + } + + cout << poa_name.in () << endl; + + root_poa->destroy (CORBA::B_TRUE, + CORBA::B_TRUE, + env); + if (env.exception () != 0) + { + env.print_exception ("PortableServer::POA::destroy"); + return -1; + } + + return 0; +} diff --git a/TAO/tests/POA/RootPOA/RootPOA.dsp b/TAO/tests/POA/RootPOA/RootPOA.dsp new file mode 100644 index 00000000000..cd00fd9b073 --- /dev/null +++ b/TAO/tests/POA/RootPOA/RootPOA.dsp @@ -0,0 +1,91 @@ +# Microsoft Developer Studio Project File - Name="RootPOA" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=RootPOA - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "RootPOA.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "RootPOA.mak" CFG="RootPOA - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "RootPOA - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "RootPOA - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "RootPOA - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib tao.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "RootPOA - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /I "..\..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 tao.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "RootPOA - Win32 Release"
+# Name "RootPOA - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\RootPOA.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/tests/POA/RootPOA/RootPOA.dsw b/TAO/tests/POA/RootPOA/RootPOA.dsw new file mode 100644 index 00000000000..a14deafc332 --- /dev/null +++ b/TAO/tests/POA/RootPOA/RootPOA.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "RootPOA"=.\RootPOA.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/tests/README b/TAO/tests/README index 86825081c8e..bc68c840e63 100644 --- a/TAO/tests/README +++ b/TAO/tests/README @@ -13,3 +13,11 @@ The individual directories contain READMEs on how to run the tests. Cubit example. The servant returns the cube of the number sent to it by the client. + + . POA + + Contains various small tests of POA features. + + . Param_Test + + Tests features of the typecode interpreter. |