diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-10-07 21:51:22 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-10-07 21:51:22 +0000 |
commit | c38a590d9cd00aa267adc49e8d024c5465d8520d (patch) | |
tree | 284f6dc0ee2f7c4f26536a876d0345102d6262c4 | |
parent | 0bfabf17e90bab43608c953eb73d4632af204327 (diff) | |
download | ATCD-c38a590d9cd00aa267adc49e8d024c5465d8520d.tar.gz |
ChangeLogTag:Tue Oct 7 16:48:08 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog_ref | 19 | ||||
-rw-r--r-- | TAO/TAO_IDL/Makefile.BE | 270 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_interface.cpp | 21 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_valuetype.cpp | 14 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp | 38 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp | 382 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp | 7 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_root.cpp | 1 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_root/root.cpp | 25 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_traits.cpp | 26 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_visitor_component/component_cs.h | 5 |
11 files changed, 477 insertions, 331 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref index 357d68519ec..08de6e74567 100644 --- a/TAO/ChangeLog_ref +++ b/TAO/ChangeLog_ref @@ -1,3 +1,22 @@ +Tue Oct 7 16:48:08 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> + + * TAO_IDL/Makefile.BE: Added the be_visitor_traits.cpp back into + the Makefile. + + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_valuetype.cpp: + * TAO_IDL/be/be_visitor_root.cpp: + * TAO_IDL/be/be_visitor_traits.cpp: + * TAO_IDL/be/be_visitor_component/component_ch.cpp: + * TAO_IDL/be/be_visitor_component/component_cs.cpp: + * TAO_IDL/be/be_visitor_component/component_sh.cpp: + * TAO_IDL/be/be_visitor_root/root.cpp: + * TAO_IDL/be_include/be_visitor_component/component_cs.h: + + Reverted this change "Wed Oct 1 10:57:12 2003 Jeff Parsons + <j.parsons@vanderbilt.edu>" that specialized object traits + outside the generated user provided namepsace. + Tue Oct 7 09:35:57 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> * TAO_IDL/be/be_visitor_traits.cpp: diff --git a/TAO/TAO_IDL/Makefile.BE b/TAO/TAO_IDL/Makefile.BE index 99938b7cc09..ab296bc39b1 100644 --- a/TAO/TAO_IDL/Makefile.BE +++ b/TAO/TAO_IDL/Makefile.BE @@ -98,6 +98,7 @@ FILES = be/be_array \ be/be_visitor_sequence \ be/be_visitor_structure \ be/be_visitor_structure_fwd \ + be/be_visitor_traits \ be/be_visitor_arg_traits \ be/be_visitor_tmplinst \ be/be_visitor_typecode \ @@ -4254,7 +4255,32 @@ realclean: clean $(ACE_ROOT)/ace/SString.i \ include/ast_predefined_type.h include/ast_concrete_type.h \ be_include/be_argument.h include/ast_argument.h include/ast_field.h \ - be_include/be_visitor.h + be_include/be_visitor.h include/global_extern.h include/idl_global.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Node.h \ + $(ACE_ROOT)/ace/Node.cpp \ + $(ACE_ROOT)/ace/Array_Base.h \ + $(ACE_ROOT)/ace/Array_Base.inl \ + $(ACE_ROOT)/ace/Array_Base.cpp \ + $(ACE_ROOT)/ace/Unbounded_Set.h \ + $(ACE_ROOT)/ace/Unbounded_Set.inl \ + $(ACE_ROOT)/ace/Unbounded_Set.cpp \ + $(ACE_ROOT)/ace/Unbounded_Queue.h \ + $(ACE_ROOT)/ace/Unbounded_Queue.inl \ + $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + include/utl_stack.h .obj/be_operation_strategy.o .obj/be_operation_strategy.so .shobj/be_operation_strategy.o .shobj/be_operation_strategy.so: be/be_operation_strategy.cpp \ be_include/be_operation_strategy.h be_include/be_codegen.h \ @@ -8560,7 +8586,24 @@ realclean: clean include/ast_operation.h be_include/be_predefined_type.h \ include/ast_predefined_type.h include/ast_concrete_type.h \ be_include/be_argument.h include/ast_argument.h \ - include/utl_identifier.h + include/utl_identifier.h include/global_extern.h include/idl_global.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Array_Base.h \ + $(ACE_ROOT)/ace/Array_Base.inl \ + $(ACE_ROOT)/ace/Array_Base.cpp \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + include/utl_stack.h .obj/be_visitor_argument.o .obj/be_visitor_argument.so .shobj/be_visitor_argument.o .shobj/be_visitor_argument.so: be/be_visitor_argument.cpp \ be_include/be_visitor_argument.h include/idl_defines.h \ @@ -14675,9 +14718,8 @@ realclean: clean be_include/be_visitor_component_fwd/cdr_op_ch.h \ be_include/be_visitor_component_fwd/cdr_op_ci.h \ be_include/be_visitor_home.h be_include/be_visitor_home/home_ch.h \ - be_include/be_visitor_traits.h be_include/be_visitor_arg_traits.h \ - be_include/be_visitor_tmplinst.h include/ast_argument.h \ - be_include/be_visitor_tmplinst/tmplinst.h \ + be_include/be_visitor_arg_traits.h be_include/be_visitor_tmplinst.h \ + include/ast_argument.h be_include/be_visitor_tmplinst/tmplinst.h \ be_include/be_visitor_tmplinst/arg_tmplinst.h \ be_include/be_visitor_tmplinst/tmplinst_cs.h \ be_include/be_visitor_tmplinst/tmplinst_ss.h \ @@ -15600,220 +15642,6 @@ realclean: clean be_include/be_visitor_context.h be_include/be_helper.h \ be/be_visitor_structure_fwd/structure_fwd_ch.cpp -.obj/be_visitor_traits.o .obj/be_visitor_traits.so .shobj/be_visitor_traits.o .shobj/be_visitor_traits.so: be/be_visitor_traits.cpp \ - be_include/be_visitor_traits.h be_include/be_visitor_scope.h \ - be_include/be_visitor_decl.h be_include/be_visitor.h \ - be_include/be_codegen.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/TSS_T.h \ - $(ACE_ROOT)/ace/Lock.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/Lock.inl \ - $(ACE_ROOT)/ace/Thread_Mutex.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/os_include/os_errno.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/os_include/os_dirent.h \ - $(ACE_ROOT)/ace/os_include/sys/os_types.h \ - $(ACE_ROOT)/ace/os_include/os_stddef.h \ - $(ACE_ROOT)/ace/os_include/os_limits.h \ - $(ACE_ROOT)/ace/os_include/os_unistd.h \ - $(ACE_ROOT)/ace/os_include/os_inttypes.h \ - $(ACE_ROOT)/ace/os_include/os_stdint.h \ - $(ACE_ROOT)/ace/os_include/os_stdio.h \ - $(ACE_ROOT)/ace/os_include/os_stdarg.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/os_include/os_float.h \ - $(ACE_ROOT)/ace/os_include/os_stdlib.h \ - $(ACE_ROOT)/ace/os_include/sys/os_wait.h \ - $(ACE_ROOT)/ace/os_include/os_signal.h \ - $(ACE_ROOT)/ace/os_include/os_time.h \ - $(ACE_ROOT)/ace/os_include/os_ucontext.h \ - $(ACE_ROOT)/ace/os_include/sys/os_resource.h \ - $(ACE_ROOT)/ace/os_include/sys/os_time.h \ - $(ACE_ROOT)/ace/os_include/sys/os_select.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/os_include/os_string.h \ - $(ACE_ROOT)/ace/os_include/os_strings.h \ - $(ACE_ROOT)/ace/os_include/os_ctype.h \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/os_include/os_dlfcn.h \ - $(ACE_ROOT)/ace/os_include/sys/os_mman.h \ - $(ACE_ROOT)/ace/os_include/os_netdb.h \ - $(ACE_ROOT)/ace/os_include/netinet/os_in.h \ - $(ACE_ROOT)/ace/os_include/sys/os_socket.h \ - $(ACE_ROOT)/ace/os_include/sys/os_uio.h \ - $(ACE_ROOT)/ace/os_include/net/os_if.h \ - $(ACE_ROOT)/ace/os_include/sys/os_sem.h \ - $(ACE_ROOT)/ace/os_include/sys/os_ipc.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/Time_Value.inl \ - $(ACE_ROOT)/ace/Default_Constants.h \ - $(ACE_ROOT)/ace/Global_Macros.h \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/os_include/os_pthread.h \ - $(ACE_ROOT)/ace/os_include/os_assert.h \ - $(ACE_ROOT)/ace/os_include/os_fcntl.h \ - $(ACE_ROOT)/ace/os_include/sys/os_stat.h \ - $(ACE_ROOT)/ace/iosfwd.h \ - $(ACE_ROOT)/ace/os_include/arpa/os_inet.h \ - $(ACE_ROOT)/ace/os_include/netinet/os_tcp.h \ - $(ACE_ROOT)/ace/os_include/sys/os_shm.h \ - $(ACE_ROOT)/ace/os_include/os_pwd.h \ - $(ACE_ROOT)/ace/os_include/os_stropts.h \ - $(ACE_ROOT)/ace/os_include/os_termios.h \ - $(ACE_ROOT)/ace/os_include/os_aio.h \ - $(ACE_ROOT)/ace/os_include/sys/os_un.h \ - $(ACE_ROOT)/ace/os_include/os_poll.h \ - $(ACE_ROOT)/ace/os_include/sys/os_msg.h \ - $(ACE_ROOT)/ace/os_include/sys/os_utsname.h \ - $(ACE_ROOT)/ace/os_include/os_syslog.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Thread_Mutex.inl \ - $(ACE_ROOT)/ace/TSS_T.inl \ - $(ACE_ROOT)/ace/TSS_T.cpp \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Guard_T.h \ - $(ACE_ROOT)/ace/Guard_T.inl \ - $(ACE_ROOT)/ace/Guard_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Recursive_Thread_Mutex.h \ - $(ACE_ROOT)/ace/Recursive_Thread_Mutex.inl \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Framework_Component.h \ - $(ACE_ROOT)/ace/Framework_Component.inl \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Framework_Component_T.h \ - $(ACE_ROOT)/ace/Framework_Component_T.inl \ - $(ACE_ROOT)/ace/Framework_Component_T.cpp \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/Auto_Event.h \ - $(ACE_ROOT)/ace/Event.h \ - $(ACE_ROOT)/ace/Event.inl \ - $(ACE_ROOT)/ace/Auto_Event.inl \ - $(ACE_ROOT)/ace/Barrier.h \ - $(ACE_ROOT)/ace/Condition_Thread_Mutex.h \ - $(ACE_ROOT)/ace/Condition_Thread_Mutex.inl \ - $(ACE_ROOT)/ace/Barrier.inl \ - $(ACE_ROOT)/ace/Condition_Recursive_Thread_Mutex.h \ - $(ACE_ROOT)/ace/Condition_Recursive_Thread_Mutex.inl \ - $(ACE_ROOT)/ace/Manual_Event.h \ - $(ACE_ROOT)/ace/Manual_Event.inl \ - $(ACE_ROOT)/ace/Mutex.h \ - $(ACE_ROOT)/ace/Mutex.inl \ - $(ACE_ROOT)/ace/Null_Barrier.h \ - $(ACE_ROOT)/ace/Null_Condition.h \ - $(ACE_ROOT)/ace/Null_Mutex.h \ - $(ACE_ROOT)/ace/Null_Semaphore.h \ - $(ACE_ROOT)/ace/RW_Mutex.h \ - $(ACE_ROOT)/ace/RW_Mutex.inl \ - $(ACE_ROOT)/ace/RW_Thread_Mutex.h \ - $(ACE_ROOT)/ace/RW_Thread_Mutex.inl \ - $(ACE_ROOT)/ace/Semaphore.h \ - $(ACE_ROOT)/ace/Semaphore.inl \ - $(ACE_ROOT)/ace/Thread_Semaphore.h \ - $(ACE_ROOT)/ace/Thread_Semaphore.inl \ - $(ACE_ROOT)/ace/TSS_Adapter.h \ - $(ACE_ROOT)/ace/TSS_Adapter.inl \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Lock_Adapter_T.h \ - $(ACE_ROOT)/ace/Lock_Adapter_T.inl \ - $(ACE_ROOT)/ace/Lock_Adapter_T.cpp \ - $(ACE_ROOT)/ace/Reverse_Lock_T.h \ - $(ACE_ROOT)/ace/Reverse_Lock_T.inl \ - $(ACE_ROOT)/ace/Reverse_Lock_T.cpp \ - $(ACE_ROOT)/ace/Condition_T.h \ - $(ACE_ROOT)/ace/Condition_T.inl \ - $(ACE_ROOT)/ace/Condition_T.cpp \ - $(ACE_ROOT)/ace/Synch_Traits.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - be_include/TAO_IDL_BE_Export.h include/idl_bool.h \ - be_include/be_visitor_context.h be_include/be_root.h \ - be_include/be_decl.h include/ast_decl.h include/utl_scoped_name.h \ - include/utl_idlist.h include/utl_list.h include/TAO_IDL_FE_Export.h \ - $(ACE_ROOT)/ace/streams.h \ - include/idl_narrow.h be_include/be_scope.h include/utl_scope.h \ - include/ast_expression.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/CDR_Base.h \ - $(ACE_ROOT)/ace/CDR_Base.inl \ - $(ACE_ROOT)/ace/SStringfwd.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - include/ast_typedef.h include/ast_type.h include/ast_root.h \ - include/ast_module.h \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - be_include/be_module.h be_include/be_interface.h be_include/be_type.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/String_Base.h \ - $(ACE_ROOT)/ace/String_Base_Const.h \ - $(ACE_ROOT)/ace/String_Base.i \ - $(ACE_ROOT)/ace/String_Base.cpp \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/SString.i \ - include/ast_interface.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - be_include/be_valuetype.h include/ast_valuetype.h include/ast_field.h \ - be_include/be_interface_fwd.h include/ast_interface_fwd.h \ - be_include/be_valuetype_fwd.h include/ast_valuetype_fwd.h \ - be_include/be_eventtype.h include/ast_eventtype.h \ - be_include/be_eventtype_fwd.h include/ast_eventtype_fwd.h \ - be_include/be_typedef.h be_include/be_helper.h be_include/be_extern.h \ - be_include/be_global.h - .obj/be_visitor_arg_traits.o .obj/be_visitor_arg_traits.so .shobj/be_visitor_arg_traits.o .shobj/be_visitor_arg_traits.so: be/be_visitor_arg_traits.cpp \ be_include/be_visitor_arg_traits.h be_include/be_visitor_scope.h \ be_include/be_visitor_decl.h be_include/be_visitor.h \ @@ -16026,7 +15854,8 @@ realclean: clean be_include/be_eventtype.h include/ast_eventtype.h \ be_include/be_eventtype_fwd.h include/ast_eventtype_fwd.h \ be_include/be_array.h include/ast_array.h include/ast_concrete_type.h \ - be_include/be_enum.h include/ast_enum.h be_include/be_sequence.h \ + be_include/be_enum.h include/ast_enum.h be_include/be_predefined_type.h \ + include/ast_predefined_type.h be_include/be_sequence.h \ include/ast_sequence.h be_include/be_string.h include/ast_string.h \ be_include/be_structure.h include/ast_structure.h be_include/be_field.h \ be_include/be_union.h include/ast_union.h be_include/be_union_branch.h \ @@ -16724,6 +16553,7 @@ realclean: clean $(ACE_ROOT)/ace/Node.cpp \ $(ACE_ROOT)/ace/Unbounded_Queue.inl \ $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ + be_include/be_interface_fwd.h include/ast_interface_fwd.h \ be_include/be_predefined_type.h include/ast_predefined_type.h \ be_include/be_sequence.h include/ast_sequence.h be_include/be_string.h \ include/ast_string.h be_include/be_structure.h include/ast_structure.h \ diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index 99710218363..78e41dc4c9f 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -612,6 +612,26 @@ be_interface:: gen_var_out_seq_decls (void) << "class " << lname << ";" << be_nl << "typedef " << lname << " *" << lname << "_ptr;"; +#if 0 + *os << be_nl << be_nl + << "ACE_TEMPLATE_SPECIALIZATION" << be_nl + << "struct " << be_global->stub_export_macro () << " TAO::Objref_Traits<" + << lname << ">" << be_nl + << "{" << be_idt_nl + << "static " << lname << "_ptr tao_duplicate (" + << be_idt << be_idt_nl + << lname << "_ptr" << be_uidt_nl << ");" + << be_uidt_nl + << "static void tao_release (" << be_idt << be_idt_nl + << lname << "_ptr" << be_uidt_nl + << ");" << be_uidt_nl + << "static " << lname << "_ptr tao_nil (void);" << be_nl + << "static CORBA::Boolean tao_marshal (" << be_idt << be_idt_nl + << lname << "_ptr," << be_nl + << "TAO_OutputCDR &" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl + << "};"; + *os << be_nl << be_nl << "ACE_TEMPLATE_SPECIALIZATION" << be_nl << "struct " << be_global->stub_export_macro () << " TAO::Objref_Traits<" @@ -630,6 +650,7 @@ be_interface:: gen_var_out_seq_decls (void) << "TAO_OutputCDR &" << be_uidt_nl << ");" << be_uidt << be_uidt_nl << "};"; +#endif /*if 0*/ *os << be_nl << be_nl << "typedef" << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_valuetype.cpp b/TAO/TAO_IDL/be/be_valuetype.cpp index 76cb2d977a3..22d9f0bd1c1 100644 --- a/TAO/TAO_IDL/be/be_valuetype.cpp +++ b/TAO/TAO_IDL/be/be_valuetype.cpp @@ -533,19 +533,7 @@ be_valuetype:: gen_var_out_seq_decls (void) const char *lname = this->local_name (); *os << be_nl << be_nl - << "class " << lname << ";"; - - *os << be_nl << be_nl - << "ACE_TEMPLATE_SPECIALIZATION" << be_nl - << "struct " << be_global->stub_export_macro () << " TAO::Value_Traits<" - << lname << ">" << be_nl - << "{" << be_idt_nl - << "static void tao_add_ref (" << lname << " *);" << be_nl - << "static void tao_remove_ref (" << lname << " *);" - << be_uidt_nl - << "};"; - - *os << be_nl << be_nl + << "class " << lname << ";" << be_nl << "typedef" << be_idt_nl << "TAO_Value_Var_T<" << be_idt << be_idt_nl << lname << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp index 51ef8061f7c..6c150a1ff99 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp @@ -55,6 +55,17 @@ be_visitor_component_ch::visit_component (be_component *node) // Now the interface definition itself. os->gen_ifdef_macro (node->flat_name ()); + if (!node->is_local () && !node->is_abstract ()) + { + // Forward class declarations. + *os << be_nl << be_nl + << "class " << node->base_proxy_impl_name () << ";" << be_nl + << "class " << node->remote_proxy_impl_name () << ";" << be_nl + << "class " << node->base_proxy_broker_name () << ";" << be_nl + << "class " << node->remote_proxy_broker_name () << ";" + << be_nl << be_nl; + } + // Now generate the class definition. *os << "class " << be_global->stub_export_macro () << " " << node->local_name () << be_idt_nl @@ -89,13 +100,16 @@ be_visitor_component_ch::visit_component (be_component *node) *os << be_uidt_nl << "{" << be_nl << "public:" << be_idt_nl - << "friend class TAO::Narrow_Utils<" - << node->local_name () << ">;" << be_nl + + // Generate the _ptr_type and _var_type typedefs. << "typedef " << node->local_name () << "_ptr _ptr_type;" << be_nl << "typedef " << node->local_name () << "_var _var_type;" << be_nl; + // Generate the static variable that we use for narrowing. + *os << "static int _tao_class_id;" << be_nl << be_nl; + // Generate the static _duplicate, _narrow, and _nil operations. *os << "// The static operations." << be_nl << "static " << node->local_name () << "_ptr " << "_duplicate (" @@ -106,6 +120,12 @@ be_visitor_component_ch::visit_component (be_component *node) << "ACE_ENV_ARG_DECL_WITH_DEFAULTS" << be_uidt_nl << ");" << be_uidt_nl << be_nl; + *os << "static " << node->local_name () << "_ptr " + << "_unchecked_narrow (" << be_idt << be_idt_nl + << "CORBA::Object_ptr obj" << be_nl + << "ACE_ENV_ARG_DECL_WITH_DEFAULTS" << be_uidt_nl + << ");" << be_uidt_nl << be_nl; + // This method is defined in the header file to workaround old // g++ problems. *os << "static " << node->local_name () << "_ptr _nil (void)" @@ -141,6 +161,10 @@ be_visitor_component_ch::visit_component (be_component *node) << "ACE_ENV_ARG_DECL_WITH_DEFAULTS" << be_uidt_nl << ");" << be_uidt; + // The _tao_QueryInterface method. + *os << be_nl << be_nl + << "virtual void *_tao_QueryInterface (ptrdiff_t type);"; + // The _interface_repository_id method. *os << be_nl << be_nl << "virtual const char* _interface_repository_id (void) const;"; @@ -151,7 +175,7 @@ be_visitor_component_ch::visit_component (be_component *node) // Add the Proxy Broker member variable. *os << be_uidt_nl << be_nl << "private:" << be_idt_nl - << "TAO::Collocation_Proxy_Broker *" + << node->base_proxy_broker_name () << " *" << "the" << node->base_proxy_broker_name () << "_;"; @@ -186,6 +210,14 @@ be_visitor_component_ch::visit_component (be_component *node) << "TAO_ORB_Core *oc = 0" << be_uidt_nl << ");" << be_uidt; + // Friends declarations. + *os << be_nl << be_nl + << "friend class " << node->remote_proxy_impl_name () << ";" + << be_nl + << "friend class " << node->thru_poa_proxy_impl_name () << ";" + << be_nl + << "friend class " << node->direct_proxy_impl_name () << ";"; + // Protected destructor. *os << be_nl << be_nl << "virtual ~" << node->local_name () << " (void);"; diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp index 26bd632e6b1..19d0b2843ef 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp @@ -1,6 +1,7 @@ // // $Id$ // + // ============================================================================ // // = LIBRARY @@ -59,73 +60,130 @@ be_visitor_component_cs::visit_component (be_component *node) *os << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; - if (node->is_defined ()) + // Initialize the static narrrowing helper variable. + *os << "int " << node->full_name () << "::_tao_class_id = 0;" + << be_nl << be_nl; + + AST_Decl *parent = ScopeAsDecl (node->defined_in ()); + + // Helper functions generated in case this interface was + // forward declared in some other IDL file and not defined there. + *os << node->full_name () << "_ptr" << be_nl; + + if (parent != 0 && parent->node_type () != AST_Decl::NT_root) { - *os << be_nl << be_nl - << "// Traits specializations for " << node->name () << "."; - - *os << be_nl << be_nl - << node->name () << "_ptr" << be_nl - << "TAO::Objref_Traits<" << node->name () << ">::tao_duplicate (" - << be_idt << be_idt_nl - << node->name () << "_ptr p" << be_uidt_nl - << ")" << be_uidt_nl - << "{" << be_idt_nl - << "return " << node->name () << "::_duplicate (p);" << be_uidt_nl - << "}"; - - *os << be_nl << be_nl - << "void" << be_nl - << "TAO::Objref_Traits<" << node->name () << ">::tao_release (" - << be_idt << be_idt_nl - << node->name () << "_ptr p" << be_uidt_nl - << ")" << be_uidt_nl - << "{" << be_idt_nl - << "CORBA::release (p);" << be_uidt_nl - << "}"; + *os << parent->name () << "::"; + } - *os << be_nl << be_nl - << node->name () << "_ptr" << be_nl - << "TAO::Objref_Traits<" << node->name () << ">::tao_nil (void)" - << be_nl - << "{" << be_idt_nl - << "return " << node->name () << "::_nil ();" << be_uidt_nl - << "}"; - - *os << be_nl << be_nl - << "CORBA::Boolean" << be_nl - << "TAO::Objref_Traits<" << node->name () << ">::tao_marshal (" - << be_idt << be_idt_nl - << node->name () << "_ptr p," << be_nl - << "TAO_OutputCDR & cdr" << be_uidt_nl - << ")" << be_uidt_nl - << "{" << be_idt_nl - << "return p->marshal (cdr);" << be_uidt_nl - << "}"; + *os << "TAO::Objref_Traits<" << node->name () << ">::" + << "tao_duplicate (" << be_idt << be_idt_nl + << node->full_name () << "_ptr p" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "return " << node->full_name () + << "::_duplicate (p);" << be_uidt_nl + << "}" << be_nl << be_nl; + + *os << "void" << be_nl; + + if (parent != 0 && parent->node_type () != AST_Decl::NT_root) + { + *os << parent->name () << "::"; } - // Generate the proxy broker factory function pointer definition. - *os << be_nl << be_nl - << "// Function pointer for collocation factory initialization." - << be_nl - << "TAO::Collocation_Proxy_Broker * " << be_nl - << "(*" << node->flat_client_enclosing_scope () - << node->base_proxy_broker_name () - << "_Factory_function_pointer) (" - << be_idt << be_idt_nl - << "CORBA::Object_ptr obj" << be_uidt_nl - << ") = 0;" << be_uidt; + *os << "TAO::Objref_Traits<" << node->name () << ">::" + << "tao_release (" << be_idt << be_idt_nl + << node->full_name () << "_ptr p" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "CORBA::release (p);" << be_uidt_nl + << "}" << be_nl << be_nl; - // Generate code for the elements of the component. - if (this->visit_scope (node) == -1) + *os << node->full_name () << "_ptr" << be_nl; + + if (parent != 0 && parent->node_type () != AST_Decl::NT_root) { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_component_cs::" - "visit_component - " - "codegen for scope failed\n"), - -1); + *os << parent->name () << "::"; + } + + *os << "TAO::Objref_Traits<" << node->name () << ">::" + << "tao_nil (" << be_idt << be_idt_nl + << "void" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "return " << node->full_name () + << "::_nil ();" << be_uidt_nl + << "}" << be_nl << be_nl; + + *os << "CORBA::Boolean" << be_nl; + + if (parent != 0 && parent->node_type () != AST_Decl::NT_root) + { + *os << parent->name () << "::"; } + *os << "TAO::Objref_Traits<" << node->name () << ">::" + << "tao_marshal (" << be_idt << be_idt_nl + << node->name () << "_ptr p," << be_nl + << "TAO_OutputCDR &cdr" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "return p->marshal (cdr);" << be_uidt_nl + << "}" << be_nl << be_nl; + + *os << node->full_name () << "_ptr" << be_nl; + + if (parent != 0 && parent->node_type () != AST_Decl::NT_root) + { + *os << parent->name () << "::"; + } + + *os << "tao_" << node->local_name () << "_cast::" + << "tao_narrow (" << be_idt << be_idt_nl + << "CORBA::Object_ptr p" << be_nl + << "ACE_ENV_ARG_DECL" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "return " << node->full_name () + << "::_narrow (p ACE_ENV_ARG_PARAMETER);" + << be_uidt_nl + << "}" << be_nl << be_nl; + + *os << "CORBA::Object_ptr" << be_nl; + + if (parent != 0 && parent->node_type () != AST_Decl::NT_root) + { + *os << parent->name () << "::"; + } + + *os << "tao_" << node->local_name () << "_cast::" + << "tao_upcast (" << be_idt << be_idt_nl + << "void *src" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << node->full_name () << " **tmp =" << be_idt_nl + << "ACE_static_cast (" << node->full_name () + << " **, src);" << be_uidt_nl + << "return *tmp;" << be_uidt_nl + << "}" << be_nl << be_nl; + + *os << "CORBA::Boolean" << be_nl + << "tao_" << node->flat_name () << "_marshal (" << be_idt << be_idt_nl + << node->name () << "_ptr p," << be_nl + << "TAO_OutputCDR &strm" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "return p->marshal (strm);" << be_uidt_nl + << "}"; + + *os << "// TAO_IDL - Generated from" << be_nl + << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + + // Generate the destructor and default constructor. + *os << node->name () << "::~" << node->local_name () + << " (void)" << be_nl; + *os << "{}" << be_nl << be_nl; + *os << node->name () << "::" << node->local_name () << " (int collocated)" << be_nl << "{" << be_idt_nl @@ -163,11 +221,6 @@ be_visitor_component_cs::visit_component (be_component *node) *os << be_uidt_nl << "}" << be_nl << be_nl; - // Generate the destructor and default constructor. - *os << node->name () << "::~" << node->local_name () - << " (void)" << be_nl; - *os << "{}" << be_nl << be_nl; - if (be_global->any_support ()) { *os << "void " << be_nl @@ -187,18 +240,31 @@ be_visitor_component_cs::visit_component (be_component *node) << "ACE_ENV_ARG_DECL" << be_uidt_nl << ")" << be_uidt_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "TAO::Narrow_Utils<" << node->local_name () << ">::narrow (" - << be_idt << be_idt_nl - << "_tao_objref," << be_nl - << "\"" << node->repoID () << "\"," << be_nl - << node->flat_client_enclosing_scope () - << node->base_proxy_broker_name () - << "_Factory_function_pointer" << be_nl + << "if (CORBA::is_nil (obj))" << be_idt_nl + << "{" << be_idt_nl + << "return " << bt->nested_type_name (this->ctx_->scope ()) + << "::_nil ();" << be_uidt_nl + << "}" << be_uidt_nl << be_nl + << "CORBA::Boolean is_a =" << be_idt_nl + << "obj->_is_a (" << be_idt << be_idt_nl + << "\"" << node->repoID () << "\"" << be_nl << "ACE_ENV_ARG_PARAMETER" << be_uidt_nl - << ");" << be_uidt << be_uidt << be_uidt_nl + << ");" << be_uidt << be_uidt_nl + << "ACE_CHECK_RETURN (" << bt->nested_type_name (this->ctx_->scope ()) + << "::_nil ());" << be_nl << be_nl + << "if (is_a == 0)" << be_idt_nl + << "{" << be_idt_nl + << "return " << bt->nested_type_name (this->ctx_->scope ()) + << "::_nil ();" << be_uidt_nl + << "}" << be_uidt_nl << be_nl + << "return " << bt->nested_type_name (this->ctx_->scope ()) + << "::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);" << be_uidt_nl << "}" << be_nl << be_nl; + this->gen_unchecked_narrow (node, + bt, + os); + // The _duplicate method *os << node->full_name () << "_ptr" << be_nl << node->full_name () << "::_duplicate (" @@ -243,13 +309,73 @@ be_visitor_component_cs::visit_component (be_component *node) << "}" << be_uidt_nl << "else" << be_idt_nl << "{" << be_idt_nl - << "return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a (" << be_idt << be_idt_nl + << "return this->Object::_is_a (" << be_idt << be_idt_nl << "value" << be_nl << "ACE_ENV_ARG_PARAMETER" << be_uidt_nl << ");" << be_uidt << be_uidt_nl << "}" << be_uidt << be_uidt_nl << "}" << be_nl << be_nl; + // Generating _tao_QueryInterface method. + *os << "void *" << node->full_name () + << "::_tao_QueryInterface (ptrdiff_t type)" << be_nl + << "{" << be_idt_nl + << "void *retv = 0;" << be_nl << be_nl + << "if "; + + if (node->traverse_inheritance_graph ( + be_interface::queryinterface_helper, + os + ) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_interface_cs::" + "visit_interface - " + "_tao_QueryInterface method codegen failed\n"), + -1); + } + + *os << "(type == ACE_reinterpret_cast (" + << be_idt << be_idt << be_idt << be_idt << be_idt << be_idt_nl + << " ptrdiff_t," << be_nl; + + if (node->is_abstract ()) + { + *os << " &CORBA::AbstractBase"; + } + else + { + *os << " &CORBA::Object"; + } + + *os << "::_tao_class_id)" << be_uidt_nl + << " )" << be_uidt << be_uidt << be_uidt << be_uidt_nl + << "{" << be_idt_nl + << "retv =" << be_idt_nl + << "ACE_reinterpret_cast (" << be_idt << be_idt_nl + << "void *," << be_nl + << "ACE_static_cast ("; + + if (node->is_abstract ()) + { + *os << "CORBA::AbstractBase_ptr"; + } + else + { + *os << "CORBA::Object_ptr"; + } + + *os << ", this)" << be_uidt_nl + << ");" << be_uidt << be_uidt << be_uidt_nl + << "}" << be_uidt_nl << be_nl; + + *os << "if (retv != 0)" << be_idt_nl + << "{" << be_idt_nl + << "this->_add_ref ();" << be_uidt_nl + << "}" << be_uidt_nl << be_nl + << "return retv;" << be_uidt_nl + << "}" << be_nl << be_nl; + *os << "const char*" << be_nl << node->full_name () << "::_interface_repository_id (void) const" @@ -266,6 +392,16 @@ be_visitor_component_cs::visit_component (be_component *node) << "return (cdr << this);" << be_uidt_nl << "}"; + // Generate code for the elements of the component. + if (this->visit_scope (node) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_component_cs::" + "visit_component - " + "codegen for scope failed\n"), + -1); + } + be_visitor_context ctx (*this->ctx_); // Smart Proxy classes. @@ -302,3 +438,101 @@ be_visitor_component_cs::visit_component (be_component *node) return 0; } +void +be_visitor_component_cs::gen_unchecked_narrow (be_component *node, + be_type *bt, + TAO_OutStream *os) +{ + *os << node->full_name () << "_ptr " << be_nl + << node->full_name () << "::_unchecked_narrow (" + << be_idt << be_idt_nl + << "CORBA::Object_ptr obj" << be_nl + << "ACE_ENV_ARG_DECL_NOT_USED" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "if (CORBA::is_nil (obj))" << be_idt_nl + << "{" << be_idt_nl + << "return " << bt->nested_type_name (this->ctx_->scope ()) + << "::_nil ();" << be_uidt_nl + << "}" << be_uidt_nl << be_nl; + + // Declare the default proxy. + *os << bt->nested_type_name (this->ctx_->scope ()) + << "_ptr default_proxy = " + << bt->nested_type_name (this->ctx_->scope ()) + <<"::_nil ();" << be_nl << be_nl; + + // Code for lzay evaluation.. + *os << "// Code for lazily evaluated IOR's" << be_nl; + + *os << "if (!obj->is_evaluated ())" << be_idt_nl + << "{" << be_idt_nl + << "ACE_NEW_RETURN (" << be_idt << be_idt_nl + << "default_proxy," << be_nl + << "::" << bt->name () + << " (" << be_idt << be_idt_nl + << "obj->steal_ior ()," << be_nl + << "obj->orb_core ()" << be_uidt_nl << ")," << be_uidt_nl + << bt->nested_type_name (this->ctx_->scope ()) + << "::_nil ()" << be_uidt_nl << ");" << be_uidt_nl << be_nl + << "return default_proxy;" << be_uidt_nl + << "}" << be_uidt_nl << be_nl; + + *os << "TAO_Stub* stub = obj->_stubobj ();" << be_nl << be_nl + << "if (stub != 0)" << be_idt_nl + << "{" << be_idt_nl + << "stub->_incr_refcnt ();" << be_uidt_nl + << "}" << be_uidt_nl << be_nl; + + // If the policy dictates that the proxy be collocated, use the + // function to create one. + *os << "if (" << be_idt << be_idt_nl + << "!CORBA::is_nil (stub->servant_orb_var ().ptr ()) &&" << be_nl + << "stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () &&" + << be_nl + << "obj->_is_collocated () &&" << be_nl + << node->flat_client_enclosing_scope () << node->base_proxy_broker_name () + << "_Factory_function_pointer != 0" << be_uidt_nl << ")" + << be_nl << "{" + << be_idt_nl + << "ACE_NEW_RETURN (" << be_idt << be_idt_nl + << "default_proxy," << be_nl + << "::" << bt->name () + << " (" << be_idt << be_idt_nl + << "stub," << be_nl + << "1," << be_nl + << "obj->_servant ()" << be_uidt_nl << ")," << be_uidt_nl + << bt->nested_type_name (this->ctx_->scope ()) + << "::_nil ()" << be_uidt_nl << ");" + << be_uidt << be_uidt_nl + << "}" << be_uidt_nl << be_nl; + + // The default proxy will either be returned else be transformed to + // a smart one! + *os << "if (CORBA::is_nil (default_proxy))" << be_idt_nl + << "{" << be_idt_nl + << "ACE_NEW_RETURN (" << be_idt << be_idt_nl + << "default_proxy," << be_nl + << "::" << bt->name () << " (" << be_idt << be_idt_nl + << "stub," << be_nl + << "0," << be_nl + << "obj->_servant ()" << be_uidt_nl + << ")," << be_uidt_nl + << bt->nested_type_name (this->ctx_->scope ()) + << "::_nil ()" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl + << "}" << be_uidt_nl << be_nl; + + if (be_global->gen_smart_proxies ()) + { + *os << "return TAO_" << node->flat_name () + << "_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);" + << be_uidt_nl; + } + else + { + *os << "return default_proxy;" << be_uidt_nl; + } + + *os << "}" << be_nl << be_nl; +} diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp index d8286269ef6..107adfc34af 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp @@ -153,13 +153,6 @@ be_visitor_component_sh::visit_component (be_component *node) *os << class_name.c_str () << " (void);" << be_uidt_nl << be_nl << "public:" << be_idt_nl; - // Some useful typedefs. - *os << "// Useful for template programming." << be_nl - << "typedef ::" << node->name () << " _stub_type;" << be_nl - << "typedef ::" << node->name () << "_ptr _stub_ptr_type;" << be_nl - << "typedef ::" << node->name () << "_var _stub_var_type;" - << be_nl << be_nl; - // Copy constructor and destructor. *os << class_name.c_str () << " (const " << class_name.c_str () << "& rhs);" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_root.cpp b/TAO/TAO_IDL/be/be_visitor_root.cpp index d19016de1be..567c4a4ee42 100644 --- a/TAO/TAO_IDL/be/be_visitor_root.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root.cpp @@ -57,6 +57,7 @@ #include "be_visitor_component.h" #include "be_visitor_component_fwd.h" #include "be_visitor_home.h" +#include "be_visitor_traits.h" #include "be_visitor_arg_traits.h" #include "be_visitor_tmplinst.h" #include "be_visitor_context.h" diff --git a/TAO/TAO_IDL/be/be_visitor_root/root.cpp b/TAO/TAO_IDL/be/be_visitor_root/root.cpp index 67573ff72ec..6982e35aaa4 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root.cpp @@ -242,6 +242,31 @@ int be_visitor_root::visit_root (be_root *node) } } + status = 0; + ctx = *this->ctx_; + + switch (this->ctx_->state ()) + { + case TAO_CodeGen::TAO_ROOT_CH: + { + be_visitor_traits visitor (&ctx); + status = node->accept (&visitor); + + if (status == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_root::" + "visit_root - " + "failed to generate traits\n"), + -1); + } + } + + break; + default: + break; + } + // The next thing we need to do is make one more pass thru the entire tree // and generate code for all the <<= and >>= operators for all the // user-defined types. diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp index 36032f9b35d..c019c8468fc 100644 --- a/TAO/TAO_IDL/be/be_visitor_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp @@ -96,7 +96,7 @@ be_visitor_traits::visit_interface (be_interface *node) // I think we need to generate this only for non-defined forward // declarations. - if (!node->imported () && !node->is_defined ()) + if (!node->imported ()) { os->gen_ifdef_macro (node->flat_name (), "traits"); @@ -105,7 +105,7 @@ be_visitor_traits::visit_interface (be_interface *node) << "struct " << be_global->stub_export_macro () << " Objref_Traits<" << node->name () << ">" << be_nl << "{" << be_idt_nl - << "static " << node->name () << "_ptr tao_duplicate (" + << "static " << node->name () << "_ptr tao_duplicate (" << be_idt << be_idt_nl << node->name () << "_ptr" << be_uidt_nl << ");" << be_uidt_nl @@ -134,7 +134,7 @@ be_visitor_traits::visit_interface (be_interface *node) return 0; } -int +int be_visitor_traits::visit_interface_fwd (be_interface_fwd *node) { if (node->cli_traits_gen ()) @@ -142,7 +142,7 @@ be_visitor_traits::visit_interface_fwd (be_interface_fwd *node) return 0; } - be_interface *fd = + be_interface *fd = be_interface::narrow_from_decl (node->full_definition ()); // The logic in visit_interface() should handle what gets generated @@ -159,7 +159,7 @@ be_visitor_traits::visit_interface_fwd (be_interface_fwd *node) return 0; } -int +int be_visitor_traits::visit_valuetype (be_valuetype *node) { if (node->cli_traits_gen ()) @@ -171,7 +171,7 @@ be_visitor_traits::visit_valuetype (be_valuetype *node) // I think we need to generate this only for non-defined forward // declarations. - if (!node->imported () && !node->is_defined ()) + if (!node->imported ()) { os->gen_ifdef_macro (node->flat_name (), "traits"); @@ -181,7 +181,7 @@ be_visitor_traits::visit_valuetype (be_valuetype *node) << node->name () << ">" << be_nl << "{" << be_idt_nl << "static void tao_add_ref (" << node->name () << " *);" << be_nl - << "static void tao_remove_ref (" << node->name () << " *);" + << "static void tao_remove_ref (" << node->name () << " *);" << be_uidt_nl << "};"; @@ -202,7 +202,7 @@ be_visitor_traits::visit_valuetype (be_valuetype *node) return 0; } -int +int be_visitor_traits::visit_valuetype_fwd (be_valuetype_fwd *node) { if (node->cli_traits_gen ()) @@ -210,7 +210,7 @@ be_visitor_traits::visit_valuetype_fwd (be_valuetype_fwd *node) return 0; } - be_valuetype *fd = + be_valuetype *fd = be_valuetype::narrow_from_decl (node->full_definition ()); // The logic in visit_valuetype() should handle what gets generated @@ -229,19 +229,19 @@ be_visitor_traits::visit_valuetype_fwd (be_valuetype_fwd *node) return 0; } -int +int be_visitor_traits::visit_eventtype (be_eventtype *node) { return this->visit_valuetype (node); } -int +int be_visitor_traits::visit_eventtype_fwd (be_eventtype_fwd *node) { return this->visit_valuetype_fwd (node); } -int +int be_visitor_traits::visit_typedef (be_typedef *node) { this->ctx_->alias (node); @@ -262,5 +262,3 @@ be_visitor_traits::visit_typedef (be_typedef *node) node->cli_traits_gen (I_TRUE); return 0; } - - diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/component_cs.h b/TAO/TAO_IDL/be_include/be_visitor_component/component_cs.h index e6acb03b7d2..1098f629512 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_component/component_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_component/component_cs.h @@ -40,6 +40,11 @@ public: virtual int visit_component (be_component *node); // set the right context and make a visitor + +protected: + void gen_unchecked_narrow (be_component *node, + be_type *bt, + TAO_OutStream *os); }; #endif /* _BE_COMPONENT_COMPONENT_CS_H_ */ |