summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be')
-rw-r--r--TAO/TAO_IDL/be/Makefile5005
-rw-r--r--TAO/TAO_IDL/be/be_args.cpp105
-rw-r--r--TAO/TAO_IDL/be/be_argument.cpp158
-rw-r--r--TAO/TAO_IDL/be/be_array.cpp1533
-rw-r--r--TAO/TAO_IDL/be/be_attribute.cpp730
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp567
-rw-r--r--TAO/TAO_IDL/be/be_constant.cpp180
-rw-r--r--TAO/TAO_IDL/be/be_decl.cpp568
-rw-r--r--TAO/TAO_IDL/be/be_enum.cpp335
-rw-r--r--TAO/TAO_IDL/be/be_enum_val.cpp147
-rw-r--r--TAO/TAO_IDL/be/be_exception.cpp526
-rw-r--r--TAO/TAO_IDL/be/be_expression.cpp80
-rw-r--r--TAO/TAO_IDL/be/be_factory.cpp45
-rw-r--r--TAO/TAO_IDL/be/be_field.cpp210
-rw-r--r--TAO/TAO_IDL/be/be_generator.cpp419
-rw-r--r--TAO/TAO_IDL/be/be_helper.cpp282
-rw-r--r--TAO/TAO_IDL/be/be_init.cpp97
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp2130
-rw-r--r--TAO/TAO_IDL/be/be_interface_fwd.cpp643
-rw-r--r--TAO/TAO_IDL/be/be_interpretive.cpp307
-rw-r--r--TAO/TAO_IDL/be/be_module.cpp222
-rw-r--r--TAO/TAO_IDL/be/be_native.cpp102
-rw-r--r--TAO/TAO_IDL/be/be_operation.cpp969
-rw-r--r--TAO/TAO_IDL/be/be_predefined_type.cpp465
-rw-r--r--TAO/TAO_IDL/be/be_produce.cpp198
-rw-r--r--TAO/TAO_IDL/be/be_root.cpp315
-rw-r--r--TAO/TAO_IDL/be/be_scope.cpp496
-rw-r--r--TAO/TAO_IDL/be/be_sequence.cpp2646
-rw-r--r--TAO/TAO_IDL/be/be_state.cpp65
-rw-r--r--TAO/TAO_IDL/be/be_state_argument.cpp2307
-rw-r--r--TAO/TAO_IDL/be/be_state_array.cpp118
-rw-r--r--TAO/TAO_IDL/be/be_state_attribute.cpp1164
-rw-r--r--TAO/TAO_IDL/be/be_state_exception.cpp409
-rw-r--r--TAO/TAO_IDL/be/be_state_operation.cpp737
-rw-r--r--TAO/TAO_IDL/be/be_state_sequence.cpp440
-rw-r--r--TAO/TAO_IDL/be/be_state_structure.cpp280
-rw-r--r--TAO/TAO_IDL/be/be_state_typedef.cpp368
-rw-r--r--TAO/TAO_IDL/be/be_state_union.cpp1144
-rw-r--r--TAO/TAO_IDL/be/be_string.cpp175
-rw-r--r--TAO/TAO_IDL/be/be_structure.cpp911
-rw-r--r--TAO/TAO_IDL/be/be_sunsoft.cpp108
-rw-r--r--TAO/TAO_IDL/be/be_type.cpp285
-rw-r--r--TAO/TAO_IDL/be/be_typedef.cpp344
-rw-r--r--TAO/TAO_IDL/be/be_union.cpp1190
-rw-r--r--TAO/TAO_IDL/be/be_union_branch.cpp213
-rw-r--r--TAO/TAO_IDL/be/be_union_label.cpp25
-rw-r--r--TAO/TAO_IDL/be/be_visitor.cpp165
-rw-r--r--TAO/TAO_IDL/be/be_visitor_args.cpp2450
-rw-r--r--TAO/TAO_IDL/be/be_visitor_attribute.cpp182
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant.cpp100
-rw-r--r--TAO/TAO_IDL/be/be_visitor_context.cpp463
-rw-r--r--TAO/TAO_IDL/be/be_visitor_decl.cpp37
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum.cpp158
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception.cpp909
-rw-r--r--TAO/TAO_IDL/be/be_visitor_field.cpp777
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface.cpp1934
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface_fwd.cpp146
-rw-r--r--TAO/TAO_IDL/be/be_visitor_module.cpp658
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation.cpp3068
-rw-r--r--TAO/TAO_IDL/be/be_visitor_root.cpp796
-rw-r--r--TAO/TAO_IDL/be/be_visitor_scope.cpp89
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence.cpp1507
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure.cpp293
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typedef.cpp1147
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union.cpp851
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union_branch.cpp2107
66 files changed, 0 insertions, 47600 deletions
diff --git a/TAO/TAO_IDL/be/Makefile b/TAO/TAO_IDL/be/Makefile
deleted file mode 100644
index ae2e334725d..00000000000
--- a/TAO/TAO_IDL/be/Makefile
+++ /dev/null
@@ -1,5005 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Makefile for libbe
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-LIBNAME = libbe
-LIB = $(LIBNAME).a
-SHLIB = $(LIBNAME).$(SOEXT)
-IDL_CFE_VERSION = \"1.3.0\"
-
-# These are components that are sources of
-BE_FILES = \
- be_array \
- be_argument \
- be_attribute \
- be_constant \
- be_enum \
- be_enum_val \
- be_exception \
- be_expression \
- be_field \
- be_interface \
- be_interface_fwd \
- be_module \
- be_native \
- be_operation \
- be_predefined_type \
- be_root \
- be_sequence \
- be_string \
- be_structure \
- be_type \
- be_typedef \
- be_union \
- be_union_branch \
- be_union_label \
- be_generator \
- be_init \
- be_produce \
- be_args \
- be_helper \
- be_state \
- be_state_array \
- be_state_argument \
- be_state_attribute \
- be_state_exception \
- be_state_operation \
- be_state_sequence \
- be_state_structure \
- be_state_typedef \
- be_state_union \
- be_codegen \
- be_factory \
- be_sunsoft \
- be_decl \
- be_scope \
- be_visitor \
- be_visitor_args \
- be_visitor_attribute \
- be_visitor_constant \
- be_visitor_context \
- be_visitor_decl \
- be_visitor_enum \
- be_visitor_exception \
- be_visitor_field \
- be_visitor_interface \
- be_visitor_interface_fwd \
- be_visitor_module \
- be_visitor_operation \
- be_visitor_root \
- be_visitor_scope \
- be_visitor_sequence \
- be_visitor_structure \
- be_visitor_typedef \
- be_visitor_union \
- be_visitor_union_branch \
- be_interpretive
-
-FILES = $(BE_FILES)
-
-LSRC = $(addsuffix .cpp,$(FILES))
-LOBJ = $(addsuffix .o,$(FILES))
-SHOBJ = $(addsuffix .so,$(FILES))
-
-
-LDLIBS = -lACE
-LIBS = -lACE
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-BUILD = $(VSHLIB) #$(VLIB)
-
-#----------------------------------------------------------------------------
-# 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.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-ifeq ($(CXX),g++)
-CCFLAGS += -Wno-switch
-PIC = -fPIC
-endif
-
-CPPFLAGS += -I../include -I../be_include -I. -DCPP_LOCATION=\"$(CXX)\" \
- -DIDL_CFE_VERSION=$(IDL_CFE_VERSION)
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/be_array.o .obj/be_array.so .shobj/be_array.o .shobj/be_array.so: be_array.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_argument.o .obj/be_argument.so .shobj/be_argument.o .shobj/be_argument.so: be_argument.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_attribute.o .obj/be_attribute.so .shobj/be_attribute.o .shobj/be_attribute.so: be_attribute.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_constant.o .obj/be_constant.so .shobj/be_constant.o .shobj/be_constant.so: be_constant.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_enum.o .obj/be_enum.so .shobj/be_enum.o .shobj/be_enum.so: be_enum.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_enum_val.o .obj/be_enum_val.so .shobj/be_enum_val.o .shobj/be_enum_val.so: be_enum_val.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_exception.o .obj/be_exception.so .shobj/be_exception.o .shobj/be_exception.so: be_exception.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_expression.o .obj/be_expression.so .shobj/be_expression.o .shobj/be_expression.so: be_expression.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_field.o .obj/be_field.so .shobj/be_field.o .shobj/be_field.so: be_field.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_interface.o .obj/be_interface.so .shobj/be_interface.o .shobj/be_interface.so: be_interface.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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_visitor_interface.h \
- ../be_include/be_visitor_scope.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_decl.h ../be_include/be.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor_context.h
-.obj/be_interface_fwd.o .obj/be_interface_fwd.so .shobj/be_interface_fwd.o .shobj/be_interface_fwd.so: be_interface_fwd.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_module.o .obj/be_module.so .shobj/be_module.o .shobj/be_module.so: be_module.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_native.o .obj/be_native.so .shobj/be_native.o .shobj/be_native.so: be_native.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_operation.o .obj/be_operation.so .shobj/be_operation.o .shobj/be_operation.so: be_operation.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_predefined_type.o .obj/be_predefined_type.so .shobj/be_predefined_type.o .shobj/be_predefined_type.so: be_predefined_type.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_root.o .obj/be_root.so .shobj/be_root.o .shobj/be_root.so: be_root.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_sequence.o .obj/be_sequence.so .shobj/be_sequence.o .shobj/be_sequence.so: be_sequence.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h \
- ../be_include/be_visitor_sequence.h ../be_include/be_visitor_decl.h
-.obj/be_string.o .obj/be_string.so .shobj/be_string.o .shobj/be_string.so: be_string.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_structure.o .obj/be_structure.so .shobj/be_structure.o .shobj/be_structure.so: be_structure.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_type.o .obj/be_type.so .shobj/be_type.o .shobj/be_type.so: be_type.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_typedef.o .obj/be_typedef.so .shobj/be_typedef.o .shobj/be_typedef.so: be_typedef.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_union.o .obj/be_union.so .shobj/be_union.o .shobj/be_union.so: be_union.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_union_branch.o .obj/be_union_branch.so .shobj/be_union_branch.o .shobj/be_union_branch.so: be_union_branch.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_union_label.o .obj/be_union_label.so .shobj/be_union_label.o .shobj/be_union_label.so: be_union_label.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_generator.o .obj/be_generator.so .shobj/be_generator.o .shobj/be_generator.so: be_generator.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_init.o .obj/be_init.so .shobj/be_init.o .shobj/be_init.so: be_init.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_produce.o .obj/be_produce.so .shobj/be_produce.o .shobj/be_produce.so: be_produce.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_interpretive.h
-.obj/be_args.o .obj/be_args.so .shobj/be_args.o .shobj/be_args.so: be_args.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_helper.o .obj/be_helper.so .shobj/be_helper.o .shobj/be_helper.so: be_helper.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state.o .obj/be_state.so .shobj/be_state.o .shobj/be_state.so: be_state.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state_array.o .obj/be_state_array.so .shobj/be_state_array.o .shobj/be_state_array.so: be_state_array.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state_argument.o .obj/be_state_argument.so .shobj/be_state_argument.o .shobj/be_state_argument.so: be_state_argument.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state_attribute.o .obj/be_state_attribute.so .shobj/be_state_attribute.o .shobj/be_state_attribute.so: be_state_attribute.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state_exception.o .obj/be_state_exception.so .shobj/be_state_exception.o .shobj/be_state_exception.so: be_state_exception.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state_operation.o .obj/be_state_operation.so .shobj/be_state_operation.o .shobj/be_state_operation.so: be_state_operation.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state_sequence.o .obj/be_state_sequence.so .shobj/be_state_sequence.o .shobj/be_state_sequence.so: be_state_sequence.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state_structure.o .obj/be_state_structure.so .shobj/be_state_structure.o .shobj/be_state_structure.so: be_state_structure.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state_typedef.o .obj/be_state_typedef.so .shobj/be_state_typedef.o .shobj/be_state_typedef.so: be_state_typedef.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_state_union.o .obj/be_state_union.so .shobj/be_state_union.o .shobj/be_state_union.so: be_state_union.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_codegen.o .obj/be_codegen.so .shobj/be_codegen.o .shobj/be_codegen.so: be_codegen.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_factory.o .obj/be_factory.so .shobj/be_factory.o .shobj/be_factory.so: be_factory.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_sunsoft.h
-.obj/be_sunsoft.o .obj/be_sunsoft.so .shobj/be_sunsoft.o .shobj/be_sunsoft.so: be_sunsoft.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_sunsoft.h
-.obj/be_decl.o .obj/be_decl.so .shobj/be_decl.o .shobj/be_decl.so: be_decl.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_scope.o .obj/be_scope.so .shobj/be_scope.o .shobj/be_scope.so: be_scope.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_visitor.o .obj/be_visitor.so .shobj/be_visitor.o .shobj/be_visitor.so: be_visitor.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 ../be_include/be.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_visitor_args.o .obj/be_visitor_args.so .shobj/be_visitor_args.o .shobj/be_visitor_args.so: be_visitor_args.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 ../be_include/be.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_visitor_args.h \
- ../be_include/be_visitor_decl.h
-.obj/be_visitor_constant.o .obj/be_visitor_constant.so .shobj/be_visitor_constant.o .shobj/be_visitor_constant.so: be_visitor_constant.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h \
- ../be_include/be_visitor_constant.h ../be_include/be_visitor_scope.h \
- ../be_include/be_visitor_decl.h
-.obj/be_visitor_context.o .obj/be_visitor_context.so .shobj/be_visitor_context.o .shobj/be_visitor_context.so: be_visitor_context.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h
-.obj/be_visitor_decl.o .obj/be_visitor_decl.so .shobj/be_visitor_decl.o .shobj/be_visitor_decl.so: be_visitor_decl.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_visitor_decl.h
-.obj/be_visitor_enum.o .obj/be_visitor_enum.so .shobj/be_visitor_enum.o .shobj/be_visitor_enum.so: be_visitor_enum.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_visitor_enum.h \
- ../be_include/be_visitor_scope.h ../be_include/be_visitor_decl.h
-.obj/be_visitor_field.o .obj/be_visitor_field.so .shobj/be_visitor_field.o .shobj/be_visitor_field.so: be_visitor_field.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_visitor_field.h \
- ../be_include/be_visitor_decl.h
-.obj/be_visitor_interface.o .obj/be_visitor_interface.so .shobj/be_visitor_interface.o .shobj/be_visitor_interface.so: be_visitor_interface.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h \
- ../be_include/be_visitor_interface.h ../be_include/be_visitor_scope.h \
- ../be_include/be_visitor_decl.h
-.obj/be_visitor_interface_fwd.o .obj/be_visitor_interface_fwd.so .shobj/be_visitor_interface_fwd.o .shobj/be_visitor_interface_fwd.so: be_visitor_interface_fwd.cpp \
- ../include/idl.h $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h \
- ../be_include/be_visitor_interface_fwd.h \
- ../be_include/be_visitor_scope.h ../be_include/be_visitor_decl.h
-.obj/be_visitor_module.o .obj/be_visitor_module.so .shobj/be_visitor_module.o .shobj/be_visitor_module.so: be_visitor_module.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_visitor_module.h \
- ../be_include/be_visitor_scope.h ../be_include/be_visitor_decl.h
-.obj/be_visitor_operation.o .obj/be_visitor_operation.so .shobj/be_visitor_operation.o .shobj/be_visitor_operation.so: be_visitor_operation.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h \
- ../be_include/be_visitor_operation.h ../be_include/be_visitor_scope.h \
- ../be_include/be_visitor_decl.h
-.obj/be_visitor_root.o .obj/be_visitor_root.so .shobj/be_visitor_root.o .shobj/be_visitor_root.so: be_visitor_root.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_visitor_root.h \
- ../be_include/be_visitor_scope.h ../be_include/be_visitor_decl.h
-.obj/be_visitor_scope.o .obj/be_visitor_scope.so .shobj/be_visitor_scope.o .shobj/be_visitor_scope.so: be_visitor_scope.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_visitor_scope.h \
- ../be_include/be_visitor_decl.h
-.obj/be_visitor_sequence.o .obj/be_visitor_sequence.so .shobj/be_visitor_sequence.o .shobj/be_visitor_sequence.so: be_visitor_sequence.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h \
- ../be_include/be_visitor_sequence.h ../be_include/be_visitor_decl.h
-.obj/be_visitor_structure.o .obj/be_visitor_structure.so .shobj/be_visitor_structure.o .shobj/be_visitor_structure.so: be_visitor_structure.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h \
- ../be_include/be_visitor_structure.h ../be_include/be_visitor_scope.h \
- ../be_include/be_visitor_decl.h
-.obj/be_visitor_typedef.o .obj/be_visitor_typedef.so .shobj/be_visitor_typedef.o .shobj/be_visitor_typedef.so: be_visitor_typedef.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_visitor_typedef.h \
- ../be_include/be_visitor_scope.h ../be_include/be_visitor_decl.h
-.obj/be_visitor_union.o .obj/be_visitor_union.so .shobj/be_visitor_union.o .shobj/be_visitor_union.so: be_visitor_union.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_visitor_union.h \
- ../be_include/be_visitor_scope.h ../be_include/be_visitor_decl.h
-.obj/be_visitor_union_branch.o .obj/be_visitor_union_branch.so .shobj/be_visitor_union_branch.o .shobj/be_visitor_union_branch.so: be_visitor_union_branch.cpp \
- ../include/idl.h $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h \
- ../be_include/be_visitor_union_branch.h \
- ../be_include/be_visitor_decl.h
-.obj/be_interpretive.o .obj/be_interpretive.so .shobj/be_interpretive.o .shobj/be_interpretive.so: be_interpretive.cpp ../include/idl.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- ../include/intlmacros.h ../include/idl_narrow.h \
- ../include/idl_defines.h ../include/idl_fwd.h ../include/idl_bool.h \
- ../include/utl_string.h ../include/utl_identifier.h ../include/ast.h \
- ../include/utl_scoped_name.h ../include/ast_decl.h \
- ../include/ast_expression.h ../include/utl_scope.h \
- ../include/ast_type.h ../include/ast_concrete_type.h \
- ../include/ast_predefined_type.h ../include/ast_module.h \
- ../include/ast_root.h ../include/ast_interface.h \
- ../include/ast_interface_fwd.h ../include/ast_structure.h \
- ../include/ast_exception.h ../include/ast_enum.h \
- ../include/ast_operation.h ../include/utl_list.h \
- ../include/ast_field.h ../include/ast_argument.h \
- ../include/ast_attribute.h ../include/ast_union.h \
- ../include/ast_union_branch.h ../include/ast_union_label.h \
- ../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 \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- ../be_include/be_decl.h ../be_include/be_scope.h \
- ../be_include/be_generator.h ../be_include/be_type.h \
- ../be_include/be_predefined_type.h ../be_include/be_module.h \
- ../be_include/be_interface.h ../be_include/be_interface_fwd.h \
- ../be_include/be_structure.h ../be_include/be_exception.h \
- ../be_include/be_expression.h ../be_include/be_enum.h \
- ../be_include/be_operation.h ../be_include/be_field.h \
- ../be_include/be_argument.h ../be_include/be_attribute.h \
- ../be_include/be_union.h ../be_include/be_union_branch.h \
- ../be_include/be_union_label.h ../be_include/be_constant.h \
- ../be_include/be_enum_val.h ../be_include/be_array.h \
- ../be_include/be_sequence.h ../be_include/be_string.h \
- ../be_include/be_typedef.h ../be_include/be_root.h \
- ../be_include/be_native.h ../be_include/be_helper.h \
- ../be_include/be_state.h ../be_include/be_codegen.h \
- ../be_include/be_factory.h ../be_include/be_visitor.h \
- ../be_include/be_visitor_context.h ../be_include/be_interpretive.h \
- ../be_include/be_visitor_args.h ../be_include/be_visitor_decl.h \
- ../be_include/be_visitor_constant.h ../be_include/be_visitor_scope.h \
- ../be_include/be_visitor_enum.h ../be_include/be_visitor_field.h \
- ../be_include/be_visitor_interface.h \
- ../be_include/be_visitor_interface_fwd.h \
- ../be_include/be_visitor_module.h \
- ../be_include/be_visitor_operation.h ../be_include/be_visitor_root.h \
- ../be_include/be_visitor_sequence.h \
- ../be_include/be_visitor_structure.h \
- ../be_include/be_visitor_typedef.h ../be_include/be_visitor_union.h \
- ../be_include/be_visitor_union_branch.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/TAO_IDL/be/be_args.cpp b/TAO/TAO_IDL/be/be_args.cpp
deleted file mode 100644
index 6416609a684..00000000000
--- a/TAO/TAO_IDL/be/be_args.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-
-COPYRIGHT
-
-Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
-States of America. All Rights Reserved.
-
-This product is protected by copyright and distributed under the following
-license restricting its use.
-
-The Interface Definition Language Compiler Front End (CFE) is made
-available for your use provided that you include this license and copyright
-notice on all media and documentation and the software program in which
-this product is incorporated in whole or part. You may copy and extend
-functionality (but may not remove functionality) of the Interface
-Definition Language CFE without charge, but you are not authorized to
-license or distribute it to anyone else except as part of a product or
-program developed by you or with the express written consent of Sun
-Microsystems, Inc. ("Sun").
-
-The names of Sun Microsystems, Inc. and any of its subsidiaries or
-affiliates may not be used in advertising or publicity pertaining to
-distribution of Interface Definition Language CFE as permitted herein.
-
-This license is effective until terminated by Sun for failure to comply
-with this license. Upon termination, you shall destroy or return all code
-and documentation for the Interface Definition Language CFE.
-
-INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
-ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
-FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
-DEALING, USAGE OR TRADE PRACTICE.
-
-INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
-ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
-TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
-
-SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
-RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
-INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
-
-IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
-ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
-DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-Use, duplication, or disclosure by the government is subject to
-restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
-Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
-52.227-19.
-
-Sun, Sun Microsystems and the Sun logo are trademarks or registered
-trademarks of Sun Microsystems, Inc.
-
-SunSoft, Inc.
-2550 Garcia Avenue
-Mountain View, California 94043
-
-NOTE:
-
-SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
-trademarks or registered trademarks of Sun Microsystems, Inc.
-
- */
-
-// be_args.cc - Collect command line arguments for the BE
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * Prepare an argument for a BE
- *
- * Since this is the dummy BE, it doesn't do anything with the passed string
- */
-void
-BE_prep_arg(char *s, idl_bool)
-{
- const char arg_macro[]="export_macro=";
- const char arg_include[]="export_include=";
-
- char* last = 0;
- for (char* arg = ACE_OS::strtok_r (s, ",", &last);
- arg != 0;
- arg = ACE_OS::strtok_r (0, ",", &last))
- {
- if (ACE_OS::strstr (arg, arg_macro) == arg)
- {
- char* val = arg + sizeof (arg_macro) - 1;
- idl_global->export_macro (val);
- }
- else if (ACE_OS::strstr (arg, arg_include) == arg)
- {
- char* val = arg + sizeof (arg_include) - 1;
- idl_global->export_include (val);
- }
- else
- {
- cerr << idl_global->prog_name ()
- << ": invalid or unknown argument <"
- << arg
- << "> to back end\n";
- }
- }
-}
diff --git a/TAO/TAO_IDL/be/be_argument.cpp b/TAO/TAO_IDL/be/be_argument.cpp
deleted file mode 100644
index 6b2fd6c167c..00000000000
--- a/TAO/TAO_IDL/be/be_argument.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_argument.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Argument that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Argument
- */
-
-be_argument::be_argument (void)
-{
-}
-
-be_argument::be_argument (AST_Argument::Direction d, AST_Type *ft,
- UTL_ScopedName *n, UTL_StrList *p)
- : AST_Argument (d, ft, n, p),
- AST_Field (AST_Decl::NT_argument, ft, n, p),
- AST_Decl (AST_Decl::NT_argument, n, p)
-{
-}
-
-
-// All the methods here are very similar. The state is set by the be_operation
-// method which then invokes its scope which inturn calls one of these methods
-// with the state that was set.
-
-
-int
-be_argument::gen_client_header (void)
-{
- be_type *bt; // the field type
- be_state *s; // state based code gen object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- bt = be_type::narrow_from_decl (this->field_type ());
- s = cg->make_state ();
-
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_argument::gen_client_header - "
- "error generating type\n"),
- -1);
- }
- return 0;
-}
-
-int
-be_argument::gen_client_stubs (void)
-{
- be_type *bt; // the field type
- be_state *s; // state based code gen object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- bt = be_type::narrow_from_decl (this->field_type ());
- s = cg->make_state ();
-
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_argument::gen_client_stubs - "
- "error generating type\n"),
- -1);
- }
- return 0;
-}
-
-int
-be_argument::gen_server_header (void)
-{
- be_type *bt; // the field type
- be_state *s; // state based code gen object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- bt = be_type::narrow_from_decl (this->field_type ());
- s = cg->make_state ();
-
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_argument::gen_server_header - "
- "error generating type\n"),
- -1);
- }
- return 0;
-}
-
-int
-be_argument::gen_server_skeletons (void)
-{
- be_type *bt; // the field type
- be_state *s; // state based code gen object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- bt = be_type::narrow_from_decl (this->field_type ());
- s = cg->make_state ();
-
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_argument::gen_server_skeletons - "
- "error generating type\n"),
- -1);
- }
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_argument::gen_client_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_argument::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-int
-be_argument::accept (be_visitor *visitor)
-{
- return visitor->visit_argument (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_argument, AST_Argument, be_decl)
-IMPL_NARROW_FROM_DECL (be_argument)
diff --git a/TAO/TAO_IDL/be/be_array.cpp b/TAO/TAO_IDL/be/be_array.cpp
deleted file mode 100644
index 347e3282b48..00000000000
--- a/TAO/TAO_IDL/be/be_array.cpp
+++ /dev/null
@@ -1,1533 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_array.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Array that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Array
- */
-be_array::be_array (void)
- : tao_name_ (0)
-{
-}
-
-be_array::be_array (UTL_ScopedName *n, unsigned long ndims, UTL_ExprList *dims)
- : AST_Array (n, ndims, dims),
- AST_Decl (AST_Decl::NT_array, n, NULL),
- tao_name_ (0)
-{
-#if 0
- // if we are inside of a union, we change our local name to have an
- // underscore before us
- AST_Decl *d = ScopeAsDecl (this->defined_in ());
- if (d && (d->node_type () == AST_Decl::NT_union))
- {
- static char namebuf [200];
- UTL_ScopedName *myname;
-
- ACE_OS::memset (namebuf, '\0', 200);
-
- // make a copy of our parent's name
- myname = (UTL_ScopedName *)d->name ()->copy ();
- ACE_OS::sprintf (namebuf, "_%s", this->local_name ()->get_string ());
- myname->nconc (new UTL_ScopedName (new Identifier (ACE_OS::strdup
- (namebuf), 1, 0,
- I_FALSE), NULL));
- this->set_name (myname);
- }
-#endif
-}
-
-be_array::~be_array (void)
-{
- if (this->tao_name_ == 0)
- delete[] tao_name_;
-}
-
-// create a name for ourselves
-const char*
-be_array::tao_name (void)
-{
- if (this->tao_name_ != 0)
- return this->tao_name_;
-
- be_type *bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "tao_name - "
- "bad base type\n"),
- 0);
- }
-
- const char prefix[] = "_tc_tao_array_";
-
- int l = (ACE_OS::strlen (bt->local_name ()->get_string ())
- + ACE_OS::strlen (this->local_name ()->get_string ()) + 1
- + sizeof (prefix)
- + 5 * this->n_dims ());
-
- ACE_NEW_RETURN (this->tao_name_, char[l], 0);
-
- ACE_OS::sprintf (this->tao_name_, "%s%s_%s",
- prefix, this->local_name ()->get_string (),
- bt->local_name ()->get_string());
-
- for (unsigned int i = 0; i < this->n_dims (); ++i)
- {
- AST_Expression *expr = this->dims ()[i]; // retrieve the ith
-
- // dimension value
- if ((expr == NULL) || ((expr != NULL) && (expr->ev () == NULL)))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "tao_name - "
- "bad array dimension\n"),
- 0);
- }
-
- if (expr->ev ()->et != AST_Expression::EV_ulong)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "tao_name - "
- "bad dimension value\n"),
- 0);
- }
-
- char buf[16];
- ACE_OS::sprintf (buf, "_%04.4x", ((int)expr->ev ()->u.ulval));
- ACE_OS::strcat (this->tao_name_, buf);
- }
- return this->tao_name_;
-}
-
-int
-be_array::create_name (void)
-{
- char namebuf [NAMEBUFSIZE];
- unsigned long i;
- UTL_ScopedName *n = NULL;
- be_decl *scope; // scope in which we are defined
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE); // reset the buffer
- // retrieve the base type
- // the name always starts this way
-
- be_type *bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "create_name - "
- "bad base type\n"),
- 0);
- }
-
- ACE_OS::sprintf (namebuf, "_tao_array_%s", bt->local_name ()->get_string ());
- // now append dimensions
- for (i = 0; i < this->n_dims (); i++)
- {
- AST_Expression *expr = this->dims ()[i]; // retrieve the ith
-
- // dimension value
- if ((expr == NULL) || ((expr != NULL) && (expr->ev () == NULL)))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "create_name - "
- "bad array dimension\n"),
- -1);
- }
- if (expr->ev ()->et == AST_Expression::EV_ulong)
- {
- ACE_OS::sprintf (namebuf, "%s_%d", namebuf, ((int)expr->ev ()->u.ulval));
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "create_name - "
- "bad dimension value\n"),
- -1);
- }
- }
-
- // now see if we have a fully scoped name and if so, generate one
- scope = be_scope::narrow_from_scope (this->defined_in ())->decl ();
- if (scope)
- {
- // make a copy of the enclosing scope's name
- n = (UTL_ScopedName *)scope->name ()->copy () ;
-
- // add our local name as the last component
- n->nconc (new UTL_ScopedName (new Identifier (ACE_OS::strdup
- (namebuf), 1,
- 0, I_FALSE),
- NULL));
- // set the fully scoped name
- this->set_name (n);
- }
- else
- {
- // We better be not here because we must be inside some scope,
- // atleast the ROOT scope.
- return -1;
- }
- return 0;
-}
-
-// Code generation
-
-int
-be_array::gen_dimensions (TAO_OutStream *os, unsigned short slice)
-{
- unsigned long i; // loop index
-
- // print our dimensions
- for (i = (slice?1:0); i < this->n_dims (); i++)
- {
- AST_Expression *expr = this->dims ()[i]; // retrieve the ith
-
- // dimension value
- if ((expr == NULL) || ((expr != NULL) && (expr->ev () == NULL)))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_dimensions - "
- "bad array dimension\n"),
- -1);
- }
- if (expr->ev ()->et == AST_Expression::EV_ulong)
- {
- *os << "[" << ((int)expr->ev ()->u.ulval) << "]";
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_dimensions - "
- "bad dimension value\n"),
- -1);
- }
- }
- return 0;
-}
-
-int
-be_array::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- be_type *bt; // our base type
- be_state *s; // state based code gen object
-
- if (!this->cli_hdr_gen_) // not already generated
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_ARRAY_DEFN_CH); // set current code gen state
-
- ch = cg->client_header (); // retrieve client hdr stream
-
-#if 0
- if (this->create_name () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "name creation failed\n"),
- 0);
- }
-#endif
- s = cg->make_state (); // get the state-based code generation object
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "Bad state\n"),
- -1);
- }
-
- // retrieve the base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "Bad type\n"),
- -1);
- }
-
- // generate the ifdefined macro for the array type
- ch->gen_ifdef_macro (this->flatname ());
-
- ch->indent (); // start from current indentation
- // generate code for our base type if required and then print the type
- // name
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "state based codegen failed\n"),
- -1);
- }
-
- // print our name
- *ch << " " << this->local_name ();
- // print our dimensions
- if (this->gen_dimensions (ch) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "dimension codegen failed\n"),
- -1);
- }
-
- *ch << ";" << nl;
-
- // if our base type is VARIABLE length, then we are variable length too
- this->size_type (bt->size_type ());
- cg->pop ();
-
- cg->push (TAO_CodeGen::TAO_ARRAY_OTHER_CH); // rest of the array defn
- s = cg->make_state ();
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "bad state\n"),
- -1);
- }
-
- // now generate the slice definition
- *ch << "typedef ";
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "state based codegen failed\n"),
- -1);
- }
-
- *ch << " " << this->local_name () << "_slice";
- // print dimensions except first one
- if (this->gen_dimensions (ch, 1) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "slice dimensions codegen failed\n"),
- -1);
- }
- *ch << ";" << nl;
-
- // memory management functions
-
- // The T_alloc method
- // first find if we are inside a scope
- if (this->is_nested ()) // we were defined inside a scope. Hence the
- // memory management functions become static
- // members of the enclosing class
- *ch << "static ";
-
- // the return type is a pointer to slice
- *ch << this->local_name () << "_slice *"
- << this->local_name () << "_alloc (void);" << nl;
- // the T_dup method
- if (this->is_nested ())
- *ch << "static ";
- *ch << this->local_name () << "_slice *" << this->local_name () <<
- "_dup (const " << this->local_name () << "_slice *);" << nl;
- // the T_free method
- if (this->is_nested ())
- *ch << "static ";
- *ch << "void " << this->local_name () << "_free (" << this->local_name ()
- << "_slice *);\n\n";
-
- // Generate the typecode decl
- if (this->is_nested ())
- {
- // we have a scoped name
- ch->indent ();
- *ch << "static CORBA::TypeCode_ptr "
- << this->tao_name () << ";\n\n";
- }
- else
- {
- // we are in the ROOT scope
- ch->indent ();
- *ch << "extern "
- << idl_global->export_macro ()
- << " CORBA::TypeCode_ptr "
- << this->tao_name () << ";\n\n";
- }
- ch->gen_endif ();
-
- // generate the ifdefined macro
- ch->gen_ifdef_macro (this->flatname (), "_var");
- // generate the _var, _out, and _forany definition
- if (this->gen_var_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "error generating _var class\n"),
- -1);
- }
- ch->gen_endif ();
-
- // generate the ifdefined macro
- ch->gen_ifdef_macro (this->flatname (), "_out");
- if (this->gen_out_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "error generating _out class\n"),
- -1);
- }
- ch->gen_endif ();
-
- // generate the ifdefined macro
- ch->gen_ifdef_macro (this->flatname (), "_forany");
- if (this->gen_forany_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_header - "
- "error generating _forany class\n"),
- -1);
- }
- ch->gen_endif ();
-
- this->cli_hdr_gen_ = I_TRUE;
- cg->pop ();
- }
- return 0;
-}
-
-int
-be_array::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- unsigned long i;
-
- if (!this->cli_stub_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BODY_CS); // set current code gen state
-
- cs = cg->client_stubs ();
-
- // generate the typecode information here
- cs->indent (); // start from current indentation level
- *cs << "static const CORBA::Long _oc_"
- << this->tao_name () << "[] =" << nl;
- *cs << "{\n";
- cs->incr_indent (0);
- if (this->gen_encapsulation () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_array:Error generating encapsulation\n\n"));
- return -1;
- }
- cs->decr_indent ();
- *cs << "};" << nl;
-
- *cs << "static CORBA::TypeCode _tc__tc_"
- << this->tao_name ()
- << " (CORBA::tk_sequence, "
- << "sizeof (_oc_" << this->tao_name ()
- << "), (char *) &_oc_"
- << this->tao_name ()
- << ", CORBA::B_FALSE);" << nl;
- *cs << "CORBA::TypeCode_ptr "
- << this->tao_name () << " = &_tc__tc_"
- << this->tao_name () << ";\n\n";
-
- cg->pop ();
- this->cli_stub_gen_ = I_TRUE;
-
- // T_dup method
- *cs << this->name () << "_slice *" << nl;
- *cs << this->name () << "_dup (const "
- << this->name () << "_slice * s)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << this->name () << "_slice *temp;" << nl;
- *cs << "// alloc an array" << nl;
- *cs << "temp = " << this->name () << "_alloc ();" << nl;
- *cs << "// copy each individual elements" << nl;
- // generate nested loops for as many dimensions as there are
- for (i = 0; i < this->n_dims (); i++)
- {
- AST_Expression *expr = this->dims ()[i]; // retrieve the ith
- // dimension value
- if ((expr == NULL) || ((expr != NULL) && (expr->ev () == NULL)))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_stubs - "
- "bad array dimension\n"),
- -1);
- }
- if (expr->ev ()->et == AST_Expression::EV_ulong)
- {
- // generate a loop for each dimension
- *cs << "for (CORBA::ULong i" << i << " = 0; i" << i << " < " <<
- expr->ev ()->u.ulval << "; i" << i << "++)\n";
- cs->incr_indent ();
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_stubs - "
- "bad array dimension value\n"),
- -1);
- }
- }
-
- // now generate code such that every element of the array gets assigned
- // inside the innermost level of the nested loops generated above
- *cs << "temp"; // generate the lvalue
- for (i = 0; i < this->n_dims (); i++)
- {
- *cs << "[i" << i << "]";
- }
- *cs << " = ";
- *cs << "s"; // generate the rvalue
- for (i = 0; i < this->n_dims (); i++)
- {
- *cs << "[i" << i << "]";
- }
- *cs << ";\n";
- for (i = 0; i < this->n_dims (); i++)
- {
- // decrement indentation as many times as the number of dimensions
- cs->decr_indent (0);
- }
- cs->indent ();
- *cs << "return temp;\n";
- // one more to get to the outermost level
- cs->decr_indent ();
- *cs << "}\n\n";
- }
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_array::gen_client_inline (void)
-{
- if (!this->cli_inline_gen_)
- {
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- be_type *bt; // our base type
- be_state *s; // state based code gen obj
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
- cg->push (TAO_CodeGen::TAO_ARRAY_DEFN_CI);
- s = cg->make_state ();
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_inline - "
- "bad state\n"),
- -1);
- }
-
- // retrieve our base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_inline - "
- "bad base type\n"),
- -1);
- }
-
- // first define the _alloc, _dup and _free methods
- // If we are defined inside some scope, these methods become static
- // members of the enclosing scope
-
- // alloc method
- ci->indent (); // start from current indentation
- *ci << "ACE_INLINE " << this->name () << "_slice *" << nl;
- *ci << this->name () << "_alloc (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return new ";
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_inline - "
- "state based codegen failed\n"),
- -1);
- }
- if (this->gen_dimensions (ci) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::"
- "gen_client_inline - "
- "dimensions codegen failed\n"),
- -1);
- }
-
- *ci << ";\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // free method
- *ci << "ACE_INLINE void" << nl
- << this->name () << "_free (" << this->name ()
- << "_slice *s)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete [] s;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // emit implementations of methods of the _var, _out, and _forany classes
- if (this->gen_var_impl () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_array: _var impl code gen failed\n"));
- return -1;
- }
- if (this->gen_out_impl () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_array: _out impl code gen failed\n"));
- return -1;
- }
- if (this->gen_forany_impl () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_array: _forany impl code gen failed\n"));
- return -1;
- }
-
- // generate client inline for base type
- if (bt->gen_client_inline () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_array: base type inline code gen failed\n"));
- return -1;
- }
-
- cg->pop ();
- this->cli_inline_gen_ = I_TRUE;
- }
-
- return 0;
-}
-
-int
-be_array::gen_server_header (void)
-{
- return 0;
-}
-
-int
-be_array::gen_server_skeletons (void)
-{
- return 0;
-}
-
-int
-be_array::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// generate the var defn
-int
-be_array::gen_var_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // names
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_var", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the var definition (always in the client header).
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ch->indent (); // start with whatever was our current indent level
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
- // default constr
- *ch << namebuf << " (void); // default constructor" << nl;
- // constr from pointer to slice
- *ch << namebuf << " (" << this->local_name () << "_slice *);" << nl;
- // copy constructor
- *ch << namebuf << " (const " << namebuf <<
- " &); // copy constructor" << nl;
- // destructor
- *ch << "~" << namebuf << " (void); // destructor" << nl;
- *ch << nl;
- // assignment operator from a pointer to slice
- *ch << namebuf << " &operator= (" << this->local_name () << "_slice *);" <<
- nl;
- // assignment from _var
- *ch << namebuf << " &operator= (const " << namebuf << " &);" << nl;
-
- // arrow operator
- // nothing here
- *ch << nl;
-
- // other extra types (cast operators, [] operator, and others)
- // overloaded [] operator
- *ch << this->local_name () << "_slice &operator[] (CORBA::ULong index);" <<
- nl;
- *ch << "const " << this->local_name () <<
- "_slice &operator[] (CORBA::ULong index) const;" << nl;
-
- // cast operators
- *ch << "operator " << this->local_name () << "_slice * const &() const;" <<
- nl;
- *ch << "operator " << this->local_name () << "_slice *&();" << nl;
-
- // in, inout, out and _retn
- *ch << "// in, inout, out, _retn " << nl;
- *ch << "const " << this->local_name () << "_slice *in (void) const;" << nl;
- *ch << this->local_name () << "_slice *inout (void);" << nl;
- *ch << this->local_name () << "_slice *&out (void);" << nl;
- *ch << this->local_name () << "_slice *_retn (void);" << nl;
-
- // generate an additional member function that returns the underlying pointer
- *ch << this->local_name () << "_slice *ptr (void) const;\n";
-
- *ch << "\n";
- ch->decr_indent ();
-
- // generate the private section
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << "_slice *ptr_;\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
-
- return 0;
-}
-
-// implementation of the _var class. All of these get generated in the inline
-// file
-int
-be_array::gen_var_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _var names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_var", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_var", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // generate the var implementation in the inline file
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // default constr
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname <<
- " (void) // default constructor" << nl;
- *ci << " " << ": ptr_ ((" << this->name () << "_slice *)0)" << nl;
- *ci << "{}\n\n";
-
- // constr from a _slice *
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << "_slice *p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{}\n\n";
-
- // copy constructor (deep copy)
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (const " << fname <<
- " &p) // copy constructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = " << this->name () << "_dup (p.ptr_);\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // destructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::~" << lname << " (void) // destructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << this->name () << "_free (this->ptr_);\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << this->name () <<
- "_slice *p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "// is what we own the same that is being assigned to us?" <<
- nl;
- *ci << "if (this->ptr_ != p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "// delete our stuff and assume ownership of p" << nl;
- *ci << this->name () << "_free (this->ptr_);" << nl;
- *ci << "this->ptr_ = p;\n";
- ci->decr_indent ();
- *ci << "}" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _var
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (const " << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (this != &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "// not assigning to ourselves" << nl;
- *ci << this->name () << "_free (this->ptr_); // free old stuff" << nl;
- *ci << "this->ptr_ = " << this->name () <<
- "_dup (p.ptr_);// deep copy\n";
- ci->decr_indent ();
- *ci << "}" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operators ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << this->name () <<
- "_slice * const &() const // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << "_slice *&() // cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // two operator []s instead of ->
- ci->indent ();
- *ci << "ACE_INLINE const " << this->name () << "_slice &" << nl;
- *ci << fname << "::operator[] (CORBA::ULong index) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_[index];\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_slice &" << nl;
- *ci << fname << "::operator[] (CORBA::ULong index)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_[index];\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // in, inout, out, and _retn
- ci->indent ();
- *ci << "ACE_INLINE const " << this->name () << "_slice *" << nl;
- *ci << fname << "::in (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice *" << nl;
- *ci << fname << "::inout (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice * &" << nl;
- *ci << fname << "::out (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice *" << nl;
- *ci << fname << "::_retn (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // the additional ptr () member function
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice *" << nl;
- *ci << fname << "::ptr (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- return 0;
-}
-
-// generate the _out definition
-int
-be_array::gen_out_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // to hold the _out name
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the out definition (always in the client header)
- ch->indent (); // start with whatever was our current indent level
-
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
-
- // No default constructor
-
- // constructor from a pointer to slice
- *ch << namebuf << " (" << this->local_name () << "_slice *&);" << nl;
- // constructor from a _var &
- *ch << namebuf << " (" << this->local_name () << "_var &);" << nl;
- // constructor from a _out &
- *ch << namebuf << " (" << namebuf << " &);" << nl;
- // assignment operator from a _out &
- *ch << namebuf << " &operator= (" << namebuf << " &);" << nl;
- // assignment from slice *
- *ch << namebuf << " &operator= (" << this->local_name () << "_slice *);" <<
- nl;
- // cast
- *ch << "operator " << this->local_name () << "_slice *&();" << nl;
- // ptr fn
- *ch << this->local_name () << "_slice *&ptr (void);" << nl;
- // operator [] instead of ->
- *ch << this->local_name () << "_slice &operator[] (CORBA::ULong index);" << nl;
- *ch << "const " << this->local_name () << "_slice &operator[] " <<
- "(CORBA::ULong index) const;" << nl;
-
- *ch << "\n";
- ch->decr_indent ();
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << "_slice *&ptr_;" << nl;
- *ch << "// assignment from T_var not allowed" << nl;
- *ch << "void operator= (const " << this->local_name () << "_var &);\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
- return 0;
-}
-
-int
-be_array::gen_out_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _out names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_out", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // generate the out implementation in the inline file
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // constr from a pointer to slice
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << this->name () << "_slice *&p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // constructor from _var &
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << this->name () <<
- "_var &p) // constructor from _var" << nl;
- *ci << " : ptr_ (p.out ())" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << this->name () << "_free (this->ptr_);" << nl;
- *ci << "this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << fname <<
- " &p) // copy constructor" << nl;
- *ci << " : ptr_ (p.ptr_)" << nl;
- *ci << "{}\n\n";
-
- // assignment operator from _out &
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p.ptr_;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment from _var is not allowed by a private declaration
-
- // assignment operator from _ptr
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << this->name () <<
- "_slice *p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << this->name () <<
- "_slice *&() // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // ptr function
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice *&" << nl;
- *ci << fname << "::ptr (void) // ptr" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator [] instead of ->
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice &" << nl;
- *ci << fname << "::operator[] (CORBA::ULong index)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_[index];\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- return 0;
-}
-
-// generate the _var definition for ourself
-int
-be_array::gen_forany_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // names
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_forany", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the var definition (always in the client header).
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ch->indent (); // start with whatever was our current indent level
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
- // default constr
- *ch << namebuf << " (void); // default constructor" << nl;
- // constr from pointer to slice
- *ch << namebuf << " (" << this->local_name () << "_slice *, " <<
- "CORBA::Boolean nocopy=0);" << nl;
- // copy constructor
- *ch << namebuf << " (const " << namebuf <<
- " &); // copy constructor" << nl;
- // destructor
- *ch << "~" << namebuf << " (void); // destructor" << nl;
- *ch << nl;
- // assignment operator from a pointer to slice
- *ch << namebuf << " &operator= (" << this->local_name () << "_slice *);" <<
- nl;
- // assignment from _var
- *ch << namebuf << " &operator= (const " << namebuf << " &);" << nl;
-
- // arrow operator
- // nothing here
- *ch << nl;
-
- // other extra types (cast operators, [] operator, and others)
- // overloaded [] operator
- *ch << this->local_name () << "_slice &operator[] (CORBA::ULong index);" <<
- nl;
- *ch << "const " << this->local_name () <<
- "_slice &operator[] (CORBA::ULong index) const;" << nl;
-
- // cast operators
- *ch << "operator " << this->local_name () << "_slice * const &() const;" <<
- nl;
- *ch << "operator " << this->local_name () << "_slice *&();" << nl;
-
- // in, inout, out and _retn
- *ch << "// in, inout, out, _retn " << nl;
- *ch << "const " << this->local_name () << "_slice *in (void) const;" << nl;
- *ch << this->local_name () << "_slice *inout (void);" << nl;
- *ch << this->local_name () << "_slice *&out (void);" << nl;
- *ch << this->local_name () << "_slice *_retn (void);" << nl;
-
- // generate an additional member function that returns the underlying pointer
- *ch << this->local_name () << "_slice *ptr (void) const;\n";
-
- *ch << "\n";
- ch->decr_indent ();
-
- // generate the private section
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << "friend CORBA::Any;" << nl;
- *ch << this->local_name () << "_slice *ptr_;" << nl;
- *ch << "CORBA::Boolean nocopy_;\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
-
- return 0;
-}
-
-int
-be_array::gen_forany_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _var names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_forany", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_forany", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // generate the var implementation in the inline file
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // default constr
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname <<
- " (void) // default constructor" << nl;
- *ci << " " << ": ptr_ ((" << this->name () << "_slice *)0)," << nl;
- *ci << " nocopy_ (0)" << nl;
- *ci << "{}\n\n";
-
- // constr from a _slice *
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << "_slice *p, " <<
- "CORBA::Boolean nocopy)" << nl;
- *ci << " : ptr_ (p)," << nl;
- *ci << " nocopy_ (nocopy)" << nl;
- *ci << "{}\n\n";
-
- // copy constructor (deep copy)
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (const " << fname <<
- " &p) // copy constructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = " << this->name () << "_dup (p.ptr_);" << nl;
- *ci << "this->nocopy_ = p.nocopy_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // destructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::~" << lname << " (void) // destructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << this->name () << "_free (this->ptr_);\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << this->name () <<
- "_slice *p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "// is what we own the same that is being assigned to us?" <<
- nl;
- *ci << "if (this->ptr_ != p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "// delete our stuff and assume ownership of p" << nl;
- *ci << this->name () << "_free (this->ptr_);" << nl;
- *ci << "this->ptr_ = p;\n";
- ci->decr_indent ();
- *ci << "}" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _forany
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (const " << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (this != &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "// not assigning to ourselves" << nl;
- *ci << this->name () << "_free (this->ptr_); // free old stuff" << nl;
- *ci << "this->ptr_ = " << this->name () <<
- "_dup (p.ptr_);// deep copy" << nl;
- *ci << "this->nocopy_ = p.nocopy_;\n";
- ci->decr_indent ();
- *ci << "}" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operators ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << this->name ()
- << "_slice * const &() const // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << "_slice *&() // cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // two operator []s instead of ->
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_slice const &" << nl;
- *ci << fname << "::operator[] (CORBA::ULong index) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_[index];\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_slice &" << nl;
- *ci << fname << "::operator[] (CORBA::ULong index)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_[index];\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // in, inout, out, and _retn
- ci->indent ();
- *ci << "ACE_INLINE const " << this->name () << "_slice *" << nl;
- *ci << fname << "::in (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice *" << nl;
- *ci << fname << "::inout (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice * &" << nl;
- *ci << fname << "::out (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice *" << nl;
- *ci << fname << "::_retn (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // the additional ptr () member function
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_slice *" << nl;
- *ci << fname << "::ptr (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- return 0;
-}
-
-int
-be_array::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "CORBA::tk_array, // typecode kind" << nl;
- *cs << this->tc_size () << ", // encapsulation length\n";
- // now emit the encapsulation
- return this->gen_encapsulation ();
-}
-
-// generate encapsulation
-// An encapsulation for ourselves will be necessary when we are part of some
-// other IDL type and a typecode for that other type is being generated. This
-// will comprise our typecode kind. IDL types with parameters will additionally
-// have the encapsulation length and the entire typecode description
-
-int
-be_array::gen_encapsulation (void)
-{
- TAO_OutStream *os; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_type *bt; // base type
-
- os = cg->client_stubs ();
- os->indent (); // start from the current indentation level
-
- // XXXASG - byte order must be based on what m/c we are generating code -
- // TODO
- *os << "TAO_ENCAP_BYTE_ORDER, // byte order" << nl;
-
- // emit typecode of element type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt || (bt->gen_typecode () == -1))
- {
- ACE_ERROR ((LM_ERROR, "be_sequence::gen_typecode - bad base type\n"));
- return -1;
- }
-
- // emit the length
- os->indent ();
- // *os << this->max_size () << ",\n";
- return 0;
-}
-
-// compute typecode size
-long
-be_array::tc_size (void)
-{
- // 4 bytes for enumeration, 4 bytes for storing encap length val, followed by the
- // actual encapsulation length
- return 4 + 4 + this->tc_encap_len ();
-}
-
-long
-be_array::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- be_type *bt; // base type
-
- this->encap_len_ = 4; // holds the byte order flag
- // add the encapsulation length of our base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR ((LM_ERROR,
- "be_array::tc_encap_len - bad base type\n"));
- return 0;
- }
- this->encap_len_ += bt->tc_size ();
- this->encap_len_ += 4; // to hold the array size
-
- }
- return this->encap_len_;
-}
-
-// compute the size type of the node in question
-int
-be_array::compute_size_type (void)
-{
- be_type *type = be_type::narrow_from_decl (this->base_type ());
- if (!type)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_array::compute_size_type - "
- "bad base type\n"), -1);
- }
-
- // our size type is the same as our type
- this->size_type (type->size_type ());
- 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)
-{
- return visitor->visit_array (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_array, AST_Array, be_type)
-IMPL_NARROW_FROM_DECL (be_array)
diff --git a/TAO/TAO_IDL/be/be_attribute.cpp b/TAO/TAO_IDL/be/be_attribute.cpp
deleted file mode 100644
index eb0a0325216..00000000000
--- a/TAO/TAO_IDL/be/be_attribute.cpp
+++ /dev/null
@@ -1,730 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_attribute.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Attribute that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Attribute
- */
-be_attribute::be_attribute (void)
-{
-}
-
-be_attribute::be_attribute (idl_bool ro, AST_Type *ft, UTL_ScopedName *n,
- UTL_StrList *p)
- : AST_Attribute (ro, ft, n, p),
- AST_Field (AST_Decl::NT_attr, ft, n, p),
- AST_Decl (AST_Decl::NT_attr, n, p)
-{
-}
-
-// Handling attributes is very similar to operations. Attributes are mapped to
-// two methods - one to set the value and one to get the value. For a readonly
-// attribute we only have the method that retrieves the value. For the "set"
-// method we pass an in parameter which is of the type of the attribute. So the
-// handling here is exactly like the "in" parameters for arguments. The
-// handling of the "get" method is exactly like the return values of
-// operations.
-
-int
-be_attribute::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
- be_type *bt; // type node
- be_state *s; // state based code gen object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- ch = cg->client_header ();
-
- ch->indent (); // start with the current indentation level
-
- bt = be_type::narrow_from_decl (this->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_client_header - "
- "bad type\n"),
- -1);
- }
-
-
- // first the "get" method
-
- // the retrieve method is defined virtual
- *ch << "virtual ";
-
- // first generate the return type
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH); // we are now generating
- // an attribute "get"
- // definition with the
- // return type first
-
- s = cg->make_state (); // retrieve state based object
-
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_client_header - "
- "return type generation failure\n"),
- -1);
- }
- cg->pop (); // restore previous state
-
- // generate the operation name
- // additional argument in the form of CORBA::Environment since TAO does not
- // yet support C++ style Exceptions. However, we can have an option to the
- // "tao" IDL compiler to ask it to generate code for exceptions. This will be
- // handled in a later release.
- *ch << " " << this->local_name () << " (CORBA::Environment &env);\n";
-
- // now the set method. However, this is not defined if we are readonly
- if (!this->readonly ())
- {
- ch->indent ();
- *ch << "virtual void " << this->local_name () << "(";
-
- // we pass the type as an "in" parameter
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH);
-
- s = cg->make_state (); // retrieve state based object
-
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_client_header - "
- "in param type generation failure\n"),
- -1);
- }
- cg->pop (); // restore previous state
- *ch << ", CORBA::Environment &env);\n";
- }
-
- return 0;
-}
-
-int
-be_attribute::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- be_type *bt; // type node
- be_state *s; // state based code gen object
-
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
-
- // retrieve the type
- bt = be_type::narrow_from_decl (this->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_client_stubs - "
- "bad type\n"),
- -1);
- }
-
- // first the retrieve method
- cs->indent (); // start with current indentation level
-
- // generate the TAO_Param_Data table for the "get" method
- *cs << "static const TAO_Param_Data _get_" << 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)
- {
- 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}";
- cs->decr_indent ();
- *cs << "};\n\n";
-
- // now generate the calldata table
-
- cs->indent ();
- *cs << "static const TAO_Call_Data _get_" << this->flatname () << "_calldata = "
- << nl;
- *cs << "{";
- // prepend a "_get_"
- *cs << "\"_get_" << this->local_name () << "\", ";
- *cs << "1, "; // always a twoway call
- *cs << "1, "; // size is 1
- // insert the address of the paramdata table
- *cs << "_get_" << this->flatname () << "_paramdata, ";
- // XXXASG - Exception list goes here (if it exists) - TODO
- *cs << "0, 0};\n\n";
-
- // now generate the actual stub
-
- // first generate the return type
- cs->indent ();
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS); // declare a return
- // type of the stub
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_client_stubs - "
- "return type generation failure\n"),
- -1);
- }
- cg->pop ();
-
- // generate the operation name
- *cs << " " << this->name () << "(CORBA::Environment &env)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
-
- // declare a return type
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS);
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_client_stubs - "
- "retval declaration failure\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_ATTRIBUTE_RETVAL_EXCEPTION_CS);
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_client_stubs - "
- "failure returning from exception\n"),
- -1);
- }
- cg->pop ();
-
- cs->decr_indent ();
- *cs << "}" << nl;
- *cs << "this->Release (); // QueryInterface has bumped up our refcount" << nl;
-
- // call do_call with appropriate number of arguments
- *cs << "istub->do_call (env, &_get_" << this->flatname () <<
- "_calldata";
-
- 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 (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";
-
- *cs << ");" << nl;
-
- // return the retval
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS);
- s = cg->make_state ();
- if (!s || (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 -1;
- }
- cg->pop ();
-
- cs->decr_indent (0);
- *cs << "\n}\n\n";
-
- if (this->readonly ())
- return 0; // we were readonly, nothing else to do.
-
- // Now generate the stub for the "set" method
- cs->indent (); // start with current indentation level
-
- // generate the TAO_Param_Data table for the "set" method
- *cs << "static const TAO_Param_Data _set_" << this->flatname () <<
- "_paramdata [] = " << nl;
- *cs << "{\n";
- cs->incr_indent ();
-
- // entry for the return type
- *cs << "{CORBA::_tc_void, PARAM_RETURN, 0}," << nl;
- *cs << "{" << bt->tc_name () << ", PARAM_IN, 0}\n";
- cs->decr_indent ();
- *cs << "};\n\n";
-
- // now generate the calldata table
-
- cs->indent ();
- *cs << "static const TAO_Call_Data _set_" << this->flatname () << "_calldata = "
- << nl;
- *cs << "{";
- // prepend a "_set_"
- *cs << "\"_set_" << this->local_name () << "\", ";
- *cs << "1, "; // always a twoway call
- *cs << "2, "; // size is 2
- // insert the address of the paramdata table
- *cs << "_set_" << this->flatname () << "_paramdata, ";
- // XXXASG - Exception list goes here (if it exists) - TODO
- *cs << "0, 0};\n\n";
-
- // now generate the actual stub
-
- cs->indent ();
- *cs << "void " << this->name () << "(";
- // generate the in parameter
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS);
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_operation::gen_client_stubs - "
- "failure in argument generation in signature\n"),
- -1);
- }
- cg->pop ();
-
- // last argument - is always CORBA::Environment
- *cs << ", CORBA::Environment &env)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
-
- // 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;
- *cs << "return;\n";
- cs->decr_indent ();
- *cs << "}" << nl;
- *cs << "this->Release (); // QueryInterface has bumped up our refcount" << nl;
-
- // do any pre do_call stuff with the lone IN parameter
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS);
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_atribute::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, &_set_" << this->flatname () <<
- "_calldata, 0"; // no return value
-
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS);
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_client_stubs - "
- "in param in docall generation failure\n"),
- -1);
- return -1;
- }
- cg->pop ();
- *cs << ");" << nl;
-
- // do any post do_call processing
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS);
- s = cg->make_state ();
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_client_stubs\n"
- "post docall generation failure\n"),
- -1);
- return -1;
- }
- cg->pop ();
-
- cs->decr_indent (0);
- *cs << "\n}\n\n";
-
- return 0;
-}
-
-int
-be_attribute::gen_server_header (void)
-{
- TAO_OutStream *sh; // output stream
- be_type *bt; // type node
- be_state *s; // state based code generator object
- TAO_NL nl; // newline generator
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- sh = cg->server_header ();
-
- // first retrieve the type
- bt = be_type::narrow_from_decl (this->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_header - "
- "bad type\n"),
- -1);
- }
-
- // first the "get" method
-
- sh->indent (); // start with the current indentation level
-
- // the retrieve method is defined pure virtual
- *sh << "virtual ";
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH); // we are now generating
- // an operation
- // definition with the
- // return type first
-
- s = cg->make_state (); // retrieve state based object
-
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_header - "
- "return type generation failure\n"),
- -1);
- }
- cg->pop (); // restore previous state
-
- *sh << " " << this->local_name () << " (CORBA::Environment &env) = 0;" << nl;
-
- // generate the static method corresponding to the method
- *sh << "static void _get_" << this->local_name () <<
- "_skel (CORBA::ServerRequest &req, void *obj, " <<
- "void *context, CORBA::Environment &env);\n\n";
-
-
- // now the set method. However, this is not defined if we are readonly
- if (this->readonly ())
- return 0;
-
- sh->indent ();
- *sh << "virtual void " << this->local_name () << "(";
-
- // we pass the type as an "in" parameter
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH);
-
- s = cg->make_state (); // retrieve state based object
-
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_header - "
- "in param type generation failure\n"),
- -1);
- }
- cg->pop (); // restore previous state
- *sh << ", CORBA::Environment &env) = 0;" << nl;
-
- // generate the static method corresponding to the method
- *sh << "static void _set_" << this->local_name () <<
- "_skel (CORBA::ServerRequest &req, void *obj, " <<
- "void *context, CORBA::Environment &env);\n\n";
-
-
- return 0;
-}
-
-int
-be_attribute::gen_server_skeletons (void)
-{
- TAO_OutStream *ss; // output stream
- TAO_NL nl; // end line
- be_type *bt; // type node
- be_state *s; // state based code gen object
- be_interface *intf; // enclosing interface node
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- ss = cg->server_skeletons ();
-
- ss->indent (); // start with the current indentation level
-
- // retrieve our type
- bt = be_type::narrow_from_decl (this->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_skeletons - "
- "bad type\n"),
- -1);
- }
-
- // retrieve our enclosing interface decl
- intf = be_interface::narrow_from_decl (ScopeAsDecl (this->defined_in ()));
- if (!intf)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_skeletons - "
- "bad enclosing interface\n"),
- -1);
- }
-
-
- // code generation - first the "get" method
- *ss << "void " << intf->full_skel_name () << "::_get_"
- << this->local_name () << "_skel ("
- << "CORBA::ServerRequest &_tao_server_request, "
- << "void *_tao_object_reference, void * /*context*/, "
- << "CORBA::Environment &_tao_environment)" << nl;
- *ss << "{\n";
- ss->incr_indent ();
- // define a variable that will eventually point to our implementation object
- *ss << intf->full_skel_name () << "_ptr impl = (" << intf->full_skel_name ()
- << "_ptr) _tao_object_reference;" << nl;
- // store the result in this Any
- *ss << "CORBA::Any *result;" << nl;
- // emit the return type
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS); // emit type for return
- // value
- // get a state based code gen object
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_skeletons - "
- "codegen for return val decl failed\n"),
- -1);
- }
- cg->pop ();
-
- ss->indent ();
- *ss << "// this method has no incoming parameters. Nothing to parse" << nl;
-
- // make the upcall
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS);
- s = cg->make_state ();
- // emit code to assign to retval
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_skeletons - "
- "codegen for return val assign failed\n"),
- -1);
- }
- *ss << " = impl->" << this->local_name () << "(_tao_environment);" << nl;
- cg->pop ();
-
- // insert our return val into the result
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS);
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_skeletons - "
- "codegen for returning result failed\n"),
- -1);
- }
- cg->pop ();
- // insert the result into the server request
- *ss << "_tao_server_request.result (result, _tao_environment);\n";
- ss->decr_indent ();
- *ss << "}\n\n";
-
- if (this->readonly ())
- return 0; // nothing else to do as we are readonly
-
- // generate skeleton for the "set" method
-
- ss->indent ();
- *ss << "void " << intf->full_skel_name () << "::_set_"
- << this->local_name () << "_skel ("
- << "CORBA::ServerRequest &_tao_server_request, "
- << "void *_tao_object_reference, void * /*context*/, "
- << "CORBA::Environment &_tao_environment)" << nl;
- *ss << "{\n";
- ss->incr_indent ();
- // define an NVList to hold the in argument
- *ss << "CORBA::NVList_ptr nvlist;" << nl;
- // define a variable that will eventually point to our implementation object
- *ss << intf->full_skel_name () << "_ptr impl = (" << intf->full_skel_name
- () << "_ptr)_tao_object_reference;" << nl;
-
- // 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 (1, nvlist); // initialize a list" << nl;
-
- // 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_ATTRIBUTE_INPARAM_TYPE_SS);
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_skeletons - "
- "codegen for returning result failed\n"),
- -1);
- }
- cg->pop ();
-
- *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_ATTRIBUTE_PRE_UPCALL_SS);
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_skeletons - "
- "preupcall code failed\n"),
- -1);
- }
- cg->pop ();
-
- // make the upcall
- *ss << "impl->" << this->local_name () << "(";
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS);
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_skeletons - "
- "upcall code failed\n"),
- -1);
- }
- cg->pop ();
- *ss << "_tao_environment);" << nl;
-
- cg->push (TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS);
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_attribute::gen_server_skeletons - "
- "post upcall code failed\n"),
- -1);
- }
- cg->pop ();
-
- *ss << "\n";
- ss->decr_indent ();
- *ss << "}\n\n";
-
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_attribute::gen_client_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_attribute::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-int
-be_attribute::accept (be_visitor *visitor)
-{
- return visitor->visit_attribute (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_attribute, AST_Attribute, be_decl)
-IMPL_NARROW_FROM_DECL (be_attribute)
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
deleted file mode 100644
index e613db990e8..00000000000
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ /dev/null
@@ -1,567 +0,0 @@
-/* -*- c++ -*- */
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_codegen.cpp
-//
-// = DESCRIPTION
-//
-// Code generation
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-TAO_CodeGen *tao_cg = TAO_CODEGEN::instance ();
-
-static const int CHUNK = 100;
-
-/* BE global Data */
-TAO_CodeGen::TAO_CodeGen (void)
- : client_header_ (0),
- client_stubs_ (0),
- client_inline_ (0),
- server_header_ (0),
- server_skeletons_ (0),
- server_inline_ (0),
- curr_os_ (0),
- state_ (new TAO_CodeGen::CG_STATE [CHUNK]),
- top_ (0),
- size_ (CHUNK),
- visitor_factory_ (0)
-{
- // set the current code generation state
- this->state_ [this->top_++] = TAO_CodeGen::TAO_INITIAL;
-}
-
-// destructor
-TAO_CodeGen::~TAO_CodeGen (void)
-{
- delete this->client_header_;
- delete this->server_header_;
- delete this->client_stubs_;
- delete this->server_skeletons_;
- delete this->client_inline_;
- delete this->server_inline_;
- this->curr_os_ = 0;
- delete [] this->state_;
- delete this->visitor_factory_;
-}
-
-// visitor factory method
-be_visitor *
-TAO_CodeGen::make_visitor (be_visitor_context *ctx)
-{
- ACE_ASSERT (this->visitor_factory_ != 0);
- return this->visitor_factory_->make_visitor (ctx);
-}
-
-// factory method
-be_state *
-TAO_CodeGen::make_state (void)
-{
- switch (this->state ())
- {
- case TAO_STRUCT_CH:
- case TAO_STRUCT_CS:
- case TAO_STRUCT_CI:
- return TAO_BE_STATE_STRUCT::instance ();
- case TAO_UNION_DISCTYPEDEFN_CH:
- return TAO_BE_STATE_UNION_DISCTYPEDEFN_CH::instance ();
- case TAO_UNION_DISCTYPEDEFN_CI:
- return TAO_BE_STATE_UNION_DISCTYPEDEFN_CI::instance ();
- case TAO_UNION_PUBLIC_CH:
- return TAO_BE_STATE_UNION_PUBLIC_CH::instance ();
- case TAO_UNION_PUBLIC_CI:
- return TAO_BE_STATE_UNION_PUBLIC_CI::instance ();
- case TAO_UNION_PUBLIC_CS:
- case TAO_UNION_PUBLIC_ASSIGN_CS:
- return TAO_BE_STATE_UNION_PUBLIC_CS::instance ();
- case TAO_UNION_PRIVATE_CH:
- return TAO_BE_STATE_UNION_PRIVATE_CH::instance ();
- case TAO_OPERATION_CH:
- case TAO_OPERATION_RETURN_TYPE_CS:
- case TAO_OPERATION_RETVAL_DECL_CS:
- case TAO_OPERATION_RETVAL_EXCEPTION_CS:
- case TAO_OPERATION_RETVAL_RETURN_CS:
- case TAO_OPERATION_SH:
- case TAO_OPERATION_RETVAL_DECL_SS:
- case TAO_OPERATION_RETVAL_ASSIGN_SS:
- case TAO_OPERATION_RESULT_SS:
- return TAO_BE_STATE_OPERATION::instance ();
- case TAO_ARGUMENT_CH:
- case TAO_ARGUMENT_CS:
- case TAO_ARGUMENT_PRE_DOCALL_CS:
- case TAO_ARGUMENT_DOCALL_CS:
- case TAO_ARGUMENT_POST_DOCALL_CS:
- case TAO_ARGUMENT_SH:
- case TAO_ARGUMENT_SS:
- case TAO_ARGUMENT_VARDECL_SS:
- case TAO_ARGUMENT_PRE_UPCALL_SS:
- case TAO_ARGUMENT_UPCALL_SS:
- case TAO_ARGUMENT_POST_UPCALL_SS:
- return TAO_BE_STATE_ARGUMENT::instance ();
- case TAO_TYPEDEF_CH:
- case TAO_TYPEDEF_CS:
- case TAO_TYPEDEF_CI:
- return TAO_BE_STATE_TYPEDEF::instance ();
- case TAO_ARRAY_DEFN_CH:
- case TAO_ARRAY_OTHER_CH:
- case TAO_ARRAY_DEFN_CI:
- return TAO_BE_STATE_ARRAY::instance ();
- case TAO_SEQUENCE_BASE_CH:
- case TAO_SEQUENCE_BASE_CS:
- case TAO_SEQUENCE_BASE_CI:
- case TAO_SEQUENCE_BODY_CH:
- case TAO_SEQUENCE_BODY_CS:
- case TAO_SEQUENCE_BODY_CI:
- case TAO_SEQELEM_RETTYPE_CH:
- case TAO_SEQELEM_RETTYPE_CI:
- case TAO_SEQELEM_RETTYPE_CS:
- return TAO_BE_STATE_SEQUENCE::instance ();
- case TAO_ATTRIBUTE_RETURN_TYPE_CH:
- case TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- case TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_ATTRIBUTE_RETVAL_DECL_CS:
- case TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- case TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- case TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_ATTRIBUTE_PRE_DOCALL_CS:
- case TAO_ATTRIBUTE_DOCALL_CS:
- case TAO_ATTRIBUTE_POST_DOCALL_CS:
- case TAO_ATTRIBUTE_RETURN_TYPE_SH:
- case TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- case TAO_ATTRIBUTE_RETVAL_DECL_SS:
- case TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- case TAO_ATTRIBUTE_RESULT_SS:
- case TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- case TAO_ATTRIBUTE_PRE_UPCALL_SS:
- case TAO_ATTRIBUTE_UPCALL_SS:
- case TAO_ATTRIBUTE_POST_UPCALL_SS:
- return TAO_BE_STATE_ATTRIBUTE::instance ();
- case TAO_EXCEPTION_CH:
- case TAO_EXCEPTION_CTOR_CH:
- case TAO_EXCEPTION_CS:
- case TAO_EXCEPTION_CTOR_CS:
- case TAO_EXCEPTION_CTOR_ASSIGN_CS:
- case TAO_EXCEPTION_CI:
- return TAO_BE_STATE_EXCEPTION::instance ();
- default:
- return 0;
- }
-}
-
-// change the string to all upcase
-const char *
-TAO_CodeGen::upcase (const char *str)
-{
- static char upcase_str [NAMEBUFSIZE];
-
- ACE_OS::memset (upcase_str, '\0', NAMEBUFSIZE);
- // convert letters in str to upcase
- for (unsigned int i=0; i < ACE_OS::strlen (str); i++)
- {
- if (isalpha (str [i]))
- {
- upcase_str[i] = toupper (str [i]);
- }
- else
- {
- // copy it as it is
- upcase_str[i] = str[i];
- }
- }
- return upcase_str;
-}
-
-// set the client header stream
-int
-TAO_CodeGen::client_header (const char *fname)
-{
- // retrieve the singleton instance to the outstream factory
- TAO_OutStream_Factory *factory = TAO_OUTSTREAM_FACTORY::instance ();
-
- // retrieve a specialized instance
- this->client_header_ = factory->make_outstream ();
- if (!this->client_header_)
- {
- return -1;
- }
-
- if (this->client_header_->open (fname, TAO_OutStream::TAO_CLI_HDR) == -1)
- return -1;
- else
- {
- // now generate the #if !defined clause
- static char macro_name [NAMEBUFSIZE];
-
- ACE_OS::memset (macro_name, '\0', NAMEBUFSIZE);
- const char *suffix = ACE_OS::strstr (fname, ".h");
- if (suffix == 0)
- return -1; // bad file name
- else
- {
- ACE_OS::sprintf (macro_name, "_TAO_IDL_");
- // convert letters in fname to upcase
- for (int i=0; i < (suffix - fname); i++)
- {
- if (isalpha (fname [i]))
- macro_name[i+9] = toupper (fname [i]);
- else if (isdigit (fname [i]))
- macro_name[i+9] = fname[i];
- else
- macro_name[i+9] = '_';
- }
-
- ACE_OS::strcat (macro_name, "_H_");
-
- this->client_header_->print ("#if !defined (%s)\n", macro_name);
- this->client_header_->print ("#define %s\n\n", macro_name);
- *this->client_header_ << "#include \"tao/corba.h\"\n";
-
- if (idl_global->export_include () != 0)
- {
- *this->client_header_ << "#include \""
- << idl_global->export_include ()
- << "\"\n";
- }
-
- // We must include all the skeleton headers corresponding to
- // IDL files included by the current IDL file.
- for (size_t j = 0;
- j < idl_global->n_include_file_names ();
- ++j)
- {
- String* idl_name =
- idl_global->include_file_names()[j];
-
- const char* client_hdr =
- IDL_GlobalData::be_get_client_hdr (idl_name);
-
- if (client_hdr != 0)
- {
- this->client_header_->print ("#include \"%s\"\n",
- client_hdr);
- }
- else
- {
- ACE_ERROR ((LM_WARNING,
- "WARNING, invalid file '%s' included\n",
- idl_name->get_string ()));
- }
- }
- *this->client_header_ << "\n";
- return 0;
- }
- }
-}
-
-// get the client header stream
-TAO_OutStream *
-TAO_CodeGen::client_header (void)
-{
- return this->client_header_;
-}
-
-// set the client stub stream
-int
-TAO_CodeGen::client_stubs (const char *fname)
-{
- // retrieve the singleton instance to the outstream factory
- TAO_OutStream_Factory *factory = TAO_OUTSTREAM_FACTORY::instance ();
-
- // retrieve a specialized instance
- this->client_stubs_ = factory->make_outstream ();
- if (!this->client_stubs_)
- {
- return -1;
- }
-
- if (this->client_stubs_->open (fname, TAO_OutStream::TAO_CLI_IMPL) == -1)
- {
- return -1;
- }
- // generate the include statement for the client header
- *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";
- *this->client_stubs_ << "#include \"" <<
- idl_global->be_get_client_inline_fname () << "\"\n";
- *this->client_stubs_ << "#endif // !defined INLINE\n\n";
- return 0;
-}
-
-// get the client stubs stream
-TAO_OutStream *
-TAO_CodeGen::client_stubs (void)
-{
- return this->client_stubs_;
-}
-
-// set the client inline stream
-int
-TAO_CodeGen::client_inline (const char *fname)
-{
- // retrieve the singleton instance to the outstream factory
- TAO_OutStream_Factory *factory = TAO_OUTSTREAM_FACTORY::instance ();
-
- // retrieve a specialized instance
- this->client_inline_ = factory->make_outstream ();
- if (!this->client_inline_)
- {
- return -1;
- }
-
- return this->client_inline_->open (fname, TAO_OutStream::TAO_CLI_INL);
-}
-
-// get the client inline stream
-TAO_OutStream *
-TAO_CodeGen::client_inline (void)
-{
- return this->client_inline_;
-}
-
-// set the server header stream
-int
-TAO_CodeGen::server_header (const char *fname)
-{
- // retrieve the singleton instance to the outstream factory
- TAO_OutStream_Factory *factory = TAO_OUTSTREAM_FACTORY::instance ();
-
- // retrieve a specialized instance
- this->server_header_ = factory->make_outstream ();
- if (!this->server_header_)
- {
- return -1;
- }
-
- if (this->server_header_->open (fname, TAO_OutStream::TAO_SVR_HDR) == -1)
- return -1;
- else
- {
- // now generate the #if !defined clause
- static char macro_name [NAMEBUFSIZE];
-
- ACE_OS::memset (macro_name, '\0', NAMEBUFSIZE);
- const char *suffix = ACE_OS::strstr (fname, ".h");
- if (suffix == 0)
- return -1; // bad file name
- else
- {
- ACE_OS::sprintf (macro_name, "_TAO_IDL_");
- // convert letters in fname to upcase
- for (int i=0; i < (suffix - fname); i++)
- if (isalpha (fname [i]))
- macro_name[i+9] = toupper (fname [i]);
- else
- macro_name[i+9] = fname[i];
-
- ACE_OS::strcat (macro_name, "_H_");
-
- this->server_header_->print ("#if !defined (%s)\n", macro_name);
- this->server_header_->print ("#define %s\n\n", macro_name);
-
- // We must include all the skeleton headers corresponding to
- // IDL files included by the current IDL file.
- for (size_t j = 0;
- j < idl_global->n_include_file_names ();
- ++j)
- {
- String* idl_name =
- idl_global->include_file_names()[j];
-
- const char* server_hdr =
- IDL_GlobalData::be_get_server_hdr (idl_name);
-
- this->server_header_->print ("#include \"%s\"\n",
- server_hdr);
- }
- // the server header should include the client header
- *this->server_header_ << "#include \"" <<
- idl_global->be_get_client_hdr_fname () << "\"\n\n";
-
- return 0;
- }
- }
-}
-
-// get the server header stream
-TAO_OutStream *
-TAO_CodeGen::server_header (void)
-{
- return this->server_header_;
-}
-
-// set the server skeletons stream
-int
-TAO_CodeGen::server_skeletons (const char *fname)
-{
- // retrieve the singleton instance to the outstream factory
- TAO_OutStream_Factory *factory = TAO_OUTSTREAM_FACTORY::instance ();
-
- // retrieve a specialized instance
- this->server_skeletons_ = factory->make_outstream ();
- if (!this->server_skeletons_)
- {
- return -1;
- }
-
- if (this->server_skeletons_->open (fname, TAO_OutStream::TAO_SVR_IMPL) == -1)
- {
- return -1;
- }
-
- // generate the include statement for the server header
- *this->server_skeletons_ << "#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->server_skeletons_ << "#if !defined (__ACE_INLINE__)\n";
- *this->server_skeletons_ << "#include \"" <<
- idl_global->be_get_server_inline_fname () << "\"\n";
- *this->server_skeletons_ << "#endif // !defined INLINE\n\n";
- return 0;
-}
-
-// get the server skeletons stream
-TAO_OutStream *
-TAO_CodeGen::server_skeletons (void)
-{
- return this->server_skeletons_;
-}
-
-// set the server inline stream
-int
-TAO_CodeGen::server_inline (const char *fname)
-{
- // retrieve the singleton instance to the outstream factory
- TAO_OutStream_Factory *factory = TAO_OUTSTREAM_FACTORY::instance ();
-
- // retrieve a specialized instance
- this->server_inline_ = factory->make_outstream ();
- if (!this->server_inline_)
- {
- return -1;
- }
-
- return this->server_inline_->open (fname, TAO_OutStream::TAO_SVR_INL);
-}
-
-// get the server inline stream
-TAO_OutStream *
-TAO_CodeGen::server_inline (void)
-{
- return this->server_inline_;
-}
-
-// put the last #endif in the client and server headers
-int
-TAO_CodeGen::end_client_header (void)
-{
- // insert the code to include the inline file
- *this->client_header_ << "\n#if defined (__ACE_INLINE__)\n";
- *this->client_header_ << "#include \"" <<
- idl_global->be_get_client_inline_fname () << "\"\n";
- *this->client_header_ << "#endif // defined INLINE\n\n";
-
- // code to put the last #endif
- *this->client_header_ << "\n#endif // if !defined\n";
- return 0;
-}
-
-int
-TAO_CodeGen::end_server_header (void)
-{
- // insert the code to include the inline file
- *this->server_header_ << "\n#if defined (__ACE_INLINE__)\n";
- *this->server_header_ << "#include \"" <<
- idl_global->be_get_server_inline_fname () << "\"\n";
- *this->server_header_ << "#endif // defined INLINE\n\n";
-
- // code to put the last #endif
- *this->server_header_ << "\n#endif // if !defined\n";
- return 0;
-}
-
-// We use the following helper functions to pass information. This class is the
-// best place to pass such information rather than passing information through
-// global variables spread everywhere. This class is a singleton and is
-// effectively a global.
-
-void
-TAO_CodeGen::outstream (TAO_OutStream *os)
-{
- this->curr_os_ = os;
-}
-
-TAO_OutStream *
-TAO_CodeGen::outstream (void)
-{
- return this->curr_os_;
-}
-
-void
-TAO_CodeGen::push (TAO_CodeGen::CG_STATE s)
-{
- if (this->top_ == this->size_)
- {
- TAO_CodeGen::CG_STATE *temp = this->state_;
- this->size_ += CHUNK;
- this->state_ = new TAO_CodeGen::CG_STATE [this->size_];
- for (int i=0; i < this->top_; i++)
- this->state_ [i] = temp [i];
- delete []temp;
- }
- this->state_[this->top_++] = s;
-}
-
-void
-TAO_CodeGen::pop (void)
-{
- this->top_--;
-}
-
-TAO_CodeGen::CG_STATE
-TAO_CodeGen::state (void)
-{
- return this->state_[this->top_ - 1]; // top points to the next free slot
-}
-
-void
-TAO_CodeGen::reset (void)
-{
- this->top_ = 1; // the 0th posn is always the INITIAL state
-}
-
-void
-TAO_CodeGen::node (be_decl *n)
-{
- this->node_ = n;
-}
-
-be_decl *
-TAO_CodeGen::node (void)
-{
- return this->node_;
-}
-
-void
-TAO_CodeGen::visitor_factory (TAO_Visitor_Factory *f)
-{
- this->visitor_factory_ = f;
-}
diff --git a/TAO/TAO_IDL/be/be_constant.cpp b/TAO/TAO_IDL/be/be_constant.cpp
deleted file mode 100644
index 962436a8de3..00000000000
--- a/TAO/TAO_IDL/be/be_constant.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_constant.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Constant that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Constant
- */
-be_constant::be_constant (void)
-{
- this->size_type (be_decl::FIXED);
-}
-
-be_constant::be_constant (AST_Expression::ExprType et,
- AST_Expression *v,
- UTL_ScopedName *n,
- UTL_StrList *p)
- : AST_Constant (et, v, n, p),
- AST_Decl (AST_Decl::NT_const, n, p)
-{
- this->size_type (be_decl::FIXED);
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// Generates the client-side header information for the constant
-int
-be_constant::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_CONSTANT_CH);
-
- ch = cg->client_header ();
-
- // if we are defined in the outermost scope, then the value is assigned
- // to us here itself, else it will be in the *.cpp file
-
- ch->indent (); // start from whatever indentation level we were at
- *ch << "static const " << this->exprtype_to_string () << " " << local_name ();
- if (!this->is_nested ())
- {
- // We were defined at the outermost scope. So we put the value in the
- // header itself
- *ch << " = " << this->constant_value ();
- }
- *ch << ";\n\n";
- cg->pop ();
- return 0;
-}
-
-// Generates the client-side stubs for the constant
-int
-be_constant::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_CONSTANT_CS);
-
- cs = cg->client_stubs ();
-
- if (this->is_nested ())
- {
- // for those constants not defined in the outer most scope, they get
- // assigned to their values in the
- cs->indent (); // start from whatever indentation level we were at
- *cs << "const " << this->exprtype_to_string () << " " << this->name ();
- *cs << " = " << this->constant_value ();
- *cs << ";\n\n";
- }
- cg->pop ();
- return 0;
-}
-
-// Generates the server-side header information for the constant
-int
-be_constant::gen_server_header (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side skeletons for the constant
-int
-be_constant::gen_server_skeletons (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_constant::gen_client_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_constant::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-char *
-be_constant::exprtype_to_string (void)
-{
- switch (this->et ())
- {
- case AST_Expression::EV_short:
- return "CORBA::Short";
- case AST_Expression::EV_ushort:
- return "CORBA::UShort";
- case AST_Expression::EV_long:
- return "CORBA::Long";
- case AST_Expression::EV_ulong:
- return "CORBA::ULong";
- case AST_Expression::EV_float:
- return "CORBA::Float";
- case AST_Expression::EV_double:
- return "CORBA::Double";
- case AST_Expression::EV_char:
- return "CORBA::Char";
- case AST_Expression::EV_octet:
- return "CORBA::Octet";
- case AST_Expression::EV_bool:
- return "CORBA::Boolean";
- case AST_Expression::EV_string:
- return "char *const";
- case AST_Expression::EV_any:
- return "CORBA::Any";
- case AST_Expression::EV_void:
- return "void";
- case AST_Expression::EV_none:
- return "none";
- case AST_Expression::EV_longlong:
- case AST_Expression::EV_ulonglong:
- case AST_Expression::EV_longdouble:
- case AST_Expression::EV_wchar:
- case AST_Expression::EV_wstring:
- return NULL;
- }
- return NULL;
-}
-
-int
-be_constant::accept (be_visitor *visitor)
-{
- return visitor->visit_constant (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_constant, AST_Constant, be_decl)
-IMPL_NARROW_FROM_DECL (be_constant)
diff --git a/TAO/TAO_IDL/be/be_decl.cpp b/TAO/TAO_IDL/be/be_decl.cpp
deleted file mode 100644
index 53914febf1a..00000000000
--- a/TAO/TAO_IDL/be/be_decl.cpp
+++ /dev/null
@@ -1,568 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_decl.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Decl that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// Default Constructor
-be_decl::be_decl (void)
- : cli_hdr_gen_ (I_FALSE),
- cli_stub_gen_ (I_FALSE),
- cli_inline_gen_ (I_FALSE),
- srv_hdr_gen_ (I_FALSE),
- srv_skel_gen_ (I_FALSE),
- srv_inline_gen_ (I_FALSE),
- fullname_ (0),
- flatname_ (0),
- repoID_ (0),
- size_type_ (be_decl::SIZE_UNKNOWN),
- encap_len_ (-1)
-{
-}
-
-// Constructor
-be_decl::be_decl (AST_Decl::NodeType type, UTL_ScopedName *n, UTL_StrList
- *pragmas)
- : AST_Decl (type, n, pragmas),
- cli_hdr_gen_ (I_FALSE),
- cli_stub_gen_ (I_FALSE),
- cli_inline_gen_ (I_FALSE),
- srv_hdr_gen_ (I_FALSE),
- srv_skel_gen_ (I_FALSE),
- srv_inline_gen_ (I_FALSE),
- fullname_ (0),
- size_type_ (be_decl::SIZE_UNKNOWN),
- encap_len_ (-1)
-{
-}
-
-//destructor
-be_decl::~be_decl (void)
-{
-}
-
-int
-be_decl::gen_encapsulation (void)
-{
- // do nothing
- return 0;
-}
-
-long
-be_decl::tc_encap_len (void)
-{
- return -1;
-}
-
-// return our size type
-be_decl::SIZE_TYPE
-be_decl::size_type (void)
-{
- if (this->size_type_ == be_decl::SIZE_UNKNOWN)
- (void) this->compute_size_type ();
- return this->size_type_;
-}
-
-// set our size type and that of all our ancestors
-void
-be_decl::size_type (be_decl::SIZE_TYPE st)
-{
- // precondition - you cannot set somebody's sizetype to unknown
- ACE_ASSERT (st != be_decl::SIZE_UNKNOWN);
-
- // st can be VARIABLE or FIXED
- if (this->size_type_ == be_decl::SIZE_UNKNOWN) // not set yet
- this->size_type_ = st; // set it
- else if ((this->size_type_ == be_decl::FIXED) &&
- (st == be_decl::VARIABLE))
- // once we are VARIABLE, we cannot be FIXED. But if we were FIXED and then
- // get overwritten to VARIABLE, it is fine. Such a situation occurs only
- // when setting the sizes of structures and unions
- this->size_type_ = st;
-
-
-#if 0
- // if we are just a typedef, nothing else to do
- if (this->node_type () == AST_Decl::NT_typedef)
- return;
-
- // update our parent if it is of a specific type
- if (this->is_nested ())
- {
- // get the scope we are defined in
- be_decl *d = be_decl::narrow_from_decl (ScopeAsDecl (this->defined_in
- ()));
- switch (d->node_type ())
- {
- // only these define valid scopes whose size needs to be set the same
- // as ours.
- case AST_Decl::NT_struct:
- case AST_Decl::NT_union:
- d->size_type (st); // call recursively to set the size type of our
- // ancestors
- default:
- return; // we are done
- }
- } // end else
-#endif
-}
-
-// compute stringified fully scoped name
-void
-be_decl::compute_fullname (void)
-{
- if (fullname_)
- return;
- else
- {
- long namelen;
- UTL_IdListActiveIterator *i;
- long first = I_TRUE;
- long second = I_FALSE;
-
- // in the first loop compute the total length
- namelen = 0;
- i = new UTL_IdListActiveIterator (this->name ());
- while (!(i->is_done ()))
- {
- if (!first)
- namelen += 2; // for "::"
- else if (second)
- first = second = I_FALSE;
- // print the identifier
- namelen += ACE_OS::strlen (i->item ()->get_string ());
- if (first)
- {
- if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0)
- // does not start with a ""
- first = I_FALSE;
- else
- second = I_TRUE;
- }
- i->next ();
- }
- delete i;
-
- this->fullname_ = new char [namelen+1];
- this->fullname_[0] = '\0';
- first = I_TRUE;
- second = I_FALSE;
- i = new UTL_IdListActiveIterator (this->name ());
- while (!(i->is_done ()))
- {
- if (!first)
- ACE_OS::strcat (this->fullname_, "::");
- else if (second)
- first = second = I_FALSE;
- // print the identifier
- ACE_OS::strcat (this->fullname_, i->item ()->get_string ());
- if (first)
- {
- if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0)
- // does not start with a ""
- first = I_FALSE;
- else
- second = I_TRUE;
- }
- i->next ();
- }
- delete i;
- }
- return;
-}
-
-const char*
-be_decl::fullname (void)
-{
- if (!this->fullname_)
- compute_fullname ();
-
- return this->fullname_;
-}
-
-// compute stringified flattened fully scoped name
-void
-be_decl::compute_flatname (void)
-{
- if (flatname_)
- return;
- else
- {
- long namelen;
- UTL_IdListActiveIterator *i;
- long first = I_TRUE;
- long second = I_FALSE;
-
- // in the first loop compute the total length
- namelen = 0;
- i = new UTL_IdListActiveIterator (this->name ());
- while (!(i->is_done ()))
- {
- if (!first)
- namelen += 1; // for "_"
- else if (second)
- first = second = I_FALSE;
- // print the identifier
- namelen += ACE_OS::strlen (i->item ()->get_string ());
- if (first)
- {
- if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0)
- // does not start with a ""
- first = I_FALSE;
- else
- second = I_TRUE;
- }
- i->next ();
- }
- delete i;
-
- this->flatname_ = new char [namelen+1];
- this->flatname_[0] = '\0';
- first = I_TRUE;
- second = I_FALSE;
- i = new UTL_IdListActiveIterator (this->name ());
- while (!(i->is_done ()))
- {
- if (!first)
- ACE_OS::strcat (this->flatname_, "_");
- else if (second)
- first = second = I_FALSE;
- // print the identifier
- ACE_OS::strcat (this->flatname_, i->item ()->get_string ());
- if (first)
- {
- if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0)
- // does not start with a ""
- first = I_FALSE;
- else
- second = I_TRUE;
- }
- i->next ();
- }
- delete i;
- }
- return;
-}
-
-const char*
-be_decl::flatname (void)
-{
- if (!this->flatname_)
- compute_flatname ();
-
- return this->flatname_;
-}
-
-// compute stringified repository ID
-void
-be_decl::compute_repoID (void)
-{
- if (repoID_)
- return;
- else
- {
- long namelen;
- UTL_IdListActiveIterator *i;
- long first = I_TRUE;
- long second = I_FALSE;
-
- // in the first loop compute the total length
- namelen = 8; // for the prefix "IDL:" and suffix ":1.0"
- i = new UTL_IdListActiveIterator (this->name ());
- while (!(i->is_done ()))
- {
- if (!first)
- namelen += 1; // for "/"
- else if (second)
- first = second = I_FALSE;
- // print the identifier
- namelen += ACE_OS::strlen (i->item ()->get_string ());
- if (first)
- {
- if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0)
- // does not start with a ""
- first = I_FALSE;
- else
- second = I_TRUE;
- }
- i->next ();
- }
- delete i;
-
- this->repoID_ = new char [namelen+1];
- this->repoID_[0] = '\0';
- ACE_OS::sprintf (this->repoID_, "%s", "IDL:");
- i = new UTL_IdListActiveIterator (this->name ());
- first = I_TRUE;
- second = I_FALSE;
- while (!(i->is_done ()))
- {
- if (!first)
- ACE_OS::strcat (this->repoID_, "/");
- else if (second)
- first = second = I_FALSE;
- // print the identifier
- ACE_OS::strcat (this->repoID_, i->item ()->get_string ());
- if (first)
- {
- if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0)
- // does not start with a ""
- first = I_FALSE;
- else
- second = I_TRUE;
- }
- i->next ();
- }
- delete i;
- ACE_OS::strcat (this->repoID_, ":1.0");
- }
- return;
-}
-
-const char *
-be_decl::repoID (void)
-{
- if (!this->repoID_)
- compute_repoID ();
-
- return this->repoID_;
-}
-
-// converts a string name into an array of 4 byte longs
-int
-be_decl::tc_name2long (const char *name, long *&larr, long &arrlen)
-{
- static long buf [NAMEBUFSIZE / sizeof (long)];
- long slen;
- unsigned int i;
-
- slen = ACE_OS::strlen (name) + 1; // 1 for NULL terminating
-
- // compute the number of bytes necessary to hold the name rounded to the next
- // multiple of 4 (i.e., size of long)
- arrlen = slen/4 + (slen%4 ? 1:0);
-
- ACE_OS::memset (buf, '\0', arrlen*4);
- larr = buf;
-
- for (i=0; i < ACE_OS::strlen (name); i++)
- {
- long shift; // num bytes to shift left
-
- shift = 3 - (i%4);
- // store the computed shifted quantity in the appropriate byte of the
- // array to be returned
- larr [i/4] |= ((name[i] & 0xff) << (shift*8));
- }
- return 0;
-}
-
-idl_bool
-be_decl::is_nested (void)
-{
- be_decl *d;
-
- d = be_scope::narrow_from_scope (this->defined_in ())->decl ();
- // if we have an outermost scope and if that scope is not that of the Root,
- // then we are defined at some nesting level
- if (d && d->node_type () != AST_Decl::NT_root)
- return I_TRUE;
-
- return I_FALSE;
-}
-
-// return the length in bytes to hold the repoID inside a typecode. This
-// comprises 4 bytes indicating the length of the string followed by the actual
-// string represented as longs.
-long
-be_decl::repoID_encap_len (void)
-{
- long slen;
-
- slen = ACE_OS::strlen (this->repoID ()) + 1; // + 1 for NULL terminating char
- // the number of bytes to hold the string must be a multiple of 4 since this
- // will be represented as an array of longs
- return 4 + 4 * (slen/4 + (slen%4 ? 1:0));
-}
-
-// return the length in bytes to hold the name inside a typecode. This
-// comprises 4 bytes indicating the length of the string followed by the actual
-// string represented as longs.
-long
-be_decl::name_encap_len (void)
-{
- long slen;
-
- slen = ACE_OS::strlen (this->local_name ()->get_string ()) + 1; // + 1 for
- // NULL terminating char
- // the number of bytes to hold the string must be a multiple of 4 since this
- // will be represented as an array of longs
- return 4 + 4 * (slen/4 + (slen%4 ? 1:0));
-}
-
-// compute the size type of the node in question
-int
-be_decl::compute_size_type (void)
-{
- return 0;
-}
-
-// return the scope created by this node (if one exists, else NULL)
-be_scope *
-be_decl::scope (void)
-{
- be_decl *d = this;
-
- switch (this->node_type()) {
- case AST_Decl::NT_interface_fwd:
- /*
- * Resolve forward declared interface by looking at full_definition()
- * field and iterating
- */
- d = be_interface::narrow_from_decl ((be_interface_fwd::narrow_from_decl
- (this))->full_definition ());
- /*
- * Fall through
- */
- case AST_Decl::NT_interface:
- return be_interface::narrow_from_decl (d);
- case AST_Decl::NT_module:
- return be_module::narrow_from_decl (d);
- case AST_Decl::NT_root:
- return be_root::narrow_from_decl (d);
- case AST_Decl::NT_except:
- return be_exception::narrow_from_decl (d);
- case AST_Decl::NT_union:
- return be_union::narrow_from_decl (d);
- case AST_Decl::NT_struct:
- return be_structure::narrow_from_decl (d);
- case AST_Decl::NT_enum:
- return be_enum::narrow_from_decl (d);
- case AST_Decl::NT_op:
- return be_operation::narrow_from_decl (d);
- case AST_Decl::NT_sequence:
- return be_sequence::narrow_from_decl (d);
- default:
- return (be_scope *)0;
- }
-}
-
-// boolean methods to test if code was already generated
-idl_bool
-be_decl::cli_hdr_gen (void)
-{
- return this->cli_hdr_gen_;
-}
-
-idl_bool
-be_decl::cli_stub_gen (void)
-{
- return this->cli_stub_gen_;
-}
-
-idl_bool
-be_decl::cli_inline_gen (void)
-{
- return this->cli_inline_gen_;
-}
-
-idl_bool
-be_decl::srv_hdr_gen (void)
-{
- return this->srv_hdr_gen_;
-}
-
-idl_bool
-be_decl::srv_skel_gen (void)
-{
- return this->srv_skel_gen_;
-}
-
-idl_bool
-be_decl::srv_inline_gen (void)
-{
- return this->srv_inline_gen_;
-}
-
-// set the flag indicating that code generation is done
-void
-be_decl::cli_hdr_gen (idl_bool val)
-{
- this->cli_hdr_gen_ = val;
-}
-
-void
-be_decl::cli_stub_gen (idl_bool val)
-{
- this->cli_stub_gen_ = val;
-}
-
-void
-be_decl::cli_inline_gen (idl_bool val)
-{
- this->cli_inline_gen_ = val;
-}
-
-void
-be_decl::srv_hdr_gen (idl_bool val)
-{
- this->srv_hdr_gen_ = val;
-}
-
-void
-be_decl::srv_skel_gen (idl_bool val)
-{
- this->srv_skel_gen_ = val;
-}
-
-void
-be_decl::srv_inline_gen (idl_bool val)
-{
- this->srv_inline_gen_ = val;
-}
-
-int
-be_decl::accept (be_visitor *visitor)
-{
- return visitor->visit_decl (this);
-}
-
-idl_bool
-be_decl::is_child (be_decl *node)
-{
- if (this->defined_in ())
- {
- be_decl *bd;
-
- bd = be_scope::narrow_from_scope (this->defined_in ())->decl ();
- if (!bd)
- return 0;
-
- if (!ACE_OS::strcmp (bd->fullname (), node->fullname ()))
- return 1; // true
- }
- return 0; // not a child
-}
-
-// narrowing methods
-IMPL_NARROW_METHODS1 (be_decl, AST_Decl)
-IMPL_NARROW_FROM_DECL (be_decl)
diff --git a/TAO/TAO_IDL/be/be_enum.cpp b/TAO/TAO_IDL/be/be_enum.cpp
deleted file mode 100644
index bed7a98a493..00000000000
--- a/TAO/TAO_IDL/be/be_enum.cpp
+++ /dev/null
@@ -1,335 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_enum.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Enum that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Enum
- */
-be_enum::be_enum (void)
-{
- this->size_type (be_decl::FIXED);
-}
-
-be_enum::be_enum (UTL_ScopedName *n, UTL_StrList *p)
- : AST_Enum (n, p),
- AST_Decl (AST_Decl::NT_enum, n, p),
- UTL_Scope (AST_Decl::NT_enum),
- member_count_ (-1)
-{
- this->size_type (be_decl::FIXED);
-}
-
-// compute total number of members
-int
-be_enum::compute_member_count (void)
-{
- UTL_ScopeActiveIterator *si; // iterator
- AST_Decl *d; // temp node
-
- this->member_count_ = 0;
-
- // if there are elements in this scope
- if (this->nmembers () > 0)
- {
- // instantiate a scope iterator.
- 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 ())
- {
- this->member_count_++;
- }
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-// return the member count
-int
-be_enum::member_count (void)
-{
- if (this->member_count_ == -1)
- this->compute_member_count ();
-
- return this->member_count_;
-}
-
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// Generates the client-side header information for the interface
-int
-be_enum::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
-
- if (!this->cli_hdr_gen_)
- {
- UTL_ScopeActiveIterator *i = new UTL_ScopeActiveIterator(this, IK_decls);
- // scope iterator
- AST_Decl *d; // AST node
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_ENUM_CH);
-
- ch = cg->client_header ();
-
- ch->indent (); // start from whatever indentation level we were at
- *ch << "enum " << this->local_name () << nl;
- *ch << "{\n";
- ch->incr_indent ();
- while (!(i->is_done ()))
- {
- d = i->item ();
- *ch << d->local_name ();
- i->next ();
- if (!(i->is_done()))
- *ch << ", " << nl;
- }
- delete i;
- *ch << "\n";
- ch->decr_indent ();
- *ch << "};" << nl;
- // As per the ORBOS spec, we need the following typedef
- *ch << "typedef " << this->local_name () << " &" << this->local_name () <<
- "_out;\n";
- cg->pop ();
-
- // Generate the typecode decl
- // All names in the root scope have length 2 (for the root and
- // ourself). The children have length greater than 2. Thus, if our name
- // length is 2 or less, we are outermost and our typecode decl must be
- // extern, else we are defined static inside the enclosing scope.
- if (this->name ()->length () > 2)
- {
- // 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 "
- << idl_global->export_macro ()
- << "CORBA::TypeCode_ptr "
- << this->tc_name ()->last_component () << ";\n\n";
- }
- this->cli_hdr_gen_ = I_TRUE;
- }
- return 0;
-}
-
-// Generates the client-side stubs for the interface
-int
-be_enum::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
-
- if (!this->cli_stub_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_ENUM_CS); // set current code gen state
-
- cs = cg->client_stubs ();
-
- // generate the typecode information here
- cs->indent (); // start from current indentation level
- *cs << nl;
- *cs << "static const CORBA::Long _oc_" << this->flatname () << "[] =" <<
- nl;
- *cs << "{\n";
- cs->incr_indent (0);
- if (this->gen_encapsulation () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_enum:Error generating encapsulation\n\n"));
- return -1;
- }
- cs->decr_indent ();
- *cs << "};" << nl;
-
- *cs << "static CORBA::TypeCode _tc__tc_" << this->flatname () <<
- " (CORBA::tk_enum, sizeof (_oc_" << this->flatname () <<
- "), (char *) &_oc_" << this->flatname () <<
- ", CORBA::B_FALSE);" << nl;
- *cs << "CORBA::TypeCode_ptr " << this->tc_name () << " = &_tc__tc_" <<
- this->flatname () << ";\n\n";
- this->cli_stub_gen_ = I_TRUE;
- cg->pop ();
- }
- return 0;
-}
-
-// Generates the server-side header information for the interface
-int
-be_enum::gen_server_header (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side skeletons for the interface
-int
-be_enum::gen_server_skeletons (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_enum::gen_client_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_enum::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// generate typecode.
-// Typecode for enum comprises the enumerated value followed by the
-// encapsulation of the parameters
-
-int
-be_enum::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "CORBA::tk_enum, // typecode kind" << nl;
- *cs << this->tc_encap_len () << ", // encapsulation length\n";
- // now emit the encapsulation
- return this->gen_encapsulation ();
-}
-
-int
-be_enum::gen_encapsulation (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- long i, arrlen;
- long *arr; // an array holding string names converted to array of longs
-
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "TAO_ENCAP_BYTE_ORDER, // byte order" << nl;
- // generate repoID
- *cs << (ACE_OS::strlen (this->repoID ())+1) << ", ";
- (void)this->tc_name2long (this->repoID (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // repository ID = " << this->repoID () << nl;
- // generate name
- *cs << (ACE_OS::strlen (this->local_name ()->get_string ())+1) << ", ";
- (void)this->tc_name2long(this->local_name ()->get_string (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // name = " << this->local_name () << nl;
- // generate the member count
- *cs << this->member_count () << ", // member count\n";
- cs->incr_indent (0);
- // hand over to the scope to generate the typecode for elements
- if (be_scope::gen_encapsulation () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_structure: cannot generate code for members\n"));
- return -1;
- }
- cs->decr_indent (0);
- return 0;
-}
-
-// compute typecode size
-long
-be_enum::tc_size (void)
-{
- // 4 bytes for enumeration, 4 bytes for storing encap length val, followed by the
- // actual encapsulation length
- return 4 + 4 + this->tc_encap_len ();
-}
-
-// return encapsulation length
-long
-be_enum::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- this->encap_len_ = 4; // holds the byte order flag
-
- this->encap_len_ += this->repoID_encap_len (); // repoID storage
-
- // do the same thing for the local name
- this->encap_len_ += this->name_encap_len ();
-
- this->encap_len_ += 4; // to hold the member count
-
- // compute encap length for members
- this->encap_len_ += be_scope::tc_encap_len ();
- }
- 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)
-{
- return visitor->visit_enum (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS3 (be_enum, AST_Enum, be_scope, be_type)
-IMPL_NARROW_FROM_DECL (be_enum)
-IMPL_NARROW_FROM_SCOPE (be_enum)
diff --git a/TAO/TAO_IDL/be/be_enum_val.cpp b/TAO/TAO_IDL/be/be_enum_val.cpp
deleted file mode 100644
index 0a63a7fb3cd..00000000000
--- a/TAO/TAO_IDL/be/be_enum_val.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_enum_val.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_EnumVal that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-be_enum_val::be_enum_val (void)
-{
-}
-
-be_enum_val::be_enum_val (unsigned long v, UTL_ScopedName *n, UTL_StrList *p)
- : AST_Constant (AST_Expression::EV_ulong,
- AST_Decl::NT_enum_val,
- new AST_Expression(v),
- n,
- p),
- AST_Decl (AST_Decl::NT_enum_val, n, p)
-{
-#if 0
- // computes the repoID
- compute_repoID ();
-
- // computes the fully scoped name
- compute_fullname ();
-
- // compute the flattened fully scoped name
- compute_flatname ();
-#endif
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// NOTE: The IDL front end does a strange thing of putting the enum_vals in the
-// Enum decl scope as well as the scope that encloses the ENUM decl. Since we
-// took care of generating the client header declarations for all the
-// enum_vals, we do not do anything in any of the methods below. However, we
-// have to provide them so that whenever be_scope finds an enum_val in a scope
-// that is not an ENUM, it just ignores it.
-
-// Generates the client-side header information for the enum val
-int
-be_enum_val::gen_client_header (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the client-side stubs for the enum val
-int
-be_enum_val::gen_client_stubs (void)
-{
- return 0;
-}
-
-// Generates the server-side header information for the enum val
-int
-be_enum_val::gen_server_header (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side skeletons for the enum val
-int
-be_enum_val::gen_server_skeletons (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_enum_val::gen_client_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_enum_val::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-int
-be_enum_val::gen_encapsulation (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- long i, arrlen;
- long *arr; // an array holding string names converted to array of longs
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- // generate name
- *cs << (ACE_OS::strlen (this->local_name ()->get_string ())+1) << ", ";
- (void)this->tc_name2long(this->local_name ()->get_string (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // name = " << this->local_name () << "\n";
- return 0;
-}
-
-long
-be_enum_val::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- this->encap_len_ = this->name_encap_len (); // for name
- }
-
- return this->encap_len_;
-}
-
-int
-be_enum_val::accept (be_visitor *visitor)
-{
- return visitor->visit_enum_val (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_enum_val, AST_EnumVal, be_decl)
-IMPL_NARROW_FROM_DECL (be_enum_val)
diff --git a/TAO/TAO_IDL/be/be_exception.cpp b/TAO/TAO_IDL/be/be_exception.cpp
deleted file mode 100644
index 975c4381ed6..00000000000
--- a/TAO/TAO_IDL/be/be_exception.cpp
+++ /dev/null
@@ -1,526 +0,0 @@
-//
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_exception.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Exception that provides additional means for C++
-// mapping of an interface.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Exception
- */
-be_exception::be_exception (void)
-{
- this->size_type (be_decl::VARIABLE); // always the case
-}
-
-be_exception::be_exception (UTL_ScopedName *n, UTL_StrList *p)
- : AST_Decl (AST_Decl::NT_except, n, p),
- AST_Structure (AST_Decl::NT_except, n, p),
- UTL_Scope (AST_Decl::NT_except),
- member_count_ (-1)
-{
- this->size_type (be_decl::VARIABLE); // always the case
-}
-
-// compute total number of members
-int
-be_exception::compute_member_count (void)
-{
- UTL_ScopeActiveIterator *si; // iterator
-
- this->member_count_ = 0;
-
- // if there are elements in this scope
- if (this->nmembers () > 0)
- {
- // instantiate a scope iterator.
- si = new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls);
-
- while (!(si->is_done ()))
- {
- // get the next AST decl node
- this->member_count_++;
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-// return the member count
-int
-be_exception::member_count (void)
-{
- if (this->member_count_ == -1)
- this->compute_member_count ();
-
- return this->member_count_;
-}
-
-// CODE GENERATION
-
-int
-be_exception::gen_client_header (void)
-{
- if (!this->cli_hdr_gen_) // not already generated
- {
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- TAO_OutStream *ch = cg->client_header (); // output stream
- TAO_NL nl; // end line
- be_scope *s = be_scope::narrow_from_scope (DeclAsScope (this)); // the
- // scope
- // defined by us
-
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_exception::"
- "gen_client_header - "
- "bad scope\n"), -1);
- }
-
- cg->push (TAO_CodeGen::TAO_EXCEPTION_CH);
- ch->indent (); // start from whatever indentation level we were at
- ch->gen_ifdef_macro (this->flatname (), "_ptr");
-
- ch->indent ();
- *ch << "class " << this->local_name () << ";" << nl;
- // generate the _ptr declaration
- *ch << "typedef " << this->local_name () << " *"
- << this->local_name () << "_ptr;" << nl;
- ch->gen_endif ();
-
- ch->gen_ifdef_macro (this->flatname ());
-
- ch->indent ();
- *ch << "class " << idl_global->export_macro ()
- << " " << this->local_name ()
- << " : public CORBA::UserException" << nl;
- *ch << "{" << nl
- << "public:\n";
- ch->incr_indent ();
- // constructors and destructor
- *ch << this->local_name () << " (void); // default ctor" << nl;
- *ch << this->local_name () << " (const " << this->local_name () <<
- " &); // copy ctor" << nl;
- *ch << "~" << this->local_name () << "(void); // dtor" << nl;
-
- // generate constructor that takes each member as a parameter. We need a
- // new state. Such a constructor exists if we have members
- if (this->member_count () > 0)
- {
- cg->push (TAO_CodeGen::TAO_EXCEPTION_CTOR_CH);
- s->comma (1); // tell the scope to generate a comma after every
- // member is generated
- *ch << this->local_name () << "(";
- if (be_scope::gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_exception::"
- "gen_client_header - "
- "codegen for scope failed\n"), -1);
- }
- *ch << ");" << nl;
- s->comma (0); // revert comma generation state
- cg->pop (); // revert to previous state
- }
-
- // assignment operator
- *ch << this->local_name () << " &operator= (const " << this->local_name
- () << " &);" << nl;
- // the static _narrow method
- *ch << "static " << this->local_name () <<
- " *_narrow (CORBA::Exception *);\n";
-
- // generate the members
- if (be_scope::gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_exception::"
- "gen_client_header - "
- "codegen for scope failed\n"), -1);
- }
-
- ch->decr_indent ();
- *ch << "};" << nl;
-
- // generate the typecode decl
- if (this->is_nested ())
- {
- // 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 "
- << idl_global->export_macro ()
- << " CORBA::TypeCode_ptr "
- << this->tc_name ()->last_component () << ";\n\n";
- }
- ch->gen_endif ();
-
- this->cli_hdr_gen_ = I_TRUE;
- cg->pop ();
- }
-
- return 0;
-}
-
-int
-be_exception::gen_client_inline (void)
-{
- if (!this->cli_inline_gen_)
- {
- TAO_NL nl; // end line
-
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- TAO_OutStream *ci = cg->client_inline ();
-
- ci->indent ();
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for exception " << this->name () << nl;
- *ci << "// *************************************************************\n\n";
-
- // default constructor
- ci->indent ();
- *ci << "// default constructor" << nl;
- *ci << "ACE_INLINE" << nl;
- *ci << this->name () << "::" << this->local_name () << " (void)" << nl;
- *ci << " : CORBA_UserException (CORBA::TypeCode::_duplicate (" <<
- this->tc_name () << "))\n";
- *ci << "{" << nl;
- *ci << "}\n\n";
-
- // destructor
- ci->indent ();
- *ci << "// destructor - all members are of self managing types" << nl;
- *ci << "ACE_INLINE" << nl;
- *ci << this->name () << "::~" << this->local_name () << " (void)" << nl;
- *ci << "{" << nl;
- *ci << "}\n\n";
-
- cg->push (TAO_CodeGen::TAO_EXCEPTION_CI);
- // generate inline code required of any anonymous types of members
- if (be_scope::gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_exception::gen_client_inline -"
- "codegen for scope failed\n"), -1);
- }
-
- cg->pop ();
- this->cli_inline_gen_ = I_TRUE;
- }
- return 0;
-}
-
-int
-be_exception::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- be_scope *s = be_scope::narrow_from_scope (DeclAsScope (this)); // the scope
- // defined by
- // us
-
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_exception::"
- "gen_client_stubs - "
- "bad scope\n"), -1);
- }
-
- if (!this->cli_stub_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_EXCEPTION_CS); // set current code gen state
-
- cs = cg->client_stubs ();
-
- // copy constructor
- cs->indent ();
- *cs << "// copy constructor" << nl;
- *cs << this->name () << "::" << this->local_name () << "(const " <<
- this->name () << " &_tao_excp)" << nl;
- *cs << " :CORBA_UserException (" <<
- "CORBA::TypeCode::_duplicate (_tao_excp.type ()))" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- // assign each individual member
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_exception::gen_client_stubs -"
- "codegen for scope failed\n"), -1);
- }
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // assignment operator
- cs->indent ();
- *cs << "// assignment operator" << nl;
- *cs << this->name () << "&" << nl;
- *cs << this->name () << "::operator= (const " <<
- this->name () << " &_tao_excp)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "this->type_ = " <<
- "CORBA::TypeCode::_duplicate (_tao_excp.type ());\n";
- // assign each individual member
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_exception::gen_client_stubs -"
- "codegen for scope failed\n"), -1);
- }
- cs->indent ();
- *cs << "return *this;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // constructor taking all members. We need a new state here. Also, such a
- // constructor exists if we have any members
- if (this->member_count () > 0)
- {
- cg->push (TAO_CodeGen::TAO_EXCEPTION_CTOR_CS);
- s->comma (1); // scope should produce comma after every parameter is
- // defined
- cs->indent ();
- *cs << "// special constructor" << nl;
- *cs << this->name () << "::" << this->local_name () << "(";
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_exception::gen_client_stubs -"
- "codegen for scope failed\n"), -1);
- }
- s->comma (0);
- cg->pop ();
- *cs << ")" << nl;
-
- *cs << " : CORBA_UserException " <<
- "(CORBA::TypeCode::_duplicate (" << this->tc_name () <<
- "))" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- // assign each individual member. We need yet another state
- cg->push (TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS);
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_exception::gen_client_stubs -"
- "codegen for scope failed\n"), -1);
- }
- cg->pop (); // revert to previous state
- cs->decr_indent ();
- *cs << "}\n\n";
- }
-
- // narrow method
- cs->indent ();
- *cs << "// narrow" << nl;
- *cs << this->name () << "_ptr " << nl;
- *cs << this->name () << "::_narrow(CORBA::Exception *exc)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (!ACE_OS::strcmp (\"" << this->repoID () <<
- "\", exc->id ())) // same type" << nl;
- *cs << " return ACE_dynamic_cast (" << this->name () << "_ptr, exc);" <<
- nl;
- *cs << "else" << nl;
- *cs << " return 0;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // generate the typecode information here
- cs->indent (); // start from current indentation level
- *cs << "static const CORBA::Long _oc_" << this->flatname () << "[] =" <<
- nl;
- *cs << "{\n";
- cs->incr_indent (0);
- // note that we just need the parameters here and hence we generate the
- // encapsulation for the parameters
- if (this->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_structure::gen_client_stubs -"
- "codegen for scope failed\n"), -1);
- }
- cs->decr_indent ();
- *cs << "};" << nl;
-
- *cs << "static CORBA::TypeCode _tc__tc_" << this->flatname () <<
- " (CORBA::tk_struct, sizeof (_oc_" << this->flatname () <<
- "), (char *) &_oc_" << this->flatname () <<
- ", CORBA::B_FALSE);" << nl;
- *cs << "CORBA::TypeCode_ptr " << this->tc_name () << " = &_tc__tc_" <<
- this->flatname () << ";\n\n";
- this->cli_stub_gen_ = I_TRUE;
- cg->pop ();
- }
-
- return 0;
-}
-
-int
-be_exception::gen_server_header (void)
-{
- return 0;
-}
-
-
-int
-be_exception::gen_server_inline (void)
-{
- return 0;
-}
-
-int
-be_exception::gen_server_skeletons (void)
-{
- return 0;
-}
-
-// generate typecode.
-// Typecode for exceptions comprises the enumerated value followed by the
-// encapsulation of the parameters
-
-int
-be_exception::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "CORBA::tk_except, // typecode kind" << nl;
- *cs << this->tc_size () << ", // encapsulation length\n";
- // now emit the encapsulation
- return this->gen_encapsulation ();
-}
-
-// generate encapsulation
-// An encapsulation for ourselves will be necessary when we are part of some
-// other IDL type and a typecode for that other type is being generated. This
-// will comprise our typecode kind. IDL types with parameters will additionally
-// have the encapsulation length and the entire typecode description
-int
-be_exception::gen_encapsulation (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- long i, arrlen;
- long *arr; // an array holding string names converted to array of longs
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- // XXXASG - byte order must be based on what m/c we are generating code -
- // TODO
- *cs << "0, // byte order" << nl;
- // generate repoID
- *cs << (ACE_OS::strlen (this->repoID ())+1) << ", ";
- (void)this->tc_name2long (this->repoID (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // repository ID = " << this->repoID () << nl;
- // generate name
- *cs << (ACE_OS::strlen (this->local_name ()->get_string ())+1) << ", ";
- (void)this->tc_name2long(this->local_name ()->get_string (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // name = " << this->local_name () << nl;
- // generate the member count
- *cs << this->member_count () << ", // member count\n";
- cs->incr_indent (0);
- // hand over to the scope to generate the typecode for elements
- if (be_scope::gen_encapsulation () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_exception: cannot generate typecode for members\n"));
- return -1;
- }
- cs->decr_indent (0);
- return 0;
-}
-
-// compute typecode size
-long
-be_exception::tc_size (void)
-{
- // 4 bytes for enumeration, 4 bytes for storing encap length val, followed by the
- // actual encapsulation length
- return 4 + 4 + this->tc_encap_len ();
-}
-
-// compute encapsulation length
-long
-be_exception::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- this->encap_len_ = 4; // holds the byte order flag
-
- this->encap_len_ += this->repoID_encap_len (); // repoID
-
- // do the same thing for the local name
- this->encap_len_ += this->name_encap_len ();
-
- this->encap_len_ += 4; // to hold the member count
-
- // compute encap length for members
- this->encap_len_ += be_scope::tc_encap_len ();
- }
- 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)
-{
- return visitor->visit_exception (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS3 (be_exception, AST_Exception, be_scope, be_type)
-IMPL_NARROW_FROM_DECL (be_exception)
-IMPL_NARROW_FROM_SCOPE (be_exception)
diff --git a/TAO/TAO_IDL/be/be_expression.cpp b/TAO/TAO_IDL/be/be_expression.cpp
deleted file mode 100644
index bc9773030e6..00000000000
--- a/TAO/TAO_IDL/be/be_expression.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_expression.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Expression that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Expression
- */
-
-// the constructors
-be_expression::be_expression (UTL_ScopedName *n)
- : AST_Expression (n)
-{
-}
-
-be_expression::be_expression (AST_Expression *b, AST_Expression::ExprType t)
- : AST_Expression (b, t)
-{
-}
-
-be_expression::be_expression (AST_Expression::ExprComb c,
- AST_Expression *v1,
- AST_Expression *v2)
- : AST_Expression (c, v1, v2)
-{
-}
-
-be_expression::be_expression (long l)
- : AST_Expression (l)
-{
-}
-
-be_expression::be_expression (long l, AST_Expression::ExprType t)
- : AST_Expression (l, t)
-{
-}
-
-be_expression::be_expression (unsigned long l)
- : AST_Expression (l)
-{
-}
-
-be_expression::be_expression (String *s)
- : AST_Expression (s)
-{
-}
-
-be_expression::be_expression (char c)
- : AST_Expression (c)
-{
-}
-
-be_expression::be_expression (double d)
- : AST_Expression (d)
-{
-}
-
-int
-be_expression::accept (be_visitor *visitor)
-{
- return visitor->visit_expression (this);
-}
diff --git a/TAO/TAO_IDL/be/be_factory.cpp b/TAO/TAO_IDL/be/be_factory.cpp
deleted file mode 100644
index ff3038d9d42..00000000000
--- a/TAO/TAO_IDL/be/be_factory.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_sunsoft.h"
-
-// destructor
-TAO_Visitor_Factory::~TAO_Visitor_Factory (void)
-{
-}
-
-// constructor
-TAO_OutStream_Factory::TAO_OutStream_Factory (void)
- : strm_type_ (TAO_OutStream_Factory::TAO_SUNSOFT)
-{
-}
-
-// destructor
-TAO_OutStream_Factory::~TAO_OutStream_Factory (void)
-{
-}
-
-// set the type of specialized o/p stream we want
-int
-TAO_OutStream_Factory::set_stream_type
-(TAO_OutStream_Factory::TAO_OutStream_Type t)
-{
- this->strm_type_ = t;
- return 0;
-}
-
-// factory method
-TAO_OutStream *
-TAO_OutStream_Factory::make_outstream (void)
-{
- switch (this->strm_type_)
- {
- case TAO_OutStream_Factory::TAO_SUNSOFT:
- return new TAO_SunSoft_OutStream ();
- case TAO_OutStream_Factory::TAO_FLICK:
- return (TAO_OutStream *)0; // not implemented as yet
- default:
- return (TAO_OutStream *)0;
- }
-}
diff --git a/TAO/TAO_IDL/be/be_field.cpp b/TAO/TAO_IDL/be/be_field.cpp
deleted file mode 100644
index 0511fd4c909..00000000000
--- a/TAO/TAO_IDL/be/be_field.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_field.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Field that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Field
- */
-be_field::be_field (void)
-{
-}
-be_field::be_field (AST_Type *ft, UTL_ScopedName *n, UTL_StrList *p)
- : AST_Field (ft, n, p),
- AST_Decl (AST_Decl::NT_field, n, p)
-{
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// Generates the client-side header information for the field
-int
-be_field::gen_client_header (void)
-{
- be_type *bt; // the field type
- be_state *s; // code generation state
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // retrieve field type
- bt = be_type::narrow_from_decl (this->field_type ());
-
- // make the state based object. The state has been set by the enclosing
- // parent structure
- s = cg->make_state ();
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_field::gen_client_header -"
- "codegen failed\n"), -1);
- }
- return 0;
-}
-
-// Generates the client-side stubs for the field
-int
-be_field::gen_client_stubs (void)
-{
- be_type *bt; // the field type
- be_state *s; // code generation state
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // retrieve field type
- bt = be_type::narrow_from_decl (this->field_type ());
-
- // make the state based object. The state has been set by the enclosing
- // parent structure
- s = cg->make_state ();
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_field::gen_client_stubs -"
- "codegen failed\n"), -1);
- }
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_field::gen_client_inline (void)
-{
- be_type *bt; // the field type
- be_state *s; // code generation state
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // retrieve field type
- bt = be_type::narrow_from_decl (this->field_type ());
-
- // make the state based object. The state has been set by the enclosing
- // parent structure
- s = cg->make_state ();
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_field::gen_client_inline -"
- "codegen failed\n"), -1);
- }
- return 0;
-}
-
-// Generates the server-side header information for the field
-int
-be_field::gen_server_header (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side skeletons for the field
-int
-be_field::gen_server_skeletons (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_field::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-int
-be_field::gen_encapsulation (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_type *bt; // our type node
- long i, arrlen;
- long *arr; // an array holding string names converted to array of longs
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- // generate name
- *cs << (ACE_OS::strlen (this->local_name ()->get_string ())+1) << ", ";
- (void)this->tc_name2long(this->local_name ()->get_string (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // name = " << this->local_name () << "\n";
-
- // hand over code generation to our type node
- bt = be_type::narrow_from_decl (this->field_type ());
- return bt->gen_typecode ();
-}
-
-long
-be_field::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- be_type *bt;
-
- // struct member is represented as the "name" followed by the typecode
-
- this->encap_len_ = this->name_encap_len (); // for name
-
- // add to this, the size of our typecode
- bt = be_type::narrow_from_decl (this->field_type ());
- this->encap_len_ += bt->tc_size (); // note that we must add typecode
- // size of the type
- }
- return this->encap_len_;
-}
-
-// compute the size type of the node in question
-int
-be_field::compute_size_type (void)
-{
- be_type *type = be_type::narrow_from_decl (this->field_type ());
- if (!type)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_field::compute_size_type - "
- "bad field type\n"), -1);
- }
-
- // our size type is the same as our type
- this->size_type (type->size_type ()); // as a side effect will also update
- // the size type of parent
- return 0;
-}
-
-int
-be_field::accept (be_visitor *visitor)
-{
- return visitor->visit_field (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_field, AST_Field, be_decl)
-IMPL_NARROW_FROM_DECL (be_field)
diff --git a/TAO/TAO_IDL/be/be_generator.cpp b/TAO/TAO_IDL/be/be_generator.cpp
deleted file mode 100644
index cf505d91c1f..00000000000
--- a/TAO/TAO_IDL/be/be_generator.cpp
+++ /dev/null
@@ -1,419 +0,0 @@
-// $Id$
-
-/*
-
-COPYRIGHT
-
-Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
-States of America. All Rights Reserved.
-
-This product is protected by copyright and distributed under the following
-license restricting its use.
-
-The Interface Definition Language Compiler Front End (CFE) is made
-available for your use provided that you include this license and copyright
-notice on all media and documentation and the software program in which
-this product is incorporated in whole or part. You may copy and extend
-functionality (but may not remove functionality) of the Interface
-Definition Language CFE without charge, but you are not authorized to
-license or distribute it to anyone else except as part of a product or
-program developed by you or with the express written consent of Sun
-Microsystems, Inc. ("Sun").
-
-The names of Sun Microsystems, Inc. and any of its subsidiaries or
-affiliates may not be used in advertising or publicity pertaining to
-distribution of Interface Definition Language CFE as permitted herein.
-
-This license is effective until terminated by Sun for failure to comply
-with this license. Upon termination, you shall destroy or return all code
-and documentation for the Interface Definition Language CFE.
-
-INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
-ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
-FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
-DEALING, USAGE OR TRADE PRACTICE.
-
-INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
-ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
-TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
-
-SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
-RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
-INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
-
-IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
-ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
-DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-Use, duplication, or disclosure by the government is subject to
-restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
-Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
-52.227-19.
-
-Sun, Sun Microsystems and the Sun logo are trademarks or registered
-trademarks of Sun Microsystems, Inc.
-
-SunSoft, Inc.
-2550 Garcia Avenue
-Mountain View, California 94043
-
-NOTE:
-
-SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
-trademarks or registered trademarks of Sun Microsystems, Inc.
-
- */
-
-// be_generator.cc
-//
-// Implementation of BE generator class
-//
-// This implements the same protocol as AST_Generator but creates instances
-// of the BE-subclassed classes instead of of AST classes
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "ace/inc_user_config.h"
-
-/*
- * Constructor
- */
-
-/*
- * Private operations
- */
-
-/*
- * Public operations
- */
-
-/*
- * Inherited operations redefined here
- */
-
-/*
- * Construct a be_root node (a node representing the root of an AST of BE nodes)
- */
-AST_Root *
-be_generator::create_root(UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return new be_root(n, p);
-}
-
-/*
- * Create a BE_PredefinedType node
- */
-AST_PredefinedType *
-be_generator::create_predefined_type(AST_PredefinedType::PredefinedType t,
- UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return (AST_PredefinedType *) new be_predefined_type(t, n, p);
-}
-
-/*
- * Create a BE_Module node
- */
-AST_Module *
-be_generator::create_module(UTL_ScopedName *n, UTL_StrList *p)
-{
- return (AST_Module *) new be_module(n, p);
-}
-
-/*
- * Create a BE_Interface node
- */
-AST_Interface *
-be_generator::create_interface(UTL_ScopedName *n,
- AST_Interface **ih,
- long nih,
- UTL_StrList *p)
-{
- return (AST_Interface *) new be_interface(n, ih, nih, p);
-}
-
-/*
- * Create a BE_InterfaceFwd node
- */
-AST_InterfaceFwd *
-be_generator::create_interface_fwd(UTL_ScopedName *n, UTL_StrList *p)
-{
- return (AST_InterfaceFwd *) new be_interface_fwd(n, p);
-}
-
-/*
- * Create a BE_Exception node
- */
-AST_Exception *
-be_generator::create_exception(UTL_ScopedName *n, UTL_StrList *p)
-{
- return (AST_Exception *) new be_exception(n, p);
-}
-
-/*
- * Create a BE_Structure node
- */
-AST_Structure *
-be_generator::create_structure(UTL_ScopedName *n, UTL_StrList *p)
-{
- return (AST_Structure *) new be_structure(n, p);
-}
-
-/*
- * Create a BE_Enum node
- */
-AST_Enum *
-be_generator::create_enum(UTL_ScopedName *n, UTL_StrList *p)
-{
- return (AST_Enum *) new be_enum(n, p);
-}
-
-/*
- * Create a BE_Operation node
- */
-AST_Operation *
-be_generator::create_operation(AST_Type *rt,
- AST_Operation::Flags fl,
- UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return (AST_Operation *) new be_operation(rt, fl, n, p);
-}
-
-/*
- * Create a BE_Field node
- */
-AST_Field *
-be_generator::create_field(AST_Type *ft, UTL_ScopedName *n, UTL_StrList *p)
-{
- return (AST_Field *) new be_field(ft, n, p);
-}
-
-/*
- * Create a BE_Argument node
- */
-AST_Argument *
-be_generator::create_argument(AST_Argument::Direction d,
- AST_Type *ft,
- UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return (AST_Argument *) new be_argument(d, ft, n, p);
-}
-
-/*
- * Create a BE_Attribute node
- */
-AST_Attribute *
-be_generator::create_attribute(idl_bool ro,
- AST_Type *ft,
- UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return (AST_Attribute *) new be_attribute(ro, ft, n, p);
-}
-
-/*
- * Create a BE_Union node
- */
-AST_Union *
-be_generator::create_union(AST_ConcreteType *dt,
- UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return (AST_Union *) new be_union(dt, n, p);
-}
-
-/*
- * Create a BE_UnionBranch node
- */
-AST_UnionBranch *
-be_generator::create_union_branch(AST_UnionLabel *lab,
- AST_Type *ft,
- UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return (AST_UnionBranch *) new be_union_branch(lab, ft, n, p);
-}
-
-/*
- * Create a BE_UnionLabel node
- */
-AST_UnionLabel *
-be_generator::create_union_label(AST_UnionLabel::UnionLabel ul,
- AST_Expression *lv)
-{
- return (AST_UnionLabel *) new be_union_label(ul, lv);
-}
-
-/*
- * Create a BE_Constant node
- */
-AST_Constant *
-be_generator::create_constant(AST_Expression::ExprType et,
- AST_Expression *ev,
- UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return (AST_Constant *) new be_constant (et, ev, n, p);
-}
-
-/*
- * Create a symbolic BE_Expression node
- */
-AST_Expression *
-be_generator::create_expr(UTL_ScopedName *n)
-{
- return (AST_Expression *) new be_expression (n);
-}
-
-/*
- * Create a BE_Expression node denoting a coercion
- */
-AST_Expression *
-be_generator::create_expr(AST_Expression *b, AST_Expression::ExprType t)
-{
- return (AST_Expression *) new be_expression (b, t);
-}
-
-/*
- * Create a BE_Expression node combining two other AST_Expression nodes
- */
-AST_Expression *
-be_generator::create_expr(AST_Expression::ExprComb c,
- AST_Expression *v1,
- AST_Expression *v2)
-{
- return (AST_Expression *) new be_expression (c, v1, v2);
-}
-
-/*
- * Create a BE_Expression node denoting a long integer
- */
-AST_Expression *
-be_generator::create_expr(long l)
-{
- return (AST_Expression *) new be_expression (l);
-}
-
-/*
- * Create a BE_Expression node denoting a long integer being used as a boolean
- */
-AST_Expression *
-be_generator::create_expr(long l, AST_Expression::ExprType t)
-{
- return (AST_Expression *) new be_expression (l, t);
-}
-
-/*
- * Create a BE_Expression node denoting an unsigned long integer
- */
-AST_Expression *
-be_generator::create_expr(unsigned long l)
-{
- return (AST_Expression *) new be_expression(l);
-}
-
-/*
- * Create a BE_Expression node denoting a char * (encapsulated as a String)
- */
-AST_Expression *
-be_generator::create_expr (String *s)
-{
- return (AST_Expression *) new be_expression (s);
-}
-
-/*
- * Create a BE_Expression node denoting a character
- */
-AST_Expression *
-be_generator::create_expr(char c)
-{
- return (AST_Expression *) new be_expression (c);
-}
-
-/*
- * Create a BE_Expression node denoting a 64-bit floating point number
- */
-AST_Expression *
-be_generator::create_expr (double d)
-{
- return (AST_Expression *) new be_expression (d);
-}
-
-/*
- * Create a BE_EnumVal node
- */
-AST_EnumVal *
-be_generator::create_enum_val(unsigned long v,
- UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return (AST_EnumVal *) new be_enum_val(v, n, p);
-}
-
-/*
- * Create a BE_Array node
- */
-AST_Array *
-be_generator::create_array(UTL_ScopedName *n,
- unsigned long ndims,
- UTL_ExprList *dims)
-{
- return (AST_Array *) new be_array(n, ndims, dims);
-}
-
-/*
- * Create a BE_Sequence node
- */
-AST_Sequence *
-be_generator::create_sequence(AST_Expression *v, AST_Type *bt)
-{
- return (AST_Sequence *) new be_sequence(v, bt);
-}
-
-/*
- * Create a BE_String node
- */
-AST_String *
-be_generator::create_string(AST_Expression *v)
-{
- return (AST_String *) new be_string(v);
-}
-
-/*
- * Create a BE_string node for a wide string
- */
-AST_String *
-be_generator::create_wstring(AST_Expression *v)
-{
-#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
- typedef short WChar;
-#else /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
- typedef wchar_t WChar;
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
- return (AST_String *) new be_string(v, sizeof(WChar));
-}
-
-/*
- * Create a BE_Typedef node
- */
-AST_Typedef *
-be_generator::create_typedef(AST_Type *bt, UTL_ScopedName *n, UTL_StrList *p)
-{
- return (AST_Typedef *) new be_typedef(bt, n, p);
-}
-
-/*
- * Construct an AST_Native node
- */
-AST_Native *
-be_generator::create_native (UTL_ScopedName *n,
- UTL_StrList *p)
-{
- return (AST_Native *) new be_native (n, p);
-}
diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp
deleted file mode 100644
index 16b6ff39437..00000000000
--- a/TAO/TAO_IDL/be/be_helper.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_helper.cpp
-//
-// = DESCRIPTION
-// Provides helper classes to print generated code to the output
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// Improvements by Carlos O'Ryan
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-static const char copyright [] =
-"/* -*- C++ -*- */\n\n\
-// ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******\n\
-// TAO ORB and the TAO IDL Compiler have been developed by Washington \n\
-// University Computer Science's Distributed Object Computing Group.\n\
-//\n\
-// Information on TAO is available at\n\
-// http://www.cs.wustl.edu/~schmidt/TAO.html\n";
-
-TAO_NL::TAO_NL (void)
-{
-}
-
-TAO_INDENT::TAO_INDENT (int do_now)
- : do_now_ (do_now)
-{
-}
-
-TAO_UNINDENT::TAO_UNINDENT (int do_now)
- : do_now_ (do_now)
-{
-}
-
-const TAO_NL be_nl;
-const TAO_INDENT be_idt;
-const TAO_INDENT be_idt_nl (1);
-const TAO_UNINDENT be_uidt;
-const TAO_UNINDENT be_uidt_nl (1);
-
-// methods of the TAO_OutStream class
-
-TAO_OutStream::TAO_OutStream (void)
- : fp_ (NULL),
- indent_level_ (0)
-{
-}
-
-TAO_OutStream::~TAO_OutStream (void)
-{
- // close the underlying I/O handle only if it exists
- if (fp_)
- {
- ACE_OS::fclose (fp_);
- fp_ = NULL;
- }
- indent_level_ = 0;
-}
-
-int
-TAO_OutStream::open (const char *fname, TAO_OutStream::STREAM_TYPE st)
-{
- if (fname)
- {
- // file name exists, open an I/O file handle
- fp_ = ACE_OS::fopen (fname, "w");
- if (fp_)
- {
- this->st_ = st;
- // put the copyright notice
- ACE_OS::fprintf (fp_, "%s\n", copyright);
- ACE_OS::fflush (fp_);
- return 0;
- }
- else
- return -1;
- }
- else
- {
- return -1;
- }
-}
-
-// set and get the stream type
-void
-TAO_OutStream::stream_type (TAO_OutStream::STREAM_TYPE st)
-{
- this->st_ = st;
-}
-
-TAO_OutStream::STREAM_TYPE
-TAO_OutStream::stream_type (void)
-{
- return this->st_;
-}
-
-// indentation
-int
-TAO_OutStream::incr_indent (unsigned short flag)
-{
- indent_level_++;
- if (flag)
- return this->indent ();
- else
- return 0; // do not indent output
-}
-
-// indentation
-int
-TAO_OutStream::decr_indent (unsigned short flag)
-{
- indent_level_--;
- if (flag)
- return this->indent ();
- else
- return 0; // do not indent output
-}
-
-int
-TAO_OutStream::reset (void)
-{
- indent_level_ = 0;
- return 0;
-}
-
-// indented print
-int
-TAO_OutStream::indent (void)
-{
- int i;
- // based on the current indentation level, leave appropriate number of blank
- // spaces in the output
- if (this->indent_level_ > 0)
- {
- for (i=0; i < this->indent_level_; i++)
- {
- ACE_OS::fprintf (this->fp_, " ");
- ACE_OS::fflush (this->fp_);
- }
- }
- return 0;
-}
-
-int
-TAO_OutStream::nl (void)
-{
- ACE_OS::fprintf (this->fp_, "\n");
- this->indent ();
- return 0;
-}
-
-// macro generation
-int
-TAO_OutStream::gen_ifdef_macro (const char *flatname, const char *suffix)
-{
- static char macro [NAMEBUFSIZE];
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ACE_OS::memset (macro, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (macro, "_%s_", cg->upcase (flatname));
- if (suffix)
- {
- ACE_OS::sprintf (macro, "%s_%s_", macro, cg->upcase (suffix));
- }
-
- // append a suffix representing the stream type
- switch (this->st_)
- {
- case TAO_OutStream::TAO_CLI_HDR:
- ACE_OS::strcat (macro, "CH_");
- break;
- case TAO_OutStream::TAO_CLI_INL:
- ACE_OS::strcat (macro, "CI_");
- break;
- case TAO_OutStream::TAO_CLI_IMPL:
- ACE_OS::strcat (macro, "CS_");
- break;
- case TAO_OutStream::TAO_SVR_HDR:
- ACE_OS::strcat (macro, "SH_");
- break;
- case TAO_OutStream::TAO_SVR_INL:
- ACE_OS::strcat (macro, "SI_");
- break;
- case TAO_OutStream::TAO_SVR_IMPL:
- ACE_OS::strcat (macro, "SS_");
- break;
- }
- *this << "\n#if !defined (" << macro << ")\n";
- *this << "#define " << macro << "\n\n";
- return 0;
-}
-
-int
-TAO_OutStream::gen_endif (void)
-{
- *this << "\n#endif // end #if !defined\n\n";
- return 0;
-}
-
-// printf style variable argument print
-int
-TAO_OutStream::print (const char *format, ...)
-{
- int result = 0;
- va_list ap;
- va_start (ap, format);
- ACE_OSCALL (::vfprintf (this->fp_, format, ap), int, -1, result);
- ACE_OS::fflush (fp_);
- va_end (ap);
- return result;
-}
-
-TAO_OutStream &
-TAO_OutStream::operator<< (const char *str)
-{
- ACE_OS::fprintf (this->fp_, "%s", str);
- ACE_OS::fflush (fp_);
- return *this;
-}
-
-TAO_OutStream &
-TAO_OutStream::operator<< (const long num)
-{
- ACE_OS::fprintf (this->fp_, "%ld", num);
- ACE_OS::fflush (fp_);
- return *this;
-}
-
-TAO_OutStream &
-TAO_OutStream::operator<< (const TAO_NL&)
-{
- ACE_OS::fprintf (this->fp_ , "\n");
- this->indent ();
- return *this;
-}
-
-TAO_OutStream &
-TAO_OutStream::operator<< (const TAO_INDENT& i)
-{
- this->incr_indent (0);
- if (i.do_now_)
- this->nl ();
- return *this;
-}
-
-TAO_OutStream &
-TAO_OutStream::operator<< (const TAO_UNINDENT& i)
-{
- this->decr_indent (0);
- if (i.do_now_)
- this->nl ();
- return *this;
-}
-
-TAO_OutStream &
-TAO_OutStream::operator<< (Identifier *id)
-{
- return this->print (id);
-}
-
-TAO_OutStream &
-TAO_OutStream::operator<< (UTL_IdList *id)
-{
- return this->print (id);
-}
-
-TAO_OutStream &
-TAO_OutStream::operator<< (AST_Expression *expr)
-{
- return this->print (expr);
-}
diff --git a/TAO/TAO_IDL/be/be_init.cpp b/TAO/TAO_IDL/be/be_init.cpp
deleted file mode 100644
index b44336db57f..00000000000
--- a/TAO/TAO_IDL/be/be_init.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-
-COPYRIGHT
-
-Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
-States of America. All Rights Reserved.
-
-This product is protected by copyright and distributed under the following
-license restricting its use.
-
-The Interface Definition Language Compiler Front End (CFE) is made
-available for your use provided that you include this license and copyright
-notice on all media and documentation and the software program in which
-this product is incorporated in whole or part. You may copy and extend
-functionality (but may not remove functionality) of the Interface
-Definition Language CFE without charge, but you are not authorized to
-license or distribute it to anyone else except as part of a product or
-program developed by you or with the express written consent of Sun
-Microsystems, Inc. ("Sun").
-
-The names of Sun Microsystems, Inc. and any of its subsidiaries or
-affiliates may not be used in advertising or publicity pertaining to
-distribution of Interface Definition Language CFE as permitted herein.
-
-This license is effective until terminated by Sun for failure to comply
-with this license. Upon termination, you shall destroy or return all code
-and documentation for the Interface Definition Language CFE.
-
-INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
-ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
-FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
-DEALING, USAGE OR TRADE PRACTICE.
-
-INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
-ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
-TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
-
-SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
-RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
-INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
-
-IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
-ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
-DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-Use, duplication, or disclosure by the government is subject to
-restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
-Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
-52.227-19.
-
-Sun, Sun Microsystems and the Sun logo are trademarks or registered
-trademarks of Sun Microsystems, Inc.
-
-SunSoft, Inc.
-2550 Garcia Avenue
-Mountain View, California 94043
-
-NOTE:
-
-SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
-trademarks or registered trademarks of Sun Microsystems, Inc.
-
- */
-
-// BE_init.cc - Initialization for dummy BE
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * Initialize the BE. The protocol requires only that this routine
- * return an instance of AST_Generator (or a subclass thereof).
- *
- * Remember that none of the FE initialization has been done, when you
- * add stuff here.
- */
-AST_Generator *
-BE_init()
-{
- AST_Generator *g = new be_generator();
-
- if (g == NULL) {
- cerr << GTDEVEL("IDL: BE init failed to create generator, exiting\n");
- exit(99);
- }
- return g;
-}
-
-/*
- * Print out a version string for the BE
- */
-void
-BE_version()
-{
- cerr << GTDEVEL("TAO C++ BE, version 0.1.0\n");
-}
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
deleted file mode 100644
index 0affe36dd45..00000000000
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ /dev/null
@@ -1,2130 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_interface.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Interface that provides additional means for C++
-// mapping of an interface.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be_visitor_interface.h"
-#include "be.h"
-
-/*
- * BE_Interface
- */
-
-// default constructor
-be_interface::be_interface (void)
- : full_skel_name_ (0),
- skel_count_ (0),
- full_coll_name_ (0),
- local_coll_name_ (0)
-{
- this->size_type (be_decl::VARIABLE); // always the case
-}
-
-// constructor used to build the AST
-be_interface::be_interface (UTL_ScopedName *n, AST_Interface **ih, long nih,
- UTL_StrList *p)
- : AST_Interface (n, ih, nih, p),
- AST_Decl (AST_Decl::NT_interface, n, p),
- UTL_Scope (AST_Decl::NT_interface),
- full_skel_name_ (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)
-{
- if (full_skel_name_)
- return;
- else
- {
- long namelen;
- UTL_IdListActiveIterator *i;
- long first = I_TRUE;
- long second = I_FALSE;
-
- // in the first loop compute the total length
- namelen = 4;
- i = new UTL_IdListActiveIterator (this->name ());
- while (!(i->is_done ()))
- {
- if (!first)
- namelen += 2; // for "::"
- else if (second)
- first = second = I_FALSE;
- // print the identifier
- namelen += ACE_OS::strlen (i->item ()->get_string ()); //
- // additional 4 for the POA_ characters
- if (first)
- {
- if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0)
- // does not start with a ""
- first = I_FALSE;
- else
- second = I_TRUE;
- }
- i->next ();
- }
- delete i;
-
- this->full_skel_name_ = new char [namelen+1];
- this->full_skel_name_[0] = '\0';
- first = I_TRUE;
- second = I_FALSE;
- ACE_OS::strcat (this->full_skel_name_, "POA_");
- i = new UTL_IdListActiveIterator (this->name ());
- while (!(i->is_done ()))
- {
- if (!first)
- ACE_OS::strcat (this->full_skel_name_, "::");
- else if (second)
- first = second = I_FALSE;
- // print the identifier
- ACE_OS::strcat (this->full_skel_name_, i->item ()->get_string ());
- if (first)
- {
- if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0)
- // does not start with a ""
- first = I_FALSE;
- else
- second = I_TRUE;
- }
- i->next ();
- }
- delete i;
- }
- return;
-}
-
-// retrieve the fully scoped skeleton name
-const char*
-be_interface::full_skel_name (void)
-{
- if (!this->full_skel_name_)
- compute_fullskelname ();
-
- return this->full_skel_name_;
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// generate the client header
-int
-be_interface::gen_client_header (void)
-{
- 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
-
- 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
-
- // generate the ifdefined macro for the _ptr type
- ch->gen_ifdef_macro (this->flatname (), "_ptr");
-
- // the following two are required to be under the ifdef macro to avoid
- // multiple declarations
-
- // forward declaration
- *ch << "class " << this->local_name () << ";" << nl;
- // generate the _ptr declaration
- *ch << "typedef " << this->local_name () << " *" << this->local_name ()
- << "_ptr;" << nl;
-
- ch->gen_endif ();
-
- // generate the ifdefined macro for the var type
- ch->gen_ifdef_macro (this->flatname (), "_var");
-
- // generate the _var declaration
- if (this->gen_var_defn () == -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
- ch->gen_ifdef_macro (this->flatname (), "_out");
-
- // 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;
- }
- // generate the endif macro
- ch->gen_endif ();
-
- ch->gen_ifdef_macro (this->flatname ());
-
- // now generate the class definition
- ch->indent ();
- *ch << "class " << idl_global->export_macro ()
- << " " << this->local_name ();
-
- if (n_inherits () > 0) // this interface inherits from other interfaces
- {
- *ch << ": ";
- for (i = 0; i < n_inherits (); i++)
- {
- be_interface *inherited = be_interface::narrow_from_decl
- (this->inherits ()[i]);
- be_decl *scope = 0;
- if (inherited->is_nested ())
- {
- // inherited node is used in the scope of "this" node
- scope = be_scope::narrow_from_scope (this->defined_in
- ())->decl ();
- }
-
- *ch << "public virtual ";
- *ch << inherited->nested_type_name (scope); // dump the scoped name
- if (i < n_inherits () - 1) // this is the case of multiple
- // inheritance
- {
- *ch << ", ";
- }
- } // end of for loop
- *ch << nl;
- }
- else
- {
- // we do not inherit from anybody, hence we do so from the base
- // CORBA::Object class
- *ch << " : public virtual CORBA::Object" << nl;
- }
-
- // generate the body
-
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
- // generate the static _duplicate, _narrow, and _nil operations
- *ch << "// the static operations" << 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";
-
- // 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 (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 << 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 << 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 ();
-
-
- // 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";
- }
- else
- {
- // we are in the ROOT scope
- ch->indent ();
- *ch << "extern "
- << idl_global->export_macro ()
- << " CORBA::TypeCode_ptr "
- << this->tc_name ()->last_component () << ";\n\n";
- }
-
- cg->pop ();
- this->cli_hdr_gen_ = I_TRUE;
- }
- return 0;
-}
-
-// Generates the client-side inline functions
-int
-be_interface::gen_client_inline (void)
-{
- TAO_NL nl; // end line
-
- // 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
-
- 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 << this->name () << "_ptr " << this->name () << "::_duplicate ("
- << this->name () << "_ptr obj)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (!CORBA::is_nil (obj))\n";
- cs->incr_indent ();
- *cs << "obj->AddRef ();\n";
- cs->decr_indent ();
- *cs << nl;
- *cs << "return obj;\n";
- cs->decr_indent ();
- *cs << "} // end of _duplicate" << nl << nl;
-
- // The _narrow method
- *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 << this->name () << "_ptr new_obj = new " << this->name () << "(obj->_get_parent ());" << be_nl
- << "return new_obj;" << be_uidt_nl
- << "} // end of if" << be_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 may be necessary to work around a GCC compiler bug!
- const char *coll_name = this->full_coll_name ();
- const char *skel_name = this->full_skel_name ();
-
- *cs << coll_name << "(" << be_idt << be_idt_nl
- << "ACE_reinterpret_cast(" << 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 (" <<
- "const char *host, CORBA::UShort port, const char *key, " <<
- "CORBA::Environment &env)" << nl;
- *cs << "{" << be_idt_nl
- << "IIOP_Object *data = new IIOP_Object (host, port, key);" << be_nl
- << "if (!data) return " << this->name () << "::_nil ();" << be_nl
- << "// create the CORBA level proxy" << be_nl
- << "CORBA::Object_ptr objref = new CORBA_Object (data);" << be_nl
- << "if (objref == 0)" << be_idt_nl << "{" << be_idt_nl
- << "data->Release ();" << be_nl
- << "env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO));" << be_nl
- << "return " << this->name () << "::_nil ();" << be_uidt_nl << "}" << be_uidt_nl
- << "return " << this->name () << "::_narrow (objref, env);" << be_uidt_nl
- << "}" << be_nl << be_nl;
-
- // generate code for the elements of the interface
- 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"));
- return -1;
- }
-
- // generate the is_a method
- cs->indent ();
- *cs << "CORBA::Boolean " << this->name () << "::_is_a (" <<
- "const CORBA::Char *value, CORBA::Environment &_tao_environment)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (\n";
- cs->incr_indent (0);
- if (this->traverse_inheritance_graph (be_interface::is_a_helper, cs) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::gen_client_stubs - "
- "inheritance graph failed\n"), -1);
- }
- cs->indent ();
- *cs << "(!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment))))\n";
- *cs << " return 1; // success using local knowledge\n";
- cs->decr_indent ();
- *cs << "else" << nl;
- *cs << " return this->CORBA_Object::_is_a (value, _tao_environment); // remote call\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // generate the typecode information here
- cs->indent (); // start from current indentation level
- *cs << "static const CORBA::Long _oc_" << this->flatname () << "[] =" <<
- nl;
- *cs << "{\n";
- cs->incr_indent (0);
- if (this->gen_encapsulation () == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error generating typecode\n\n"));
- return -1;
- }
- cs->decr_indent ();
- *cs << "};" << nl;
-
- *cs << "static CORBA::TypeCode _tc__tc_" << this->flatname () <<
- " (CORBA::tk_objref, sizeof (_oc_" << this->flatname () <<
- "), (char *) &_oc_" << this->flatname () <<
- ", CORBA::B_FALSE);" << nl;
- *cs << "CORBA::TypeCode_ptr " << this->tc_name () << " = &_tc__tc_" <<
- this->flatname () << ";\n\n";
-
- cg->pop ();
- return 0;
-}
-
-// generate server header
-int be_interface::gen_server_header (void)
-{
- TAO_OutStream *sh; // output stream
- long i; // loop index
- TAO_NL nl; // end line
- static char namebuf [NAMEBUFSIZE]; // holds the class name
- AST_Decl *d; // enclosing scope
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_INTERFACE_SH); // set the current code generation
- // state
-
- sh = cg->server_header ();
-
- // generate the skeleton class name
-
- sh->indent (); // start with whatever indentation level we are at
-
- // we shall have a POA_ prefix only if we are at the topmost level
- // generate the forward declaration
- d = ScopeAsDecl (this->defined_in ());
- if (d->node_type () == AST_Decl::NT_root)
- {
- // we are outermost
- ACE_OS::sprintf (namebuf, "POA_%s", this->local_name ()->get_string ());
- }
- else
- {
- ACE_OS::sprintf (namebuf, "%s", this->local_name ()->get_string ());
- }
-
- *sh << "class " << namebuf << ";" << nl;
-
- // generate the _ptr declaration
- *sh << "typedef " << namebuf << " *" << namebuf
- << "_ptr;" << nl;
-
- // now generate the class definition
- *sh << "class " << idl_global->export_macro ()
- << " " << namebuf << " : ";
- if (n_inherits () > 0) // this interface inherits from other interfaces
- {
- be_interface *intf;
-
- *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 ());
- } // 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 << " (void);" << nl;
- sh->decr_indent ();
- *sh << "public:\n";
- 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)
- {
- ACE_ERROR ((LM_ERROR, "be_interface::gen_server_header\n"));
- ACE_ERROR ((LM_ERROR, "Scope code generation failure\n"));
- return -1;
- }
-
- // add our _is_a method
- sh->indent ();
- *sh << "static void _is_a_skel (CORBA::ServerRequest &req, " <<
- "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
- if (this->traverse_inheritance_graph (be_interface::gen_skel_helper, sh) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::gen_server_header - "
- "inheritance graph traversal failed\n"), -1);
- }
-
- // add the dispatch method
- sh->indent ();
- *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";
-
-#if 0
- be_visitor_collocated_sh visitor;
- this->accept (&visitor);
- *sh << "\n";
-#endif
- cg->pop ();
- return 0;
-}
-
-int be_interface::gen_server_skeletons (void)
-{
- TAO_OutStream *ss; // output stream
- TAO_NL nl; // end line
- AST_Decl *d; // temporary
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_INTERFACE_SS); // set the current code generation
- // state
-
- ss = cg->server_skeletons ();
-
- // generate the skeleton class name
-
- ss->indent (); // start with whatever indentation level we are at
-
- if (this->gen_operation_table () == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "be_interface::gen_operation_table failure\n"));
- return -1;
- }
-
- *ss << "// skeleton constructor" << nl;
- // find if we are at the top scope or inside some module
- d = ScopeAsDecl (this->defined_in ());
-
- // if (d && d->node_type () == AST_Decl::NT_root)
- if (!this->is_nested ())
- {
- // we are outermost. So the POA_ prefix is prepended to our name
- *ss << this->full_skel_name () << "::POA_" << this->local_name () <<
- " (void)" << nl;
- }
- else
- {
- // the POA_ prefix is prepended to our outermost module name
- *ss << this->full_skel_name () << "::" << this->local_name () <<
- " (void)" << nl;
- }
-
- *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)
- {
- ACE_ERROR ((LM_ERROR, "be_interface::gen_server_skeletons\n"));
- ACE_ERROR ((LM_ERROR, "Scope code generation failure\n"));
- return -1;
- }
-
- // generate code for the _is_a skeleton
- ss->indent ();
- *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 = 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, _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 << this->full_skel_name () << "_ptr 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 (_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, " <<
- "void *context, CORBA::Environment &env)" << nl;
- *ss << "{\n";
- ss->incr_indent ();
- *ss << "TAO_Skeleton skel; // pointer to skeleton for operation" << nl;
- *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 << "{\n";
- ss->incr_indent ();
- *ss << "env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO));" <<
- nl;
- *ss << "ACE_ERROR ((LM_ERROR, \"Bad operation <%s>\\n\", opname));\n";
- ss->decr_indent ();
- *ss << "}\n";
- *ss << "else" << nl;
- *ss << " skel (req, this, context, env);\n";
- ss->decr_indent ();
- *ss << "}\n\n";
-
- 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";
-
- cg->pop ();
-
-#if 0
- be_visitor_collocated_ss visitor;
- this->accept (&visitor);
- *ss << "\n";
-#endif
- *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;
-
- *ss << "}\n\n";
-
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_interface::gen_server_inline (void)
-{
- // nothing to be done
- TAO_OutStream *si; // 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 ();
-
- si = cg->server_inline ();
-
- // generate the skeleton class name
-
- si->indent (); // start with whatever indentation level we are at
-
- *si << "// skeleton destructor" << nl;
-
- *si << "ACE_INLINE" << nl;
- if (!this->is_nested ())
- {
- // we are outermost. So the POA_ prefix is prepended to our name
- *si << this->full_skel_name () << "::~POA_" << this->local_name () <<
- " (void)" << nl;
- }
- else
- {
- // the POA_ prefix is prepended to our outermost module name
- *si << this->full_skel_name () << "::~" << this->local_name () <<
- " (void)" << 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)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::gen_server_inline - "
- "inheritance graph traversal failed\n"), -1);
- }
-
- return 0;
-}
-
-// generate the var definition
-int
-be_interface::gen_var_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // names
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_var", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the var definition (always in the client header).
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ch->indent (); // start with whatever was our current indent level
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
-
- // default constr
- *ch << namebuf << " (void); // default constructor" << nl;
- *ch << namebuf << " (" << local_name () << "_ptr);" << nl;
-
- // copy constructor
- *ch << namebuf << " (const " << namebuf <<
- " &); // copy constructor" << nl;
-
- // destructor
- *ch << "~" << namebuf << " (void); // destructor" << nl;
- *ch << nl;
-
- // assignment operator from a pointer
- *ch << namebuf << " &operator= (" << local_name () << "_ptr);" << nl;
-
- // assignment from _var
- *ch << namebuf << " &operator= (const " << namebuf <<
- " &);" << nl;
-
- // arrow operator
- *ch << local_name () << "_ptr operator-> (void) const;" << nl;
-
- *ch << nl;
-
- // other extra types (cast operators, [] operator, and others)
- *ch << "operator const " << local_name () << "_ptr &() const;" << nl;
- *ch << "operator " << local_name () << "_ptr &();" << nl;
-
- *ch << "// in, inout, out, _retn " << nl;
- // the return types of in, out, inout, and _retn are based on the parameter
- // passing rules and the base type
- *ch << local_name () << "_ptr in (void) const;" << nl;
- *ch << local_name () << "_ptr &inout (void);" << nl;
- *ch << local_name () << "_ptr &out (void);" << nl;
- *ch << local_name () << "_ptr _retn (void);" << nl;
-
- // generate an additional member function that returns the underlying pointer
- *ch << local_name () << "_ptr ptr (void) const;\n";
-
- *ch << "\n";
- ch->decr_indent ();
-
- // private
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << "_ptr ptr_;\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
-
- return 0;
-}
-
-// implementation of the _var class. All of these get generated in the inline
-// file
-int
-be_interface::gen_var_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _var names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_var", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_var", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // generate the var implementation in the inline file
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // default constr
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname <<
- " (void) // default constructor" << nl;
- *ci << " " << ": ptr_ (" << this->name () << "::_nil ())" << nl;
- *ci << "{}\n\n";
-
- // constr from a _ptr
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << "_ptr p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{}\n\n";
-
- // the additional ptr () member function. This member function must be
- // defined before the remaining member functions including the copy
- // constructor because this inline function is used elsewhere. Hence to make
- // inlining of this function possible, we must define it before its use.
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr " << nl;
- *ci << fname << "::ptr (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (const " << fname <<
- " &p) // copy constructor" << nl;
- *ci << " : ptr_ (" << name () << "::_duplicate (p.ptr ()))" << nl;
- *ci << "{}\n\n";
-
- // destructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::~" << lname << " (void) // destructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << name () <<
- "_ptr p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);" << nl;
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _var
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (const " << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (this != &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);" << nl;
- *ci << "this->ptr_ = " << name () << "::_duplicate (p.ptr ());\n";
- ci->decr_indent ();
- *ci << "}" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator const " << name () <<
- "_ptr &() const // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << "_ptr &() // cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator->
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr " << nl;
- *ci << fname << "::operator-> (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // in, inout, out, and _retn
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr" << nl;
- *ci << fname << "::in (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr &" << nl;
- *ci << fname << "::inout (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr &" << nl;
- *ci << fname << "::out (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);" << nl;
- *ci << "this->ptr_ = " << this->name () << "::_nil ();" << nl;
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr " << nl;
- *ci << fname << "::_retn (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "// yield ownership of managed obj reference" << nl;
- *ci << this->name () << "_ptr val = this->ptr_;" << nl;
- *ci << "this->ptr_ = " << this->name () << "::_nil ();" << nl;
- *ci << "return val;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- return 0;
-}
-
-// generate the _out definition
-int
-be_interface::gen_out_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // to hold the _out name
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the out definition (always in the client header)
- ch->indent (); // start with whatever was our current indent level
-
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
-
- // No default constructor
-
- // constructor from a pointer
- *ch << namebuf << " (" << local_name () << "_ptr &);" << nl;
- // constructor from a _var &
- *ch << namebuf << " (" << local_name () << "_var &);" << nl;
- // constructor from a _out &
- *ch << namebuf << " (" << namebuf << " &);" << nl;
- // assignment operator from a _out &
- *ch << namebuf << " &operator= (" << namebuf << " &);" << nl;
- // assignment operator from a pointer &, cast operator, ptr fn, operator
- // -> and any other extra operators
- // only interface allows assignment from var &
- *ch << namebuf << " &operator= (const " << local_name () << "_var &);" << nl;
- *ch << namebuf << " &operator= (" << local_name () << "_ptr);" << nl;
- // cast
- *ch << "operator " << local_name () << "_ptr &();" << nl;
- // ptr fn
- *ch << local_name () << "_ptr &ptr (void);" << nl;
- // operator ->
- *ch << local_name () << "_ptr operator-> (void);" << nl;
-
- *ch << "\n";
- ch->decr_indent ();
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << "_ptr &ptr_;\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
- return 0;
-}
-
-int
-be_interface::gen_out_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _out names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_out", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // generate the var implementation in the inline file
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // constr from a _ptr
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << "_ptr &p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = " << this->name () << "::_nil ();\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // constructor from _var &
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << this->name () <<
- "_var &p) // constructor from _var" << nl;
- *ci << " : ptr_ (p.out ())" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);" << nl;
- *ci << "this->ptr_ = " << this->name () << "::_nil ();\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << fname <<
- " &p) // copy constructor" << nl;
- *ci << " : ptr_ (p.ptr_)" << nl;
- *ci << "{}\n\n";
-
- // assignment operator from _out &
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p.ptr_;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _var
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (const " << this->name () <<
- "_var &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = " << this->name () << "::_duplicate (p.ptr ());" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _ptr
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << this->name () <<
- "_ptr p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << this->name () <<
- "_ptr &() // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // ptr function
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_ptr &" << nl;
- *ci << fname << "::ptr (void) // ptr" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator->
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_ptr " << nl;
- *ci << fname << "::operator-> (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- return 0;
-}
-
-// generate typecode.
-// Typecode for interface comprises the enumerated value followed by the
-// encapsulation of the parameters
-
-int
-be_interface::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "CORBA::tk_objref, // typecode kind" << nl;
- *cs << this->tc_size () << ", // encapsulation length\n";
- // now emit the encapsulation
- return this->gen_encapsulation ();
-}
-
-// generate encapsulation
-// An encapsulation for ourselves will be necessary when we are part of some
-// other IDL type and a typecode for that other type is being generated. This
-// will comprise our typecode kind. IDL types with parameters will additionally
-// have the encapsulation length and the entire typecode description
-int
-be_interface::gen_encapsulation (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- long i, arrlen;
- long *arr; // an array holding string names converted to array of longs
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- // XXXASG - byte order must be based on what m/c we are generating code -
- // TODO
- *cs << "TAO_ENCAP_BYTE_ORDER, // byte order" << nl;
- // generate repoID
- *cs << (ACE_OS::strlen (this->repoID ())+1) << ", ";
- (void)this->tc_name2long (this->repoID (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // repository ID = " << this->repoID () << nl;
- // generate name
- *cs << (ACE_OS::strlen (this->local_name ()->get_string ())+1) << ", ";
- (void)this->tc_name2long(this->local_name ()->get_string (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // name = " << this->local_name () << ",\n";
-
- return 0;
-}
-
-// compute size of typecode
-long
-be_interface::tc_size (void)
-{
- return 4 + 4 + this->tc_encap_len ();
-}
-
-// compute the encapsulation length
-long
-be_interface::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- long slen;
-
- // Macro to avoid "warning: unused parameter" type warning.
- ACE_UNUSED_ARG (slen);
-
- this->encap_len_ = 4; // holds the byte order flag
-
- this->encap_len_ += this->repoID_encap_len (); // for repoID
-
- // do the same thing for the local name
- this->encap_len_ += this->name_encap_len ();
-
- }
- return this->encap_len_;
-}
-
-// helper
-int
-be_interface::gen_operation_table (void)
-{
- TAO_OutStream *ss; // output stream
- TAO_NL nl; // end line
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ss = cg->server_skeletons ();
-
- ss->indent (); // start from current indentation level
- *ss << "static const TAO_operation_db_entry " << this->flatname () <<
- "_operations [] = {\n";
- ss->incr_indent (0);
-
- if (this->traverse_inheritance_graph (be_interface::gen_optable_helper, ss) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::gen_operation_table - "
- "inheritance graph traversal failed\n"), -1);
- }
-
- // generate the skeleton for the is_a method
- ss->indent ();
- *ss << "{\"_is_a\", &" << this->full_skel_name () << "::_is_a_skel}\n";
- this->skel_count_++;
-
- ss->decr_indent ();
- *ss << "};" << nl << nl;
-
- // XXXASG - this code should be based on using different strategies for
- // demux - for next release
- *ss << "TAO_Dynamic_Hash_OpTable tao_" << this->flatname () << "_optable " <<
- "(" << this->flatname () << "_operations, " << this->skel_count_ << ", " <<
- 2*this->skel_count_ << ");"
- << nl;
- return 0;
-}
-
-// we separate the generation of operation table entries from the
-// "gen_operation_table" method. This enables us to invoke generation of
-// entries for interfaces from which we inherit without any additional
-// code. The parameter "derived" is the one for which the entire operation
-// table is being built.
-int
-be_interface::gen_optable_entries (be_interface *derived)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- TAO_OutStream *ss; // output stream
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ss = cg->server_skeletons ();
-
- if (this->nmembers () > 0)
- {
- // if there are elements in this scope i.e., any operations and
- // attributes defined by "this" which happens to be the same as "derived"
- // or one of its ancestors.
-
- 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->node_type () == AST_Decl::NT_op)
- {
- ss->indent (); // start from current indentation level
- // we are an operation node
- *ss << "{\"" << d->local_name () << "\", &" << derived->full_skel_name
- () << "::" << d->local_name () << "_skel},\n";
- derived->skel_count_++;
- }
- else if (d->node_type () == AST_Decl::NT_attr)
- {
- AST_Attribute *attr;
-
- ss->indent (); // start from current indentation level
- // generate only the "get" entry if we are readonly
- *ss << "{\"_get_" << d->local_name () << "\", &" <<
- derived->full_skel_name () << "::_get_" << d->local_name () <<
- "_skel},\n";
- derived->skel_count_++;
-
- attr = AST_Attribute::narrow_from_decl (d);
- if (!attr)
- return -1;
-
- if (!attr->readonly ())
- {
- // the set method
- ss->indent (); // start from current indentation level
- *ss << "{\"_set_" << d->local_name () << "\", &" <<
- derived->full_skel_name () << "::_set_" << d->local_name
- () << "_skel},\n";
- derived->skel_count_++;
- }
- }
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-// template method that traverses the inheritance graph in a breadth-first
-// style. The actual work on each element in the inheritance graph is carried
-// out by the function passed as argument
-int be_interface::traverse_inheritance_graph (be_interface::tao_code_emitter gen,
- TAO_OutStream *os)
-{
- long i; // loop index
- ACE_Unbounded_Queue <be_interface*> queue; // Queue data structure needed for
- // breadth-first traversal of
- // inheritance tree
-
- // For a special case of a deeply nested inheritance graph and one specific
- // way of inheritance in which a node that was already visited, but is not present in
- // the queue, gets inserted at the tail. This sitation arises when a node
- // multiply inherits from two or more interfaces in which the first parent is
- // higher up in the tree than the second parent. In addition, if the second
- // parent turns out to be a child of the first .
-
- ACE_Unbounded_Queue <be_interface*> del_queue; // queue of dequeued nodes to
- // be searched for the above case
-
- // insert ourselves in the Queue
- if (queue.enqueue_tail (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_interface::gen_operation_table - "
- "error generating entries\n"), -1);
- }
-
- // do until queue is empty
- while (!queue.is_empty ())
- {
- be_interface *bi; // element inside the queue
-
- // use breadth-first strategy i.e., first generate entries for ourselves,
- // followed by nodes that we immediately inherit from, and so on. In the
- // process make sure that we do not generate code for the same node more
- // than once. Such a case may arise due to multiple inheritance forming a
- // diamond like inheritance graph.
-
- // dequeue the element at the head of the queue
- if (queue.dequeue_head (bi))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::traverse_graph - "
- "dequeue_head failed\n"), -1);
- }
-
- // insert the dequeued element in the del_queue
- if (del_queue.enqueue_tail (bi) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_interface::gen_operation_table - "
- "error generating entries\n"), -1);
- }
-
- // use the helper method to generate code for ourself using the
- // properties of the element dequeued. For the first iteration, the
- // element dequeued and "this" will be the same i.e., ourselves
- if (gen (this, bi, os) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::traverse_graph - "
- "helper code gen failed\n"), -1);
- }
-
- // now check if the dequeued element has any ancestors. If yes, insert
- // them inside the queue making sure that there are no duplicates
- for (i=0; i < bi->n_inherits (); i++)
- {
- be_interface *parent; // parent of the dequeued element
-
- // initialize an iterator to search the queue for duplicates
- ACE_Unbounded_Queue_Iterator<be_interface*> q_iter (queue);
-
- // retrieve the next parent from which the dequeued element inherits
- parent = be_interface::narrow_from_decl (bi->inherits ()[i]);
- if (!parent)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::gen_server_skeletons - "
- "bad inherited interface\n"), -1);
- }
-
- // now insert this node at the tail of the queue, but make sure that
- // it doesn't already exist in the queue
- int found = 0;
- while (!q_iter.done ())
- {
- be_interface **temp; // queue element
-
- (void) q_iter.next (temp);
- if (!ACE_OS::strcmp (parent->fullname (), (*temp)->fullname ()))
- {
- // we exist in this queue and cannot be inserted
- found = 1;
- }
- if (found)
- break;
- (void) q_iter.advance ();
- } // end of while
-
- // initialize an iterator to search the del_queue for duplicates
- ACE_Unbounded_Queue_Iterator<be_interface*> del_q_iter (del_queue);
-
- while (!found && !del_q_iter.done ())
- {
- be_interface **temp; // queue element
-
- (void) del_q_iter.next (temp);
- if (!ACE_OS::strcmp (parent->fullname (), (*temp)->fullname ()))
- {
- // we exist in this del_queue and cannot be inserted
- found = 1;
- }
- if (found)
- break;
- (void) del_q_iter.advance ();
- } // end of while
-
- if (!found)
- {
- // insert the parent in the queue
- if (queue.enqueue_tail (parent) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::gen_server_skeletons - "
- "enqueue op failed\n"), -1);
- }
- }
- } // end of for loop
- } // end of while queue not empty
- return 0;
-}
-
-// helpers passed to the template method
-
-int
-be_interface::gen_optable_helper (be_interface *derived,
- be_interface *ancestor,
- TAO_OutStream * /*os*/)
-{
- // generate entries for the derived class using the properties of its
- // ancestors
- if (ancestor->gen_optable_entries (derived) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::gen_operation_table - "
- "error generating entries for inherited"
- "interfaces\n"), -1);
- }
- return 0;
-}
-
-int
-be_interface::is_a_helper (be_interface * /*derived*/,
- be_interface *bi,
- TAO_OutStream *os)
-{
- // emit the comparison code
- os->indent ();
- *os << "(!ACE_OS::strcmp ((char *)value, \"" << bi->repoID () <<
- "\")) ||\n";
-
- return 0;
-}
-
-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)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- TAO_NL nl; // end line
-
- // if derived and ancestor are same, skip it
- if (derived == ancestor)
- return 0;
-
- // else generate code that does the cast to the appropriate type
-
- if (ancestor->nmembers () > 0)
- {
- // if there are elements in ancestor scope i.e., any operations and
- // attributes defined by "ancestor", become methods on the derived class
- // which call the corresponding method of the base class by doing the
- // proper casting
-
- si = new UTL_ScopeActiveIterator (ancestor, UTL_Scope::IK_decls);
- // instantiate a scope iterator.
-
- while (!(si->is_done ()))
- {
- // get the next AST decl node
- d = si->item ();
- if (d->node_type () == AST_Decl::NT_op)
- {
- os->indent (); // start from current indentation level
- if (os->stream_type () == TAO_OutStream::TAO_SVR_HDR)
- {
- // generate the static method corresponding to this method
- *os << "static void " << d->local_name () <<
- "_skel (CORBA::ServerRequest &req, void *obj,"
- << " void *context, CORBA::Environment &env);\n\n";
- }
- else
- { // generate code in the inline file
- // generate the static method corresponding to this method
- *os << "ACE_INLINE void " << derived->full_skel_name () <<
- "::" << d->local_name () <<
- "_skel (CORBA::ServerRequest &req, " <<
- "void *obj, void *context, CORBA::Environment &env)" << nl;
- *os << "{\n";
- os->incr_indent ();
- *os << ancestor->full_skel_name () << "_ptr impl = (" <<
- derived->full_skel_name () << "_ptr) obj;" << nl;
- *os << ancestor->full_skel_name () << "::" << d->local_name
- () << "_skel (req, (" << ancestor->full_skel_name () <<
- "_ptr) impl, context, env);\n";
- os->decr_indent ();
- *os << "}\n";
- }
- }
- else if (d->node_type () == AST_Decl::NT_attr)
- {
- AST_Attribute *attr;
-
- attr = AST_Attribute::narrow_from_decl (d);
- if (!attr)
- return -1;
-
- os->indent (); // start from current indentation level
- if (os->stream_type () == TAO_OutStream::TAO_SVR_HDR)
- {
- // generate the static method corresponding to this method
- *os << "static void _get_" << d->local_name () <<
- "_skel (CORBA::ServerRequest &req, void *obj,"
- << " void *context, CORBA::Environment &env);\n\n";
- }
- else
- { // generate code in the inline file
- // generate the static method corresponding to this method
- *os << "ACE_INLINE void " << derived->full_skel_name () <<
- "::_get_" << d->local_name () <<
- "_skel (CORBA::ServerRequest &req, " <<
- "void *obj, void *context, CORBA::Environment &env)" << nl;
- *os << "{\n";
- os->incr_indent ();
- *os << ancestor->full_skel_name () << "_ptr impl = (" <<
- derived->full_skel_name () << "_ptr) obj;" << nl;
- *os << ancestor->full_skel_name () << "::_get_" << d->local_name
- () << "_skel (req, (" << ancestor->full_skel_name () <<
- "_ptr) impl, context, env);\n";
- os->decr_indent ();
- *os << "}\n";
- }
-
- if (!attr->readonly ())
- {
- // the set method
- os->indent (); // start from current indentation level
- if (os->stream_type () == TAO_OutStream::TAO_SVR_HDR)
- {
- // generate the static method corresponding to this method
- *os << "static void _set_" << d->local_name () <<
- "_skel (CORBA::ServerRequest &req, void *obj,"
- << " void *context, CORBA::Environment &env);\n\n";
- }
- else
- { // generate code in the inline file
- // generate the static method corresponding to this method
- *os << "ACE_INLINE void " << derived->full_skel_name ()
- << "::_set_" << d->local_name () <<
- "_skel (CORBA::ServerRequest &req, " <<
- "void *obj, void *context, CORBA::Environment &env)" <<
- nl;
- *os << "{\n";
- os->incr_indent ();
- *os << ancestor->full_skel_name () << "_ptr impl = (" <<
- derived->full_skel_name () << "_ptr) obj;" << nl;
- *os << ancestor->full_skel_name () << "::_get_" <<
- d->local_name () << "_skel (req, (" <<
- ancestor->full_skel_name () <<
- "_ptr) impl, context, env);\n";
- os->decr_indent ();
- *os << "}\n";
- }
-
- }
- }
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- 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)
-const char *
-be_interface::relative_skel_name (const char *skelname)
-{
- 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
- // need to ensure that it was not defined in any of our ancestor
- // scopes as well. If that is the case, then we can generate a fully
- // scoped name for that type, else we use the ACE_NESTED_CLASS macro
-
- // thus we need some sort of relative name to be generated
-
- static char macro [NAMEBUFSIZE];
- // UNUSED: be_decl *def_scope = 0; // our defining scope
- char // hold the fully scoped name
- def_name [NAMEBUFSIZE],
- use_name [NAMEBUFSIZE];
- char // these point to the curr and next component in the scope
- *def_curr = def_name,
- *def_next,
- *use_curr = use_name,
- *use_next;
-
- ACE_OS::memset (macro, '\0', NAMEBUFSIZE);
- ACE_OS::memset (def_name, '\0', NAMEBUFSIZE);
- ACE_OS::memset (use_name, '\0', NAMEBUFSIZE);
-
- // traverse every component of the def_scope and use_scope beginning at the
- // root and proceeding towards the leaf trying to see if the components
- // match. Continue until there is a match and keep accumulating the path
- // traversed. This forms the first argument to the ACE_NESTED_CLASS
- // macro. Whenever there is no match, the remaining components of the
- // def_scope form the second argument
-
- ACE_OS::strcpy (def_name, localname);
- ACE_OS::strcpy (use_name, othername);
-
- while (def_curr && use_curr)
- {
- // find the first occurrence of a :: and advance the next pointers accordingly
- def_next = ACE_OS::strstr (def_curr, "::");
- use_next = ACE_OS::strstr (use_curr, "::");
-
- if (def_next)
- *def_next = 0;
-
- if (use_next)
- *use_next = 0;
-
- if (!ACE_OS::strcmp (def_curr, use_curr))
- {
- // they have same prefix, append to arg1
- def_curr = (def_next ? (def_next+2) : 0); // skip the ::
- use_curr = (use_next ? (use_next+2) : 0); // skip the ::
- }
- else
- {
- // we had overwritten a ':' by a '\0' for string comparison. We
- // revert back because we want the rest of the relative name to be
- // used
- if (def_next)
- *def_next = ':';
-
- if (use_next)
- *use_next = ':';
-
- // no match. This is the end of the first argument. Get out
- // of the loop as no more comparisons are necessary
- break;
- }
- }
-
- // start the 2nd argument of the macro
-
- // copy the remaining def_name (if any left)
- if (def_curr)
- ACE_OS::strcat (macro, def_curr);
-
- return macro;
-}
-
-int
-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)
-IMPL_NARROW_FROM_SCOPE (be_interface)
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Node <be_interface*>;
-template class ACE_Unbounded_Queue <be_interface*>;
-template class ACE_Unbounded_Queue_Iterator <be_interface*>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Node<be_interface*>
-#pragma instantiate ACE_Unbounded_Queue<be_interface*>
-#pragma instantiate ACE_Unbounded_Queue_Iterator<be_interface*>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/TAO_IDL/be/be_interface_fwd.cpp b/TAO/TAO_IDL/be/be_interface_fwd.cpp
deleted file mode 100644
index 760ca8297f2..00000000000
--- a/TAO/TAO_IDL/be/be_interface_fwd.cpp
+++ /dev/null
@@ -1,643 +0,0 @@
-/* -*- c++ -*- */
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_interface.h
-//
-// = DESCRIPTION
-// Extension of class AST_Interface_Fwd that provides additional means for C++
-// mapping of an interface.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_InterfaceFwd
- */
-
-be_interface_fwd::be_interface_fwd (void)
-{
- this->size_type (be_decl::VARIABLE); // always the case
-}
-
-be_interface_fwd::be_interface_fwd (UTL_ScopedName *n, UTL_StrList *p)
- : AST_InterfaceFwd (n, p),
- AST_Decl (AST_Decl::NT_interface_fwd, n, p)
-{
- this->size_type (be_decl::VARIABLE); // always the case
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// generate the client header
-int be_interface_fwd::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
-
- if (!this->cli_hdr_gen_) // not already generated
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // get the client header
- ch = cg->client_header ();
-
- ch->indent (); // start from the current
-
- // all we do in this is generate a forward declaration of the class
- *ch << "class " << this->local_name () << ";" << nl;
-
- // generate the ifdefined macro for the _ptr type
- ch->gen_ifdef_macro (this->flatname (), "_ptr");
-
- // generate the _ptr declaration
- *ch << "typedef " << this->local_name () << " *" << this->local_name () <<
- "_ptr; \n";
-
- ch->gen_endif ();
-
- // enclose under an ifdef macro
- ch->gen_ifdef_macro (this->flatname (), "_var");
-
- // generate the _var declaration
- if (this->gen_var_defn () == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "be_interface_fwd - error generating _var definition\n"));
- return -1;
- }
- // gen an endif
- ch->gen_endif ();
-
- // enclose under an ifdef macro
- ch->gen_ifdef_macro (this->flatname (), "_out");
-
- // generate the _out declaration - ORBOS/97-05-15 pg 16-20 spec
- if (this->gen_out_defn () == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "be_interface_fwd - error generating _var definition\n"));
- return -1;
- }
-
- // generate the endif macro
- ch->gen_endif ();
-
- this->cli_hdr_gen_ = I_TRUE;
- }
- return 0;
-}
-
-int
-be_interface_fwd::gen_client_stubs (void)
-{
- return 0;
-}
-
-int
-be_interface_fwd::gen_client_inline (void)
-{
- TAO_OutStream *ci; // output stream
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // 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_fwd: _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_fwd: _out impl code gen failed\n"));
- return -1;
- }
- ci->gen_endif ();
-
- return 0;
-}
-
-int
-be_interface_fwd::gen_server_header (void)
-{
- return 0;
-}
-
-int
-be_interface_fwd::gen_server_skeletons (void)
-{
- return 0;
-}
-
-int
-be_interface_fwd::gen_server_inline (void)
-{
- return 0;
-}
-
-// generate the var definition
-int
-be_interface_fwd::gen_var_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // names
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_var", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the var definition (always in the client header).
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ch->indent (); // start with whatever was our current indent level
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
-
- // default constr
- *ch << namebuf << " (void); // default constructor" << nl;
- *ch << namebuf << " (" << local_name () << "_ptr);" << nl;
-
- // copy constructor
- *ch << namebuf << " (const " << namebuf <<
- " &); // copy constructor" << nl;
-
- // destructor
- *ch << "~" << namebuf << " (void); // destructor" << nl;
- *ch << nl;
-
- // assignment operator from a pointer
- *ch << namebuf << " &operator= (" << local_name () << "_ptr);" << nl;
-
- // assignment from _var
- *ch << namebuf << " &operator= (const " << namebuf <<
- " &);" << nl;
-
- // arrow operator
- *ch << local_name () << "_ptr operator-> (void) const;" << nl;
-
- *ch << nl;
-
- // other extra types (cast operators, [] operator, and others)
- *ch << "operator const " << local_name () << "_ptr &() const;" << nl;
- *ch << "operator " << local_name () << "_ptr &();" << nl;
-
- *ch << "// in, inout, out, _retn " << nl;
- // the return types of in, out, inout, and _retn are based on the parameter
- // passing rules and the base type
- *ch << local_name () << "_ptr in (void) const;" << nl;
- *ch << local_name () << "_ptr &inout (void);" << nl;
- *ch << local_name () << "_ptr &out (void);" << nl;
- *ch << local_name () << "_ptr _retn (void);" << nl;
-
- // generate an additional member function that returns the underlying pointer
- *ch << local_name () << "_ptr ptr (void) const;\n";
-
- *ch << "\n";
- ch->decr_indent ();
-
- // private
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << "_ptr ptr_;\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
-
- return 0;
-}
-
-// implementation of the _var class. All of these get generated in the inline
-// file
-int
-be_interface_fwd::gen_var_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _var names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_var", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_var", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // generate the var implementation in the inline file
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // default constr
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname <<
- " (void) // default constructor" << nl;
- *ci << " " << ": ptr_ (" << this->name () << "::_nil ())" << nl;
- *ci << "{}\n\n";
-
- // constr from a _ptr
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << "_ptr p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{}\n\n";
-
- // the additional ptr () member function. This member function must be
- // defined before the remaining member functions including the copy
- // constructor because this inline function is used elsewhere. Hence to make
- // inlining of this function possible, we must define it before its use.
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr " << nl;
- *ci << fname << "::ptr (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (const " << fname <<
- " &p) // copy constructor" << nl;
- *ci << " : ptr_ (" << name () << "::_duplicate (p.ptr ()))" << nl;
- *ci << "{}\n\n";
-
- // destructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::~" << lname << " (void) // destructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << name () <<
- "_ptr p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);" << nl;
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _var
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (const " << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (this != &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);" << nl;
- *ci << "this->ptr_ = " << name () << "::_duplicate (p.ptr ());\n";
- ci->decr_indent ();
- *ci << "}" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator const " << name () <<
- "_ptr &() const // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << "_ptr &() // cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator->
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr " << nl;
- *ci << fname << "::operator-> (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // in, inout, out, and _retn
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr" << nl;
- *ci << fname << "::in (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr &" << nl;
- *ci << fname << "::inout (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr &" << nl;
- *ci << fname << "::out (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);" << nl;
- *ci << "this->ptr_ = " << this->name () << "::_nil ();" << nl;
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << "_ptr " << nl;
- *ci << fname << "::_retn (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "// yield ownership of managed obj reference" << nl;
- *ci << this->name () << "_ptr val = this->ptr_;" << nl;
- *ci << "this->ptr_ = " << this->name () << "::_nil ();" << nl;
- *ci << "return val;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- return 0;
-}
-
-// generate the _out definition
-int
-be_interface_fwd::gen_out_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // to hold the _out name
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the out definition (always in the client header)
- ch->indent (); // start with whatever was our current indent level
-
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
-
- // No default constructor
-
- // constructor from a pointer
- *ch << namebuf << " (" << local_name () << "_ptr &);" << nl;
- // constructor from a _var &
- *ch << namebuf << " (" << local_name () << "_var &);" << nl;
- // constructor from a _out &
- *ch << namebuf << " (" << namebuf << " &);" << nl;
- // assignment operator from a _out &
- *ch << namebuf << " &operator= (" << namebuf << " &);" << nl;
- // assignment operator from a pointer &, cast operator, ptr fn, operator
- // -> and any other extra operators
- // only interface allows assignment from var &
- *ch << namebuf << " &operator= (const " << local_name () << "_var &);" << nl;
- *ch << namebuf << " &operator= (" << local_name () << "_ptr);" << nl;
- // cast
- *ch << "operator " << local_name () << "_ptr &();" << nl;
- // ptr fn
- *ch << local_name () << "_ptr &ptr (void);" << nl;
- // operator ->
- *ch << local_name () << "_ptr operator-> (void);" << nl;
-
- *ch << "\n";
- ch->decr_indent ();
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << "_ptr &ptr_;\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
-
- return 0;
-}
-
-int
-be_interface_fwd::gen_out_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _out names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_out", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // generate the var implementation in the inline file
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // constr from a _ptr
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << "_ptr &p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = " << this->name () << "::_nil ();\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // constructor from _var &
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << this->name () <<
- "_var &p) // constructor from _var" << nl;
- *ci << " : ptr_ (p.out ())" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "CORBA::release (this->ptr_);" << nl;
- *ci << "this->ptr_ = " << this->name () << "::_nil ();\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << fname <<
- " &p) // copy constructor" << nl;
- *ci << " : ptr_ (p.ptr_)" << nl;
- *ci << "{}\n\n";
-
- // assignment operator from _out &
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p.ptr_;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _var
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (const " << this->name () <<
- "_var &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = " << this->name () << "::_duplicate (p.ptr ());" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _ptr
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << this->name () <<
- "_ptr p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << this->name () <<
- "_ptr &() // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // ptr function
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_ptr &" << nl;
- *ci << fname << "::ptr (void) // ptr" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator->
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << "_ptr " << nl;
- *ci << fname << "::operator-> (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- return 0;
-}
-int
-be_interface_fwd::gen_typecode (void)
-{
- return 0;
-}
-
-long
-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)
-{
- return visitor->visit_interface_fwd (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_interface_fwd, AST_InterfaceFwd, be_type)
-IMPL_NARROW_FROM_DECL (be_interface_fwd)
diff --git a/TAO/TAO_IDL/be/be_interpretive.cpp b/TAO/TAO_IDL/be/be_interpretive.cpp
deleted file mode 100644
index ab1c23a553d..00000000000
--- a/TAO/TAO_IDL/be/be_interpretive.cpp
+++ /dev/null
@@ -1,307 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL Backend
-//
-// = FILENAME
-// be_interpretive_visitor.cpp
-//
-// = DESCRIPTION
-// Defines a factory that returns a specialized visitor object based on the
-// code generation state. The visitors returned by this factory generate
-// stubs and skeletons that use interpretive form of marshaling
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// individual visitors included only here
-#include "be_interpretive.h"
-
-#include "be_visitor_args.h"
-#include "be_visitor_attribute.h"
-#include "be_visitor_constant.h"
-#include "be_visitor_enum.h"
-#include "be_visitor_exception.h"
-#include "be_visitor_field.h"
-#include "be_visitor_interface.h"
-#include "be_visitor_interface_fwd.h"
-#include "be_visitor_module.h"
-#include "be_visitor_operation.h"
-#include "be_visitor_root.h"
-#include "be_visitor_sequence.h"
-#include "be_visitor_structure.h"
-#include "be_visitor_typedef.h"
-#include "be_visitor_union.h"
-#include "be_visitor_union_branch.h"
-
-TAO_Interpretive_Visitor_Factory::TAO_Interpretive_Visitor_Factory (void)
-{
-}
-
-// destructor
-TAO_Interpretive_Visitor_Factory::~TAO_Interpretive_Visitor_Factory (void)
-{
-}
-
-be_visitor *
-TAO_Interpretive_Visitor_Factory::make_visitor (be_visitor_context *ctx)
-{
- TAO_CodeGen::CG_STATE st = ctx->state ();
- // create a new context so that ownership issues are not confused. This newly
- // created context is a copy of what was sent by the caller. The newly
- // created visitor will own this new copy.
- be_visitor_context *new_ctx = new be_visitor_context (*ctx);
-
- switch (st)
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- return new be_visitor_root_ch (new_ctx);
- case TAO_CodeGen::TAO_ROOT_CI:
- return new be_visitor_root_ci (new_ctx);
- case TAO_CodeGen::TAO_ROOT_CS:
- return new be_visitor_root_cs (new_ctx);
- case TAO_CodeGen::TAO_ROOT_SH:
- return new be_visitor_root_sh (new_ctx);
- case TAO_CodeGen::TAO_ROOT_SI:
- return new be_visitor_root_si (new_ctx);
- case TAO_CodeGen::TAO_ROOT_SS:
- return new be_visitor_root_ss (new_ctx);
-
- case TAO_CodeGen::TAO_MODULE_CH:
- return new be_visitor_module_ch (new_ctx);
- case TAO_CodeGen::TAO_MODULE_SH:
- return new be_visitor_module_sh (new_ctx);
- case TAO_CodeGen::TAO_MODULE_CI:
- case TAO_CodeGen::TAO_MODULE_CS:
- case TAO_CodeGen::TAO_MODULE_SI:
- case TAO_CodeGen::TAO_MODULE_SS:
- return new be_visitor_module (new_ctx);
-
- case TAO_CodeGen::TAO_INTERFACE_CH:
- return new be_visitor_interface_ch (new_ctx);
- case TAO_CodeGen::TAO_INTERFACE_CI:
- return new be_visitor_interface_ci (new_ctx);
- case TAO_CodeGen::TAO_INTERFACE_CS:
- return new be_visitor_interface_cs (new_ctx);
- case TAO_CodeGen::TAO_INTERFACE_SH:
- return new be_visitor_interface_sh (new_ctx);
- case TAO_CodeGen::TAO_INTERFACE_SI:
- return new be_visitor_interface_si (new_ctx);
- case TAO_CodeGen::TAO_INTERFACE_SS:
- return new be_visitor_interface_ss (new_ctx);
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH:
- return new be_visitor_interface_collocated_sh (new_ctx);
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS:
- return new be_visitor_interface_collocated_ss (new_ctx);
-
- case TAO_CodeGen::TAO_INTERFACE_FWD_CH:
- return new be_visitor_interface_fwd_ch (new_ctx);
- case TAO_CodeGen::TAO_INTERFACE_FWD_CI:
- return new be_visitor_interface_fwd_ci (new_ctx);
-
- case TAO_CodeGen::TAO_STRUCT_CH:
- return new be_visitor_structure_ch (new_ctx);
- case TAO_CodeGen::TAO_STRUCT_CS:
- return new be_visitor_structure_cs (new_ctx);
- case TAO_CodeGen::TAO_STRUCT_CI:
- return new be_visitor_structure_ci (new_ctx);
-
- case TAO_CodeGen::TAO_CONSTANT_CH:
- return new be_visitor_constant_ch (new_ctx);
- case TAO_CodeGen::TAO_CONSTANT_CS:
- return new be_visitor_constant_cs (new_ctx);
-
- case TAO_CodeGen::TAO_ENUM_CH:
- return new be_visitor_enum_ch (new_ctx);
- case TAO_CodeGen::TAO_ENUM_CS:
- return new be_visitor_enum_cs (new_ctx);
-
- case TAO_CodeGen::TAO_FIELD_CH:
- return new be_visitor_field_ch (new_ctx);
- case TAO_CodeGen::TAO_FIELD_CS:
- return new be_visitor_field_cs (new_ctx);
- case TAO_CodeGen::TAO_FIELD_CI:
- return new be_visitor_field_ci (new_ctx);
-
- case TAO_CodeGen::TAO_UNION_CH:
- return new be_visitor_union_ch (new_ctx);
- case TAO_CodeGen::TAO_UNION_CI:
- return new be_visitor_union_ci (new_ctx);
- case TAO_CodeGen::TAO_UNION_CS:
- return new be_visitor_union_cs (new_ctx);
- case TAO_CodeGen::TAO_UNION_PUBLIC_CH:
- return new be_visitor_union_branch_public_ch (new_ctx);
- case TAO_CodeGen::TAO_UNION_PUBLIC_CI:
- return new be_visitor_union_branch_public_ci (new_ctx);
- case TAO_CodeGen::TAO_UNION_PUBLIC_CS:
- return new be_visitor_union_branch_public_cs (new_ctx);
- case TAO_CodeGen::TAO_UNION_PUBLIC_ASSIGN_CS:
- return new be_visitor_union_branch_public_assign_cs (new_ctx);
- case TAO_CodeGen::TAO_UNION_PRIVATE_CH:
- return new be_visitor_union_branch_private_ch (new_ctx);
- case TAO_CodeGen::TAO_UNION_DISCTYPEDEFN_CH:
-
- return new be_visitor_union_discriminant_ch (new_ctx);
- case TAO_CodeGen::TAO_UNION_DISCTYPEDEFN_CI:
- return new be_visitor_union_discriminant_ci (new_ctx);
- case TAO_CodeGen::TAO_UNION_DISCTYPEDEFN_CS:
- return new be_visitor_union_discriminant_cs (new_ctx);
-
- case TAO_CodeGen::TAO_SEQUENCE_CH:
- return new be_visitor_sequence_ch (new_ctx);
- case TAO_CodeGen::TAO_SEQUENCE_CI:
- return new be_visitor_sequence_ci (new_ctx);
- case TAO_CodeGen::TAO_SEQUENCE_CS:
- return new be_visitor_sequence_cs (new_ctx);
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CH:
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CI:
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CS:
- return new be_visitor_sequence_base (new_ctx);
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH:
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI:
- return new be_visitor_sequence_elemtype (new_ctx);
- case TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CH:
- case TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CI:
- case TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CS:
- return new be_visitor_sequence_buffer_type (new_ctx);
-
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- return new be_visitor_typedef_ch (new_ctx);
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- return new be_visitor_typedef_cs (new_ctx);
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- return new be_visitor_typedef_ci (new_ctx);
-
- case TAO_CodeGen::TAO_OPERATION_CH:
- return new be_visitor_operation_ch (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_CS:
- return new be_visitor_operation_cs (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_SH:
- return new be_visitor_operation_sh (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_SS:
- return new be_visitor_operation_ss (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_COLLOCATED_SH:
- return new be_visitor_operation_collocated_sh (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_COLLOCATED_SS:
- return new be_visitor_operation_collocated_ss (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETTYPE_CH:
- case TAO_CodeGen::TAO_OPERATION_RETTYPE_OTHERS:
- return new be_visitor_operation_rettype (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS:
- return new be_visitor_operation_rettype_vardecl_cs (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETVAL_PRE_DOCALL_CS:
- return new be_visitor_operation_rettype_pre_docall_cs (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DOCALL_CS:
- return new be_visitor_operation_rettype_docall_cs (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETVAL_POST_DOCALL_CS:
- return new be_visitor_operation_rettype_post_docall_cs (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS:
- return new be_visitor_operation_rettype_return_cs (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS:
- return new be_visitor_operation_rettype_vardecl_ss (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DEMARSHAL_SS:
- case TAO_CodeGen::TAO_OPERATION_RETVAL_MARSHAL_SS:
- return new be_visitor_operation_rettype_marshal_ss (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS:
- return new be_visitor_operation_rettype_assign_ss (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_RETVAL_POST_UPCALL_SS:
- return new be_visitor_operation_rettype_post_upcall_ss (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_CH:
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_SH:
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_COLLOCATED_SH:
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_OTHERS:
- return new be_visitor_operation_arglist (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_ARG_PRE_DOCALL_CS:
- case TAO_CodeGen::TAO_OPERATION_ARG_DOCALL_CS:
- case TAO_CodeGen::TAO_OPERATION_ARG_POST_DOCALL_CS:
- case TAO_CodeGen::TAO_OPERATION_ARG_PRE_UPCALL_SS:
- case TAO_CodeGen::TAO_OPERATION_ARG_UPCALL_SS:
- case TAO_CodeGen::TAO_OPERATION_ARG_POST_UPCALL_SS:
- case TAO_CodeGen::TAO_OPERATION_ARG_DECL_SS:
- case TAO_CodeGen::TAO_OPERATION_ARG_DEMARSHAL_SS:
- case TAO_CodeGen::TAO_OPERATION_ARG_MARSHAL_SS:
- case TAO_CodeGen::TAO_OPERATION_ARG_POST_MARSHAL_SS:
- return new be_visitor_operation_argument (new_ctx);
-
- case TAO_CodeGen::TAO_ARGUMENT_ARGLIST_CH:
- case TAO_CodeGen::TAO_ARGUMENT_ARGLIST_OTHERS:
- return new be_visitor_args_arglist (new_ctx);
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- return new be_visitor_args_pre_docall_cs (new_ctx);
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- return new be_visitor_args_docall_cs (new_ctx);
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- return new be_visitor_args_post_docall_cs (new_ctx);
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- return new be_visitor_args_vardecl_ss (new_ctx);
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- return new be_visitor_args_pre_upcall_ss (new_ctx);
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- return new be_visitor_args_upcall_ss (new_ctx);
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- return new be_visitor_args_post_upcall_ss (new_ctx);
- case TAO_CodeGen::TAO_ARGUMENT_DEMARSHAL_SS:
- case TAO_CodeGen::TAO_ARGUMENT_MARSHAL_SS:
- return new be_visitor_args_marshal_ss (new_ctx);
- case TAO_CodeGen::TAO_ARGUMENT_POST_MARSHAL_SS:
- return new be_visitor_args_post_marshal_ss (new_ctx);
-
- case TAO_CodeGen::TAO_ATTRIBUTE_CH:
- case TAO_CodeGen::TAO_ATTRIBUTE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_SH:
- case TAO_CodeGen::TAO_ATTRIBUTE_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_COLLOCATED_SH:
- case TAO_CodeGen::TAO_ATTRIBUTE_COLLOCATED_SS:
- return new be_visitor_attribute (new_ctx);
-
- case TAO_CodeGen::TAO_EXCEPTION_CH:
- return new be_visitor_exception_ch (new_ctx);
- case TAO_CodeGen::TAO_EXCEPTION_CI:
- return new be_visitor_exception_ci (new_ctx);
- case TAO_CodeGen::TAO_EXCEPTION_CS:
- return new be_visitor_exception_cs (new_ctx);
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CH:
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CS:
- return new be_visitor_exception_ctor (new_ctx);
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS:
- return new be_visitor_exception_ctor_assign (new_ctx);
-
- case TAO_CodeGen::TAO_OPERATION_RESULT_SS:
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- case TAO_CodeGen::TAO_ARGUMENT_SS:
- case TAO_CodeGen::TAO_ARRAY_DEFN_CH:
- case TAO_CodeGen::TAO_ARRAY_OTHER_CH:
- case TAO_CodeGen::TAO_ARRAY_DEFN_CI:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- default:
- return new be_visitor_decl (new_ctx);
- }
-}
diff --git a/TAO/TAO_IDL/be/be_module.cpp b/TAO/TAO_IDL/be/be_module.cpp
deleted file mode 100644
index f51a834806b..00000000000
--- a/TAO/TAO_IDL/be/be_module.cpp
+++ /dev/null
@@ -1,222 +0,0 @@
-// $Id$
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_module.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Module that provides additional means for C++
-// mapping of a module
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Module
- */
-be_module::be_module (void)
-{
-}
-
-be_module::be_module (UTL_ScopedName *n, UTL_StrList *p)
- : AST_Decl (AST_Decl::NT_module, n, p),
- UTL_Scope (AST_Decl::NT_module)
-{
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// generate the client header
-int be_module::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
-
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_MODULE_CH); // set the current code generation state
- ch = cg->client_header (); // get the stream
-
- // XXXASG - Modules really map to namespace. We need to see if our target
- // compiler supports namespaces or not. For this release we opt to generate a
- // class definition for a module
-
- ch->indent (); // start with whatever indentation level we are at
-
- // now generate the class definition
- *ch << "class " << idl_global->export_macro ()
- << " " << local_name ();
-
- // generate the body
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent (0);
-
- // generate code for the module 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_module::gen_client_header\n"));
- ACE_ERROR ((LM_ERROR, "Scope code generation failure\n"));
- return -1;
- }
-
- ch->decr_indent ();
- *ch << "};\n\n";
- cg->pop ();
- return 0;
-}
-
-int be_module::gen_client_stubs (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_MODULE_CS); // set the current code generation state
-
- // gen code for elements in the scope
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_module::gen_client_stubs\n"));
- ACE_ERROR ((LM_ERROR, "Scope code generation failure\n"));
- return -1;
- }
-
- cg->pop ();
- return 0;
-}
-
-int be_module::gen_server_header (void)
-{
- TAO_OutStream *sh; // output stream
- TAO_NL nl; // end line
- AST_Decl *d;
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_MODULE_SH); // set the current code generation state
-
- sh = cg->server_header ();
-
- // generate the skeleton class name
-
- sh->indent (); // start with whatever indentation level we are at
-
- // now generate the class definition. The prefix POA_ is prepended to our
- // name only if we are the outermost module
- d = ScopeAsDecl (this->defined_in ());
-
- *sh << "class " << idl_global->export_macro ()
- << " ";
- if (d->node_type () == AST_Decl::NT_root)
- // we are outermost module
- *sh << "POA_" << local_name () << nl;
- else
- // we are inside another module
- *sh << local_name () << nl;
-
- *sh << "{" << nl;
- *sh << "public:\n";
- sh->incr_indent (0);
-
- if (be_scope::gen_server_header () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_module::gen_server_header\n"));
- ACE_ERROR ((LM_ERROR, "Scope code generation failure\n"));
- return -1;
- }
-
- sh->decr_indent ();
- *sh << "};\n\n";
- cg->pop ();
- return 0;
-}
-
-int be_module::gen_server_skeletons (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_MODULE_SS); // set the current code generation state
-
- if (be_scope::gen_server_skeletons () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_module::gen_server_skeletons\n"));
- ACE_ERROR ((LM_ERROR, "Scope code generation failure\n"));
- return -1;
- }
- cg->pop ();
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_module::gen_client_inline (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_MODULE_CI); // set the current code generation state
-
- // gen code for elements in the scope
- if (be_scope::gen_client_inline () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_module::gen_client_inline\n"));
- ACE_ERROR ((LM_ERROR, "Scope code generation failure\n"));
- return -1;
- }
-
- cg->pop ();
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_module::gen_server_inline (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_MODULE_SI); // set the current code generation state
-
- // gen code for elements in the scope
- if (be_scope::gen_server_inline () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_module::gen_server_inline\n"));
- ACE_ERROR ((LM_ERROR, "Scope code generation failure\n"));
- return -1;
- }
-
- cg->pop ();
- return 0;
-}
-
-// compute the size type of the node in question
-int
-be_module::compute_size_type (void)
-{
- // our size does not matter
- return 0;
-}
-
-int
-be_module::accept (be_visitor *visitor)
-{
- return visitor->visit_module (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS3 (be_module, AST_Module, be_scope, be_decl)
-IMPL_NARROW_FROM_DECL (be_module)
-IMPL_NARROW_FROM_SCOPE (be_module)
diff --git a/TAO/TAO_IDL/be/be_native.cpp b/TAO/TAO_IDL/be/be_native.cpp
deleted file mode 100644
index eaaf1f9d325..00000000000
--- a/TAO/TAO_IDL/be/be_native.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// Id
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_native.cpp
-//
-// = DESCRIPTION
-// The native IDL type
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-
-// be_native: New IDL type added by the POA spec
-/*
- * Constructor(s)
- */
-be_native::be_native (void)
-{
-}
-
-be_native::be_native (UTL_ScopedName *n,
- UTL_StrList *p)
- : AST_Native (n, p),
- AST_Decl (AST_Decl::NT_native, n, p)
-{
-}
-
-int
-be_native::gen_client_header (void)
-{
- return 0;
-}
-
-int
-be_native::gen_client_stubs (void)
-{
- return 0;
-}
-
-int
-be_native::gen_server_header (void)
-{
- return 0;
-}
-
-int
-be_native::gen_server_skeletons (void)
-{
- return 0;
-}
-
-int
-be_native::gen_client_inline (void)
-{
- return 0;
-}
-
-int
-be_native::gen_server_inline (void)
-{
- return 0;
-}
-
-int
-be_native::gen_typecode (void)
-{
- return 0;
-}
-
-long
-be_native::tc_size (void)
-{
- return 0;
-}
-
-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);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2(be_native, AST_Native, be_type)
-IMPL_NARROW_FROM_DECL(be_native)
diff --git a/TAO/TAO_IDL/be/be_operation.cpp b/TAO/TAO_IDL/be/be_operation.cpp
deleted file mode 100644
index 88dfcdfd5ea..00000000000
--- a/TAO/TAO_IDL/be/be_operation.cpp
+++ /dev/null
@@ -1,969 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_operation.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Operation that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Operation
- */
-be_operation::be_operation (void)
- : argument_count_ (-1),
- has_native_ (0)
-{
-}
-
-be_operation::be_operation (AST_Type *rt, AST_Operation::Flags fl,
- UTL_ScopedName *n, UTL_StrList *p)
- : AST_Operation (rt, fl, n, p),
- AST_Decl (AST_Decl::NT_op, n, p),
- UTL_Scope (AST_Decl::NT_op),
- argument_count_ (-1),
- has_native_ (0)
-{
-}
-
-// compute total number of members
-int
-be_operation::compute_argument_attr (void)
-{
- if (this->argument_count_ != -1)
- return 0;
-
- this->argument_count_ = 0;
-
- // if there are elements in this scope
- if (this->nmembers () > 0)
- {
- // instantiate a scope iterator.
- UTL_ScopeActiveIterator *si =
- new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls);
-
- while (!(si->is_done ()))
- {
- // get the next AST decl node
- 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;
-}
-
-// return the member count
-int
-be_operation::argument_count (void)
-{
- 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_;
-}
-
-be_argument *
-be_operation::add_argument_to_scope (be_argument *arg)
-{
- this->add_to_scope (arg);
- this->add_to_referenced (arg, 0);
- return arg;
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-int
-be_operation::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
- be_type *bt; // type node
- be_state *s; // state based code gen object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- ch = cg->client_header ();
-
- ch->indent (); // start with the current indentation level
-
- // every operation is declared virtual in the client code
- *ch << "virtual ";
-
- // first generate the return type
- bt = be_type::narrow_from_decl (this->return_type ());
- cg->push (TAO_CodeGen::TAO_OPERATION_CH); // we are now generating an
- // operation definition with the
- // return type first
-
- s = cg->make_state (); // retrieve state based object
-
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_operation::gen_client_header - "
- "return type generation failure\n"),
- -1);
- }
- cg->pop (); // restore previous state
-
- // generate the operation name
- *ch << " " << this->local_name () << " (";
-
- // generate the arguments with the appropriate mapping
- cg->push (TAO_CodeGen::TAO_ARGUMENT_CH); // generating code for arguments in
- // the signature
- if (be_scope::gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_operation::gen_client_header - "
- "failed in argument generation in signature\n"),
- -1);
- }
- cg->pop ();
-
- // XXXASG
- // additional argument in the form of CORBA::Environment since TAO does not
- // yet support C++ style Exceptions. However, we can have an option to the
- // "tao" IDL compiler to ask it to generate code for exceptions. This will be
- // handled in a later release.
- *ch << "CORBA::Environment &env);\n";
-
- return 0;
-}
-
-int
-be_operation::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- be_type *bt; // type node
- UTL_ScopeActiveIterator *si; // scope iterator
- AST_Decl *d; // temp node
- be_argument *bd; // argument node
- be_predefined_type *bpd=0; // predefined type used for return VOID type
- be_state *s; // state based code gen object
- long paramtblsize = 0; // size of the paradata table
-
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
-
- // for each operation, generate the paramdata and calldata tables followed by
- // the actual stub
-
- cs->indent (); // start with current indentation level
-
- // retrieve the return type
- bt = be_type::narrow_from_decl (this->return_type ());
-
- // bt holds the return type. Declare a variable that will hold the return
- // type. However, we must be careful if the return type is a void
- if (bt->node_type () == AST_Decl::NT_pre_defined)
- {
- bpd = be_predefined_type::narrow_from_decl (bt);
- }
-
- if (!this->has_native ())
- {
- // 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)
- {
- 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
-
- 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)
- // no need of size here
- *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
- << "{"
- << "\"" << 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, ";
-
- // XXXASG - Exception list goes here (if it exists) - TODO
- *cs << "0, 0};\n\n";
- }
-
- // now generate the actual stub
-
- // retrieve the return type again because we have used bt to also retrieve
- // the argument types
- bt = be_type::narrow_from_decl (this->return_type ());
-
- // bt holds the return type. Declare a variable that will hold the return
- // type. However, we must be careful if the return type is a void
- if (bt->node_type () == AST_Decl::NT_pre_defined)
- {
- bpd = be_predefined_type::narrow_from_decl (bt);
- }
-
- // first generate the return type
- cs->indent ();
- cg->push (TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS); // declare a return
- // type of the stub
- 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 - "
- "return type generation failure\n"),
- -1);
- }
- cg->pop ();
-
- // generate the operation name
- *cs << " " << this->name () << " (";
-
- // generate the arguments with the appropriate mapping
- cg->push (TAO_CodeGen::TAO_ARGUMENT_CS); // generating code for arguments in
- // the signature
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_operation::gen_client_stubs - "
- "failure in argument generation in signature\n"),
- -1);
- }
- cg->pop ();
-
- // last argument - is always CORBA::Environment
- *cs << "CORBA::Environment &env)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
-
- if (this->has_native ())
- {
- *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);
- }
- }
- else
- {
- // 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 ();
-
- // 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 ();
-
- 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";
-
- // if our return type is not void, then pass the address of retval
- if (!bpd || (bpd->pt () != AST_PredefinedType::PT_void))
- {
- 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 (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 ();
-
- // 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 ();
- }
-
- cs->decr_indent (0);
- *cs << "\n}\n\n";
- return 0;
-}
-
-int
-be_operation::gen_server_header (void)
-{
- TAO_OutStream *sh; // output stream
- be_type *bt; // type node
- be_state *s; // state based code generator object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_OPERATION_SH); // we are now generating an
- // operation definition
-
- sh = cg->server_header ();
- sh->indent (); // start with the current indentation level
-
- // every operation is declared virtual
- *sh << "virtual ";
-
-
- // first generate the return type
- bt = be_type::narrow_from_decl (this->return_type ());
- s = cg->make_state (); // retrieve code gen object for this state
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR ((LM_ERROR, "be_operation::gen_server_header\n"));
- ACE_ERROR ((LM_ERROR, "return type generation failure\n"));
- return -1;
- }
- // generate the operation name
- *sh << " " << this->local_name () << " (";
-
- // generate the arguments with the appropriate mapping
- cg->push (TAO_CodeGen::TAO_ARGUMENT_SH); // generating code for arguments in
- // the signature
- if (be_scope::gen_server_header () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_operation::gen_server_header\n"));
- ACE_ERROR ((LM_ERROR, "Argument generation failure\n"));
- return -1;
- }
- cg->pop ();
-
- // XXXASG
- // additional argument in the form of CORBA::Environment since TAO does not
- // yet support Exceptions. However, we can have an option to the "tao" IDL
- // compiler to ask it to generate code for exceptions. This will be handled
- // in a later release.
- *sh << " CORBA::Environment &env) = 0; // pure virtual\n";
-
- sh->indent ();
-
- // generate the static method corresponding to this method
- *sh << "static void " << this->local_name () <<
- "_skel (CORBA::ServerRequest &req, void *obj,"
- << " void *context, CORBA::Environment &env);\n\n";
- cg->pop (); // restore previous state
- return 0;
-}
-
-// Generate code for the operation skeleton that makes the upcall.
-// Special Note: We deviate a bit from our policy of handing over code
-// generation for elements in our scope to the be_scope class. For this method,
-// it is best to simulate that behavior here as it involves a lot of
-// complexity.
-int
-be_operation::gen_server_skeletons (void)
-{
- TAO_OutStream *ss; // output stream
- TAO_NL nl; // end line
- be_type *bt; // type node
- be_type *rt; // type node for the return type
- UTL_ScopeActiveIterator *si; // scope iterator
- AST_Decl *d; // temp node
- be_argument *bd = 0; // argument node
- be_state *s; // state based code gen object
- be_predefined_type *bpd=0; // predefined return type
- be_interface *intf; // enclosing interface node
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- ss = cg->server_skeletons ();
-
- ss->indent (); // start with the current indentation level
-
- // retrieve our enclosing interface decl
- intf = be_interface::narrow_from_decl (ScopeAsDecl (this->defined_in ()));
-
- *ss << "void " << intf->full_skel_name () << "::"
- << this->local_name () << "_skel ("
- << "CORBA::ServerRequest &_tao_server_request, "
- //@@XXASG << "CORBA::Object_ptr _tao_object_reference, "
- << "void *_tao_object_reference, "
- << "void *context, "
- << "CORBA::Environment &_tao_environment)" << nl;
- *ss << "{\n";
- ss->incr_indent ();
- *ss << "ACE_UNUSED_ARG (context);" << nl;
-
- if (this->has_native ())
- {
- // Native types cannot be exported...
- *ss << "_tao_environment.exception (new CORBA::MARSHAL"
- << " (CORBA::COMPLETED_NO));\n";
- }
- else
- {
- // define an NVList to hold arguments
- *ss << "CORBA::NVList_ptr nvlist;" << nl;
- // define a variable that will eventually point to our
- // implementation object
- *ss << intf->full_skel_name () << "_ptr 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
- 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;
- }
-#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
- 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 () << "(";
- 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;
- cg->pop ();
- *ss << "_tao_server_request.result (result, "
- << "_tao_environment);" << nl;
- }
- *ss << "\n";
- }
-
- ss->decr_indent ();
- *ss << "}\n\n";
-
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_operation::gen_client_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_operation::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// compute the size type of the node in question
-int
-be_operation::compute_size_type (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
-
- 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 ();
- bd = be_decl::narrow_from_decl (d);
- if (bd != 0)
- {
- // our sizetype depends on the sizetype of our members. Although
- // previous value of sizetype may get overwritten, we are
- // guaranteed by the "size_type" call that once the value reached
- // be_decl::VARIABLE, nothing else can overwrite it.
- this->size_type (bd->size_type ());
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l) be_operation::compute_size_type - "
- "narrow_from_decl returned 0\n"));
- }
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-int
-be_operation::accept (be_visitor *visitor)
-{
- return visitor->visit_operation (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS3 (be_operation, AST_Operation, be_scope, be_decl)
-IMPL_NARROW_FROM_DECL (be_operation)
-IMPL_NARROW_FROM_SCOPE (be_operation)
diff --git a/TAO/TAO_IDL/be/be_predefined_type.cpp b/TAO/TAO_IDL/be/be_predefined_type.cpp
deleted file mode 100644
index 5b55195a70d..00000000000
--- a/TAO/TAO_IDL/be/be_predefined_type.cpp
+++ /dev/null
@@ -1,465 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_predefined_type.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_PredefinedType that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_PredefinedType
- */
-be_predefined_type::be_predefined_type (void)
-{
-}
-
-be_predefined_type::be_predefined_type (AST_PredefinedType::PredefinedType t,
- UTL_ScopedName *n, UTL_StrList *p)
- : AST_PredefinedType (t, n, p),
- AST_Decl (AST_Decl::NT_pre_defined, n, p)
-{
- // generate a new Scoped Name for us such that we belong to the CORBA
- // namespace
- if (this->pt () != AST_PredefinedType::PT_void)
- {
-
- UTL_ScopedName *new_name = new UTL_ScopedName (new Identifier ("CORBA", 1, 0,
- I_FALSE),
- NULL);
- switch (this->pt ())
- {
- case AST_PredefinedType::PT_long:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("Long", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_ulong:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("ULong", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_short:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("Short", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_ushort:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("UShort", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_float:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("Float", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_double:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("Double", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_char:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("Char", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_octet:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("Octet", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_wchar:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("WChar", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_boolean:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("Boolean", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_any:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier ("Any", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_pseudo:
- {
- new_name->nconc (new UTL_ScopedName (new Identifier
- (n->last_component
- ()->get_string (), 1, 0,
- I_FALSE), NULL));
- }
- break;
- default:
- {
- new_name->nconc (new UTL_ScopedName (this->local_name (), NULL));
- }
- }
- this->set_name (new_name);
- }
-
- // computes the repoID
- compute_repoID ();
-
- // computes the fully scoped name
- compute_fullname ();
-
- // computes the fully scoped typecode name
- compute_tc_name ();
-
- // compute the flattened fully scoped name
- compute_flatname ();
-}
-
-// overriden method
-void
-be_predefined_type::compute_tc_name (void)
-{
- // start with the head as the CORBA namespace
- this->tc_name_ = new UTL_ScopedName (new Identifier ("CORBA", 1, 0, I_FALSE),
- NULL);
-
- switch (this->pt ())
- {
- case AST_PredefinedType::PT_void:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_void", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_long:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_long", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_longlong:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_longlong", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_ulong:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_ulong", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_ulonglong:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_ulonglong", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_short:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_short", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_ushort:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_ushort", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_float:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_float", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_double:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_double", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_longdouble:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_longdouble", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_char:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_char", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_wchar:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_wchar", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_octet:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_octet", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_boolean:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_boolean", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_any:
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_any", 1, 0,
- I_FALSE), NULL));
- }
- break;
- case AST_PredefinedType::PT_pseudo:
- {
- char tcname [100];
- ACE_OS::sprintf (tcname, "_tc_%s",
- this->name ()->last_component ()->get_string ());
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier
- (ACE_OS::strdup (tcname),
- 1, 0,
- I_FALSE), NULL));
- }
- break;
- default:
- ACE_ERROR ((LM_WARNING, "Unknown or invalid predefined type"));
- break;
- }
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// Generates the client-side header information for the predefined type
-int
-be_predefined_type::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- ch->indent ();
- *ch << this->name ();
- return 0;
-}
-
-// Generates the client-side stubs for the predefined type
-int
-be_predefined_type::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
-
- return 0;
-}
-
-// Generates the server-side header information for the predefined type
-int
-be_predefined_type::gen_server_header (void)
-{
- TAO_OutStream *sh; // output stream
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- sh = cg->server_header ();
-
- return 0;
-}
-
-// Generates the server-side skeletons for the predefined type
-int
-be_predefined_type::gen_server_skeletons (void)
-{
- TAO_OutStream *ss; // output stream
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ss = cg->server_skeletons ();
-
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_predefined_type::gen_client_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_predefined_type::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-int
-be_predefined_type::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // Macro to avoid "warning: unused parameter" type warning.
- ACE_UNUSED_ARG (nl);
-
- cs = cg->client_stubs ();
- cs->indent (); // start from the current indentation level
-
- switch (this->pt ())
- {
- case AST_PredefinedType::PT_void:
- *cs << "CORBA::tk_void,\n\n";
- break;
- case AST_PredefinedType::PT_short:
- *cs << "CORBA::tk_short,\n\n";
- break;
- case AST_PredefinedType::PT_ushort:
- *cs << "CORBA::tk_ushort,\n\n";
- break;
- case AST_PredefinedType::PT_long:
- *cs << "CORBA::tk_long,\n\n";
- break;
- case AST_PredefinedType::PT_ulong:
- *cs << "CORBA::tk_ulong,\n\n";
- break;
- case AST_PredefinedType::PT_longlong:
- *cs << "CORBA::tk_longlong,\n\n";
- break;
- case AST_PredefinedType::PT_ulonglong:
- *cs << "CORBA::tk_ulonglong,\n\n";
- break;
- case AST_PredefinedType::PT_float:
- *cs << "CORBA::tk_float,\n\n";
- break;
- case AST_PredefinedType::PT_double:
- *cs << "CORBA::tk_double,\n\n";
- break;
- case AST_PredefinedType::PT_longdouble:
- *cs << "CORBA::tk_longdouble,\n\n";
- break;
- case AST_PredefinedType::PT_boolean:
- *cs << "CORBA::tk_boolean,\n\n";
- break;
- case AST_PredefinedType::PT_char:
- *cs << "CORBA::tk_char,\n\n";
- break;
- case AST_PredefinedType::PT_octet:
- *cs << "CORBA::tk_octet,\n\n";
- break;
- case AST_PredefinedType::PT_any:
- *cs << "CORBA::tk_any,\n\n";
- break;
- case AST_PredefinedType::PT_wchar:
- *cs << "CORBA::tk_wchar,\n\n";
- break;
- case AST_PredefinedType::PT_pseudo:
- *cs << "CORBA::tk_objref,\n\n";
- }
- return 0;
-}
-
-long
-be_predefined_type::tc_size (void)
-{
- return 4; // for the enum value
-}
-
-long
-be_predefined_type::tc_encap_len (void)
-{
- // XXXASG - TODO what if it was of type Object? or one of the pseudo-objects
- return 0; // no encapsulation
-}
-
-int
-be_predefined_type::gen_encapsulation (void)
-{
- // XXXASG - TODO what if it was of type Object? or one of the pseudo-objects
- return 0; // nothing to be done
-}
-
-// compute the size type of the node in question
-int
-be_predefined_type::compute_size_type (void)
-{
- switch (this->pt ())
- {
- case AST_PredefinedType::PT_any:
- case AST_PredefinedType::PT_pseudo:
- // we are variable length type
- this->size_type (be_decl::VARIABLE);
- break;
- default:
- this->size_type (be_decl::FIXED);
- }
- 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)
-{
- return visitor->visit_predefined_type (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_predefined_type, AST_PredefinedType, be_type)
-IMPL_NARROW_FROM_DECL (be_predefined_type)
diff --git a/TAO/TAO_IDL/be/be_produce.cpp b/TAO/TAO_IDL/be/be_produce.cpp
deleted file mode 100644
index 817fb6af65d..00000000000
--- a/TAO/TAO_IDL/be/be_produce.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-
-COPYRIGHT
-
-Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
-States of America. All Rights Reserved.
-
-This product is protected by copyright and distributed under the following
-license restricting its use.
-
-The Interface Definition Language Compiler Front End (CFE) is made
-available for your use provided that you include this license and copyright
-notice on all media and documentation and the software program in which
-this product is incorporated in whole or part. You may copy and extend
-functionality (but may not remove functionality) of the Interface
-Definition Language CFE without charge, but you are not authorized to
-license or distribute it to anyone else except as part of a product or
-program developed by you or with the express written consent of Sun
-Microsystems, Inc. ("Sun").
-
-The names of Sun Microsystems, Inc. and any of its subsidiaries or
-affiliates may not be used in advertising or publicity pertaining to
-distribution of Interface Definition Language CFE as permitted herein.
-
-This license is effective until terminated by Sun for failure to comply
-with this license. Upon termination, you shall destroy or return all code
-and documentation for the Interface Definition Language CFE.
-
-INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
-ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
-FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
-DEALING, USAGE OR TRADE PRACTICE.
-
-INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
-ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
-TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
-
-SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
-RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
-INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
-
-IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
-ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
-DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-Use, duplication, or disclosure by the government is subject to
-restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
-Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
-52.227-19.
-
-Sun, Sun Microsystems and the Sun logo are trademarks or registered
-trademarks of Sun Microsystems, Inc.
-
-SunSoft, Inc.
-2550 Garcia Avenue
-Mountain View, California 94043
-
-NOTE:
-
-SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
-trademarks or registered trademarks of Sun Microsystems, Inc.
-
- */
-
-// BE_produce.cc - Produce the work of the BE - does nothing in the
-// dummy BE
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_interpretive.h"
-
-/*
- * Do the work of this BE. This is the starting point for code generation.
- */
-
-void
-BE_produce()
-{
- be_root *root; // root of the AST made up of BE nodes
- be_visitor *root_visitor; // visitor for root
- be_visitor_context ctx; // context information for the visitor root
-
- // XXXASG - Here is where we will have a choice of what to initialize i.e.,
- // whether we want a visitor generating "interpetive" or "compiled" form of
- // stubs/skeletons
- // TODO - to do this elegantly.
- // right now we just force it to be the interpretive one.
- tao_cg->visitor_factory (new TAO_Interpretive_Visitor_Factory);
-
- AST_Decl *d = idl_global->root (); // get the root
-
- root = be_root::narrow_from_decl (d); // narrow it to the "be_root"
- if (!root) // no root
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) be_produce - "
- "No Root\n"));
- BE_abort();
- }
-
- // Code generation involves six steps because of the six files that we
- // generate.
-
- // (1) generate client header
- // instantiate a visitor context
- ctx.state (TAO_CodeGen::TAO_ROOT_CH); // set the codegen state
- // get a root visitor
- root_visitor = tao_cg->make_visitor (&ctx);
- if (root->accept (root_visitor) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) be_produce - "
- "client header for Root failed\n"));
- BE_abort();
- }
- (void) tao_cg->end_client_header (); // generate the last #endif
- delete root_visitor; // it is our responsibility to free up the visitor
-
- // (2) generate client inline
- // set the context information
- ctx.state (TAO_CodeGen::TAO_ROOT_CI);
- // create a visitor
- root_visitor = tao_cg->make_visitor (&ctx);
- if (root->accept (root_visitor) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) be_produce - "
- "client inline for Root failed\n"));
- BE_abort();
- }
- delete root_visitor; // it is our responsibility to free up the visitor
-
-
- // (3) generate client stubs
- ctx.state (TAO_CodeGen::TAO_ROOT_CS);
- // create a visitor
- root_visitor = tao_cg->make_visitor (&ctx);
- if (root->accept (root_visitor) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) be_produce - "
- "client stubs for Root failed\n"));
- BE_abort();
- }
- delete root_visitor; // it is our responsibility to free up the visitor
-
- // (4) generate server header
- ctx.state (TAO_CodeGen::TAO_ROOT_SH);
- // create a visitor
- root_visitor = tao_cg->make_visitor (&ctx);
- if (root->accept (root_visitor) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) be_produce - "
- "server header for Root failed\n"));
- BE_abort();
- }
- (void) tao_cg->end_server_header (); // generate the last #endif
- delete root_visitor; // it is our responsibility to free up the visitor
-
- // (5) generate server inline
- ctx.state (TAO_CodeGen::TAO_ROOT_SI);
- // create a visitor
- root_visitor = tao_cg->make_visitor (&ctx);
- if (root->accept (root_visitor) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) be_produce - "
- "server inline for Root failed\n"));
- BE_abort();
- }
- delete root_visitor; // it is our responsibility to free up the visitor
-
- // (6) generate server skeletons
- ctx.state (TAO_CodeGen::TAO_ROOT_SS);
- // create a visitor
- root_visitor = tao_cg->make_visitor (&ctx);
- if (root->accept (root_visitor) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) be_produce - "
- "server skeletons for Root failed\n"));
- BE_abort();
- }
- delete root_visitor; // it is our responsibility to free up the visitor
-}
-
-/*
- * Abort this run of the BE
- */
-void
-BE_abort()
-{
- cerr << "Fatal Error" << endl;
- exit (1);
-}
diff --git a/TAO/TAO_IDL/be/be_root.cpp b/TAO/TAO_IDL/be/be_root.cpp
deleted file mode 100644
index 96dcb1065d6..00000000000
--- a/TAO/TAO_IDL/be/be_root.cpp
+++ /dev/null
@@ -1,315 +0,0 @@
-// $Id$
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_root.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Root that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// Default Constructor
-be_root::be_root (void)
-{
-}
-
-// Constructor used to build the root of the abstract syntax tree (AST)
-be_root::be_root (UTL_ScopedName *n, UTL_StrList *p)
- : AST_Root (n, p),
- AST_Decl (AST_Decl::NT_root, n, p),
- UTL_Scope (AST_Decl::NT_root)
-
-{
-}
-
-// =====================================================
-// CODE GENERATION METHODS
-// =====================================================
-
-// Starting point for the code generation. Called inside BE_produce ()
-int be_root::gen_idl2cplusplus_mapping (void)
-{
- // this is the main starting point from which the files are generated. We
- // delegate the task of code generation to a special Code Generation
- // object. This allows a number of different front ends to access the services
- // of a single code generator
-
- // C++ mapping involves producing 6 files. These include the client and
- // server side headers, the client and server side inlines, as well as client
- // stubs and server skeletons.
- if (this->gen_client_header () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error generating client header file: %s\n",
- idl_global->be_get_client_hdr_fname ()));
- return -1;
- }
- if (this->gen_client_inline () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error generating client inline file: %s\n",
- idl_global->be_get_client_inline_fname ()));
- return -1;
- }
- if (this->gen_client_stubs () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error generating client stubs file: %s\n",
- idl_global->be_get_client_stub_fname ()));
- return -1;
- }
- if (this->gen_server_header () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error generating server header file: %s\n",
- idl_global->be_get_server_hdr_fname ()));
- return -1;
- }
- if (this->gen_server_inline () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error generating server inline file: %s\n",
- idl_global->be_get_server_inline_fname ()));
- return -1;
- }
- if (this->gen_server_skeletons () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error generating server skeleton file: %s\n",
- idl_global->be_get_server_skeleton_fname ()));
- return -1;
- }
-
- return 0;
-}
-
-// generate client header
-int be_root::gen_client_header (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_ROOT_CH); // set the code generation state
-
- // open the client-side header file
- if (cg->client_header (idl_global->be_get_client_hdr_fname ()) == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error opening client header\n"));
- return -1;
- }
- // delegate the task of code generation to the scope
- if (be_scope::gen_client_header () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: code generation for scope failed\n"));
- return -1;
- }
- cg->pop ();
-
- // at this point, we must be in the initial state
- ACE_ASSERT (cg->state () == TAO_CodeGen::TAO_INITIAL);
-
- (void) cg->end_client_header (); // generate the last #endif
- return 0;
-}
-
-// Generates the client-side stubs for the root
-int be_root::gen_client_stubs (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_ROOT_CS); // set the code generation state
-
- // open the client-side stub file
- if (cg->client_stubs (idl_global->be_get_client_stub_fname ()) == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error opening client stubs file\n"));
- return -1;
- }
- // delegate the task of code generation to the scope
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: code generation for scope failed\n"));
- return -1;
- }
- cg->pop ();
-
- // at this point, we must be in the initial state
- // ACE_ASSERT (cg->state () == TAO_CodeGen::TAO_INITIAL);
-
- return 0;
-}
-
-// Generates the client-side inlines for the root
-int be_root::gen_client_inline (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_ROOT_CI); // set the code generation state
-
- // open the client-side inline file
- if (cg->client_inline (idl_global->be_get_client_inline_fname ()) == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error opening client inline file\n"));
- return -1;
- }
- // delegate the task of code generation to the scope
- if (be_scope::gen_client_inline () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: code generation for scope failed\n"));
- return -1;
- }
- cg->pop ();
-
- // at this point, we must be in the initial state
- // ACE_ASSERT (cg->state () == TAO_CodeGen::TAO_INITIAL);
-
- return 0;
-}
-
-// Generates the server-side header information for the root
-int be_root::gen_server_header (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_ROOT_SH); // set the code generation state
-
- // open the server-side header file
- if (cg->server_header (idl_global->be_get_server_hdr_fname ()) == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error opening server header\n"));
- return -1;
- }
- // delegate the task of code generation to the scope
- if (be_scope::gen_server_header () == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "be_root: server code generation for scope failed\n"));
- return -1;
- }
-
- cg->pop ();
-
- // at this point, we must be in the initial state
- // ACE_ASSERT (cg->state () == TAO_CodeGen::TAO_INITIAL);
-
- (void) cg->end_server_header (); // generate the last #endif statement
- return 0;
-}
-
-// Generates the server-side skeletons for the root
-int be_root::gen_server_skeletons (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_ROOT_SS); // set the code generation state
-
- // open the server-side skeleton file
- if (cg->server_skeletons (idl_global->be_get_server_skeleton_fname ()) == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error opening server skeletons file\n"));
- return -1;
- }
- // delegate the task of code generation to the scope
- if (be_scope::gen_server_skeletons () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: code generation for scope failed\n"));
- return -1;
- }
- cg->pop ();
-
- // at this point, we must be in the initial state
- // ACE_ASSERT (cg->state () == TAO_CodeGen::TAO_INITIAL);
-
- return 0;
-}
-
-// Generates the server-side inlines for the root
-int be_root::gen_server_inline (void)
-{
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_ROOT_SI); // set the code generation state
-
- // open the server-side inline file
- if (cg->server_inline (idl_global->be_get_server_inline_fname ()) == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: Error opening server inline file\n"));
- return -1;
- }
- // delegate the task of code generation to the scope
- if (be_scope::gen_server_inline () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_root: code generation for scope failed\n"));
- return -1;
- }
- cg->pop ();
-
- // at this point, we must be in the initial state
- // ACE_ASSERT (cg->state () == TAO_CodeGen::TAO_INITIAL);
-
- return 0;
-}
-
-// We had to provide these since the AST_Root::fe_* method was setting the
-// names of these three to "local type"
-
-/*
- * Add this AST_Sequence to the locally defined types in this scope
- */
-AST_Sequence *
-be_root::fe_add_sequence (AST_Sequence *t)
-{
- if (t == NULL)
- return NULL;
-
- add_to_local_types(t);
- return t;
-}
-
-/*
- * Add this AST_String to the locally defined types in this scope
- */
-AST_String *
-be_root::fe_add_string (AST_String *t)
-{
- if (t == NULL)
- return NULL;
-
- add_to_local_types (t);
-
- return t;
-}
-
-/*
- * Add this AST_Array to the locally defined types in this scope
- */
-AST_Array *
-be_root::fe_add_array (AST_Array *t)
-{
- if (t == NULL)
- return NULL;
-
- add_to_local_types (t);
-
- return t;
-}
-
-int
-be_root::accept (be_visitor *visitor)
-{
- return visitor->visit_root (this);
-}
-
-/*
- * Narrowing methods
- */
-IMPL_NARROW_METHODS3 (be_root, AST_Root, be_scope, be_decl)
-IMPL_NARROW_FROM_DECL (be_root)
-IMPL_NARROW_FROM_SCOPE (be_root)
diff --git a/TAO/TAO_IDL/be/be_scope.cpp b/TAO/TAO_IDL/be/be_scope.cpp
deleted file mode 100644
index 1842d29143a..00000000000
--- a/TAO/TAO_IDL/be/be_scope.cpp
+++ /dev/null
@@ -1,496 +0,0 @@
-//
-// $Id$
-//
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// Default Constructor
-be_scope::be_scope (void)
- : comma_ (0)
-{
-}
-
-// Constructor
-be_scope::be_scope (AST_Decl::NodeType type)
- : UTL_Scope (type),
- comma_ (0)
-{
-}
-
-be_scope::~be_scope (void)
-{
-}
-
-// Code generation methods
-void
-be_scope::comma (unsigned short comma)
-{
- this->comma_ = comma;
-}
-
-int
-be_scope::comma (void) const
-{
- return this->comma_;
-}
-
-int
-be_scope::gen_client_header (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- TAO_OutStream *os = cg->client_header (); // output stream
-
- 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 ();
- if (!d->imported ())
- {
- // we are not imported.
-
- // NOTE: Our assumption here is that whatever scope we are in, the
- // node type that shows up here *MUST* be valid according to the
- // IDL grammar. We do not check for this since the front end must
- // have taken care of weeding out such errors
-
- // The FE does some strange things in which items get added to
- // the enclosing scope as well as the scope that encloses the
- // enclosing scope. We do not want to generate code for items
- // that do not belong to the appropriate scope
-
- bd = be_decl::narrow_from_decl (d);
- // @@ Despite the comment above the following code will
- // crash without the if() around it.
- if (bd != 0)
- {
- if (bd->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_scope::gen_client_header failed\n"),
- -1);
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l) be_scope::gen_client_header - "
- "narrow_from_decl returned 0\n"));
- }
- } // no imported
- si->next ();
- if (!si->is_done () && this->comma_)
- {
- *os << ", "; // generate a comma
- }
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-int
-be_scope::gen_client_stubs (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- TAO_OutStream *os = cg->client_stubs (); // output stream
-
- 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 ();
- if (!d->imported ())
- {
- // we are not imported.
- // NOTE: Our assumptin here is that whatever scope we are in, the
- // node type that shows up here *MUST* be valid according to the
- // IDL grammar. We do not check for this since the front end must
- // have taken care of weeding out such errors
-
- bd = be_decl::narrow_from_decl (d);
- // @@ Despite the comment above the following code will
- // crash without the if() around it.
- if (bd != 0)
- {
- if (bd->gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_scope::gen_client_stubs failed\n"),
- -1);
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l) be_scope::gen_client_stubs - "
- "narrow_from_decl returned 0\n"));
- }
- } // not imported
- si->next ();
- if (!si->is_done () && this->comma_)
- {
- *os << ", "; // generate a comma
- }
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-int
-be_scope::gen_client_inline (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- TAO_OutStream *os = cg->client_inline (); // output stream
-
- 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 ();
- if (!d->imported ())
- {
- // we are not imported.
- // NOTE: Our assumptin here is that whatever scope we are in, the
- // node type that shows up here *MUST* be valid according to the
- // IDL grammar. We do not check for this since the front end must
- // have taken care of weeding out such errors
-
- bd = be_decl::narrow_from_decl (d);
- if (bd != 0)
- {
- if (bd->gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_scope::gen_client_inline failed\n"),
- -1);
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l) be_scope::gen_client_inline - "
- "narrow_from_decl returned 0\n"));
- }
- } // not imported
- si->next ();
- if (!si->is_done () && this->comma_)
- {
- *os << ", "; // generate a comma
- }
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-int
-be_scope::gen_server_header (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- TAO_OutStream *os = cg->server_header (); // output stream
-
- 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 ();
- if (!d->imported ())
- {
- // we are not imported.
- // we are not imported.
-
- // NOTE: Our assumptin here is that whatever scope we are in, the
- // node type that shows up here *MUST* be valid according to the
- // IDL grammar. We do not check for this since the front end must
- // have taken care of weeding out such errors
-
- bd = be_decl::narrow_from_decl (d);
- if (bd != 0)
- {
- if (bd->gen_server_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_scope::gen_server_header failed\n"),
- -1);
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l) be_scope::gen_server_header - "
- "narrow_from_decl returned 0\n"));
- }
- } // not imported
- si->next ();
- if (!si->is_done () && this->comma_)
- {
- *os << ", "; // generate a comma
- }
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-int
-be_scope::gen_server_skeletons (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- TAO_OutStream *os = cg->server_skeletons (); // output stream
-
- 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 ();
- if (!d->imported ())
- {
- // we are not imported.
-
- // NOTE: Our assumptin here is that whatever scope we are in, the
- // node type that shows up here *MUST* be valid according to the
- // IDL grammar. We do not check for this since the front end must
- // have taken care of weeding out such errors
-
- bd = be_decl::narrow_from_decl (d);
- if (bd != 0)
- {
- if (bd->gen_server_skeletons () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_scope::gen_server_skeletons failed\n"),
- -1);
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l): be_scope::gen-server_skeletons - "
- "narrow_from_decl returned 0\n"));
- }
- } // not imported
- si->next ();
- if (!si->is_done () && this->comma_)
- {
- *os << ", "; // generate a comma
- }
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-int
-be_scope::gen_server_inline (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- TAO_OutStream *os = cg->server_inline (); // output stream
-
- 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 ();
-
- if (!d->imported ())
- {
- // we are not imported.
- // NOTE: Our assumptin here is that whatever scope we are in, the
- // node type that shows up here *MUST* be valid according to the
- // IDL grammar. We do not check for this since the front end must
- // have taken care of weeding out such errors
-
- bd = be_decl::narrow_from_decl (d);
- if (bd != 0)
- {
- if (bd->gen_server_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_scope::gen_server_inline failed\n"),
- -1);
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l): be_scope::gen_server_inline - "
- "narrow_from_decl returned 0\n"));
- }
- }
- si->next ();
- if (!si->is_done () && this->comma_)
- {
- *os << ", "; // generate a comma
- }
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-int
-be_scope::gen_encapsulation (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
-
- // if there are elements in this scope
- if (this->nmembers () > 0)
- {
- // instantiate a scope iterator.
- si = new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls);
-
- while (!(si->is_done ()))
- {
- // get the next AST decl node
- d = si->item ();
- bd = be_decl::narrow_from_decl (d);
- if (bd->gen_encapsulation () == -1)
- {
- // failure
- return -1;
- }
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-long
-be_scope::tc_encap_len (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
- long encap_len = 0;
-
- 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 ();
-
- // NOTE: Our assumptin here is that whatever scope we are in, the
- // node type that shows up here *MUST* be valid according to the
- // IDL grammar. We do not check for this since the front end must
- // have taken care of weeding out such errors
-
- bd = be_decl::narrow_from_decl (d);
- if (bd != 0)
- {
- encap_len += bd->tc_encap_len ();
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l): be_scope::tc_encap_len - "
- "narrow_from_decl returned 0\n"));
- }
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return encap_len;
-}
-
-// return the scope created by this node (if one exists, else NULL)
-be_decl *
-be_scope::decl (void)
-{
- switch (this->scope_node_type())
- {
- case AST_Decl::NT_interface:
- return be_interface::narrow_from_scope (this);
- case AST_Decl::NT_module:
- return be_module::narrow_from_scope (this);
- case AST_Decl::NT_root:
- return be_root::narrow_from_scope (this);
- case AST_Decl::NT_except:
- return be_exception::narrow_from_scope (this);
- case AST_Decl::NT_union:
- return be_union::narrow_from_scope (this);
- case AST_Decl::NT_struct:
- return be_structure::narrow_from_scope (this);
- case AST_Decl::NT_enum:
- return be_enum::narrow_from_scope (this);
- case AST_Decl::NT_op:
- return be_operation::narrow_from_scope (this);
- default:
- return (be_decl *)0;
- }
-}
-
-int
-be_scope::accept (be_visitor *visitor)
-{
- return visitor->visit_scope (this);
-}
-
-// narrowing methods
-IMPL_NARROW_METHODS1 (be_scope, UTL_Scope)
-IMPL_NARROW_FROM_SCOPE (be_scope)
diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp
deleted file mode 100644
index 6ffdfbe8997..00000000000
--- a/TAO/TAO_IDL/be/be_sequence.cpp
+++ /dev/null
@@ -1,2646 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_sequence.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Sequence that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-#include "be_visitor_sequence.h"
-
-/*
- * BE_Sequence
- */
-be_sequence::be_sequence (void)
- : mt_ (be_sequence::MNG_UNKNOWN)
-{
- this->size_type (be_decl::VARIABLE); // always the case
-}
-
-be_sequence::be_sequence (AST_Expression *v, AST_Type *t)
- : AST_Sequence (v, t),
- AST_Decl (AST_Decl::NT_sequence,
- NULL,
- NULL),
- mt_ (be_sequence::MNG_UNKNOWN)
-{
- // check if we are bounded or unbounded. An expression value of 0 means
- // unbounded
- if (v->ev ()->u.ulval == 0)
- {
- this->unbounded_ = I_TRUE;
- }
- else
- {
- this->unbounded_ = I_FALSE;
- }
-
- this->size_type (be_decl::VARIABLE); // a sequence data type is always
- // VARIABLE
-}
-
-idl_bool
-be_sequence::unbounded (void) const
-{
- return this->unbounded_;
-}
-
-// helper to create_name
-char *
-be_sequence::gen_name (void)
-{
- char namebuf [NAMEBUFSIZE];
- be_type *bt; // base type;
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE); // reset the buffer
- // retrieve the base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_name - "
- "bad base type\n"),
- 0);
- }
- if (bt->node_type () == AST_Decl::NT_sequence)
- {
- // our base type is an anonymous sequence
- be_sequence *seq;
- seq = be_sequence::narrow_from_decl (bt);
- if (!seq)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_name - "
- "error converting base type to sequence\n"),
- 0);
- }
- seq->set_defined_in (this); // set ourselves as its parent
- this->fe_add_sequence (seq); // add the child to our scope
- ACE_OS::sprintf (namebuf, "_tao_seq_%s", seq->gen_name ());
- }
- else
- {
- ACE_OS::sprintf (namebuf, "_tao_seq_%s", bt->local_name ()->get_string ());
- }
- // append the size (if any)
- if (!this->unbounded_)
- {
- ACE_OS::sprintf (namebuf, "%s_%d", namebuf, this->max_size ()->ev
- ()->u.ulval);
- }
- return ACE_OS::strdup (namebuf);
-}
-
-// create a name for ourselves
-int
-be_sequence::create_name (be_typedef *node)
-{
- static char namebuf [NAMEBUFSIZE];
- UTL_ScopedName *n = NULL;
- be_decl *scope; // scope in which we are defined
-
- // if there is a typedef node, we use its name as our name
- if (node)
- {
- n = (UTL_ScopedName *)node->name ()->copy ();
- this->set_name (n); // set our name
- }
- else
- {
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE); // reset the buffer
- ACE_OS::strcpy (namebuf, this->gen_name ()); // generate a local name
-
- // now see if we have a fully scoped name and if so, generate one
- scope = be_scope::narrow_from_scope (this->defined_in ())->decl ();
- if (scope)
- {
- // make a copy of the enclosing scope's name
- n = (UTL_ScopedName *)scope->name ()->copy () ;
-
- // add our local name as the last component
- n->nconc (new UTL_ScopedName (new Identifier (ACE_OS::strdup
- (namebuf), 1,
- 0, I_FALSE),
- NULL));
- // set the fully scoped name
- this->set_name (n);
- }
- else
- {
- // We better be not here because we must be inside some scope,
- // atleast the ROOT scope.
- return -1;
- }
- }
- return 0;
-}
-
-// Does this sequence have a managed type sequence element?
-be_sequence::MANAGED_TYPE
-be_sequence::managed_type (void)
-{
- if (this->mt_ == be_sequence::MNG_UNKNOWN) // not calculated yet
- {
- be_type *bt, *prim_type; // base types
-
- bt = be_type::narrow_from_decl (this->base_type ());
-
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- // get the primitive base type of this typedef node
- be_typedef *t = be_typedef::narrow_from_decl (bt);
- prim_type = t->primitive_base_type ();
- }
- else
- prim_type = bt;
-
- // determine if we need a managed type and which one
- switch (prim_type->node_type ())
- {
- case AST_Decl::NT_interface:
- case AST_Decl::NT_interface_fwd:
- this->mt_ = be_sequence::MNG_OBJREF;
- break;
- case AST_Decl::NT_string:
- this->mt_ = be_sequence::MNG_STRING;
- break;
- case AST_Decl::NT_pre_defined:
- {
- be_predefined_type *bpd = be_predefined_type::narrow_from_decl
- (prim_type);
- if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- this->mt_ = be_sequence::MNG_OBJREF;
- }
- else
- {
- this->mt_ = be_sequence::MNG_NONE;
- }
- }
- break;
- default:
- this->mt_ = be_sequence::MNG_NONE;
- } // end of switch
- }
- return this->mt_;
-}
-
-int
-be_sequence::gen_client_header (void)
-{
-#if 0 /* visitor code */
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- be_type *bt; // type node
- be_state *s; // state based code gen object
-#endif /* visitor code */
-
- if (!this->cli_hdr_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // first create a name for ourselves. We defer name creation for
- // ourselves to this point since named sequences should get the name
- // of the typedef node, else some other technique of name generation
- // should be used.
- if (this->create_name () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_sequence::gen_client_header - name creation failed\n"),
- -1);
- }
-
- be_visitor *visitor_seq_ch = cg->make_visitor (0);
- // (TAO_CodeGen::TAO_SEQUENCE_BODY_CH);
-
- if (this->accept (visitor_seq_ch) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence - "
- "gen_client_header"
- "\n"),
- -1);
- }
-
-#if 0 /* visitor code */
- ch = cg->client_header ();
-
- // generate the ifdefined macro for the sequence type
- ch->gen_ifdef_macro (this->flatname ());
-
- ch->indent (); // start with the current indentation level
-
- *ch << "// *************************************************************"
- << nl;
- *ch << "// class " << this->local_name () << nl;
- *ch << "// *************************************************************"
- << nl << nl;
-
- *ch << "class " << idl_global->export_macro ()
- << " " << this->local_name () << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent (0);
-
- // retrieve the base type since we may need to do some code
- // generation for the base type.
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence.cpp - "
- "Bad base type\n"),
- -1);
- }
-
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BASE_CH); // set current code gen
- // state
- s = cg->make_state ();
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence.cpp - "
- "base type codegen failed\n"),
- -1);
- }
- cg->pop ();
-
- // now generate the sequence body
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BODY_CH);
- s = cg->make_state ();
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "bad state\n"),
- -1);
- }
-
- // generate constructors
- ch->indent ();
- *ch << this->local_name () << " (void); // default constructor" << nl;
- // check whether we are bounded or not. Depending on that the mapping is
- // slightly different as shown below
- if (this->unbounded_)
- {
- *ch << local_name () << " (CORBA::ULong max);" << nl;
- *ch << local_name () << " (CORBA::ULong max, CORBA::ULong length, " << nl;
- }
- else
- {
- // bounded seq does not take the "max" argument
- *ch << local_name () << " (CORBA::ULong length, " << nl;
- }
-
- *ch << " ";
- // generate the type info for the element type
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "state based codegen failed\n"),
- -1);
- }
-
- *ch << " *value, CORBA::Boolean release=CORBA::B_FALSE);" << nl;
- *ch << local_name () << "(const " << local_name () <<
- " &); // copy constructor" << nl;
- *ch << "~" << this->local_name () << " (void);" << nl;
- *ch << this->local_name () << " &operator= (const " <<
- this->local_name () << " &);" << nl;
- *ch << "CORBA::ULong maximum (void) const;" << nl;
- *ch << "void length (CORBA::ULong);" << nl;
- *ch << "CORBA::ULong length (void) const;" << nl;
-
- // we need a new state here because the [] operator for strings and obj
- // references returns a managed type as opposed to the normal type
- cg->push (TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH);
- s = cg->make_state ();
- if (!s || s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "state based codegen failed\n"),
- -1);
- }
- *ch << "operator[] (CORBA::ULong index);" << nl;
- *ch << "const ";
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "state based codegen failed\n"),
- -1);
- }
- *ch << "operator[] (CORBA::ULong index) const;" << nl;
- cg->pop (); // back to the previous state
-
- s = cg->make_state ();
- // generate the static allocbuf and freebuf methods
- *ch << "static ";
- if (!s || s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "state based codegen failed\n"),
- -1);
- }
- *ch << " *allocbuf (CORBA::ULong nelems);" << nl;
- *ch << "static void freebuf (";
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "state based codegen failed\n"),
- -1);
- }
- *ch << " *);\n" ;
-
- // the spec says that for managed sequence types, the freebuf method
- // should individually free up the elements before deleting the
- // buffer. However, freebuf does not have a parameter that indicates the
- // total number of elements that are in the buffer. Hence we provide a
- // helper method to freebuf
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- case be_sequence::MNG_STRING:
- ch->indent ();
- *ch << "static void freebuf (" << nl;
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "state based codegen failed\n"),
- -1);
- }
- *ch << " *, CORBA::ULong);\n" ;
- break;
- default:
- break;
- }
- ch->decr_indent ();
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << "CORBA::ULong maximum_;" << nl;
- *ch << "CORBA::ULong length_;" << nl;
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "state based codegen failed\n"),
- -1);
- }
-
- *ch << " *buffer_;" << nl;
- *ch << "CORBA::Boolean release_;\n";
- ch->decr_indent ();
- *ch << "};\n";
- ch->indent ();
- *ch << "typedef " << this->local_name () << "* "
- << this->local_name () << "_ptr;\n";
- // Generate the typecode decl
- if (this->is_nested ())
- {
- // 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 "
- << idl_global->export_macro ()
- << " CORBA::TypeCode_ptr "
- << this->tc_name ()->last_component () << ";\n\n";
- }
-
- ch->gen_endif (); // endif macro
-
- // generate the ifdefined macro for the var type
- ch->gen_ifdef_macro (this->flatname (), "_var");
-
- // generate the var and out types
- if (this->gen_var_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "codegen for _var failed\n"),
- -1);
- }
-
- ch->gen_endif ();
-
- // generate the ifdefined macro for the var type
- ch->gen_ifdef_macro (this->flatname (), "_out");
-
- if (this->gen_out_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_header - "
- "codegen for _out failed\n"),
- -1);
- }
- ch->gen_endif ();
-
- cg->pop ();
-#endif /* visitor code */
-
- this->cli_hdr_gen_ = I_TRUE;
- } // if (cli_hdr_gen_)
- return 0;
-}
-
-int
-be_sequence::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
-#if 0 /* visitor code */
- be_type *bt; // base type
- be_state *s; //state object
-#endif /* visitor code */
-
- if (!this->cli_stub_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs (); // retrieve the client stubs stream
- // generate the ifdefined macro for the sequence type
- cs->gen_ifdef_macro (this->flatname ());
-
-#if 0 /* visitor code */
- // retrieve base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_stubs - "
- "bad type\n"),
- -1);
- }
-
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BASE_CS);
- s = cg->make_state ();
-
- // generate stubs for our base type if it itself is a sequence or we
- // need to generate code for our managed types
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_stubs - "
- "state based codegen failed\n"),
- -1);
- }
-
- cg->pop ();
-
- // generate the methods of the sequence C++ mapping
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BODY_CS);
- s = cg->make_state ();
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_stubs - "
- "bad state\n"),
- -1);
- }
-
-
- *cs << "// *************************************************************"
- << nl;
- *cs << "// class " << this->name () << nl;
- *cs << "// *************************************************************\n\n";
-
- // copy constructor
- cs->indent ();
- *cs << "// copy constructor" << nl;
- *cs << this->name () << "::" << this->local_name () <<
- " (const " << this->name () << " &seq)" << nl;
- *cs << " : maximum_ (seq.maximum_)," << nl;
- *cs << " length_ (seq.length_)," << nl;
- *cs << " buffer_ (" << this->name () << "::allocbuf (seq.maximum_)),"
- << nl;
- *cs << " release_ (1) // we always own it" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- // copy each element
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- {
- *cs << "for (CORBA::ULong i=0; i < seq.length_; i++)" << nl;
- *cs << "{" << nl;
- *cs << " this->buffer_[i] = " << bt->name () << "::_duplicate ("
- << "seq.buffer_[i]);" << nl;
- *cs << "}\n";
- }
- break;
- case be_sequence::MNG_STRING:
- {
- *cs << "for (CORBA::ULong i=0; i < seq.length_; i++)" << nl;
- *cs << "{" << nl;
- *cs << " this->buffer_[i] = CORBA::string_dup (" <<
- "seq.buffer_[i]);" << nl;
- *cs << "}\n";
- }
- break;
- default: // all other types are self managed, just assign them.
- *cs << "for (CORBA::ULong i=0; i < seq.length_; i++)" << nl;
- *cs << " this->buffer_[i] = seq.buffer_[i];\n";
- }
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // constructor only for unbounded seq. This takes in "max length"
- if (this->unbounded_)
- {
- cs->indent ();
- *cs << "// constructor for unbounded seq" << nl;
- *cs << this->name () << "::" << this->local_name () <<
- "(CORBA::ULong max )" << nl;
- *cs << " : maximum_ (max)," << nl;
- *cs << " length_ (0)," << nl;
- *cs << " buffer_ (" << this->name () << "::allocbuf (max))," << nl;
- *cs << " release_ (1) // owns" << nl;
- *cs << "{\n";
- *cs << "}\n\n";
- }
-
- // constructor that takes in the data buffer
- cs->indent ();
- *cs << "// constructor from data buffer" << nl;
- *cs << this->name () << "::" << this->local_name ();
- // depending on whether we are bounded or not, the constructor has
- // different sets of parameters
- if (this->unbounded_)
- {
- *cs << " (CORBA::ULong max, CORBA::ULong length, " << nl;
- }
- else
- {
- // bounded seq does not take the "max" argument
- *cs << " (CORBA::ULong length, " << nl;
- }
- *cs << " ";
- if (s->gen_code (bt, this) == -1)
- return -1;
- *cs << " *value, CORBA::Boolean release)" << nl;
- // for unbounded we have the additional max parameter
- if (this->unbounded_)
- {
- *cs << " : maximum_ (max)," << nl;
- }
- else
- {
- *cs << " : maximum_ (" << this->max_size () << ")," << nl;
- }
- *cs << " length_ (length)," << nl;
- *cs << " buffer_ (value)," << nl;
- *cs << " release_ (release) // ownership depends on release" << nl;
- *cs << "{\n";
- *cs << "}\n\n";
-
- // destructor
- cs->indent ();
- *cs << "// destructor" << nl;
- *cs << this->name () << "::~" << this->local_name () << " (void)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (this->release_) // we own the buffer" << nl;
- *cs << "{\n";
- cs->incr_indent ();
-
- // only for obj references and strings, we need to free each individual
- // element
- // call the appropriate freebuf on the buffer
- if (this->managed_type () != be_sequence::MNG_NONE)
- {
- *cs << this->name () << "::freebuf (this->buffer_, " <<
- "this->maximum_);\n";
- }
- else
- *cs << this->name () << "::freebuf (this->buffer_);\n";
-
- cs->decr_indent ();
- *cs << "}\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // assignment operator
- cs->indent ();
- *cs << "// assignment operator" << nl;
- *cs << this->name () << "& " << nl;
- *cs << this->name () << "::operator=" <<
- " (const " << this->name () << " &seq)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- // check for equality
- *cs << "if (this == &seq) return *this;" << nl;
- // otherwise, if release flag, free the buffer
- *cs << "if (this->release_)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- // only for obj references and strings, we need to free each individual
- // element
- // call the appropriate freebuf on the buffer
- if (this->managed_type () != be_sequence::MNG_NONE)
- {
- *cs << this->name () << "::freebuf (this->buffer_, " <<
- "this->maximum_);\n";
- }
- else
- *cs << this->name () << "::freebuf (this->buffer_);\n";
-
- cs->decr_indent ();
- *cs << "}" << nl;
-
- *cs << "this->length_ = seq.length_;" << nl;
- *cs << "this->maximum_ = seq.maximum_;" << nl;
- *cs << "this->buffer_ = " << this->name () << "::allocbuf (seq.maximum_),"
- << nl;
- *cs << "this->release_ = 1; // we always own it" << nl;
- // copy each element
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- {
- *cs << "for (CORBA::ULong i=0; i < seq.length_; i++)" << nl;
- *cs << "{" << nl;
- *cs << " this->buffer_[i] = " << bt->name () << "::_duplicate ("
- << "seq.buffer_[i]);" << nl;
- *cs << "}" << nl;
- }
- break;
- case be_sequence::MNG_STRING:
- {
- *cs << "for (CORBA::ULong i=0; i < seq.length_; i++)" << nl;
- *cs << "{" << nl;
- *cs << " this->buffer_[i] = CORBA::string_dup (" <<
- "seq.buffer_[i]);" << nl;
- *cs << "}" << nl;
- }
- break;
- default: // all other types are self managed, just assign them.
- *cs << "for (CORBA::ULong i=0; i < seq.length_; i++)" << nl;
- *cs << " this->buffer_[i] = seq.buffer_[i];" << nl;
- }
- *cs << "return *this;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // the length method
- cs->indent ();
- *cs << "void" << nl;
- *cs << this->name () << "::length (CORBA::ULong length)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- if (!this->unbounded_) // bounded sequence - we cannot increase length
- // more than its max => no reallocation necessary
- {
- // The sequence has a maximum length, check that the new
- // length is valid before changing anything.
- *cs << "if (length > this->maximum_)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "// @@ throw something?" << nl;
- *cs << "return;\n";
- cs->decr_indent ();
- *cs << "}" << nl;
- *cs << "this->length_ = length;\n";
- }
- else // unbounded buffer - may need reallocation
- {
- // Reallocate the buffer.
- *cs << "if (length > this->maximum_) // need realloc" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_stubs - "
- "bad state\n"),
- -1);
- }
-
- *cs << " *tmp = " << this->name ()
- << "::allocbuf (length);" << nl;
- *cs << "if (!tmp)" << nl;
- *cs << " return;" << nl;
-
- // copy each element. Allocate a new manager and initialize it.
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- {
- *cs << "CORBA::ULong i;" << nl;
- *cs << "// copy old buffer" << nl;
- *cs << "for (i=0; i < this->length_; i++)" << nl;
- *cs << "{" << nl;
- *cs << " tmp[i] = " << bt->name () << "::_duplicate ("
- << "this->buffer_[i]);" << nl;
- *cs << "}" << nl;
- }
- break;
- case be_sequence::MNG_STRING:
- {
- *cs << "CORBA::ULong i;" << nl;
- *cs << "// copy old buffer" << nl;
- *cs << "for (i=0; i < this->length_; i++)" << nl;
- *cs << "{" << nl;
- *cs << " tmp[i] = CORBA::string_dup (" <<
- "this->buffer_[i]);" << nl;
- *cs << "}" << nl;
- }
- break;
- default: // all other types are self managed, just assign them.
- {
- *cs << "CORBA::ULong i;" << nl;
- *cs << "// copy old buffer" << nl;
- *cs << "for (i=0; i < this->length_; i++)" << nl;
- *cs << "{" << nl;
- *cs << " tmp[i] = this->buffer_[i];" << nl;
- *cs << "}" << nl;
- }
- }
- // if release is set, we must free the previous buffer
- *cs << "if (this->release_) // free old one if we own it" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- // only for obj references and strings, we need to free each individual
- // element. Others are self managed.
- // call the appropriate freebuf on the buffer
- if (this->managed_type () != be_sequence::MNG_NONE)
- {
- *cs << this->name () << "::freebuf (this->buffer_, " <<
- "this->maximum_);\n";
- }
- else
- *cs << this->name () << "::freebuf (this->buffer_);\n";
-
- cs->decr_indent ();
- *cs << "}" << nl;
-
- *cs << "//assign the newly reallocated buffer" << nl;
- *cs << "this->buffer_ = tmp;" << nl;
- *cs << "this->release_ = 1; //after reallocation, we own it" << nl;
- *cs << "this->maximum_ = length;\n";
- cs->decr_indent ();
- *cs << "}" << nl;;
- *cs << "this->length_ = length;\n";
- }
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // the allocbuf method
- cs->indent ();
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_stubs - "
- "state based codegen failed\n"),
- -1);
- }
-
- *cs << " *" << nl;
- *cs << this->name () << "::allocbuf (CORBA::ULong nelems)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_stubs - "
- "state based codegen failed\n"),
- -1);
- }
-
- *cs << " *buf = new ";
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_stubs - "
- "state based codegen failed\n"),
- -1);
- }
- *cs << "[nelems]; // allocate from heap" << nl;
- // the managed types must be initilaized
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- {
- *cs << "for (CORBA::ULong i=0; i < nelems; i++)" << nl;
- *cs << " buf[i] = " << bt->name () << "::_nil ();" << nl;
- }
- break;
- case be_sequence::MNG_STRING:
- {
- *cs << "for (CORBA::ULong i=0; i < nelems; i++)" << nl;
- *cs << " buf[i] = (char *)0;" << nl;
- }
- break;
- }
- *cs << "return buf;\n";
-
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // extra freebuf method for managed types
- if (this->managed_type () != MNG_NONE)
- {
- cs->indent ();
- *cs << "void" << nl;
- *cs << this->name () << "::freebuf (";
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "state based codegen failed\n"),
- -1);
- }
-
- *cs << " *seq, CORBA::ULong nelems)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (!seq) return; // null sequence" << nl;
- // the managed types must be individually freed. The others will have
- // their destructors called.
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- {
- *cs << "for (CORBA::ULong i=0; i < nelems; i++)" << nl;
- *cs << " CORBA::release (seq[i]);" << nl;
- }
- break;
- case be_sequence::MNG_STRING:
- {
- *cs << "for (CORBA::ULong i=0; i < nelems; i++)" << nl;
- *cs << " CORBA::string_free (seq[i]);" << nl;
- }
- break;
- }
- *cs << this->name () << "::freebuf (seq);\n";
- cs->decr_indent ();
- *cs << "}\n\n";
- }
-#endif /* visitor code */
- // generate the typecode information here
- cs->indent (); // start from current indentation level
- *cs << "static const CORBA::Long _oc_" << this->flatname () << "[] =" <<
- nl;
- *cs << "{\n";
- cs->incr_indent (0);
- if (this->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_stubs - "
- "codegen for encapsulation failed\n"),
- -1);
- }
-
- cs->decr_indent ();
- *cs << "};" << nl;
-
- *cs << "static CORBA::TypeCode _tc__tc_" << this->flatname () <<
- " (CORBA::tk_sequence, sizeof (_oc_" << this->flatname () <<
- "), (char *) &_oc_" << this->flatname () <<
- ", CORBA::B_FALSE);" << nl;
- *cs << "CORBA::TypeCode_ptr " << this->tc_name () << " = &_tc__tc_" <<
- this->flatname () << ";\n\n";
-
-#if 0
- cg->pop ();
-#endif
- this->cli_stub_gen_ = I_TRUE;
-
- cs->gen_endif ();
- }
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_sequence::gen_client_inline (void)
-{
- TAO_OutStream *ci; // output stream
-#if 0 /* visitor code */
- TAO_NL nl; // end line
- be_state *s; // code gen state
- be_type *bt; // base type
-#endif /* visitor code */
-
- if (!this->cli_inline_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-#if 0
- // retrieve base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "bad type\n"),
- -1);
- }
-
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BASE_CI);
- s = cg->make_state ();
-
- // generate inline methods for our base type if it itself is a sequence
- if (!s || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "state based codegen failed\n"),
- -1);
- }
- cg->pop ();
-
- // generate the methods of the sequence C++ mapping
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BODY_CI);
- s = cg->make_state ();
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "bad state\n"),
- -1);
- }
-
- // generate the ifdefined macro for type
- ci->gen_ifdef_macro (this->flatname ());
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// class " << this->name () << nl;
- *ci << "// *************************************************************\n\n";
-
- // freebuf method
- ci->indent ();
- *ci << "ACE_INLINE void" << nl;
- *ci << this->name () << "::freebuf (";
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "state based codegen failed\n"),
- -1);
- }
-
- *ci << " *seq)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete []seq;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // default constructor
- ci->indent ();
- *ci << "//default constructor" << nl;
- *ci << "ACE_INLINE " << nl;
- *ci << this->name () << "::" << this->local_name () << " (void)" << nl;
- // for bounded and unbounded, initialize the data members differently
- if (this->unbounded_)
- {
- *ci << " : maximum_ (0)," << nl;
- *ci << " length_ (0)," << nl;
- *ci << " buffer_ (0)," << nl;
- *ci << " release_ (0) // does not own" << nl;
- }
- else
- {
- *ci << " : maximum_ (" << this->max_size () << ")," << nl;
- *ci << " length_ (0)," << nl;
- *ci << " buffer_ (" << this->name () << "::allocbuf (" <<
- this->max_size () << "))," << nl;
- *ci << " release_ (1) // owns" << nl;
- }
- *ci << "{}\n\n";
-
- // the maximum method
- ci->indent ();
- *ci << "ACE_INLINE CORBA::ULong" << nl;
- *ci << this->name () << "::maximum (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->maximum_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // the length method
- ci->indent ();
- *ci << "ACE_INLINE CORBA::ULong" << nl;
- *ci << this->name () << "::length (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->length_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- cg->pop ();
-
- // subscript operators (1) read-only, (2) read/write
- cg->push (TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI);
- s = cg->make_state ();
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "bad state\n"),
- -1);
- }
-
- ci->indent ();
- *ci << "ACE_INLINE ";
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "state based codegen failed\n"),
- -1);
- }
-
- *ci << nl;
- *ci << this->name () << "::operator[] (CORBA::ULong index) // read/write"
- << nl;
- *ci << "{\n";
- ci->incr_indent ();
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- *ci << "return " << this->name () << "::TAO_ObjRefMngType (" <<
- "&this->buffer_[index], this->release_);\n";
- break;
- case be_sequence::MNG_STRING:
- *ci << "return " << this->name () << "::TAO_StrMngType (" <<
- "&this->buffer_[index], this->release_);\n";
- break;
- default:
- *ci << "return this->buffer_[index];\n";
- }
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE const ";
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "state based codegen failed\n"),
- -1);
- }
-
- *ci << nl;
- *ci << this->name () << "::operator[] (CORBA::ULong index) const // read"
- << nl;
- *ci << "{\n";
- ci->incr_indent ();
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- *ci << "return " << this->name () << "::TAO_ObjRefMngType (" <<
- "&this->buffer_[index], this->release_);\n";
- break;
- case be_sequence::MNG_STRING:
- *ci << "return " << this->name () << "::TAO_StrMngType (" <<
- "&this->buffer_[index], this->release_);\n";
- break;
- default:
- *ci << "return this->buffer_[index];\n";
- }
- ci->decr_indent ();
- *ci << "}\n\n";
- cg->pop ();
- ci->gen_endif (); // endif macro
-#endif
- // generate the ifdefined macro for the var type
- ci->gen_ifdef_macro (this->flatname (), "_var");
-
- // generate the implementations for the _var and _impl classes
- if (this->gen_var_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "var implementation failed\n"),
- -1);
- }
- ci->gen_endif ();
-
- // generate the ifdefined macro for the var type
- ci->gen_ifdef_macro (this->flatname (), "_out");
-
- if (this->gen_out_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_inline - "
- "out impl failed\n"),
- -1);
- }
- ci->gen_endif (); // endif macro
-
- this->cli_inline_gen_ = I_TRUE;
- }
- return 0;
-}
-
-int
-be_sequence::gen_server_header (void)
-{
- // nothing to be done
- return 0;
-}
-
-int
-be_sequence::gen_server_skeletons (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_sequence::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// generate the _var definition for ourself
-int
-be_sequence::gen_var_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // names
- be_state *s; // code gen state
- be_type *bt; // base type
- be_decl *scope; // our enclosing scope
-
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_var", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- *ch << "// *************************************************************"
- << nl;
- *ch << "// class " << this->name () << "_var" << nl;
- *ch << "// *************************************************************\n\n";
-
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BODY_CH);
- s = cg->make_state ();
-
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_var_defn - "
- "state based codegen failed\n"),
- -1);
- }
-
- // retrieve base type
- bt = be_type::narrow_from_decl (this->base_type ());
-
- if (this->defined_in ())
- scope = be_scope::narrow_from_scope (this->defined_in ())->decl ();
- else
- scope = 0;
-
- // generate the var definition (always in the client header).
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ch->indent (); // start with whatever was our current indent level
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
- // default constr
- *ch << namebuf << " (void); // default constructor" << nl;
- // constr
- *ch << namebuf << " (" << this->local_name () << " *);" << nl;
- // copy constructor
- *ch << namebuf << " (const " << namebuf <<
- " &); // copy constructor" << nl;
- // destructor
- *ch << "~" << namebuf << " (void); // destructor" << nl;
- *ch << nl;
- // assignment operator from a pointer
- *ch << namebuf << " &operator= (" << this->local_name () << " *);" << nl;
- // assignment from _var
- *ch << namebuf << " &operator= (const " << namebuf <<
- " &);" << nl;
-
- // arrow operator
- *ch << this->local_name () << " *operator-> (void);" << nl;
- *ch << "const " << this->local_name () << " *operator-> (void) const;" << nl;
- *ch << nl;
-
- // other extra types (cast operators, [] operator, and others)
-
- // cast operator
- *ch << "operator const " << this->local_name () << " &() const;" << nl;
- *ch << "operator " << this->local_name () << " &();" << nl;
- *ch << "operator " << this->local_name () << " &() const;" << nl;
-
- // overloaded [] operator. The const version is not required for sequences
-
-#if 0
- switch (this->managed_type ())
- {
- case be_sequence::MNG_STRING:
- if (scope)
- {
- *ch << "ACE_NESTED_CLASS (" << scope->name () << "," <<
- this->local_name () << "::TAO_StrMngType) ";
- }
- else
- {
- *ch << this->local_name () << "::TAO_StrMngType ";
- }
- break;
- case be_sequence::MNG_OBJREF:
- if (scope)
- {
- *ch << "ACE_NESTED_CLASS (" << scope->name () << "," <<
- this->local_name () << "::TAO_ObjRefMngType) ";
- }
- else
- {
- *ch << this->local_name () << "::TAO_ObjRefMngType ";
- }
- break;
- default:
- // gen code for base return type
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_var_defn - "
- "state based codegen failed\n"),
- -1);
- }
- *ch << " &";
- }
-
- be_visitor_sequence_elemtype elemtype (ch, this, bt);
- if (bt->accept (&elemtype) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_var_defn - "
- "[] ret type gen failed\n"),
- -1);
- }
-#endif
-
- *ch << "operator[] (CORBA::ULong index);" << nl;
-
- *ch << "// in, inout, out, _retn " << nl;
- // the return types of in, out, inout, and _retn are based on the parameter
- // passing rules and the base type
- *ch << "const " << this->local_name () << " &in (void) const;" << nl;
- *ch << this->local_name () << " &inout (void);" << nl;
- *ch << this->local_name () << " *&out (void);" << nl;
- *ch << this->local_name () << " *_retn (void);" << nl;
-
- // generate an additional member function that returns the underlying pointer
- *ch << this->local_name () << " *ptr (void) const;\n";
-
- *ch << "\n";
- ch->decr_indent ();
-
- // generate the private section
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << this->local_name () << " *ptr_;\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
- cg->pop ();
-
- return 0;
-}
-
-// implementation of the _var class. All of these get generated in the inline
-// file
-int
-be_sequence::gen_var_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _var names
- be_state *s; // code gen state
- be_type *bt; // base type
-
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_var", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_var", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BODY_CI);
- s = cg->make_state ();
-
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_sequence::gen_var_impl - invalid state obj\n"), -1);
- }
-
- // retrieve base type
- bt = be_type::narrow_from_decl (this->base_type ());
-
- // generate the var implementation in the inline file
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // default constr
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname <<
- " (void) // default constructor" << nl;
- *ci << " " << ": ptr_ (0)" << nl;
- *ci << "{}\n\n";
-
- // constr from a _ptr
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << " *p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (const " << fname <<
- " &p) // copy constructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (p.ptr_)" << nl;
- *ci << " this->ptr_ = new " << this->name () << "(*p.ptr_);" << nl;
- *ci << "else" << nl;
- *ci << " this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // destructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::~" << lname << " (void) // destructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from a pointer
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << name () <<
- " *p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _var
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (const " << fname <<
- " &p) // deep copy" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (this != &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = new " << this->name () << " (*p.ptr_);\n";
- ci->decr_indent ();
- *ci << "}" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // two arrow operators
- ci->indent ();
- *ci << "ACE_INLINE const " << this->name () << " *" << nl;
- *ci << fname << "::operator-> (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << " *" << nl;
- *ci << fname << "::operator-> (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - 3 cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator const " << name () <<
- " &() const // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << " &() // cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << " &() const// cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator []
- ci->indent ();
- *ci << "ACE_INLINE ";
-
-#if 0
- switch (this->managed_type ())
- {
- case be_sequence::MNG_STRING:
- *ci << this->name () << "::TAO_StrMngType ";
- break;
- case be_sequence::MNG_OBJREF:
- *ci << this->name () << "::TAO_ObjRefMngType ";
- break;
- default:
- // gen code for base return type
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_var_impl - "
- "state based codegen failed\n"),
- -1);
- }
- *ci << " &";
- }
-
- be_visitor_sequence_elemtype elemtype (ci, 0, bt);
- if (bt->accept (&elemtype) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_var_defn - "
- "[] ret type gen failed\n"),
- -1);
- }
-#endif
-
-
- *ci << nl;
- *ci << fname << "::operator[] (CORBA::ULong index)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_->operator[] (index);\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // in, inout, out, and _retn
- ci->indent ();
- *ci << "ACE_INLINE const " << name () << " &" << nl;
- *ci << fname << "::in (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << " &" << nl;
- *ci << fname << "::inout (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "// mapping for variable size " << nl;
- *ci << "ACE_INLINE " << name () << " *&" << nl;
- *ci << fname << "::out (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = 0;" << nl;
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << " *" << nl;
- *ci << fname << "::_retn (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << this->name () << " *tmp = this->ptr_;" << nl;
- *ci << "this->ptr_ = 0;" << nl;
- *ci << "return tmp;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // the additional ptr () member function
- ci->indent ();
- *ci << "ACE_INLINE " << name () << " *" << nl;
- *ci << fname << "::ptr (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- cg->pop ();
-
- return 0;
-}
-
-// generate the _out definition
-int
-be_sequence::gen_out_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // to hold the _out name
- be_state *s; // code gen state
- be_type *bt; // base type
- be_decl *scope; // our enclosing scope
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_out", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BODY_CH);
- s = cg->make_state ();
-
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_sequence::gen_out_defn - invalid state obj\n"), -1);
- }
-
- // retrieve base type
- bt = be_type::narrow_from_decl (this->base_type ());
-
- if (this->defined_in ())
- scope = be_scope::narrow_from_scope (this->defined_in ())->decl ();
- else
- scope = 0;
-
- // generate the out definition (always in the client header)
- ch->indent (); // start with whatever was our current indent level
-
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
-
- // No default constructor
-
- // constructor from a pointer
- *ch << namebuf << " (" << this->local_name () << " *&);" << nl;
- // constructor from a _var &
- *ch << namebuf << " (" << this->local_name () << "_var &);" << nl;
- // constructor from a _out &
- *ch << namebuf << " (" << namebuf << " &);" << nl;
- // assignment operator from a _out &
- *ch << namebuf << " &operator= (" << namebuf << " &);" << nl;
- // assignment operator from a pointer &, cast operator, ptr fn, operator
- // -> and any other extra operators
- // assignment
- *ch << namebuf << " &operator= (" << this->local_name () << " *);" << nl;
- // operator ()
- *ch << "operator " << this->local_name () << " *&();" << nl;
- // ptr fn
- *ch << this->local_name () << " *&ptr (void);" << nl;
- // operator ->
- *ch << this->local_name () << " *operator-> (void);" << nl;
-
- // overloaded [] operator only for sequence. The const version is not
- // required
-
-#if 0
- switch (this->managed_type ())
- {
- case be_sequence::MNG_STRING:
- if (scope)
- {
- *ch << "ACE_NESTED_CLASS (" << scope->name () << "," <<
- this->local_name () << "::TAO_StrMngType) ";
- }
- else
- {
- *ch << this->local_name () << "::TAO_StrMngType ";
- }
- break;
- case be_sequence::MNG_OBJREF:
- if (scope)
- {
- *ch << "ACE_NESTED_CLASS (" << scope->name () << "," <<
- this->local_name () << "::TAO_ObjRefMngType) ";
- }
- else
- {
- *ch << this->local_name () << "::TAO_ObjRefMngType ";
- }
- break;
- default:
- // gen code for base return type
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_out_defn - "
- "state based codegen failed\n"),
- -1);
- }
- *ch << " &";
- }
-
- be_visitor_sequence_elemtype elemtype(ch, this, bt);
- if (bt->accept (&elemtype) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_var_defn - "
- "[] ret type gen failed\n"),
- -1);
- }
-#endif
-
- *ch << "operator[] (CORBA::ULong index);" << nl;
- *ch << "\n";
- ch->decr_indent ();
- *ch << "private:\n";
- ch->incr_indent ();
-
- *ch << this->local_name () << " *&ptr_;" << nl;
- *ch << "// assignment from T_var not allowed" << nl;
- *ch << "void operator= (const " << this->local_name () << "_var &);\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
-
- cg->pop ();
- return 0;
-}
-
-int
-be_sequence::gen_out_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _out names
- be_state *s; // code gen state
- be_type *bt; // base type
-
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_out", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_out", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- cg->push (TAO_CodeGen::TAO_SEQUENCE_BODY_CI);
- s = cg->make_state ();
-
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_sequence::gen_out_impl - invalid state obj\n"), -1);
- }
-
- // retrieve base type
- bt = be_type::narrow_from_decl (this->base_type ());
-
- // generate the out implementation in the inline file
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // constr from a pointer
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << " *&p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // constructor from _var &
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << this->name () <<
- "_var &p) // constructor from _var" << nl;
- *ci << " : ptr_ (p.out ())" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << fname <<
- " &p) // copy constructor" << nl;
- *ci << " : ptr_ (p.ptr_)" << nl;
- *ci << "{}\n\n";
-
- // assignment operator from _out &
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p.ptr_;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment from _var is not allowed by a private declaration
-
- // assignment operator from pointer
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << this->name () <<
- " *p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << this->name () <<
- " *&() // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // ptr function
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << " *&" << nl;
- *ci << fname << "::ptr (void) // ptr" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator ->
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << " *" << nl;
- *ci << fname << "::operator-> (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // sequence has an additional method
- ci->indent ();
- *ci << "ACE_INLINE ";
-#if 0
- switch (this->managed_type ())
- {
- case be_sequence::MNG_STRING:
- *ci << this->name () << "::TAO_StrMngType ";
- break;
- case be_sequence::MNG_OBJREF:
- *ci << this->name () << "::TAO_ObjRefMngType ";
- break;
- default:
- // gen code for base return type
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_out_impl - "
- "state based codegen failed\n"),
- -1);
- }
- *ci << " &";
- }
-
- be_visitor_sequence_elemtype elemtype (ci, 0, bt);
- if (bt->accept (&elemtype) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_var_defn - "
- "[] ret type gen failed\n"),
- -1);
- }
-#endif
-
-
- *ci << nl;
- *ci << fname << "::operator[] (CORBA::ULong index)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_->operator[] (index);\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- cg->pop ();
- return 0;
-}
-
-// generate the managed type
-int
-be_sequence::gen_managed_type_ch (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // names
- char typebuf [NAMEBUFSIZE]; // generated type
- be_type *bt; // base type
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // retrieve base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_gen_managed_type_ch - "
- "state based codegen failed\n"),
- -1);
- }
-
- // set the name of the generated class
- // the name depends on whether we are interface type or a string type
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::memset (typebuf, '\0', NAMEBUFSIZE);
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- {
- ACE_OS::sprintf (namebuf, "%s", "TAO_ObjRefMngType");
- ACE_OS::sprintf (typebuf, "%s", bt->nested_type_name (this, "_ptr"));
- }
- break;
- case be_sequence::MNG_STRING:
- {
- ACE_OS::sprintf (namebuf, "%s", "TAO_StrMngType");
- ACE_OS::sprintf (typebuf, "%s", "char *");
- }
- break;
- default:
- // cannot be here
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_gen_managed_type_ch - "
- "bad managed type\n"),
- -1);
- }
- }
-
- ch->indent (); // start with whatever was our current indent level
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
- // generate the friend instruction
- *ch << "friend " << this->local_name () << ";" << nl;
- // default constr is protected as this managed type is not available
- // outside. Only this sequence can play with it.
- //*ch << namebuf << " (void); // default constructor" << nl;
- // copy constructor
- *ch << namebuf << "(const " << namebuf << " &); // copy ctor " << nl;
- // the constructor that will be used
- if (this->managed_type () == be_sequence::MNG_STRING)
- {
- *ch << namebuf << "(char **buffer, CORBA::Boolean release);" << nl;
- }
- else
- {
- *ch << namebuf << "(" << bt->nested_type_name (this, "_ptr*") <<
- ", CORBA::Boolean release);" << nl;
- }
- // destructor
- *ch << "~" << namebuf << " (void); // destructor" << nl;
- *ch << nl;
- // assignment operator from another managed type
- *ch << namebuf << " &operator= (const " << namebuf << "&);" << nl;
- // assignment operator from a pointer
- *ch << namebuf << " &operator= (" << typebuf << ");" << nl;
-
- // others
- if (this->managed_type () == be_sequence::MNG_STRING)
- {
- // assignment operator from a pointer to const
- *ch << namebuf << " &operator= (const " << typebuf << ");" << nl;
- // cast op
- *ch << "operator const char*() const;" << nl;
- *ch << "operator char *();" << nl;
- // overloaded [] operator - only for strings
- *ch << "char &operator[] (CORBA::ULong index);" << nl;
- *ch << "const char &operator[] (CORBA::ULong index) const;" << nl;
- *ch << "// in, inout, out, _retn " << nl;
- // the return types of in, out, inout, and _retn are based on the parameter
- // passing rules and the base type
- *ch << "const char *in (void) const;" << nl;
- *ch << "char *&inout (void);" << nl;
- *ch << "char *&out (void);" << nl;
- *ch << "char *_retn (void);" << nl;
- }
- else
- {
- *ch << "operator const " << bt->nested_type_name (this, "_ptr") <<
- " &() const;" << nl;
- *ch << "operator " << bt->nested_type_name (this, "_ptr") <<
- " &();" << nl;
- *ch << "// in, inout, out, _retn " << nl;
- // the return types of in, out, inout, and _retn are based on the parameter
- // passing rules and the base type
- *ch << "const " << bt->nested_type_name (this, "_ptr") <<
- " in (void) const;" << nl;
- *ch << bt->nested_type_name (this, "_ptr") << " &inout (void);" << nl;
- *ch << bt->nested_type_name (this, "_ptr") << " &out (void);" << nl;
- *ch << bt->nested_type_name (this, "_ptr") << " _retn (void);" << nl;
- }
-
- *ch << "\n";
- ch->decr_indent ();
-
- // generate the private section
- *ch << "private:\n";
- ch->incr_indent ();
- // *ch << namebuf << "(const " << namebuf << " &); // copy ctor " << nl;
- *ch << typebuf << " *ptr_;" << nl;
- *ch << "CORBA::Boolean release_;\n";
- ch->decr_indent ();
- *ch << "};\n\n";
-
- return 0;
-}
-
-// implementation of the managed type class. All of these get generated in the
-// inline file
-int
-be_sequence::gen_managed_type_ci (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- be_type *bt; // base type
- char fnamebuf [NAMEBUFSIZE]; // full name
- char lnamebuf [NAMEBUFSIZE]; // local name
- char typebuf [NAMEBUFSIZE]; // type name
- char macro [NAMEBUFSIZE]; // for ifdef macro
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // get the inline stream
- ci = cg->client_inline ();
-
- // retrieve base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence.cpp::"
- "gen_managed_types_ci - "
- "Bad base type\n"),
- -1);
- }
-
- // set the names (this is for easier code generation)
- ACE_OS::memset (fnamebuf, '\0', NAMEBUFSIZE);
- ACE_OS::memset (lnamebuf, '\0', NAMEBUFSIZE);
- ACE_OS::memset (typebuf, '\0', NAMEBUFSIZE);
- ACE_OS::memset (macro, '\0', NAMEBUFSIZE);
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- {
- ACE_OS::sprintf (fnamebuf, "%s::%s", this->fullname (), "TAO_ObjRefMngType");
- ACE_OS::sprintf (lnamebuf, "%s", "TAO_ObjRefMngType");
- ACE_OS::sprintf (typebuf, "%s_ptr", bt->fullname ());
- ACE_OS::sprintf (macro, "%s_%s", this->flatname (), "TAO_ObjRefMngType");
- }
- break;
- case be_sequence::MNG_STRING:
- {
- ACE_OS::sprintf (fnamebuf, "%s::%s", this->fullname (), "TAO_StrMngType");
- ACE_OS::sprintf (lnamebuf, "%s", "TAO_StrMngType");
- ACE_OS::sprintf (typebuf, "%s", "char *");
- ACE_OS::sprintf (macro, "%s_%s", this->flatname (), "TAO_StrMngType");
- }
- break;
- default:
- // cannot be here
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_managed_types_ci - "
- "Bad managed type\n"),
- -1);
- }
- }
-
- // generate the ifdefined macro for the managed
- ci->gen_ifdef_macro (macro);
-
- // generate the managed type implementation in the inline file
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fnamebuf << nl;
- *ci << "// *************************************************************\n\n";
-
- // destructor
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fnamebuf << "::~" << lnamebuf << " (void) // destructor" << nl;
- *ci << "{}\n\n";
-
- // copy constructor not allowed
-
- // operators
- if (this->managed_type () == be_sequence::MNG_STRING)
- {
- // constructor that will be used
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fnamebuf << "::" << lnamebuf <<
- "(char **buffer, CORBA::Boolean release)" << nl;
- *ci << " : ptr_ (buffer)," << nl;
- *ci << " release_ (release)" << nl;
- *ci << "{}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fnamebuf << "::operator const " << typebuf <<
- " () const // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fnamebuf << "::operator " << typebuf << " () // cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator []
- ci->indent ();
- *ci << "ACE_INLINE char&" << nl;
- *ci << fnamebuf << "::operator[] (CORBA::ULong index)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_[index];\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator []
- ci->indent ();
- *ci << "ACE_INLINE const char&" << nl;
- *ci << fnamebuf << "::operator[] (CORBA::ULong index) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_[index];\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- }
- else if (this->managed_type () == be_sequence::MNG_OBJREF)
- {
- // constructor that will be used
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fnamebuf << "::" << lnamebuf << "(" << bt->name () <<
- "_ptr* buffer, CORBA::Boolean release)" << nl;
- *ci << " : ptr_ (buffer)," << nl;
- *ci << " release_ (release)" << nl;
- *ci << "{}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fnamebuf << "::operator const " << typebuf <<
- " &() const // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fnamebuf << "::operator " << typebuf << " &() // cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_managed_types_ci - "
- "Bad managed type\n"),
- -1);
- }
-
- // in, inout
- ci->indent ();
- *ci << "ACE_INLINE const " << typebuf << nl;
- *ci << fnamebuf << "::in (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << typebuf << "&" << nl;
- *ci << fnamebuf << "::inout (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->gen_endif ();
- return 0;
-}
-
-// implementation of the managed types
-int
-be_sequence::gen_managed_type_cs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- be_type *bt; // base type
- char fnamebuf [NAMEBUFSIZE]; // full name
- char lnamebuf [NAMEBUFSIZE]; // local name
- char typebuf [NAMEBUFSIZE]; // type name
- char macro [NAMEBUFSIZE]; // for ifdef macro
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // get the stubs stream
- cs = cg->client_stubs ();
-
- // retrieve base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence.cpp::"
- "gen_managed_types_cs - "
- "Bad base type\n"),
- -1);
- }
-
- // set the names (this is for easier code generation)
- ACE_OS::memset (fnamebuf, '\0', NAMEBUFSIZE);
- ACE_OS::memset (lnamebuf, '\0', NAMEBUFSIZE);
- ACE_OS::memset (typebuf, '\0', NAMEBUFSIZE);
- ACE_OS::memset (macro, '\0', NAMEBUFSIZE);
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- {
- ACE_OS::sprintf (fnamebuf, "%s::%s", this->fullname (), "TAO_ObjRefMngType");
- ACE_OS::sprintf (lnamebuf, "%s", "TAO_ObjRefMngType");
- ACE_OS::sprintf (typebuf, "%s_ptr", bt->fullname ());
- ACE_OS::sprintf (macro, "%s_%s", this->flatname (), "TAO_ObjRefMngType");
- }
- break;
- case be_sequence::MNG_STRING:
- {
- ACE_OS::sprintf (fnamebuf, "%s::%s", this->fullname (), "TAO_StrMngType");
- ACE_OS::sprintf (lnamebuf, "%s", "TAO_StrMngType");
- ACE_OS::sprintf (typebuf, "%s", "char *");
- ACE_OS::sprintf (macro, "%s_%s", this->flatname (), "TAO_StrMngType");
- }
- break;
- default:
- // cannot be here
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence.cpp::"
- "gen_managed_types_cs - "
- "Bad managed type\n"),
- -1);
- }
- }
-
- // generate the ifdefined macro for the sequence type
- cs->gen_ifdef_macro (macro);
-
- switch (this->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- {
- // copy ctro
- cs->indent ();
- *cs << fnamebuf << "::" << lnamebuf << "(const " << fnamebuf <<
- " &_tao_mng_type)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "*this->ptr_ = " << bt->name () <<
- "::_duplicate (*_tao_mng_type.ptr_);" << nl;
- *cs << "this->release_ = _tao_mng_type.release_;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // assignment operator
- cs->indent ();
- *cs << fnamebuf << "&" << nl;
- *cs << fnamebuf << "::operator= (const " << fnamebuf <<
- " &_tao_mng_type)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (this == &_tao_mng_type) return *this;" << nl;
- *cs << "if (this->release_) // need to free old one" << nl;
- *cs << " CORBA::release (*this->ptr_);" << nl;
- *cs << "*this->ptr_ = " << bt->name () <<
- "::_duplicate (*_tao_mng_type.ptr_);" << nl;
- *cs << "return *this;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // assignment operator from a pointer
- cs->indent ();
- *cs << fnamebuf << " &" << nl;
- *cs << fnamebuf << "::operator= (" << typebuf << " p)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (this->release_) // need to free old one" << nl;
- *cs << " CORBA::release (*this->ptr_);" << nl;
- *cs << "*this->ptr_ = p; // no copy" << nl;
- *cs << "return *this;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // out method and _retn
- cs->indent ();
- *cs << "// mapping for variable size " << nl;
- *cs << bt->name () << "_ptr &" << nl;
- *cs << fnamebuf << "::out (void)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (this->release_)" << nl;
- *cs << " CORBA::release (*this->ptr_);" << nl;
- *cs << "*this->ptr_ = " << bt->name () << "::_nil ();" << nl;
- *cs << "return *this->ptr_;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- cs->indent ();
- *cs << bt->name () << "_ptr" << nl;
- *cs << fnamebuf << "::_retn (void)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << bt->name () << "_ptr tmp = *this->ptr_;" << nl;
- *cs << "*this->ptr_ = " << bt->name () << "::_nil ();" << nl;
- *cs << "return tmp;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
- }
- break;
- case be_sequence::MNG_STRING:
- {
- // copy constructor
- cs->indent ();
- *cs << fnamebuf << "::" << lnamebuf << "(const " << fnamebuf <<
- " &_tao_mng_type)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "*this->ptr_ = CORBA::string_dup (*_tao_mng_type.ptr_);" << nl;
- *cs << "this->release_ = _tao_mng_type.release_;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // assignment operator (does not change the release flag)
- cs->indent ();
- *cs << fnamebuf << "&" << nl;
- *cs << fnamebuf << "::operator= (const " << fnamebuf <<
- " &_tao_mng_type)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (this == &_tao_mng_type) return *this;" << nl;
- *cs << "if (this->release_) // need to free old one" << nl;
- *cs << " CORBA::string_free (*this->ptr_);" << nl;
- *cs << "*this->ptr_ = CORBA::string_dup (*_tao_mng_type.ptr_);" << nl;
- *cs << "return *this;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // assignment operator from a pointer
- cs->indent ();
- *cs << fnamebuf << " &" << nl;
- *cs << fnamebuf << "::operator= (" << typebuf << " p)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (this->release_) // need to free old one" << nl;
- *cs << " CORBA::string_free (*this->ptr_);" << nl;
- *cs << "*this->ptr_ = p; // no copy" << nl;
- *cs << "return *this;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // assignment operator from a pointer to const
- cs->indent ();
- *cs << fnamebuf << " &" << nl;
- *cs << fnamebuf << "::operator= (const " << typebuf << " p)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (this->release_) // need to free old one" << nl;
- *cs << "{" << nl;
- *cs << " CORBA::string_free (*this->ptr_);" << nl;
- *cs << " *this->ptr_ = CORBA::string_dup (p);// make copy" << nl;
- *cs << "}" << nl;
- *cs << "else // make no copy as we don't own it" << nl;
- *cs << " *this->ptr_ = (char *)p; // no copy" << nl;
- *cs << "return *this;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // out method and _retn
- cs->indent ();
- *cs << "// mapping for variable size " << nl;
- *cs << "char *&" << nl;
- *cs << fnamebuf << "::out (void)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "if (this->release_)" << nl;
- *cs << " CORBA::string_free (*this->ptr_);" << nl;
- *cs << "*this->ptr_ = 0;" << nl;
- *cs << "return *this->ptr_;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- cs->indent ();
- *cs << "char *" << nl;
- *cs << fnamebuf << "::_retn (void)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- *cs << "char *tmp = *this->ptr_;" << nl;
- *cs << "*this->ptr_ = 0;" << nl;
- *cs << "return tmp;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
- }
- break;
- }
-
- cs->gen_endif ();
- return 0;
-}
-
-// generate typecode.
-// Typecode for sequences comprises the enumerated value followed by the
-// encapsulation of the parameters
-
-int
-be_sequence::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "CORBA::tk_sequence, // typecode kind" << nl;
- *cs << this->tc_encap_len () << ", // encapsulation length\n";
- // now emit the encapsulation
- return this->gen_encapsulation ();
-}
-
-// generate encapsulation
-// An encapsulation for ourselves will be necessary when we are part of some
-// other IDL type and a typecode for that other type is being generated. This
-// will comprise our typecode kind. IDL types with parameters will additionally
-// have the encapsulation length and the entire typecode description
-
-int
-be_sequence::gen_encapsulation (void)
-{
- TAO_OutStream *os; // output stream
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_type *bt; // base type
-
- os = cg->client_stubs ();
- os->incr_indent ();
-
- *os << "TAO_ENCAP_BYTE_ORDER, // byte order\n";
-
- // emit typecode of element type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt || (bt->gen_typecode () == -1))
- {
- ACE_ERROR ((LM_ERROR, "be_sequence::gen_typecode - bad base type\n"));
- return -1;
- }
-
- // emit the length
- os->decr_indent ();
- *os << this->max_size () << ",\n";
- return 0;
-}
-
-// compute typecode size
-long
-be_sequence::tc_size (void)
-{
- // 4 bytes for enumeration, 4 bytes for storing encap length val, followed by the
- // actual encapsulation length
- return 4 + 4 + this->tc_encap_len ();
-}
-
-long
-be_sequence::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- be_type *bt; // base type
-
- this->encap_len_ = 4; // holds the byte order flag
- // add the encapsulation length of our base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR ((LM_ERROR,
- "be_sequence::tc_encap_len - bad base type\n"));
- return 0;
- }
- this->encap_len_ += bt->tc_size ();
- this->encap_len_ += 4; // to hold the max size
-
- }
- return this->encap_len_;
-}
-
-/*
- * Add this be_sequence to the locally defined types in this scope
- */
-be_sequence *
-be_sequence::fe_add_sequence (be_sequence *t)
-{
- if (t == NULL)
- return NULL;
-
- this->add_to_local_types(t);
- return t;
-}
-
-// overridden method
-be_decl *
-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)
-{
- return visitor->visit_sequence (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS3 (be_sequence, AST_Sequence, be_scope, be_type)
-IMPL_NARROW_FROM_DECL (be_sequence)
diff --git a/TAO/TAO_IDL/be/be_state.cpp b/TAO/TAO_IDL/be/be_state.cpp
deleted file mode 100644
index 59312eaeaa5..00000000000
--- a/TAO/TAO_IDL/be/be_state.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state.cpp
-//
-// = DESCRIPTION
-// state based code generation.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// constructor
-be_state::be_state (void)
-{
-}
-
-// destructor
-be_state::~be_state (void)
-{
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Singleton<be_state_struct, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_union_disctypedefn_ch, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_union_disctypedefn_ci, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_union_public_ch, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_union_public_ci, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_union_public_cs, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_union_private_ch, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_operation, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_argument, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_typedef, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_array, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_sequence, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_attribute, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<be_state_exception, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<TAO_CodeGen, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Singleton<TAO_OutStream_Factory, ACE_SYNCH_RECURSIVE_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Singleton<be_state_struct, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_union_disctypedefn_ch, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_union_disctypedefn_ci, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_union_public_ch, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_union_public_ci, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_union_public_cs, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_union_private_ch, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_operation, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_argument, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_typedef, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_array, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_sequence, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_attribute, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<be_state_exception, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<TAO_CodeGen, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Singleton<TAO_OutStream_Factory, ACE_SYNCH_RECURSIVE_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/TAO_IDL/be/be_state_argument.cpp b/TAO/TAO_IDL/be/be_state_argument.cpp
deleted file mode 100644
index a5198b16d3e..00000000000
--- a/TAO/TAO_IDL/be/be_state_argument.cpp
+++ /dev/null
@@ -1,2307 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state_argument.cpp
-//
-// = DESCRIPTION
-// state based code generation for arguments.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// return type for argument
-be_state_argument::be_state_argument (void)
-{
-}
-
-// generate code for the mapping of the argument.
-// The different cases below have the following meaning:
-// TAO_ARGUMENT_CH
-// TAO_ARGUMENT_CS
-// TAO_ARGUMENT_SH -- all three generate the arguments in the signature of the
-// method . The CH case uses the ACE_NESTED_CLASS macro to
-// keep the MSVC++ compiler happy
-// The rest of the enumerated constants are self-explanatory
-//
-// There are 3 levels of nested switch statements
-// Level (1): The "type" of each argument, e.g., predefined, structure, ...
-// Level (2): The direction - in, inout, out
-// Level (3): The current state we are in
-
-int
-be_state_argument::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os = 0; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_argument *arg; // argument node
- be_interface *bif; // interface inside which the operation that uses this
- // argument was defined
-
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- os = cg->client_header ();
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- os = cg->client_stubs ();
- break;
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- os = cg->server_header ();
- break;
- case TAO_CodeGen::TAO_ARGUMENT_SS:
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- os = cg->server_skeletons ();
- break;
- }
-
- // retrieve the argument node
- arg = be_argument::narrow_from_decl (d);
- if (!arg)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument.cpp - "
- "Bad argument\n"),
- -1);
- }
-
- // get the scope of the arg which is the operation. Its scope is the
- // interface node. We need this interface node for generating the
- // ACE_NESTED_CLASS macro
- bif = be_interface::narrow_from_scope (ScopeAsDecl (arg->defined_in
- ())->defined_in ());
- if (!bif)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument.cpp - "
- "Bad interface\n"),
- -1);
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // find the direction of the argument. Depending on the direction and the
- // type, generate the mapping
- switch (type->node_type ()) // LEVEL (1) switch on node type of the "type"
- {
- case AST_Decl::NT_interface: // type is an obj reference
- case AST_Decl::NT_interface_fwd: // type is an obj reference
- {
- switch (arg->direction ())
- {
- case AST_Argument::dir_IN:
- // what state are we in
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // assign to a CORBA::Object_ptr
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << "; // cast it" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- // pass the cast value
- *os << ", &_tao_base_" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing for in parameters
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << "_ptr ";
- *os << arg->local_name () << ";" << nl;
- // we also declare a corresponding CORBA::Object_ptr to be
- // passed to the decoder
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name ()
- << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &_tao_base_" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_IN, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", &_tao_base_" << arg->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // convert from the CORBA::Object_ptr to the interface type
- // using a _narrow
- *os << arg->local_name () << " = " << bt->name () <<
- "::_narrow (_tao_base_" << arg->local_name () << ", " <<
- "_tao_environment);" << nl;
- *os << "if (_tao_environment.exception ()) return;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // we must release the in parameter
- *os << "CORBA::release (" << arg->local_name () << ");" << nl;
- *os << "CORBA::release (_tao_base_" << arg->local_name () <<
- ");" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << bt->nested_type_name (bif, "_ptr") << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_ptr " << arg->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // switch state
- break;
- case AST_Argument::dir_INOUT: // inout
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // assign to a CORBA::Object_ptr
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ";" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &_tao_base_" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // reassign to the inout parameter doing a _narrow
- *os << arg->local_name () << " = " << bt->name () <<
- "::_narrow (_tao_base_" << arg->local_name () << ", env);"
- << nl;
- *os << "CORBA::release (_tao_base_" << arg->local_name () <<
- ");" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << "_ptr ";
- *os << arg->local_name () << ";" << nl;
- // we also declare a corresponding CORBA::Object_ptr to be
- // passed to the decoder
- *os << "CORBA::Object_ptr *_tao_base_" << arg->local_name ()
- << " = new CORBA::Object_ptr;" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", _tao_base_" << arg->local_name () <<
- ", 1); // ORB owns" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_INOUT, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", _tao_base_" << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // convert from the CORBA::Object_ptr to the interface type
- // using a _narrow
- *os << arg->local_name () << " = " << bt->name () <<
- "::_narrow (*_tao_base_" << arg->local_name () << ", " <<
- "_tao_environment);" << nl;
- *os << "if (_tao_environment.exception ()) return;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // assign modified interface obj ref to object_ptr
- *os << "CORBA::release (*_tao_base_" << arg->local_name () <<
- "); // first release old obj" << nl;
- *os << "*_tao_base_" << arg->local_name () << " = " <<
- arg->local_name () << ";" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << bt->nested_type_name (bif, "_ptr") << " &" <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_ptr &" << arg->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- case AST_Argument::dir_OUT:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // assign to a CORBA::Object_ptr
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name ()
- << ";" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &_tao_base_" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // reassign to the inout parameter doing a _narrow
- *os << arg->local_name () << " = " << bt->name () <<
- "::_narrow (_tao_base_" << arg->local_name () << ", env);"
- << nl;
- *os << "// free the Object_ptr" << nl;
- *os << "CORBA::release (_tao_base_" << arg->local_name () <<
- ");" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << "_ptr " << arg->local_name () << ";" <<
- nl;
- *os << bt->name () << "_out " << arg->local_name () <<
- "_out (" << arg->local_name () << ");" << nl;
- // we also declare a corresponding CORBA::Object_ptr to be
- // passed to the decoder
- *os << "CORBA::Object_ptr *_tao_base_" << arg->local_name ()
- << " = new CORBA::Object_ptr;" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", _tao_base_" << arg->local_name () <<
- ", 1); // ORB owns" << nl;
-#endif
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- " = nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_OUT, _tao_environment);" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // out parameter is cast to Object_ptr
- *os << "*_tao_base_" << arg->local_name () << " = " <<
- arg->local_name () << "_out.ptr ();" << nl;
- *os << "nv_" << arg->local_name () << "->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", _tao_base_" << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << "_out, ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << bt->nested_type_name (bif, "_out") << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_out " << arg->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- } // end switch direction
- } // end of case interface/interface_fwd
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- be_predefined_type *bpd = be_predefined_type::narrow_from_decl (type);
-
- // check if the type is an any
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- switch (arg->direction ())
- {
- case AST_Argument::dir_IN:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- *os << bt->name () << " ";
- // declare a variable
- *os << arg->local_name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_IN, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", &" << arg->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // XXXASG - TODO
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- // XXXASG - TODO
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // XXXASG - TODO
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // XXXASG - TODO
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing since the Any will call its destructor
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // keep MSVC++ happy
- *os << "const " << bt->nested_type_name (bif) << " &" <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << "const " << bt->name () << " &" << arg->local_name
- () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- case AST_Argument::dir_INOUT:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " *";
- *os << arg->local_name () << " = new " << bt->name () <<
- ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- ", 1); // ORB owns" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_INOUT, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // XXXASG - TODO very similar to ObjRef
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- // XXXASG - TODO very similar to ObjRef
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // XXXASG - TODO very similar to ObjRef
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << "*" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- *os << "const " << 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;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- case AST_Argument::dir_OUT:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " *" << arg->local_name () <<
- " = 0;" << nl;
- *os << bt->name () << "_out " << arg->local_name () <<
- "_out (" << arg->local_name () << ");" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", " << arg->local_name () <<
- ", 1); // ORB owns" << nl;
-#endif
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name ()
- << " = nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_OUT, _tao_environment);" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // TODO
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
-#if 0 // causing ambiguity on NT compiler
- *os << arg->local_name () << " = " << arg->local_name ()
- << "_out;" << nl;
-#endif
- *os << "nv_" << arg->local_name () << "->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- *os << bt->nested_type_name (bif, "_out") << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_out " << arg->local_name () <<
- ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- } // end switch direction
- } // end of if
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- switch (arg->direction ())
- {
- case AST_Argument::dir_IN:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << "_ptr " << arg->local_name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_IN, _tao_environment)->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", &" << arg->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // no casting necessary as we already are object_ptr
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing to be done as we are Object_ptr
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- //release the in parameter
- *os << "CORBA::release (" << arg->local_name () << ");"
- << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- *os << bt->nested_type_name (bif, "_ptr") << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_ptr " << arg->local_name () <<
- ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end of switch state
- break;
- case AST_Argument::dir_INOUT:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << "_ptr *" << arg->local_name () <<
- " = new " << bt->name () << "_ptr;" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", " << arg->local_name () <<
- ", 1); // ORB owns" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_INOUT, _tao_environment)->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << "*" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- *os << bt->nested_type_name (bif, "_ptr") << " &" <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_ptr &" << arg->local_name () <<
- ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- case AST_Argument::dir_OUT:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << "_ptr *" << arg->local_name () <<
- " = new " << bt->name () << "_ptr;" << nl;
- *os << bt->name () << "_out ";
- *os << arg->local_name () << "_out (*" << arg->local_name
- () << ");" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- ", 0); // ORB doesn't own" << nl;
-#endif
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name ()
- << " = nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_OUT, _tao_environment);" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // declare a variable
- *os << bt->name () << "_ptr _tao_base_" <<
- arg->local_name () << ";" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &_tao_base_" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // this was causing an ambiguity on NT compiler
- // assign to the _out parameter
- *os << arg->local_name () << " = _tao_base_" <<
- arg->local_name () << ";" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << "_out, ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
-#if 0 // causing ambiguity on NT compiler
- *os << "*" << arg->local_name () << " = " <<
- arg->local_name () << "_out;" << nl;
-#endif
- *os << "nv_" << arg->local_name () << "->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- *os << bt->nested_type_name (bif, "_out") << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_out " << arg->local_name () <<
- ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- } // end switch direction
- } // end else if
- else // simple predefined types
- {
- switch (arg->direction ())
- {
- case AST_Argument::dir_IN:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " " << arg->local_name () << ";" <<
- nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_IN, _tao_environment)->value ()"
- << "->replace (" << bt->tc_name ()
- << ", &" << arg->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- *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;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- case AST_Argument::dir_INOUT:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " *" << arg->local_name () <<
- " = new " << bt->name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", " << arg->local_name () <<
- "); // ORB owns " << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_INOUT, _tao_environment)->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << "*" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- *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;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- case AST_Argument::dir_OUT:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " *" << arg->local_name () <<
- " = new " << bt->name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", " << arg->local_name () <<
- ", 1); // ORB owns" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_OUT, _tao_environment)->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << "*" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- *os << bt->nested_type_name (bif, "_out") << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_out " << arg->local_name () <<
- ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end of switch
- break;
- } // end switch direction
- } // end of else
- } // end of case predefined
- break;
- case AST_Decl::NT_string: // type is a string
- {
- switch (arg->direction ())
- {
- case AST_Argument::dir_IN:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
-#if 0
- // XXXASG- check for memory leak here - TODO
- // declare a variable
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->name ();
- else
- *os << "char *";
-#endif
- *os << "char *" << arg->local_name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_IN, _tao_environment)->value ()->replace ("
- << bt->tc_name () << ", &" << arg->local_name () <<
- ", 0, _tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // we need to free the "in" string that got decoded
- *os << "CORBA::string_free (" << arg->local_name () << ");"
- << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
-#if 0
- *os << "const ";
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->nested_type_name (bif);
- else
- *os << "char *";
-#endif
- *os << "const char *" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- {
-#if 0
- *os << "const ";
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->name ();
- else
- *os << "char *";
-#endif
- *os << "const char *" << arg->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- case AST_Argument::dir_INOUT:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
-#if 0
- // declare a variable
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->name () << " *" << arg->local_name () <<
- " = new " << bt->name () << ";" << nl;
- }
- else
- {
- *os << "char **" << arg->local_name () <<
- " = new char *;" << nl;
- }
-#endif
- *os << "char **" << arg->local_name () << " = new char *;" <<
- nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_INOUT, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << "*" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
-#if 0
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->nested_type_name (bif, " &");
- else
- *os << "char *&";
-#endif
- *os << "char *&" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- {
-#if 0
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->name ();
- else
- *os << "char *&";
-#endif
- *os << "char *&" << arg->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- case AST_Argument::dir_OUT:
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
-#if 0
- // declare a variable
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->name () << " *" << arg->local_name () <<
- " = new " << bt->name () << ";" << nl;
- }
- else
- {
- *os << "char **" << arg->local_name () <<
- " = new char *;" << nl;
- }
- // now declare a _out variable to be passed as a parameter
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->name () << "_out";
- else
- *os << "CORBA::String_out";
-#endif
- *os << "char **" << arg->local_name () <<
- " = new char *;" << nl;
- *os << "CORBA::String_out " << arg->local_name () <<
- "_out (*" << arg->local_name () << ");" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", _tao_base_" << arg->local_name () <<
- ", 1); // ORB owns" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_OUT, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
-#if 0
- // declare a string variable
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->name ();
- else
- *os << "char *";
-#endif
- *os << "char *_tao_base_" << arg->local_name () << ";" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &_tao_base_" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // assign the _tao_base_<string> variable to the out
- // parameter
- *os << arg->local_name () << " = _tao_base_" <<
- arg->local_name () << ";" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << "_out, ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
-#if 0 // causing ambiguity on NT compiler
- // out parameter is cast back to the real parameter
- *os << "*" << arg->local_name () << " = " <<
- arg->local_name () << "_out;" << nl;
-#endif
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
-#if 0
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->nested_type_name (bif, "_out");
- else
- *os << "CORBA::String_out";
-#endif
- *os << "CORBA::String_out " << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
-#if 0
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->name () << "_out";
- else
- *os << "CORBA::String_out";
-#endif
- *os << "CORBA::String_out " << arg->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- break;
- } // end switch direction
- } // end case string
- break;
- case AST_Decl::NT_array: // type is an array
- switch (arg->direction ())
- {
- case AST_Argument::dir_IN:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " " << arg->local_name ()
- << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", " << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_INOUT, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", &" << arg->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // XXXASG TODO
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- // XXXASG TODO
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // XXXASG TODO
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << "const " << bt->nested_type_name (bif) << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << "const " << bt->name () << " " << arg->local_name ()
- << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- } // end case
- break;
- case AST_Argument::dir_INOUT:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name ();
- if (bt->size_type () == be_decl::VARIABLE)
- {
- *os << "_slice *";
- }
- *os << " " << arg->local_name () << ";" << nl;
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", " << arg->local_name () <<
- "); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // TODO XXXASG
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- // TODO XXXASG
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // TODO XXXASG
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // to keep the MSVC++ compiler happy
- if (bt->size_type () == be_decl::VARIABLE)
- {
- *os << bt->nested_type_name (bif, "_slice") << " *" <<
- arg->local_name () << ", ";
- }
- else
- {
- *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 ();
- if (bt->size_type () == be_decl::VARIABLE)
- {
- *os << "_slice *";
- }
- *os << arg->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- } // end case
- break;
- case AST_Argument::dir_OUT:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << "_slice *" << arg->local_name () << ";" <<
- nl;
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", " << arg->local_name () <<
- ", 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // TODO XXXASG
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- // TODO XXXASG
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // TODO XXXASG
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << bt->nested_type_name (bif, "_out") << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_out " << arg->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- }
- break;
- } // end of switch direction
- break;
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- switch (arg->direction ())
- {
- case AST_Argument::dir_IN:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " " << arg->local_name () <<
- ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_IN, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", &" << arg->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing - the destructor will ensure proper memory release
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << "const " << bt->nested_type_name (bif) << " &" <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << "const " << bt->name () << " &" << arg->local_name ()
- << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- }
- break;
- case AST_Argument::dir_INOUT:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " *" << arg->local_name () <<
- " = new " << bt->name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_INOUT, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
-#if 0
- // if we are sequence, call init manager
- if (type->node_type () == AST_Decl::NT_sequence)
- {
- be_sequence *seq = be_sequence::narrow_from_decl (type);
- // init_mgr method for managed types
- switch (seq->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- case be_sequence::MNG_STRING:
- *os << arg->local_name () << ".init_mgr ();" << nl;
- break;
- default:
- break;
- }
- }
-#endif
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << "*" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- 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;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- } // end case
- break;
- case AST_Argument::dir_OUT:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // for a variable sized type, the caller allocates a pointer
- if (bt->size_type () == be_decl::VARIABLE)
- {
- // declare a variable
- *os << bt->name () << " *" << arg->local_name () <<
- " = 0;" << nl;
- *os << bt->name () << "_out " << arg->local_name () <<
- "_out (" << arg->local_name () << ");" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", " << arg->local_name () <<
- ", 0); // ORB does not own" << nl;
-#endif
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name ()
- << " = nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_OUT, _tao_environment);" << nl;
- }
- else
- {
- // declare a variable
- *os << bt->name () << " *" << arg->local_name () <<
- " = new " << bt->name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- ", 0); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name () <<
- "\", CORBA::ARG_OUT, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- } // end else
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // declare a variable. We need this only if we are variable
- // sized. If we are fixed sized, we already know our size and
- // hence we have already been allocated
- if (bt->size_type () == be_decl::VARIABLE)
- {
- *os << bt->name () << " *_tao_base_" << arg->local_name
- () << " = new " << bt->name () << ";" << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- if (bt->size_type () == be_decl::VARIABLE)
- {
- *os << ", _tao_base_" << arg->local_name ();
- }
- else
- {
- // simply pass our address
- *os << ", &" << arg->local_name ();
- }
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
-#if 0
- // if we are sequence, call init manager
- if (type->node_type () == AST_Decl::NT_sequence)
- {
- be_sequence *seq = be_sequence::narrow_from_decl (type);
- // init_mgr method for managed types
- switch (seq->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- case be_sequence::MNG_STRING:
- *os << "_tao_base_" << arg->local_name () <<
- "->init_mgr ();" << nl;
- break;
- default:
- break;
- }
- }
-#endif
- if (bt->size_type () == be_decl::VARIABLE)
- {
- *os << arg->local_name () << " = _tao_base_" <<
- arg->local_name () << ";" << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- if (bt->size_type () == be_decl::VARIABLE)
- *os << arg->local_name () << "_out, ";
- else
- *os << "*" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- if (bt->size_type () == be_decl::VARIABLE)
- {
-#if 0 // causing ambiguity on NT compiler
- *os << arg->local_name () << " = " << arg->local_name ()
- << "_out;" << nl;
-#endif
- *os << "nv_" << arg->local_name () << "->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << bt->nested_type_name (bif, "_out") << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_out " << arg->local_name () << ", ";
- break;
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- } // end case
- break;
- } // end switch direction
- break;
- case AST_Decl::NT_enum: // type is an enum
- switch (arg->direction ())
- {
- case AST_Argument::dir_IN:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " " << arg->local_name () << ";" <<
- nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_IN, _tao_environment)->value ()"
- << "->replace (" << bt->tc_name ()
- << ", &" << arg->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- 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;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end of switch state
- } // end case
- break;
- case AST_Argument::dir_INOUT:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " *" << arg->local_name () <<
- " = new " << bt->name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_INOUT, _tao_environment)->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << "*" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- 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;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- } // end case
- break;
- case AST_Argument::dir_OUT:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS:
- {
- // declare a variable
- *os << bt->name () << " *" << arg->local_name () <<
- " = new " << bt->name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << arg->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << arg->local_name () << " (" <<
- bt->tc_name () << ", &" << arg->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << arg->local_name
- () << "\", CORBA::ARG_OUT, _tao_environment)->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", " << arg->local_name () << ", 1, " <<
- "_tao_environment); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- {
- *os << ", &" << arg->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- {
- *os << "*" << arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << bt->nested_type_name (bif, "_out") << " " <<
- arg->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- {
- *os << bt->name () << "_out " << arg->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_argument - unknown state\n"), -1);
- }
- } // end switch state
- } // end case
- break;
- } // end switch direction
- break;
- case AST_Decl::NT_native:
- {
- 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
- {
- // XXXASG TODO: is this allowed ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp;
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, d, temp);
- } // end of case
- break;
- } //end switch node type
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_state_array.cpp b/TAO/TAO_IDL/be/be_state_array.cpp
deleted file mode 100644
index 618c891bc7b..00000000000
--- a/TAO/TAO_IDL/be/be_state_array.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state_array.cpp
-//
-// = DESCRIPTION
-// state based code generation for arrays.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// return type for array
-be_state_array::be_state_array (void)
-{
-}
-
-// generate code for array type
-int
-be_state_array::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os = 0; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // Macro to avoid "warning: unused parameter" type warning.
- ACE_UNUSED_ARG (nl);
-
- // get the appropriate stream
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARRAY_DEFN_CH:
- case TAO_CodeGen::TAO_ARRAY_OTHER_CH:
- os = cg->client_header ();
- break;
- case TAO_CodeGen::TAO_ARRAY_DEFN_CI:
- os = cg->client_inline ();
- break;
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // generate code based on type. For every case, first downcast to the
- // appropriate type. If the downcast fails, return error, else proceed. In
- // some cases, the type itself may need code generation, e.g., anonymous
- // struct types.
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- {
- *os << bt->name () << "_var ";
- }
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- *os << bt->name ();
- }
- break;
- case AST_Decl::NT_string: // type is a string
- {
- *os << "CORBA::String_var ";
- }
- break;
- case AST_Decl::NT_array:
- // type is an array. This is possible only if we
- // are here thru the typedef node
- {
- *os << bt->name () << "_slice *";
- }
- break;
- // these are all anonymous types
- case AST_Decl::NT_enum: // type is an enum
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- {
- // based on what state we are in, we may have to generate the definition
- // of the type first
- if (cg->state () == TAO_CodeGen::TAO_ARRAY_DEFN_CH)
- if (bt->gen_client_header () == -1) // generate the defn
- return -1;
-
- *os << bt->name ();
- }
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG TODO: is this allowed ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp;
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, d, temp);
- } // end of switch
- //break; unreachable statement!
- }
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_state_attribute.cpp b/TAO/TAO_IDL/be/be_state_attribute.cpp
deleted file mode 100644
index 4b505514e3f..00000000000
--- a/TAO/TAO_IDL/be/be_state_attribute.cpp
+++ /dev/null
@@ -1,1164 +0,0 @@
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state_attribute.cpp
-//
-// = DESCRIPTION
-// state based code generation for attributes.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// constructor
-be_state_attribute::be_state_attribute (void)
-{
-}
-
-int
-be_state_attribute::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os = 0; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_attribute *attr; // attribute node
- be_interface *bif; // enclosing scope which is an interface
-
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- os = cg->client_header ();
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- os = cg->client_stubs ();
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- os = cg->server_header ();
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- os = cg->server_skeletons ();
- break;
- }
-
- // retrieve the ATTRIBUTE node
- attr = be_attribute::narrow_from_decl (d);
- if (!attr)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute.cpp - "
- "Bad attribute node\n"),
- -1);
- }
-
- // get the enclosing interface scope to be used in the NESTED_CLASS macro
- bif = be_interface::narrow_from_decl (ScopeAsDecl (attr->defined_in ()));
- if (!bif)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute.cpp - "
- "Bad interface\n"),
- -1);
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // Two level switching
- // (1) switch on node type
- // (2) switch on current code generation state
-
- switch (type->node_type ()) // LEVEL (1) switch based on node type
- {
- case AST_Decl::NT_interface: // type is an obj reference
- case AST_Decl::NT_interface_fwd: // type is an obj reference
- {
- // what state are we in
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif, "_ptr") << " ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << bt->nested_type_name (bif, "_ptr") << " " <<
- attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- {
- *os << bt->name () << "_ptr ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- {
- *os << bt->name () << "_ptr " << attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- {
- *os << "CORBA::Object_ptr retval = CORBA::Object::_nil ();" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- {
- *os << "return " << bt->name () << "::_nil ();\n";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- {
- *os << "return " << bt->name () << "::_narrow (retval, env);" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- {
- *os << "CORBA::Object_ptr *retval ="
- " new CORBA::Object_ptr;" << nl;
- *os << "*retval = CORBA::Object::_nil ();" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- {
- *os << "*retval"; // assign to retval
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- {
- // assign to a CORBA::Object_ptr
- *os << "CORBA::Object_ptr _tao_base_" << attr->local_name ()
- << " = " << attr->local_name () << "; // cast it" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- {
- // pass the cast value
- *os << ", &_tao_base_" << attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- {
- // nothing for in parameters
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- {
- // declare a variable
- *os << bt->name () << "_ptr ";
- *os << attr->local_name () << ";" << nl;
- // we also declare a corresponding CORBA::Object_ptr to be
- // passed to the decoder
- *os << "CORBA::Object_ptr _tao_base_" << attr->local_name ()
- << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << attr->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << attr->local_name () << " (" <<
- bt->tc_name () << ", &_tao_base_" << attr->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << attr->local_name () <<
- "\", CORBA::ARG_IN, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", &_tao_base_" << attr->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- {
- // convert from the CORBA::Object_ptr to the interface type
- // using a _narrow
- *os << attr->local_name () << " = " << bt->name () <<
- "::_narrow (_tao_base_" << attr->local_name () << ", " <<
- "_tao_environment);" << nl;
- *os << "if (_tao_environment.exception ()) return;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- {
- // we must release the in parameter
- *os << "CORBA::release (" << attr->local_name () << ");" << nl;
- *os << "CORBA::release (_tao_base_" << attr->local_name () <<
- ");" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- {
- *os << attr->local_name () << ", ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute - unknown state\n"), -1);
- }
- } // switch state
- } // end of case interface/interface_fwd
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- be_predefined_type *bpd = be_predefined_type::narrow_from_decl (type);
-
- // check if the type is an any
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- {
- // if it is an any, return a pointer to it
- *os << bt->name () << " *retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- {
- // if it is an any, return a pointer to it
- *os << "return 0;\n";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- {
- // if it is an any, return a pointer to it
- *os << bt->name () << " *retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- {
- // if it is an any, return a pointer to it
- *os << "retval";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- {
- // if it is an any, return a pointer to it
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- {
- *os << bt->name () << " ";
- // declare a variable
- *os << attr->local_name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << attr->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << attr->local_name () << " (" <<
- bt->tc_name () << ", &" << attr->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << attr->local_name () <<
- "\", CORBA::ARG_IN, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", &" << attr->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- {
- // XXXASG - TODO
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- {
- // XXXASG - TODO
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- {
- // XXXASG - TODO
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- {
- *os << attr->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- {
- // XXXASG - TODO
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- {
- // XXXASG - TODO
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- {
- // keep MSVC++ happy
- *os << bt->nested_type_name (bif);
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- {
- *os << bt->name () << "* ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- {
- // keep MSVC++ happy
- *os << "const " << bt->nested_type_name (bif) << " &" <<
- attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- {
- *os << "const " << bt->name () << " &" << attr->local_name
- ();
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute - unknown state\n"), -1);
- }
- } // end switch state
- } // end of if
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- {
- // pseudo object, return a pointer
- *os << bt->name () << "_ptr retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- {
- // pseudo object, return a pointer
- *os << "return 0;\n";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- {
- // pseudo object, return a pointer
- *os << bt->name () << "_ptr *retval = new " << bt->name () <<
- "_ptr;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- {
- // pseudo object, return a pointer
- *os << "*retval";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- {
- // pseudo object, return a pointer
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- {
- // declare a variable
- *os << bt->name () << "_ptr " << attr->local_name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << attr->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << attr->local_name () << " (" <<
- bt->tc_name () << ", &" << attr->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << attr->local_name
- () << "\", CORBA::ARG_IN, _tao_environment)->" <<
- "value ()->replace (" << bt->tc_name ()
- << ", &" << attr->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- {
- // no casting necessary as we already are object_ptr
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- {
- *os << ", &" << attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- {
- *os << attr->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- {
- // nothing to be done as we are Object_ptr
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- {
- //release the in parameter
- *os << "CORBA::release (" << attr->local_name () << ");"
- << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- {
- // keep MSVC++ happy
- *os << bt->nested_type_name (bif);
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- {
- *os << bt->name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- {
- // keep MSVC++ happy
- *os << "const " << bt->nested_type_name (bif) << " &" <<
- attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- {
- *os << "const " << bt->name () << " &" << attr->local_name
- ();
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute - unknown state\n"), -1);
- }
- } // end of switch state
- } // end else if
- else // simple predefined types
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- {
- *os << bt->name () << " retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- {
- *os << "return retval;\n";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- {
- *os << bt->name () << " *retval = new " << bt->name () << ";"
- << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- {
- *os << " *retval";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- {
- // declare a variable
- *os << bt->name () << " " << attr->local_name () << ";" <<
- nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << attr->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << attr->local_name () << " (" <<
- bt->tc_name () << ", &" << attr->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << attr->local_name
- () << "\", CORBA::ARG_IN, _tao_environment)->value ()"
- << "->replace (" << bt->tc_name ()
- << ", &" << attr->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- {
- *os << ", &" << attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- {
- *os << attr->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- {
- // keep MSVC++ happy
- *os << bt->nested_type_name (bif);
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- {
- *os << bt->name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- {
- // keep MSVC++ happy
- *os << "const " << bt->nested_type_name (bif) << " &" <<
- attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- {
- *os << "const " << bt->name () << " &" << attr->local_name
- ();
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute - unknown state\n"), -1);
- }
- } // end switch state
- } // end of else
- } // end of case predefined
- break;
- case AST_Decl::NT_string: // type is a string
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- {
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->name () << " retval = 0;" << nl;
- }
- else
- {
- *os << "char *retval = 0;" << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- {
- *os << "return 0;\n";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- {
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->name () << " *retval = new " << bt->name () << "*;" << nl;
- }
- else
- {
- *os << "char **retval = new char*;" << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- {
- *os << "*retval";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- {
- *os << ", &" << attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- {
- // we need to free the "in" string that got decoded
- *os << "CORBA::string_free (" << attr->local_name () << ");"
- << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- {
- *os << attr->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- {
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif);
- }
- else
- {
- *os << "char *";
- }
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- {
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->name ();
- }
- else
- {
- *os << "char *";
- }
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- {
- // declare a variable
- if (bt->node_type () == AST_Decl::NT_typedef)
- *os << bt->name ();
- else
- *os << "char *";
- *os << " " << attr->local_name () << ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << attr->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << attr->local_name () << " (" <<
- bt->tc_name () << ", &" << attr->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << attr->local_name () <<
- "\", CORBA::ARG_IN, _tao_environment)->value ()->replace ("
- << bt->tc_name () << ", &" << attr->local_name () <<
- ", 0, _tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- {
- *os << "const char *" << attr->local_name ();
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute - unknown state\n"), -1);
- }
- } // end switch state
- } // end case string
- break;
- case AST_Decl::NT_array: // type is an array
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- {
- *os << bt->name () << "_slice *retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- {
- *os << "return 0;\n";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- {
- *os << bt->name () << "_slice *retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- {
- *os << "retval";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- {
- // declare a variable
- *os << bt->name () << " " << attr->local_name ()
- << ";" << nl;
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << attr->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << attr->local_name () << " (" <<
- bt->tc_name () << ", " << attr->local_name () <<
- "); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- {
- // XXXASG TODO
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- {
- // XXXASG TODO
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- {
- // XXXASG TODO
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- {
- *os << attr->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif, "_slice") << " *";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- {
- *os << bt->name () << "_slice *";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << "const " << bt->nested_type_name (bif) << " " <<
- attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- {
- *os << "const " << bt->name () << " " << attr->local_name ();
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute - unknown state\n"), -1);
- }
- } // end switch state
- } // end of case array
- break;
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- {
- // declare a variable
- *os << bt->name () << " " << attr->local_name () <<
- ";" << nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << attr->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << attr->local_name () << " (" <<
- bt->tc_name () << ", &" << attr->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << attr->local_name () <<
- "\", CORBA::ARG_IN, _tao_environment)->value ()->" <<
- "replace (" << bt->tc_name ()
- << ", &" << attr->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- {
- *os << ", &" << attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- {
- *os << attr->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- {
- *os << bt->name () << " *retval = new " << bt->name () << ";" <<
- nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- {
- *os << "return 0;\n";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- {
-#if 0
- if (type->node_type () == AST_Decl::NT_sequence)
- {
- be_sequence *seq = be_sequence::narrow_from_decl (type);
- // init_mgr method for managed types
- switch (seq->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- case be_sequence::MNG_STRING:
- *os << "retval->init_mgr ();" << nl;
- break;
- default:
- break;
- }
- }
-#endif
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- {
- *os << bt->name () << " *retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- {
- *os << "retval";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- {
- if (bt->size_type () == be_decl::VARIABLE)
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif) << " *";
- else
- *os << bt->nested_type_name (bif);
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- {
- if (bt->size_type () == be_decl::VARIABLE)
- *os << bt->name () << " *";
- else
- *os << bt->name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << "const " << bt->nested_type_name (bif) << " &" <<
- attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- {
- *os << "const " << bt->name () << " &" << attr->local_name ();
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute - unknown state\n"), -1);
- }
- } // end switch state
- } // end case
- break;
- case AST_Decl::NT_enum: // type is an enum
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_CS:
- {
- *os << bt->name () << " retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_EXCEPTION_CS:
- {
- *os << "return retval;\n";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_DECL_SS:
- {
- *os << bt->name () << " *retval = new " << bt->name () << ";" <<
- nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETVAL_ASSIGN_SS:
- {
- *os << "*retval";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SS:
- {
- // declare a variable
- *os << bt->name () << " " << attr->local_name () << ";" <<
- nl;
-#if 0
- // now define a NamedValue_ptr
- *os << "CORBA::NamedValue_ptr nv_" << attr->local_name () <<
- ";" << nl;
- // declare an Any
- *os << "CORBA::Any any_" << attr->local_name () << " (" <<
- bt->tc_name () << ", &" << attr->local_name () <<
- "); // ORB does not own" << nl;
-#endif
- // insert into the Any
- *os << "(void) nvlist->add_item (\"" << attr->local_name
- () << "\", CORBA::ARG_IN, _tao_environment)->value ()"
- << "->replace (" << bt->tc_name ()
- << ", &" << attr->local_name () << ", 0, " <<
- "_tao_environment); // ORB does not own" << nl;
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_DOCALL_CS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_UPCALL_SS:
- {
- *os << attr->local_name () << ", ";
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_PRE_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_POST_UPCALL_SS:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CH:
- {
- // to keep the MSVC++ compiler happy
- *os << bt->nested_type_name (bif) << " " << attr->local_name
- ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_CS:
-
- case TAO_CodeGen::TAO_ATTRIBUTE_INPARAM_TYPE_SH:
- {
- *os << bt->name () << " " << attr->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CH:
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif);
- }
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_ATTRIBUTE_RETURN_TYPE_SH:
- {
- *os << bt->name ();
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_attribute - unknown state\n"), -1);
- }
- } // end switch state
- } // end case
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG TODO: is this allowed ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp;
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, d, temp);
- } // end of case
- break;
- } //end switch node type
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_state_exception.cpp b/TAO/TAO_IDL/be/be_state_exception.cpp
deleted file mode 100644
index 769104ffe65..00000000000
--- a/TAO/TAO_IDL/be/be_state_exception.cpp
+++ /dev/null
@@ -1,409 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state_exception.cpp
-//
-// = DESCRIPTION
-// state based code generation for exceptions.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-be_state_exception::be_state_exception (void)
-{
-}
-
-// generate code for exception member
-int
-be_state_exception ::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os; // output stream
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_field *f; // field node
- be_exception *bexcp; // enclosing exception node
-
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_EXCEPTION_CH: // used for defining members
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CH: // used for defining the
- // parameters to the special
- // constructor
- os = cg->client_header ();
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CI: // for generating inline functions for
- // specific anonymous types
- os = cg->client_inline ();
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CS: // for copy ctor and assignment op
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CS: // for the parameters of the
- // special constructor
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS: // for assigning to members
- // inside the special ctor
- os = cg->client_stubs ();
- break;
- default:
- os = 0; // Force a seg fault. At least os will have a known value.
- }
-
- f = be_field::narrow_from_decl (d); // downcast to field node
- if (!f)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception.cpp - "
- "Bad field\n"),
- -1);
- }
-
- // retrieve the exception node
- bexcp = be_exception::narrow_from_scope (f->defined_in ());
- if (!bexcp)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception.cpp - "
- "Bad exception\n"),
- -1);
- }
-
- // pass the field node just incase it is needed to generate definition for
- // sequence
- cg->node (f);
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // generate code based on type.
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_EXCEPTION_CH:
- {
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bexcp, "_var") << " " << f->local_name
- () << ";\n";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CS:
- {
- // assign
- os->indent (); // start with current indentation
- *os << "this->" << f->local_name () << " = _tao_excp." <<
- f->local_name () << ";\n";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CH:
- {
- *os << "const " << bt->nested_type_name (bexcp, "_ptr") << "&";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CS:
- {
- *os << "const " << bt->name () << "_ptr &_tao_" << f->local_name
- ();
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS:
- {
- // assign
- os->indent (); // start with current indentation
- *os << "this->" << f->local_name () << " = _tao_" <<
- f->local_name () << ";\n";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CI:
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception - unknown state\n"), -1);
- }
- } // end switch state
- } // end case interface
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- be_predefined_type *bpd = be_predefined_type::narrow_from_decl (type);
- if (!bpd)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception - "
- "bad predefined type\n"), -1);
- }
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_EXCEPTION_CH:
- {
- switch (bpd->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- {
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bexcp, "_var") << " " <<
- f->local_name () << ";\n";
- }
- break;
- default:
- {
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bexcp) << " " << f->local_name
- () << ";\n";
- }
- } // end of switch state
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CS:
- {
- // assign
- os->indent (); // start with current indentation
- *os << "this->" << f->local_name () << " = _tao_excp." <<
- f->local_name () << ";\n";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CH:
- {
- switch (bpd->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- {
- *os << "const " << bt->nested_type_name (bexcp, "_ptr") <<
- "&";
- }
- break;
- default:
- {
- *os << "const " << bt->nested_type_name (bexcp);
- }
- }
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CS:
- {
- switch (bpd->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- {
- *os << "const " << bt->name () << "_ptr &_tao_" <<
- f->local_name ();
- }
- break;
- default:
- {
- *os << "const " << bt->name () << " _tao_" <<
- f->local_name ();
- }
- }
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS:
- {
- // assign
- os->indent (); // start with current indentation
- *os << "this->" << f->local_name () << " = _tao_" <<
- f->local_name () << ";\n";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CI:
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception - unknown state\n"), -1);
- }
- } // end switch state
- }
- break;
- case AST_Decl::NT_string: // type is a string
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_EXCEPTION_CH:
- {
- os->indent (); // start from current indentation
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->nested_type_name (bexcp, "_var") << " " <<
- f->local_name () << ";\n";
- }
- else
- {
- *os << "CORBA::String_var " << f->local_name () << ";\n";
- }
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CS:
- {
- // assign
- os->indent (); // start with current indentation
- *os << "this->" << f->local_name () << " = _tao_excp." <<
- f->local_name () << ";\n";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CH:
- {
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << "const " << bt->nested_type_name (bexcp);
- }
- else
- {
- *os << "const char*";
- }
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CS:
- {
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << "const " << bt->name () << " _tao_" << f->local_name
- ();
- }
- else
- {
- *os << "const char* _tao_" << f->local_name ();
- }
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS:
- {
- // assign
- os->indent (); // start with current indentation
- *os << "this->" << f->local_name () << " = _tao_" <<
- f->local_name () << ";\n";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CI:
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception - unknown state\n"), -1);
- }
- } // end switch state
- }
- break;
- // these are all anonymous types
- case AST_Decl::NT_array: // type is an array
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_enum: // type is an enum
- case AST_Decl::NT_union: // type is a union
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_EXCEPTION_CH:
- {
- // We first need to generate code for this aggregate type. Check
- // if we are not called recursively thru a typedef
- if (bt->node_type () != AST_Decl::NT_typedef
- && !bt->imported ())
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception - "
- "error generating code for type\n"),
- -1);
- }
- os->indent ();
- *os << bt->nested_type_name (bexcp) << " " << f->local_name () <<
- ";\n";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CI:
- {
- // We first need to generate code for this aggregate type. Check
- // if we are not called recursively thru a typedef
- if (bt->node_type () != AST_Decl::NT_typedef
- && !bt->imported ())
- if (bt->gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception - "
- "error generating code for type\n"),
- -1);
- }
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CS:
- {
- // We first need to generate code for this aggregate type. Check
- // if we are not called recursively thru a typedef
- if (bt->node_type () != AST_Decl::NT_typedef
- && !bt->imported ())
- if (bt->gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception - "
- "error generating code for type\n"),
- -1);
- }
- // assign
- os->indent (); // start with current indentation
- *os << "this->" << f->local_name () << " = _tao_excp." <<
- f->local_name () << ";\n";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CH:
- {
- *os << "const " << bt->nested_type_name (bexcp) << "&";
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_CS:
- {
- *os << "const " << bt->name () << "&_tao_" << f->local_name ();
- }
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS:
- {
- // assign
- os->indent (); // start with current indentation
- *os << "this->" << f->local_name () << " = _tao_" <<
- f->local_name () << ";\n";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_exception - unknown state\n"), -1);
- }
- } // end switch state
- }
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG TODO: is this allowed ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp;
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, f, temp);
- } // end of switch
- //break; unreachable statement!
- }
- // the enclosing exception will be variable length if the field's type is
- // variable length
- bexcp->size_type (type->size_type ());
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_state_operation.cpp b/TAO/TAO_IDL/be/be_state_operation.cpp
deleted file mode 100644
index 8e0a255232e..00000000000
--- a/TAO/TAO_IDL/be/be_state_operation.cpp
+++ /dev/null
@@ -1,737 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state_operation.cpp
-//
-// = DESCRIPTION
-// state based code generation for operations.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// return type for operation
-be_state_operation::be_state_operation (void)
-{
-}
-
-// generate code for return type of operation
-int
-be_state_operation::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os = 0; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_operation *bop;
- be_interface *bif; // interface in which the operation was defined
-
- bop = be_operation::narrow_from_decl (d);
- if (!bop)
- return -1;
-
- bif = be_interface::narrow_from_scope (bop->defined_in ());
- if (!bif)
- return -1;
-
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_CH:
- os = cg->client_header ();
- break;
- case TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS:
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS:
- case TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS:
- case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS:
- os = cg->client_stubs ();
- break;
- case TAO_CodeGen::TAO_OPERATION_SH:
- os = cg->server_header ();
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS:
- case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS:
- case TAO_CodeGen::TAO_OPERATION_RESULT_SS:
- os = cg->server_skeletons ();
- break;
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // generate code based on type. For every case, first downcast to the
- // appropriate type. If the downcast fails, return error, else proceed. In
- // some cases, the type itself may need code generation, e.g., anonymous
- // struct types.
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- case AST_Decl::NT_interface_fwd: // type is an obj reference
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS:
- {
- *os << bt->name () << "_ptr ";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS:
- {
- *os << "CORBA::Object_ptr retval = CORBA::Object::_nil ();" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS:
- {
- *os << "return " << bt->name () << "::_nil ();\n";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS:
- {
- *os << "return " << bt->name () << "::_narrow (retval, env);" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS:
- {
- *os << "CORBA::Object_ptr *retval ="
- " new CORBA::Object_ptr;" << nl;
- *os << "*retval = CORBA::Object::_nil ();" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS:
- {
- *os << "*retval"; // assign to retval
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_CH:
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif, "_ptr") << " ";
- }
- break;
- default:
- {
- *os << bt->name () << "_ptr ";
- }
- }
- }
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- be_predefined_type *bpd = be_predefined_type::narrow_from_decl (type);
-
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS:
- {
- // check if the type is an any
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- // if it is an any, return a pointer to it
- *os << bt->name () << " *";
- }
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object, return a pointer
- *os << bt->name () << "_ptr ";
- }
- else if (bpd->pt () == AST_PredefinedType::PT_void)
- {
- *os << "void ";
- }
- else
- {
- *os << bt->name () << " ";
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS:
- {
- // check if the type is an any
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- // if it is an any, return a pointer to it
- *os << bt->name () << " *retval;" << nl;
- }
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object, return a pointer
- *os << bt->name () << "_ptr retval;" << nl;
- }
- else if (bpd->pt () == AST_PredefinedType::PT_void)
- {
- // no return variable
- }
- else
- {
- *os << bt->name () << " retval;" << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS:
- {
- // check if the type is an any
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- // if it is an any, return a pointer to it
- *os << "return 0;\n";
- }
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object, return a pointer
- *os << "return 0;\n";
- }
- else if (bpd->pt () == AST_PredefinedType::PT_void)
- {
- *os << "return;\n";
- }
- else
- {
- *os << "return retval;\n";
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS:
- {
- if (bpd->pt () == AST_PredefinedType::PT_void)
- {
- *os << "return; // no value" << nl;
- }
- else
- {
- *os << "return retval;" << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS:
- {
- // check if the type is an any
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- // if it is an any, return a pointer to it
- *os << bt->name () << " *retval;" << nl;
- }
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object, return a pointer
- *os << bt->name () << "_ptr *retval = new " << bt->name () <<
- "_ptr;" << nl;
- }
- else
- {
- *os << bt->name () << " *retval = new " << bt->name () << ";"
- << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS:
- {
- // check if the type is an any
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- // if it is an any, return a pointer to it
- *os << "retval";
- }
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object, return a pointer
- *os << "*retval";
- }
- else
- {
- *os << " *retval";
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RESULT_SS:
- {
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- // if it is an any, return a pointer to it
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object, return a pointer
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- else
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_CH:
- {
- // to keep MSVC++ happy
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- // if it is an any, return a pointer to it
- *os << bt->nested_type_name (bif, "*") << " ";
- }
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object, return a pointer
- *os << bt->nested_type_name (bif, "_ptr") << " ";
- }
- else
- {
- *os << bt->nested_type_name (bif) << " ";
- }
- }
- break;
- default:
- {
- *os << bt->name ();
- // check if the type is an any
- if (bpd->pt () == AST_PredefinedType::PT_any)
- {
- // if it is an any, return a pointer to it
- *os << " *";
- }
- else if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object, return a pointer
- *os << "_ptr";
- }
- }
- } // end switch (cg->state())
- }
- break;
- case AST_Decl::NT_string: // type is a string
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS:
- {
-#if 0
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->name ();
- }
- else
- {
- *os << "char *";
- }
-#endif
- *os << "char *";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS:
- {
-#if 0
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->name () << " retval = 0;" << nl;
- }
- else
- {
- *os << "char *retval = 0;" << nl;
- }
-#endif
- *os << "char *retval = 0;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS:
- {
- *os << "return 0;\n";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS:
- {
-#if 0
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->name () << " *retval = new " << bt->name () << ";" << nl;
- }
- else
- {
- *os << "char **retval = new char*;" << nl;
- }
-#endif
- *os << "char **retval = new char*;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS:
- {
- *os << "*retval";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_CH:
- {
-#if 0
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif);
- }
- else
- {
- *os << "char *";
- }
-#endif
- *os << "char *";
- }
- break;
- default:
- {
- *os << "char *";
- }
- } // end of switch cg->state
- }
- break;
- // these are all anonymous types
- case AST_Decl::NT_array: // type is an array
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS:
- {
- *os << bt->name () << "_slice *";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS:
- {
- *os << bt->name () << "_slice *retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS:
- {
- *os << "return 0;\n";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS:
- {
- *os << bt->name () << "_slice *retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS:
- {
- *os << "retval";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_CH:
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif, "_slice") << " *";
- }
- break;
- default:
- {
- // return a pointer to slice
- *os << bt->name () << "_slice *";
- }
- } // end of switch cg->state
- }
- break;
- case AST_Decl::NT_sequence: // type is a sequence
- // return type is a pointer to sequence
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS:
- {
- *os << bt->name () << " *";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS:
- {
- *os << bt->name () << " *retval = new " << bt->name () << ";" <<
- nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS:
- {
- *os << "return 0;\n";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS:
- {
-#if 0
- be_sequence *seq = be_sequence::narrow_from_decl (type);
- // init_mgr method for managed types
- switch (seq->managed_type ())
- {
- case be_sequence::MNG_OBJREF:
- case be_sequence::MNG_STRING:
- *os << "retval->init_mgr ();" << nl;
- break;
- default:
- break;
- }
-#endif
- // if we are sequence, call init manager
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS:
- {
- *os << bt->name () << " *retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS:
- {
- *os << "retval";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_CH:
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif) << " *";
- }
- break;
- default:
- {
- *os << bt->name () << " *";
- }
- } // end of swithc cg->state
- }
- break;
- case AST_Decl::NT_enum: // type is an enum
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS:
- {
- *os << bt->name () << " ";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS:
- {
- *os << bt->name () << " retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS:
- {
- *os << "return retval;\n";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS:
- {
- *os << bt->name () << " *retval = new " << bt->name () << ";" <<
- nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS:
- {
- *os << "*retval";
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_CH:
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif);
- }
- break;
- default:
- {
- *os << bt->name ();
- }
- } // end of switch cg->state
- }
- break;
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_RETURN_TYPE_CS:
- {
- *os << bt->name () << " ";
- if (bt->size_type () == be_decl::VARIABLE)
- {
- *os << "*";
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS:
- {
- if (bt->size_type () == be_decl::VARIABLE)
- {
- *os << bt->name () << " *retval = new " << bt->name () << ";"
- << nl;
- }
- else
- {
- *os << bt->name () << " retval;" << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_EXCEPTION_CS:
- {
- if (bt->size_type () == be_decl::VARIABLE)
- {
- *os << "return 0;\n";
- }
- else
- {
- *os << "return retval;\n";
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS:
- {
- *os << "return retval;" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS:
- {
- if (type->size_type () == be_decl::VARIABLE)
- {
- *os << bt->name () << " *retval;" << nl;
- }
- else
- {
- *os << bt->name () << " *retval = new " << bt->name () << ";"
- << nl;
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS:
- {
- if (type->size_type () == be_decl::VARIABLE)
- {
- *os << "retval";
- }
- else
- {
- *os << "*retval";
- }
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_RESULT_SS:
- {
- *os << "result = new CORBA::Any (" << bt->tc_name () <<
- ", retval, 1); // ORB owns" << nl;
- }
- break;
- case TAO_CodeGen::TAO_OPERATION_CH:
- {
- // to keep MSVC++ happy
- *os << bt->nested_type_name (bif);
- // check if we are fixed size or variable sized. Depending on that we
- // return a pointer or the aggregate itself
- if (type->size_type () == be_decl::VARIABLE)
- *os << " *";
- }
- break;
- default:
- {
- *os << bt->name ();
- // check if we are fixed size or variable sized. Depending on that we
- // return a pointer or the aggregate itself
- if (type->size_type () == be_decl::VARIABLE)
- *os << " *";
- }
- } // 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 ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp;
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, d, temp);
- } // end of switch
- //break; unreachable statement!
- } // switch of main switch
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_state_sequence.cpp b/TAO/TAO_IDL/be/be_state_sequence.cpp
deleted file mode 100644
index ca1b9e11a2a..00000000000
--- a/TAO/TAO_IDL/be/be_state_sequence.cpp
+++ /dev/null
@@ -1,440 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state_sequence.cpp
-//
-// = DESCRIPTION
-// state based code generation for sequences.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// return type for sequence
-be_state_sequence::be_state_sequence (void)
-{
-}
-
-// generate code for sequence type
-int
-be_state_sequence::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os = 0; // output stream
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_sequence *seq;
-
- seq = be_sequence::narrow_from_decl (d);
- if (!seq)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "Bad sequence type\n"),
- -1);
- }
-
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CH:
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CH:
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH:
- os = cg->client_header (); // get client header stream
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CS:
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CS:
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CS:
- os = cg->client_stubs (); // get client stubs stream
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CI:
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CI:
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI:
- os = cg->client_inline (); // get client inline stream
- break;
- default:
- return -1;
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // enclosing scope in which the sequence element type occurs
- be_decl *scope;
- if (!bt->defined_in ()) // no outer scope for us
- scope = 0;
- else
- {
- scope = be_scope::narrow_from_scope (bt->defined_in ())->decl ();
- if (!scope)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "bad scope for seq elem type\n"),
- -1);
- }
- }
-
- // for sequences, all we do is generate the type
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- case AST_Decl::NT_interface_fwd: // type is an obj reference
- case AST_Decl::NT_string: // type is a string
- {
- switch (cg->state ())
- {
- // if it is the case of sequence base, we generate the code for
- // managed types
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CH:
- if (seq->gen_managed_type_ch () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "codegen for managed type\n"),
- -1);
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CS:
- if (seq->gen_managed_type_cs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "codegen for managed type\n"),
- -1);
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CI:
- if (seq->gen_managed_type_ci () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "codegen for managed type\n"),
- -1);
- }
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH: // managed type returned by
- // operator []
- {
- if ((type->node_type () == AST_Decl::NT_interface)
- || (type->node_type () == AST_Decl::NT_interface_fwd))
- {
- if (scope)
- {
- *os << "ACE_NESTED_CLASS (" << scope->name () << "," <<
- seq->local_name () << "::TAO_ObjRefMngType) ";
- }
- else
- {
- *os << seq->local_name () << "::TAO_ObjRefMngType ";
- }
- }
- else // must be a string
- {
- if (scope)
- {
- *os << "ACE_NESTED_CLASS (" << scope->name () << "," <<
- seq->local_name () << "::TAO_StrMngType) ";
- }
- else
- {
- *os << seq->local_name () << "::TAO_StrMngType ";
- }
- }
- }
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI:
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CS:
- {
- if ((type->node_type () == AST_Decl::NT_interface)
- || (type->node_type () == AST_Decl::NT_interface_fwd))
- {
- *os << seq->name () << "::TAO_ObjRefMngType ";
- }
- else // must be a string
- {
- *os << seq->name () << "::TAO_StrMngType ";
- }
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CH:
- {
- if ((type->node_type () == AST_Decl::NT_interface)
- || (type->node_type () == AST_Decl::NT_interface_fwd))
- {
- *os << bt->nested_type_name (scope, "_ptr");
- }
- else // must be a string
- {
- *os << "char *";
- }
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CI:
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CS:
- {
- if ((type->node_type () == AST_Decl::NT_interface)
- || (type->node_type () == AST_Decl::NT_interface_fwd))
- {
- *os << bt->name () << "_ptr";
- }
- else // must be a string
- {
- *os << "char *";
- }
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "bad state\n"),
- -1);
- }
- }
- }
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- be_predefined_type *bpd = be_predefined_type::narrow_from_decl (type);
-
- if (!bpd)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "bad type\n"),
- -1);
- }
- if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // managed types for pseudo objs
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CH:
- if (seq->gen_managed_type_ch () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "codegen for managed type\n"),
- -1);
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CS:
- if (seq->gen_managed_type_cs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "codegen for managed type\n"),
- -1);
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CI:
- if (seq->gen_managed_type_ci () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "codegen for managed type\n"),
- -1);
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CH:
- *os << bt->nested_type_name (scope, "_ptr");
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CS:
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CI:
- *os << bt->name () << "_ptr";
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH: // managed type returned by
- // operator []
- {
- if (scope)
- {
- *os << "ACE_NESTED_CLASS (" << scope->name () << "," <<
- seq->local_name () << "::TAO_ObjRefMngType ) ";
- }
- else
- {
- *os << seq->local_name () << "::TAO_ObjRefMngType ";
- }
- }
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI:
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CS:
- {
- *os << seq->name () << "::TAO_ObjRefMngType ";
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "bad state\n"),
- -1);
- }
- } // end switch state
- } // if pseudo
- else
- {
- // rest of the predefined types
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CH:
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CS:
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CI:
- // nothing to be done
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH:
- *os << bt->nested_type_name (scope, " &");
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CH:
- *os << bt->nested_type_name (scope, " ");
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI:
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CS:
- *os << bt->name () << " &";
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CS:
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CI:
- *os << bt->name () << " ";
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "bad state\n"),
- -1);
- }
- } // end of switch
- } // end else
- } // end case predefined type
- break;
- case AST_Decl::NT_enum: // type is an enum
- case AST_Decl::NT_array: // type is an array
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CH:
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CS:
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CI:
- // nothing to do because we cannot have anonymous data types here
- // that are enums or structures or unions.
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CH:
- *os << bt->nested_type_name (scope, " ");
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH:
- *os << bt->nested_type_name (scope, " &");
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CS:
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI:
- *os << bt->name () << " &";
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CS:
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CI:
- *os << bt->name () << " ";
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "bad state\n"),
- -1);
- }
- }
- }
- break;
- case AST_Decl::NT_sequence: // type is a sequence
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CH:
- {
- // generate the base type sequence
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "Bad sequence type\n"),
- -1);
- }
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CS:
- {
- // generate the base type sequence
- if (bt->gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "Bad sequence type\n"),
- -1);
- }
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BASE_CI:
- {
- // generate the base type sequence
- if (bt->gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "Bad sequence type\n"),
- -1);
- }
- }
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CH:
- *os << bt->nested_type_name (scope, " ");
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH:
- *os << bt->nested_type_name (scope, " &");
- break;
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CS:
- case TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI:
- *os << bt->name () << " &";
- break;
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CS:
- case TAO_CodeGen::TAO_SEQUENCE_BODY_CI:
- *os << bt->name () << " ";
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_sequence.cpp - "
- "bad state\n"),
- -1);
- }
- }
- }
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG: Is this case valid ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp; // most primitive base type
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, d, temp);
- }
- //break; unreachable statement!
- } // end of switch
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_state_structure.cpp b/TAO/TAO_IDL/be/be_state_structure.cpp
deleted file mode 100644
index 86ab10cac5a..00000000000
--- a/TAO/TAO_IDL/be/be_state_structure.cpp
+++ /dev/null
@@ -1,280 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state_struct.cpp
-//
-// = DESCRIPTION
-// state based code generation for structs.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-be_state_struct::be_state_struct (void)
-{
-}
-
-// generate code for structure member
-int
-be_state_struct ::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os; // output stream
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_field *f; // field node
- be_structure *bs; // enclosing structure node
-
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_STRUCT_CH:
- os = cg->client_header ();
- break;
- case TAO_CodeGen::TAO_STRUCT_CS:
- os = cg->client_stubs ();
- break;
- case TAO_CodeGen::TAO_STRUCT_CI:
- os = cg->client_inline ();
- break;
- default:
- os = 0; // Force a seg fault. At least os will have a known value.
- }
-
- f = be_field::narrow_from_decl (d); // downcast to field node
- if (!f)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_structure.cpp - "
- "Bad field\n"),
- -1);
- }
-
- // retrieve the enclosing "struct" node
- bs = be_structure::narrow_from_scope (f->defined_in ());
- if (!bs)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_struct.cpp - "
- "Bad structure\n"),
- -1);
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // generate code based on type.
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_STRUCT_CH:
- {
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bs, "_var") << " " << f->local_name
- () << ";\n";
- }
- break;
- case TAO_CodeGen::TAO_STRUCT_CI:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_STRUCT_CS:
- {
- // nothing
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_struct - unknown state\n"), -1);
- }
- } // end switch state
- } // end case interface
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_STRUCT_CH:
- {
- be_predefined_type *bpd = be_predefined_type::narrow_from_decl
- (type);
- if (!bpd)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_struct - "
- "bad predefined type\n"), -1);
- }
- os->indent (); // start from current indentation
- switch (bpd->pt ())
- {
- case AST_PredefinedType::PT_any:
- case AST_PredefinedType::PT_pseudo:
- *os << bt->nested_type_name (bs) << "_var " << f->local_name
- () << ";\n";
- break;
- default:
- *os << bt->nested_type_name (bs) << " " << f->local_name ()
- << ";\n";
- }
- }
- break;
- case TAO_CodeGen::TAO_STRUCT_CI:
- {
- // nothing
- }
- break;
- case TAO_CodeGen::TAO_STRUCT_CS:
- {
- // nothing
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_struct - unknown state\n"), -1);
- }
- } // end switch state
- }
- break;
- case AST_Decl::NT_string: // type is a string
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_STRUCT_CH:
- {
- os->indent (); // start from current indentation
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->nested_type_name (bs, "_var") << " " <<
- f->local_name () << ";\n";
- }
- else
- {
- *os << "CORBA::String_var " << f->local_name () << ";\n";
- }
- }
- break;
- case TAO_CodeGen::TAO_STRUCT_CI:
- {
- }
- break;
- case TAO_CodeGen::TAO_STRUCT_CS:
- {
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_struct - unknown state\n"), -1);
- }
- } // end switch state
- }
- break;
- // these are all anonymous types
- case AST_Decl::NT_array: // type is an array
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_enum: // type is an enum
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_STRUCT_CH:
- {
- // We first need to generate code for this aggregate type. Check
- // if we are not called recursively thru a typedef
- if (bt->node_type () != AST_Decl::NT_typedef
- && !bt->imported ())
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_struct - "
- "error generating code for type\n"),
- -1);
- }
- // this is not to be generated for arrays
- if (bt->node_type () != AST_Decl::NT_array)
- {
- os->indent ();
- *os << bt->nested_type_name (bs) << " " << f->local_name () <<
- ";\n";
- }
- }
- break;
- case TAO_CodeGen::TAO_STRUCT_CI:
- {
- // We first need to generate code for this aggregate type. Check
- // if we are not called recursively thru a typedef
- if (bt->node_type () != AST_Decl::NT_typedef
- && !bt->imported ())
- if (bt->gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_struct - "
- "error generating code for type\n"),
- -1);
- }
- }
- break;
- case TAO_CodeGen::TAO_STRUCT_CS:
- {
- // We first need to generate code for this aggregate type. Check
- // if we are not called recursively thru a typedef
- if (bt->node_type () != AST_Decl::NT_typedef
- && !bt->imported ())
- if (bt->gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_struct - "
- "error generating code for type\n"),
- -1);
- }
- }
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_struct - unknown state\n"), -1);
- }
- } // end switch state
- }
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG TODO: is this allowed ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp;
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, f, temp);
- } // end of switch
- //break; unreachable statement!
- }
- // the enclosing structure will be variable length if the field's type is
- // variable length
- bs->size_type (type->size_type ());
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_state_typedef.cpp b/TAO/TAO_IDL/be/be_state_typedef.cpp
deleted file mode 100644
index 7c83bfa758c..00000000000
--- a/TAO/TAO_IDL/be/be_state_typedef.cpp
+++ /dev/null
@@ -1,368 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state_typedef.cpp
-//
-// = DESCRIPTION
-// state based code generation for typedefs.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// return type for typedef
-be_state_typedef::be_state_typedef (void)
-{
-}
-
-// generate code for structure member
-int
-be_state_typedef::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_typedef *tdef; // typedef node
- be_decl *scope; // enclosing scope in which the typedef occurs
-
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- os = cg->client_header (); // set the stream to be the client header
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- os = cg->client_inline ();
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- os = cg->client_stubs ();
- break;
- default:
- return -1;
- } // end of outermost switch
-
-
- tdef = be_typedef::narrow_from_decl (d); // downcast to typedef node
- if (!tdef)
- return -1;
-
- scope = be_scope::narrow_from_scope (tdef->defined_in ())->decl ();
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most
- // primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // the typedef node has the same size type as its base type
- tdef->size_type (bt->size_type ());
-
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- case AST_Decl::NT_interface_fwd: // type is an obj reference
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- {
- os->indent (); // start from current indentation
-
- // typedef of an interface results in 3 typedefs as shown below
- *os << "typedef " << bt->nested_type_name (scope) << " " <<
- d->local_name () << ";" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_ptr") << " " <<
- d->local_name () << "_ptr;" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_var") << " " <<
- d->local_name () << "_var;" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_out") << " " <<
- d->local_name () << "_out;\n\n";
- }
- break;
- default: // nothing to do for other cases
- break;
- } // end of switch state
- }
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- {
- be_predefined_type *pd = be_predefined_type::narrow_from_decl (type);
-
- if (!pd)
- return -1;
- os->indent (); // start from current indentation
- *os << "typedef " << bt->nested_type_name (scope) << " " <<
- d->local_name () << ";";
- // if the predefined type is an ANY, we also define a typedef to _var
- if (pd->pt () == AST_PredefinedType::PT_any)
- {
- *os << nl;
- *os << "typedef " << bt->name () << "_var " << d->local_name
- () << "_var;";
- }
- else if (pd->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object
- *os << "typedef " << bt->nested_type_name (scope, "_ptr") <<
- " " << d->local_name () << "_ptr;" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_var") <<
- " " << d->local_name () << "_var;" << nl;
- }
- *os << "typedef " << bt->nested_type_name (scope, "_out") << " "
- << d->local_name () << "_out;\n\n";
- } // end of case
- break;
- default: // nothing to do for other cases
- break;
- } // end switch
- }
- break;
- case AST_Decl::NT_string: // type is a string
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- {
- os->indent (); // start from current indentation
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << "typedef " << bt->nested_type_name (scope) << " " <<
- d->local_name () << ";" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_var") <<
- " " << d->local_name () << "_var;" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_out") <<
- " " << d->local_name () << "_out;\n\n";
- }
- else
- {
- *os << "typedef CORBA::String " << d->local_name () << ";" <<
- nl;
- *os << "typedef CORBA::String_var " << d->local_name
- () << "_var;" << nl;
- *os << "typedef CORBA::String_out " << d->local_name
- () << "_out;\n\n";
- }
- }
- break;
- default: // nothing to do for the rest of the cases
- break;
- } // end switch state
- }
- break;
- case AST_Decl::NT_enum: // type is an enum
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- {
- os->indent (); // start from current indentation
- // if we are not here recursively, then we need to generate the
- // definition first
- if (bt->node_type () != AST_Decl::NT_typedef)
- {
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_state_typedef - enum gen failed\n"), -1);
- }
- }
- *os << "typedef " << bt->nested_type_name (scope) << " " <<
- d->local_name () << ";" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_out") << " "
- << d->local_name () << "_out;\n\n";
- }
- break;
- default:
- break;
- } // end of switch
- }
- break;
- // these are all anonymous types
- case AST_Decl::NT_array: // type is an array
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- {
- // if we are not here recursively, then we need to generate the
- // definition first i.e., this typedef had its immediate base
- // class that was an array declaration. The code for arrays will
- // handle all the code generation. We just prepend the word
- // "typedef".
- if (bt->node_type () != AST_Decl::NT_typedef)
- {
- os->indent ();
- *os << "typedef ";
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_state_typedef - array gen failed\n"), -1);
- }
- }
- else
- {
- // we are a typedef node whose immediate base class is also a
- // typedefed node to some array node. We simply output a
- // number of typedef statements
- os->indent ();
- *os << "typedef " << bt->nested_type_name (scope) << " " <<
- d->local_name () << ";" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_slice") <<
- " " << d->local_name () << "_slice;" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_var") << " "
- << d->local_name () << "_var;" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_out") << " "
- << d->local_name () << "_out;" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_forany") << " "
- << d->local_name () << "_forany;" << nl;
-
- // typedefs for the auxiliary methods. If we are nested inside
- // some scope, these methods become static to the enclosing scope
- if (d->is_nested ())
- *os << "static ";
- *os << bt->nested_type_name (scope) << "_slice* " << d->local_name () <<
- "_alloc (void);" << nl;
- if (d->is_nested ())
- *os << "static ";
- *os << bt->nested_type_name (scope, "_slice") << " *" <<
- d->local_name () << "_dup ("
- << bt->nested_type_name (scope) << "_slice* " << ");" << nl;
- if (d->is_nested ())
- *os << "static ";
- *os << "void " << bt->nested_type_name (scope) << "_free (" <<
- d->name () << "_slice *);\n\n";
- }
- }
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- {
- // if we are not here recursively, then we need to generate the
- // definition first
- if (bt->node_type () != AST_Decl::NT_typedef)
- {
- if (bt->gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_state_typedef - struct/union/seq gen failed\n"),
- -1);
- }
- }
- }
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- {
- // if we are not here recursively, then we need to generate the
- // definition first
- if (bt->node_type () != AST_Decl::NT_typedef)
- {
- if (bt->gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_state_typedef - struct/union/seq gen failed\n"),
- -1);
- }
- }
- }
- break;
- default:
- break;
- } // end of switch
- }
- break;
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- {
- // if we are not here recursively, then we need to generate the
- // definition first
- if (bt->node_type () != AST_Decl::NT_typedef)
- {
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_state_typedef - struct/union/seq gen failed\n"),
- -1);
- }
- }
- os->indent (); // start from current indentation
- *os << "typedef " << bt->nested_type_name (scope) << " " <<
- d->local_name () << ";" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_var") << " "
- << d->local_name () << "_var;" << nl;
- *os << "typedef " << bt->nested_type_name (scope, "_out") << " "
- << d->local_name () << "_out;\n\n";
- }
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- {
- // if we are not here recursively, then we need to generate the
- // definition first
- if (bt->node_type () != AST_Decl::NT_typedef)
- {
- if (bt->gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_state_typedef - struct/union/seq gen failed\n"),
- -1);
- }
- }
- }
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- {
- // if we are not here recursively, then we need to generate the
- // definition first
- if (bt->node_type () != AST_Decl::NT_typedef)
- {
- if (bt->gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_state_typedef - struct/union/seq gen failed\n"),
- -1);
- }
- }
- }
- break;
- default:
- break;
- } // end of switch state
- }
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG TODO: is this allowed ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp;
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, tdef, temp);
- } // end of case
- //break; unreachable statement!
- } // end of switch
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_state_union.cpp b/TAO/TAO_IDL/be/be_state_union.cpp
deleted file mode 100644
index 9a0b5b6c07e..00000000000
--- a/TAO/TAO_IDL/be/be_state_union.cpp
+++ /dev/null
@@ -1,1144 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_state_union.cpp
-//
-// = DESCRIPTION
-// state based code generation for unions.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-be_state_union_disctypedefn_ch::be_state_union_disctypedefn_ch (void)
-{
-}
-
-// generate code for union discriminant type in client header
-int
-be_state_union_disctypedefn_ch::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_union *bu;
-
- bu = be_union::narrow_from_decl (d); // downcast to union type
- if (!bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_disctypedefn_ch::"
- "gen_code - "
- "bad union node\n"), -1);
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- os = cg->client_header (); // get client header stream
-
- // generate code based on type. For every case, first downcast to the
- // appropriate type. If the downcast fails, return error, else proceed. In
- // some cases, the type itself may need code generation, e.g., anonymous
- // struct types.
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- case AST_Decl::NT_string: // type is a string
- case AST_Decl::NT_array: // type is an array
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- case AST_Decl::NT_except: // type is an exception
- // all these cases are syntax errors which the front-end should have
- // flagged as error cases
- return -1;
- case AST_Decl::NT_pre_defined: // type is predefined type
- case AST_Decl::NT_enum: // type is an enum
- {
- // if the discriminant is an enum, first generate the enum
- // definition. However, check that we are not inside a recursive call
- if (bt->node_type () == AST_Decl::NT_enum)
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_disctypedefn_ch::"
- "gen_code - "
- "codegen for discrim failed\n"), -1);
- }
-
- os->indent ();
- // the set method
- *os << "void _d (" << bt->nested_type_name (bu) << ");" << nl;
- // the get method
- *os << bt->nested_type_name (bu) << " _d (void) const;\n\n";
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- // a scoped name must result in one of the allowed types. Hopefully the
- // front-end has done a good job of ensuring this.
- be_type *temp; // most primitive base type
- be_typedef *t = be_typedef::narrow_from_decl (bt);
- if (!t)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_disctypedefn_ch::"
- "gen_code - "
- "bad typedef node\n"), -1);
- }
-
- temp = t->primitive_base_type ();
- return this->gen_code (t, d, temp);
- }
- } // end of switch
- return 0;
-}
-
-be_state_union_disctypedefn_ci::be_state_union_disctypedefn_ci (void)
-{
-}
-
-// generate code for union discriminant type in client inline
-int
-be_state_union_disctypedefn_ci::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_union *bu;
-
- bu = be_union::narrow_from_decl (d); // downcast to union type
- if (!bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_disctypedefn_ci::"
- "gen_code - "
- "bad union node\n"), -1);
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- os = cg->client_inline (); // get client inline stream
-
- // generate code based on type. For every case, first downcast to the
- // appropriate type. If the downcast fails, return error, else proceed. In
- // some cases, the type itself may need code generation, e.g., anonymous
- // struct types.
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- case AST_Decl::NT_string: // type is a string
- case AST_Decl::NT_array: // type is an array
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- case AST_Decl::NT_except: // type is an exception
- // all these cases are syntax errors which the front-end should have
- // flagged as error
- return -1;
- case AST_Decl::NT_pre_defined: // type is predefined type
- case AST_Decl::NT_enum: // type is an enum
- case AST_Decl::NT_typedef: // type is a typedef
- {
- os->indent ();
- // the set method
- *os << "// accessor to set the discriminant" << nl;
- *os << "ACE_INLINE void" << nl;
- *os << bu->name () << "::_d (" << bt->name () <<
- " discval)" << nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "this->disc_ = discval;\n";
- os->decr_indent ();
- *os << "}" << nl;
- // the get method
- *os << "// accessor to get the discriminant" << nl;
- *os << "ACE_INLINE " << bt->name () << nl;
- *os << bu->name () << "::_d (void) const" << nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->disc_;\n";
- os->decr_indent ();
- *os << "}\n\n";
- }
- break;
- } // end of switch
- return 0;
-}
-
-be_state_union_public_ch::be_state_union_public_ch (void)
-{
-}
-
-// generate code for union branch members in client header. This involves
-// generating the set/get methods corresponding to the members
-int
-be_state_union_public_ch::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_union_branch *ub; // union branch member
- be_union *bu; // enclosing union
-
- os = cg->client_header (); // get client header stream
- ub = be_union_branch::narrow_from_decl (d); // downcast to union branch node
- if (!ub)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ch::"
- "gen_code - "
- "bad union member\n"), -1);
- }
-
- bu = be_union::narrow_from_scope (ub->defined_in ());
- if (bu == NULL)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ch::"
- "gen_code - "
- "bad union node\n"), -1);
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // codegen based on node type and the state we are in
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- {
- os->indent (); // start from current indentation
- *os << "void " << ub->local_name () << " (" << bt->nested_type_name
- (bu, "_ptr") << ");// set" << nl;
- *os << bt->nested_type_name (bu, "_ptr") << " " << ub->local_name () <<
- " (void) const; // get method\n\n";
- }
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- be_predefined_type *bpd = be_predefined_type::narrow_from_decl (type);
- if (!bpd)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ch::"
- "gen_code - "
- "bad predefined type\n"), -1);
- }
-
- if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- os->indent (); // start from current indentation
- *os << "void " << ub->local_name () << " (" << bt->nested_type_name
- (bu) << "_ptr);// set" << nl;
- *os << bt->nested_type_name (bu) << "_ptr " << ub->local_name () <<
- " (void) const; // get method\n\n";
- }
- else
- {
- os->indent (); // start from current indentation
- *os << "void " << ub->local_name () << " (" << bt->nested_type_name
- (bu) << ");// set" << nl;
- *os << bt->nested_type_name (bu) << " " << ub->local_name () <<
- " (void) const; // get method\n\n";
- }
- }
- break;
- case AST_Decl::NT_enum: // type is an enum
- {
- // XXXASG - TODO - what if we have a pseudo obj?
- // if the type is an enum, we generate its defn first
- if (bt->node_type () == AST_Decl::NT_enum)
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ch::"
- "gen_code - "
- "bad union member\n"), -1);
- }
-
- os->indent (); // start from current indentation
- *os << "void " << ub->local_name () << " (" << bt->nested_type_name (bu)
- << ");// set" << nl;
- *os << bt->nested_type_name (bu) << " " << ub->local_name () <<
- " (void) const; // get method\n\n";
- }
- break;
- case AST_Decl::NT_string: // type is a string
- {
- os->indent (); // start from current indentation
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- // three methods to set the string value
- *os << "void " << ub->local_name () << " (" << bt->nested_type_name
- (bu) << "); // set" << nl;
- *os << "void " << ub->local_name () << " (const " <<
- bt->nested_type_name (bu) << "); // set"
- << nl;
- *os << "void " << ub->local_name () <<
- " (const " << bt->nested_type_name (bu, "_var") << " &); // set" <<
- nl;
- *os << "const " << bt->nested_type_name (bu) << " " <<
- ub->local_name () << " (void) const; // get method\n\n";
- }
- else
- {
- // three methods to set the string value
- *os << "void " << ub->local_name () << " (char *); // set" << nl;
- *os << "void " << ub->local_name () << " (const char *); // set"
- << nl;
- *os << "void " << ub->local_name () <<
- " (const CORBA::String_var&); // set" << nl;
- *os << "const char *" << ub->local_name () <<
- " (void) const; // get method\n\n";
- }
- }
- break;
- case AST_Decl::NT_array: // type is an array
- {
- // generate code for the array. So let the array handle code
- // generation. Check if this is not a recursive call
- if (bt->node_type () != AST_Decl::NT_typedef)
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ch::"
- "gen_code - "
- "codegen for array failed\n"), -1);
- }
-
- os->indent ();
- *os << "void " << ub->local_name () << " (" << bt->nested_type_name
- (bu) << ");// set" << nl;
- *os << bt->nested_type_name (bu, "_slice") << " *" << ub->local_name () <<
- " (void) const; // get method\n\n";
-
- }
- break;
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- {
- // generate defn for this aggregate unless we are recursively called
- if (bt->node_type () != AST_Decl::NT_typedef)
- if (bt->gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ch::"
- "gen_code - "
- "codegen for type failed\n"), -1);
- }
-
- os->indent ();
- *os << "void " << ub->local_name () << " (const " <<
- bt->nested_type_name (bu) << " &);// set" << nl;
- *os << "const " << bt->nested_type_name (bu) << " &" << ub->local_name
- () << " (void) const; // get method (read only)" << nl;
- *os << bt->nested_type_name (bu) << " &" << ub->local_name () <<
- " (void); // get method (read/write only)\n\n";
- }
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG: Is this case valid ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp; // most primitive base type
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, ub, temp);
- }
- } // end of switch
-
- // enclosing union is variable if the member is variable
- bu->size_type (type->size_type ());
-
- return 0;
-}
-
-be_state_union_public_ci::be_state_union_public_ci (void)
-{
-}
-
-// generate code for union branch members in client inline. This involves
-// generating the set/get methods corresponding to the members
-int
-be_state_union_public_ci::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_union_branch *ub; // union branch member
- be_union *bu; // enclosing union
-
- os = cg->client_inline (); // get client inline stream
- ub = be_union_branch::narrow_from_decl (d); // downcast to union branch node
- if (!ub)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ci::"
- "gen_code - "
- "bad union member\n"), -1);
- }
-
- bu = be_union::narrow_from_scope (ub->defined_in ());
- if (bu == NULL)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ci::"
- "gen_code - "
- "bad union node\n"), -1);
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- switch (type->node_type ())
- {
- case AST_Decl::NT_pre_defined: // type is predefined type
- case AST_Decl::NT_enum: // type is an enum
- case AST_Decl::NT_array: // type is an array
- case AST_Decl::NT_interface: // type is an obj reference
- {
- // for array, generate inline methods if any
- // We first need to generate code for this aggregate type. Check
- // if we are not called recursively thru a typedef
- if (bt->node_type () == AST_Decl::NT_array
- && !bt->imported ())
- if (bt->gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ci::"
- "gen_code - "
- "codegen for array failed\n"), -1);
- }
-
- // set method
- os->indent (); // start from current indentation
- *os << "// accessor to set the member" << nl;
- *os << "ACE_INLINE void" << nl;
- *os << bu->name () << "::" << ub->local_name () << " (" << bt->name ();
- if (type->node_type () == AST_Decl::NT_interface)
- {
- // if it is an interface node, we use _ptr as a suffix for the type
- *os << "_ptr";
- }
- *os << " val)// set" << nl;
- *os << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- nl;
- }
- *os << "// set the value" << nl;
- if (type->node_type () == AST_Decl::NT_interface)
- {
- // the private data member is a pointer type
- *os << "*this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- *os << "this->" << ub->local_name () << "_ = val;\n";
- }
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << nl;
-
- // get method
- *os << "// retrieve the member" << nl;
- *os << "ACE_INLINE " << bt->name ();
- if (type->node_type () == AST_Decl::NT_interface)
- {
- // for interface type, return a _ptr type
- *os << "_ptr";
- }
- else if (type->node_type () == AST_Decl::NT_array)
- {
- // for an array, return a _slice* type
- *os << "_slice *";
- }
- *os << nl;
- *os << bu->name () << "::" << ub->local_name () <<
- " (void) const" << nl;
- *os << "{\n";
- os->incr_indent ();
- if (type->node_type () == AST_Decl::NT_interface)
- {
- *os << "return *this->" << ub->local_name () << "_;\n";
- }
- else
- {
- *os << "return this->" << ub->local_name () << "_;\n";
- }
- os->decr_indent ();
- *os << "}\n\n";
- }
- break;
- case AST_Decl::NT_string: // type is a string
- {
- // three methods to set the string value
-
- // (1) set method from char*
- os->indent (); // start from current indentation
- *os << "// accessor to set the member" << nl;
- *os << "ACE_INLINE void" << nl;
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bu->name () << "::" << ub->local_name () << " (" << bt->name
- () << " val)" << nl;
- }
- else
- {
- *os << bu->name () << "::" << ub->local_name () << " (char *val)"
- << nl;
- }
- *os << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- nl;
- }
- *os << "// set the value" << nl;
- *os << "if (!this->" << ub->local_name () << "_) // does not exist"
- << nl ;
- *os << " this->" << ub->local_name () <<
- "_ = new CORBA::String_var (val);" << nl;
- *os << "else" << nl;
- *os << " *this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << nl;
-
- // (2) set method from const char *
- *os << "// accessor to set the member" << nl;
- *os << "ACE_INLINE void" << nl;
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bu->name () << "::" << ub->local_name () << " (const " <<
- bt->name () << " val)" << nl;
- }
- else
- {
- *os << bu->name () << "::" << ub->local_name () <<
- " (const char *val)" << nl;
- }
- *os << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- nl;
- }
- *os << "// set the value" << nl;
- *os << "if (!this->" << ub->local_name () << "_) // does not exist"
- << nl ;
- *os << " this->" << ub->local_name () <<
- "_ = new CORBA::String_var (val);" << nl;
- *os << "else" << nl;
- *os << " *this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << nl;
-
- // (3) set from const String_var&
- *os << "// accessor to set the member" << nl;
- *os << "ACE_INLINE void" << nl;
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bu->name () << "::" << ub->local_name () << " (const " <<
- bt->name () << "_var &val)" << nl;
- }
- else
- {
- *os << bu->name () << "::" << ub->local_name () <<
- " (const CORBA::String_var &val)" << nl;
- }
- *os << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- nl;
- }
- *os << "// set the value" << nl;
- *os << "if (!this->" << ub->local_name () << "_) // does not exist"
- << nl ;
- *os << " this->" << ub->local_name () <<
- "_ = new CORBA::String_var (val);" << nl;
- *os << "else" << nl;
- *os << " *this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << nl;
-
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << "ACE_INLINE const " << bt->name () << nl;
- }
- else
- {
- *os << "ACE_INLINE const char *" << nl;
- }
- *os << bu->name () << "::" << ub->local_name () <<
- " (void) const // get method" << nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return *this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}\n\n";
- }
- break;
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_union: // type is a union
- {
- // We first need to generate code for this aggregate type. Check
- // if we are not called recursively thru a typedef
- if (bt->node_type () != AST_Decl::NT_typedef
- && !bt->imported ())
- if (bt->gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ci::"
- "gen_code - "
- "codegen for type failed\n"), -1);
- }
-
- os->indent ();
- // This case has to be handled differently from structs because the data
- // member is a pointer
-
- // (1) set from a const
- *os << "// accessor to set the member" << nl;
- *os << "ACE_INLINE void" << nl;
- *os << bu->name () << "::" << ub->local_name () <<
- " (const " << bt->name () << " &val)" << nl;
- *os << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- nl;
- }
- *os << "// set the value" << nl;
- *os << "*this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << nl;
-
- // readonly get method
- *os << "// readonly get method " << nl;
- *os << "ACE_INLINE const " << bt->name () << " &" << nl;
- *os << bu->name () << "::" << ub->local_name () << " (void) const" << nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return *this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}" << nl;
-
- // read/write get method
- *os << "// read/write get method " << nl;
- *os << "ACE_INLINE " << bt->name () << " &" << nl;
- *os << bu->name () << "::" << ub->local_name () << " (void)" << nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return *this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}" << nl;
-
- }
- break;
- case AST_Decl::NT_struct: // type is a struct
- {
- // We first need to generate code for this aggregate type. Check
- // if we are not called recursively thru a typedef
- if (bt->node_type () != AST_Decl::NT_typedef
- && !bt->imported ())
- if (bt->gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_ci::"
- "gen_code - "
- "codegen for struct failed\n"), -1);
- }
-
- os->indent ();
-
- // (1) set from a const
- *os << "// accessor to set the member" << nl;
- *os << "ACE_INLINE void" << nl;
- *os << bu->name () << "::" << ub->local_name () <<
- " (const " << bt->name () << " &val)" << nl;
- *os << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- nl;
- }
- *os << "// set the value" << nl;
- *os << "this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << nl;
-
- // readonly get method
- *os << "// readonly get method " << nl;
- *os << "ACE_INLINE const " << bt->name () << " &" << nl;
- *os << bu->name () << "::" << ub->local_name () << " (void) const" << nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}" << nl;
-
- // read/write get method
- *os << "// read/write get method " << nl;
- *os << "ACE_INLINE " << bt->name () << " &" << nl;
- *os << bu->name () << "::" << ub->local_name () << " (void)" << nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}" << nl;
-
- }
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG: Is this case valid ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp; // most primitive base type
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, ub, temp);
- }
- } // end of switch
-
- return 0;
-}
-
-be_state_union_public_cs::be_state_union_public_cs (void)
-{
-}
-
-// generate code for union branch members in client header. This involves
-// generating the set/get methods corresponding to the members
-int
-be_state_union_public_cs::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_union_branch *ub; // union branch member
- be_union *bu; // enclosing union
-
- os = cg->client_stubs (); // get client stubs stream
- ub = be_union_branch::narrow_from_decl (d); // downcast to union branch node
- if (!ub)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_cs::"
- "gen_code - "
- "bad union member\n"), -1);
- }
-
- bu = be_union::narrow_from_scope (ub->defined_in ());
- if (!bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_cs::"
- "gen_code - "
- "bad union member\n"), -1);
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_UNION_PUBLIC_CS:
- {
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- case AST_Decl::NT_pre_defined: // type is predefined type
- case AST_Decl::NT_string: // type is a string
- {
- // nothing
- }
- break;
- case AST_Decl::NT_enum: // type is an enum
- {
- if (bt->node_type () == AST_Decl::NT_enum)
- if (bt->gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_cs::"
- "gen_code - "
- "codegen for type failed\n"), -1);
- }
- }
- break;
- case AST_Decl::NT_array: // type is an array
- {
- // generate code for the array. So let the array handle code
- // generation. Check if this is not a recursive call
- if (bt->node_type () != AST_Decl::NT_typedef)
- if (bt->gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_cs::"
- "gen_code - "
- "codegen for type failed\n"), -1);
- }
-
- }
- break;
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_struct: // type is a struct
- case AST_Decl::NT_union: // type is a union
- {
- // generate defn for this aggregate unless we are recursively called
- if (bt->node_type () != AST_Decl::NT_typedef)
- if (bt->gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_public_cs::"
- "gen_code - "
- "codegen for type failed\n"), -1);
- }
- }
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG: Is this case valid ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp; // most primitive base type
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_private_cs::"
- "gen_code - "
- "bad typedef\n"), -1);
- }
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, ub, temp);
- }
- } // end of switch node type
- }
- break;
- case TAO_CodeGen::TAO_UNION_PUBLIC_ASSIGN_CS:
- {
- // This state is used when we are generating the copy ctor and
- // assignment operator for the union.
- // Individual assignment of the members takes place inside a case
- // statement because the type of member assigned is based on the value
- // of the discriminant
- os->indent ();
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "case " << ub->label ()->label_val ()->n () << ":\n";
- }
- else
- {
- *os << "case " << ub->label ()->label_val () << ":\n";
- }
- os->incr_indent ();
- *os << "this->" << ub->local_name () << "_ = u." << ub->local_name ()
- << "_;" << nl;
- *os << "break;\n";
- os->decr_indent (0);
- }
- break;
- }
-
- return 0;
-}
-
-be_state_union_private_ch::be_state_union_private_ch (void)
-{
-}
-
-int
-be_state_union_private_ch::gen_code (be_type *bt, be_decl *d, be_type *type)
-{
- TAO_OutStream *os; // output stream
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_union_branch *ub; // union branch member
- be_union *bu; // enclosing union
-
- os = cg->client_header (); // get client header stream
- ub = be_union_branch::narrow_from_decl (d); // downcast to union branch node
- if (!ub)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_private_ch::"
- "gen_code - "
- "bad union member\n"), -1);
- }
-
- bu = be_union::narrow_from_scope (ub->defined_in ());
- if (!bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_private_ch::"
- "gen_code - "
- "bad union\n"), -1);
- }
-
- if (!type) // not a recursive call
- type = bt;
- else // recursively called thru a typedef. "type" will have the most primitive
- // base class of the typedef
- ACE_ASSERT (bt->node_type () == AST_Decl::NT_typedef);
-
- // generate code based on type. For every case, first downcast to the
- // appropriate type. If the downcast fails, return error, else proceed. In
- // some cases, the type itself may need code generation, e.g., anonymous
- // struct types.
- switch (type->node_type ())
- {
- case AST_Decl::NT_interface: // type is an obj reference
- {
- os->indent (); // start from current indentation
- // C++ does not allow an object declaration inside a union. Hence we
- // must have a pointer. This changes some of the methods
- *os << bt->nested_type_name (bu, "_var") << " *" << ub->local_name () <<
- "_;\n";
- }
- break;
- case AST_Decl::NT_pre_defined: // type is predefined type
- {
- be_predefined_type *bpd = be_predefined_type::narrow_from_decl (type);
- if (!bpd)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_state_union_private_ch::"
- "gen_code - "
- "bad predefined type\n"), -1);
- }
-
- if (bpd->pt () == AST_PredefinedType::PT_pseudo)
- {
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bu) << "_var " << ub->local_name () <<
- "_;\n";
- }
- else
- {
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bu) << " " << ub->local_name () <<
- "_;\n";
- }
- }
- break;
- case AST_Decl::NT_enum: // type is an enum
- {
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bu) << " " << ub->local_name () <<
- "_;\n";
- }
- break;
- case AST_Decl::NT_string: // type is a string
- {
- os->indent (); // start from current indentation
- // C++ does not allow an object declaration inside a union. Hence we
- // must have a pointer. This changes some of the methods
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- *os << bt->nested_type_name (bu, "_var") << " *" << ub->local_name () <<
- "_;\n";
- }
- else
- {
- *os << "CORBA::String_var *" << ub->local_name () << "_;\n";
- }
- }
- break;
- case AST_Decl::NT_array: // type is an array
- {
- os->indent ();
- *os << bt->nested_type_name (bu, "_slice") << " *" << ub->local_name () <<
- "_;\n";
- }
- break;
- case AST_Decl::NT_sequence: // type is a sequence
- case AST_Decl::NT_union: // type is a union
- {
- os->indent ();
- // C++ doesn't allow object instances inside unions, so we need a
- // pointer
- *os << bt->nested_type_name (bu) << " *" << ub->local_name () << "_;\n";
- }
- break;
- case AST_Decl::NT_struct: // type is a struct
- {
- os->indent ();
- *os << bt->nested_type_name (bu) << " " << ub->local_name () << "_;\n";
- }
- break;
- case AST_Decl::NT_except: // type is an exception
- {
- // XXXASG: Is this case valid ???
- }
- break;
- case AST_Decl::NT_typedef: // type is a typedef
- {
- be_type *temp; // most primitive base type
- be_typedef *t = be_typedef::narrow_from_decl (bt);
-
- if (!t)
- return -1;
-
- temp = t->primitive_base_type ();
- // make a recursive call
- return this->gen_code (t, ub, temp);
- }
- } // end of switch
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_string.cpp b/TAO/TAO_IDL/be/be_string.cpp
deleted file mode 100644
index c883c6e80eb..00000000000
--- a/TAO/TAO_IDL/be/be_string.cpp
+++ /dev/null
@@ -1,175 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_string.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Array that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_String
- */
-be_string::be_string (void)
-{
- this->size_type (be_decl::VARIABLE); // always the case
-}
-
-be_string::be_string (AST_Expression *v)
- : AST_String (v),
- AST_Decl (AST_Decl::NT_string,
- new UTL_ScopedName(new Identifier("string", 1, 0, I_FALSE),
- NULL),
- NULL)
-{
- this->size_type (be_decl::VARIABLE); // always the case
-}
-
-be_string::be_string (AST_Expression *v, long wide)
- : AST_String (v, wide),
- AST_Decl (AST_Decl::NT_string,
- wide == 1
- ? new UTL_ScopedName(new Identifier("string",1,0,I_FALSE),
- NULL)
- : new UTL_ScopedName(new Identifier("wstring_t",
- 1,
- 0,
- I_FALSE),
- NULL),
- NULL)
-{
- this->size_type (be_decl::VARIABLE); // always the case
-}
-
-// overriden method
-void
-be_string::compute_tc_name (void)
-{
- // start with the head as the CORBA namespace
- this->tc_name_ = new UTL_ScopedName (new Identifier ("CORBA", 1, 0, I_FALSE),
- NULL);
-
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier ("_tc_string", 1, 0,
- I_FALSE), NULL));
-}
-
-// Code generation
-
-int
-be_string::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
- ch->indent ();
- *ch << "char *";
-
- return 0;
-}
-
-int
-be_string::gen_client_stubs (void)
-{
- return 0;
-}
-
-int
-be_string::gen_server_header (void)
-{
- return 0;
-}
-
-int
-be_string::gen_server_skeletons (void)
-{
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_string::gen_client_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_string::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-int
-be_string::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
- cs->indent (); // start from the current indentation level
- // emit the enumeration
- *cs << "CORBA::tk_string, " << nl;
- *cs << this->max_size () << ", // string length\n";
- return 0;
-}
-
-// compute typecode size
-long
-be_string::tc_size (void)
-{
- // 4 bytes for enumeration, 4 bytes for storing string length
- return 4 + 4;
-}
-
-int
-be_string::gen_encapsulation (void)
-{
- return 0;
-}
-
-long
-be_string::tc_encap_len (void)
-{
- if (this->encap_len_ == -1)
- {
- this->encap_len_ = 0; // no encapsulation
- }
- 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)
-{
- return visitor->visit_string (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_string, AST_String, be_type)
-IMPL_NARROW_FROM_DECL (be_string)
diff --git a/TAO/TAO_IDL/be/be_structure.cpp b/TAO/TAO_IDL/be/be_structure.cpp
deleted file mode 100644
index 0f9778ba764..00000000000
--- a/TAO/TAO_IDL/be/be_structure.cpp
+++ /dev/null
@@ -1,911 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_structure.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Structure that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Structure
- */
-be_structure::be_structure (void)
-{
-}
-
-be_structure::be_structure (UTL_ScopedName *n, UTL_StrList *p)
- : AST_Decl (AST_Decl::NT_struct, n, p),
- UTL_Scope (AST_Decl::NT_struct),
- member_count_ (-1)
-{
-}
-
-// compute total number of members
-int
-be_structure::compute_member_count (void)
-{
- UTL_ScopeActiveIterator *si; // iterator
- AST_Decl *d; // temp node
-
- this->member_count_ = 0;
-
- // if there are elements in this scope
- if (this->nmembers () > 0)
- {
- // instantiate a scope iterator.
- si = new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls);
-
- while (!(si->is_done ()))
- {
- // get the next AST decl node
- d = si->item ();
- this->member_count_++;
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-// return the member count
-int
-be_structure::member_count (void)
-{
- if (this->member_count_ == -1)
- this->compute_member_count ();
-
- return this->member_count_;
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// Generates the client-side header information for the structure
-int
-be_structure::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
-
-
- if (!this->cli_hdr_gen_) // not already generated
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_STRUCT_CH); // set current code gen state
-
- ch = cg->client_header ();
-
- ch->indent (); // start from whatever indentation level we were at
- *ch << "struct " << local_name () << nl;
- *ch << "{\n";
- ch->incr_indent (0);
-
- // generate code for field members
- if (be_scope::gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_structure::gen_client_header -"
- "codegen for scope failed\n"), -1);
- }
-
- ch->decr_indent ();
- *ch << "};\n\n";
-
- // generate var defn
- this->gen_var_defn ();
-
- // a class is generated for an out defn only for a variable length struct
- if (this->size_type () == be_decl::VARIABLE)
- {
- this->gen_out_defn ();
- }
- else
- {
- ch->indent ();
- *ch << "typedef " << this->local_name () << " &" << this->local_name
- () << "_out;\n\n";
- }
-
- // generate the typecode decl
- if (this->is_nested ())
- {
- // 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 "
- << idl_global->export_macro ()
- << " CORBA::TypeCode_ptr "
- << this->tc_name ()->last_component () << ";\n\n";
- }
- this->cli_hdr_gen_ = I_TRUE;
- cg->pop (); // pop up the current state
- }
- return 0;
-}
-
-// Generates the client-side stubs for the structure
-int
-be_structure::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
-
-
- if (!this->cli_stub_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_STRUCT_CS); // set current code gen state
-
- cs = cg->client_stubs ();
- // pass info
- cg->node (this);
-
- // generate the typecode information here
- cs->indent (); // start from current indentation level
- *cs << "static const CORBA::Long _oc_" << this->flatname () << "[] =" <<
- nl;
- *cs << "{\n";
- cs->incr_indent (0);
- // note that we just need the parameters here and hence we generate the
- // encapsulation for the parameters
- if (this->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_structure::gen_client_stubs -"
- "codegen for scope failed\n"), -1);
- }
- cs->decr_indent ();
- *cs << "};" << nl;
-
- *cs << "static CORBA::TypeCode _tc__tc_" << this->flatname () <<
- " (CORBA::tk_struct, sizeof (_oc_" << this->flatname () <<
- "), (char *) &_oc_" << this->flatname () <<
- ", CORBA::B_FALSE);" << nl;
- *cs << "CORBA::TypeCode_ptr " << this->tc_name () << " = &_tc__tc_" <<
- this->flatname () << ";\n\n";
- this->cli_stub_gen_ = I_TRUE;
- cg->pop ();
- }
-
- return 0;
-
-}
-
-// Generates the client-side inline information
-int
-be_structure::gen_client_inline (void)
-{
- if (!this->cli_inline_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_STRUCT_CI); // set current code gen state
-
- if (this->gen_var_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_structure::gen_client_inline -"
- "_var codegen failed\n"), -1);
- }
- if (this->size_type () == be_decl::VARIABLE && this->gen_out_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_structure::gen_client_inline -"
- "_out codegen failed\n"), -1);
- }
- if (be_scope::gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_structure::gen_client_inline -"
- "codegen for scope failed\n"), -1);
- }
- this->cli_inline_gen_ = I_TRUE;
- cg->pop ();
- }
- return 0;
-}
-
-// Generates the server-side header information for the structure
-int
-be_structure::gen_server_header (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side skeletons for the structure
-int
-be_structure::gen_server_skeletons (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_structure::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// generate the _var definition for ourself
-int
-be_structure::gen_var_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // names
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_var", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the var definition (always in the client header).
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ch->indent (); // start with whatever was our current indent level
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
- // default constr
- *ch << namebuf << " (void); // default constructor" << nl;
- // constr
- *ch << namebuf << " (" << local_name () << " *);" << nl;
- // copy constructor
- *ch << namebuf << " (const " << namebuf <<
- " &); // copy constructor" << nl;
- // destructor
- *ch << "~" << namebuf << " (void); // destructor" << nl;
- *ch << nl;
- // assignment operator from a pointer
- *ch << namebuf << " &operator= (" << local_name () << " *);" << nl;
- // assignment from _var
- *ch << namebuf << " &operator= (const " << namebuf << " &);" << nl;
-
- // arrow operator
- *ch << local_name () << " *operator-> (void);" << nl;
- *ch << "const " << local_name () << " *operator-> (void) const;" << nl;
- *ch << nl;
-
- // other extra types (cast operators, [] operator, and others)
- *ch << "operator const " << local_name () << " &() const;" << nl;
- *ch << "operator " << local_name () << " &();" << nl;
- *ch << "operator " << local_name () << " &() const;" << nl;
- *ch << "// in, inout, out, _retn " << nl;
- // the return types of in, out, inout, and _retn are based on the parameter
- // passing rules and the base type
- if (this->size_type () == be_decl::FIXED)
- {
- *ch << "const " << local_name () << " &in (void) const;" << nl;
- *ch << local_name () << " &inout (void);" << nl;
- *ch << local_name () << " &out (void);" << nl;
- *ch << local_name () << " _retn (void);" << nl;
- }
- else
- {
- *ch << "const " << local_name () << " &in (void) const;" << nl;
- *ch << local_name () << " &inout (void);" << nl;
- *ch << local_name () << " *&out (void);" << nl;
- *ch << local_name () << " *_retn (void);" << nl;
- }
-
- // generate an additional member function that returns the underlying pointer
- *ch << local_name () << " *ptr (void) const;\n";
-
- *ch << "\n";
- ch->decr_indent ();
-
- // generate the private section
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << " *ptr_;\n";
- ch->decr_indent ();
- *ch << "};\n\n";
-
- return 0;
-}
-
-// implementation of the _var class. All of these get generated in the inline
-// file
-int
-be_structure::gen_var_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _var names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_var", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_var", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // default constr
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname <<
- " (void) // default constructor" << nl;
- *ci << " " << ": ptr_ (0)" << nl;
- *ci << "{}\n\n";
-
- // constr from a pointer
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << " *p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (const " << fname <<
- " &p) // copy constructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (p.ptr_)" << nl;
- *ci << " this->ptr_ = new " << this->name () << "(*p.ptr_);" << nl;
- *ci << "else" << nl;
- *ci << " this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // destructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::~" << lname << " (void) // destructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from a pointer
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << name () <<
- " *p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _var
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (const " << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (this != &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = new " << this->name () << " (*p.ptr_);\n";
- ci->decr_indent ();
- *ci << "}" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // two arrow operators
- ci->indent ();
- *ci << "ACE_INLINE const " << this->name () << " *" << nl;
- *ci << fname << "::operator-> (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << " *" << nl;
- *ci << fname << "::operator-> (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - 3 cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator const " << name () <<
- " &() const // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << " &() // cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << " &() const// cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // in, inout, out, and _retn
- ci->indent ();
- *ci << "ACE_INLINE const " << name () << " &" << nl;
- *ci << fname << "::in (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << " &" << nl;
- *ci << fname << "::inout (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // the out is handled differently based on our size type
- ci->indent ();
- if (this->size_type () == be_decl::VARIABLE)
- {
- *ci << "// mapping for variable size " << nl;
- *ci << "ACE_INLINE " << name () << " *&" << nl;
- *ci << fname << "::out (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = 0;" << nl;
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << " *" << nl;
- *ci << fname << "::_retn (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << this->name () << " *tmp = this->ptr_;" << nl;
- *ci << "this->ptr_ = 0;" << nl;
- *ci << "return tmp;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- }
- else
- {
- *ci << "// mapping for fixed size " << nl;
- *ci << "ACE_INLINE " << name () << " &" << nl;
- *ci << fname << "::out (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << nl;
- *ci << fname << "::_retn (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- }
-
- // the additional ptr () member function
- ci->indent ();
- *ci << "ACE_INLINE " << name () << " *" << nl;
- *ci << fname << "::ptr (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- return 0;
-}
-
-// generate the _out definition
-int
-be_structure::gen_out_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // to hold the _out name
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the out definition (always in the client header)
- ch->indent (); // start with whatever was our current indent level
-
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
-
- // No default constructor
-
- // constructor from a pointer
- *ch << namebuf << " (" << local_name () << " *&);" << nl;
- // constructor from a _var &
- *ch << namebuf << " (" << local_name () << "_var &);" << nl;
- // constructor from a _out &
- *ch << namebuf << " (" << namebuf << " &);" << nl;
- // assignment operator from a _out &
- *ch << namebuf << " &operator= (" << namebuf << " &);" << nl;
- // assignment operator from a pointer &, cast operator, ptr fn, operator
- // -> and any other extra operators
- // assignment
- *ch << namebuf << " &operator= (" << local_name () << " *);" << nl;
- // operator ()
- *ch << "operator " << local_name () << " *&();" << nl;
- // ptr fn
- *ch << local_name () << " *&ptr (void);" << nl;
- // operator ->
- *ch << local_name () << " *operator-> (void);" << nl;
-
- *ch << "\n";
- ch->decr_indent ();
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << " *&ptr_;" << nl;
- *ch << "// assignment from T_var not allowed" << nl;
- *ch << "void operator= (const " << local_name () << "_var &);\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
- return 0;
-}
-
-int
-be_structure::gen_out_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _out names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_out", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // generate the var implementation in the inline file
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // constr from a pointer
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << " *&p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // constructor from _var &
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << this->name () <<
- "_var &p) // constructor from _var" << nl;
- *ci << " : ptr_ (p.out ())" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << fname <<
- " &p) // copy constructor" << nl;
- *ci << " : ptr_ (p.ptr_)" << nl;
- *ci << "{}\n\n";
-
- // assignment operator from _out &
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p.ptr_;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment from _var is not allowed by a private declaration
-
- // assignment operator from pointer
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << this->name () <<
- " *p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << this->name () <<
- " *&() // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // ptr function
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << " *&" << nl;
- *ci << fname << "::ptr (void) // ptr" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator ->
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << " *" << nl;
- *ci << fname << "::operator-> (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
-
- return 0;
-}
-
-// generate typecode.
-// Typecode for structures comprises the enumerated value followed by the
-// encapsulation of the parameters
-
-int
-be_structure::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "CORBA::tk_struct, // typecode kind" << nl;
- *cs << this->tc_encap_len () << ", // encapsulation length\n";
- // now emit the encapsulation
- cs->incr_indent (0);
- if (this->gen_encapsulation () == -1)
- {
- return -1;
- }
- cs->decr_indent ();
- return 0;
-}
-
-// generate encapsulation
-// An encapsulation for ourselves will be necessary when we are part of some
-// other IDL type and a typecode for that other type is being generated. This
-// will comprise our typecode kind. IDL types with parameters will additionally
-// have the encapsulation length and the entire typecode description
-int
-be_structure::gen_encapsulation (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- long i, arrlen;
- long *arr; // an array holding string names converted to array of longs
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "TAO_ENCAP_BYTE_ORDER, // byte order" << nl;
- // generate repoID
- *cs << (ACE_OS::strlen (this->repoID ())+1) << ", ";
- (void)this->tc_name2long (this->repoID (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // repository ID = " << this->repoID () << nl;
- // generate name
- *cs << (ACE_OS::strlen (this->local_name ()->get_string ())+1) << ", ";
- (void)this->tc_name2long(this->local_name ()->get_string (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // name = " << this->local_name () << nl;
- // generate the member count
- *cs << this->member_count () << ", // member count\n";
- cs->incr_indent (0);
- // hand over to the scope to generate the typecode for elements
- if (be_scope::gen_encapsulation () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_structure: cannot generate typecode for members\n"));
- return -1;
- }
- cs->decr_indent (0);
- return 0;
-}
-
-// compute typecode size
-long
-be_structure::tc_size (void)
-{
- // 4 bytes for enumeration, 4 bytes for storing encap length val, followed by the
- // actual encapsulation length
- return 4 + 4 + this->tc_encap_len ();
-}
-
-// compute encapsulation length
-long
-be_structure::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- this->encap_len_ = 4; // holds the byte order flag
-
- this->encap_len_ += this->repoID_encap_len (); // repoID
-
- // do the same thing for the local name
- this->encap_len_ += this->name_encap_len ();
-
- this->encap_len_ += 4; // to hold the member count
-
- // compute encap length for members
- this->encap_len_ += be_scope::tc_encap_len ();
- }
- return this->encap_len_;
-}
-
-// compute the size type of the node in question
-int
-be_structure::compute_size_type (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
-
- 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 ();
- bd = be_decl::narrow_from_decl (d);
- if (bd != 0)
- {
- // our sizetype depends on the sizetype of our members. Although
- // previous value of sizetype may get overwritten, we are
- // guaranteed by the "size_type" call that once the value reached
- // be_decl::VARIABLE, nothing else can overwrite it.
- this->size_type (bd->size_type ());
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l) be_structure::compute_size_type - "
- "narrow_from_decl returned 0\n"));
- }
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- 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)
-{
- return visitor->visit_structure (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS3 (be_structure, AST_Structure, be_scope, be_type)
-IMPL_NARROW_FROM_DECL (be_structure)
-IMPL_NARROW_FROM_SCOPE (be_structure)
diff --git a/TAO/TAO_IDL/be/be_sunsoft.cpp b/TAO/TAO_IDL/be/be_sunsoft.cpp
deleted file mode 100644
index f6bbac39a76..00000000000
--- a/TAO/TAO_IDL/be/be_sunsoft.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-#include "be_sunsoft.h"
-
-TAO_SunSoft_OutStream::TAO_SunSoft_OutStream (void)
- : TAO_OutStream ()
-{
-}
-
-TAO_SunSoft_OutStream::~TAO_SunSoft_OutStream (void)
-{
-}
-
-TAO_OutStream &
-TAO_SunSoft_OutStream::print (Identifier *id)
-{
- ACE_OS::fprintf (this->fp_, id->get_string ());
- return *this;
-}
-
-TAO_OutStream &
-TAO_SunSoft_OutStream::print (UTL_IdList *idl)
-{
- UTL_IdListActiveIterator *i = new UTL_IdListActiveIterator (idl);
- long first = I_TRUE;
- long second = I_FALSE;
-
- while (!(i->is_done ()))
- {
- if (!first)
- *this << "::";
- else if (second)
- first = second = I_FALSE;
- // print the identifier
- *this << i->item ();
- if (first)
- {
- if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0)
- // does not start with a ""
- first = I_FALSE;
- else
- second = I_TRUE;
- }
- i->next ();
- }
- return *this;
-}
-
-TAO_OutStream&
-TAO_SunSoft_OutStream::print (AST_Expression *expr)
-{
- AST_Expression::AST_ExprValue *ev = expr->ev ();
-
- if (ev)
- {
- switch (ev->et)
- {
- case AST_Expression::EV_short:
- this->TAO_OutStream::print ("%hd", ev->u.sval);
- break;
- case AST_Expression::EV_ushort:
- this->TAO_OutStream::print ("%hu", ev->u.usval);
- break;
- case AST_Expression::EV_long:
- this->TAO_OutStream::print ("%ld", ev->u.lval);
- break;
- case AST_Expression::EV_ulong:
- this->TAO_OutStream::print ("%ld", ev->u.ulval);
- break;
- case AST_Expression::EV_longlong:
- break;
- case AST_Expression::EV_ulonglong:
- break;
- case AST_Expression::EV_float:
- this->TAO_OutStream::print ("%f", ev->u.fval);
- break;
- case AST_Expression::EV_double:
- this->TAO_OutStream::print ("%f", ev->u.dval);
- break;
- case AST_Expression::EV_longdouble:
- break;
- case AST_Expression::EV_char:
- this->TAO_OutStream::print ("'%c'", ev->u.cval);
- break;
- case AST_Expression::EV_wchar:
- break;
- case AST_Expression::EV_octet:
- this->TAO_OutStream::print ("%c", ev->u.oval);
- break;
- case AST_Expression::EV_bool:
- this->TAO_OutStream::print ("%ld", ev->u.bval);
- break;
- case AST_Expression::EV_string:
- this->TAO_OutStream::print ("\"%s\"", ev->u.strval->get_string ());
- break;
- case AST_Expression::EV_wstring:
- break;
- default:
- break;
- }
- }
- else //
- {
- // XXXASG: need to add code here
- }
- return *this;
-}
diff --git a/TAO/TAO_IDL/be/be_type.cpp b/TAO/TAO_IDL/be/be_type.cpp
deleted file mode 100644
index 79484c523eb..00000000000
--- a/TAO/TAO_IDL/be/be_type.cpp
+++ /dev/null
@@ -1,285 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_type.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Type that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Type
- */
-
-be_type::be_type (void)
- : tc_name_ (0),
- type_name_ (0),
- nested_type_name_ (0)
-{
-}
-
-be_type::be_type (AST_Decl::NodeType nt, UTL_ScopedName *n, UTL_StrList *p)
- : AST_Decl (nt, n, p),
- tc_name_ (0),
- type_name_ (0),
- nested_type_name_ (0)
-{
-}
-
-be_type::~be_type (void)
-{
- if (this->nested_type_name_ != 0)
- {
- delete[] this->nested_type_name_;
- this->nested_type_name_ = 0;
- }
-}
-
-// compute the typecode name. The idea is to use the fully scoped name,
-// however, prepend a _tc_ to the last component. A slightly different approach
-// is required of the predefined types. Hence this method is overridden for
-// predefined types.
-
-void
-be_type::compute_tc_name (void)
-{
- static char namebuf [NAMEBUFSIZE];
- UTL_ScopedName *n;
-
- this->tc_name_ = NULL;
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- n = this->name ();
- while (n->tail () != NULL)
- {
- if (!this->tc_name_)
- {
- // does not exist
- this->tc_name_ = new UTL_ScopedName (n->head (), NULL);
- }
- else
- {
- this->tc_name_->nconc (new UTL_ScopedName (n->head (), NULL));
- }
- n = (UTL_ScopedName *)n->tail ();
- }
- ACE_OS::sprintf (namebuf, "_tc_%s", n->last_component ()->get_string ());
- if (!this->tc_name_)
- {
- // does not exist
- this->tc_name_ = new UTL_ScopedName (new Identifier (ACE_OS::strdup
- (namebuf), 1, 0, I_FALSE), NULL);
- }
- else
- {
- this->tc_name_->nconc (new UTL_ScopedName (new Identifier (ACE_OS::strdup
- (namebuf), 1,
- 0, I_FALSE), NULL));
- }
- return;
-}
-
-// retrieve typecode name
-UTL_ScopedName *
-be_type::tc_name (void)
-{
- if (!this->tc_name_)
- compute_tc_name ();
-
- return this->tc_name_;
-}
-
-// XXXASG - This code works. However, whether we should generate the
-// ACE_NESTED_CLASS macro or not should be based on an option to the
-// compiler. In this version, we choose to generate a relative path.
-
-// return the type name using the ACE_NESTED_CLASS macro
-const char *
-be_type::nested_type_name (be_decl *use_scope, const char *suffix)
-{
- // 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.
- //
-
- // 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
- // need to ensure that it was not defined in any of our ancestor
- // scopes as well. If that is the case, then we can generate a fully
- // scoped name for that type, else we use the ACE_NESTED_CLASS macro
-
- // thus we need some sort of relative name to be generated
-
- if (this->nested_type_name_ == 0)
- ACE_NEW_RETURN (this->nested_type_name_, char[NAMEBUFSIZE], 0);
-
- be_decl *def_scope = 0; // our defining scope
- char // hold the fully scoped name
- def_name [NAMEBUFSIZE],
- use_name [NAMEBUFSIZE];
- char // these point to the curr and next component in the scope
- *def_curr = def_name,
- *def_next,
- *use_curr = use_name,
- *use_next;
-
- ACE_OS::memset (this->nested_type_name_, '\0', NAMEBUFSIZE);
- ACE_OS::memset (def_name, '\0', NAMEBUFSIZE);
- ACE_OS::memset (use_name, '\0', NAMEBUFSIZE);
-
- // traverse every component of the def_scope and use_scope beginning at the
- // root and proceeding towards the leaf trying to see if the components
- // match. Continue until there is a match and keep accumulating the path
- // traversed. This forms the first argument to the ACE_NESTED_CLASS
- // macro. Whenever there is no match, the remaining components of the
- // def_scope form the second argument
-
- def_scope = ((this->defined_in ())?
- (be_scope::narrow_from_scope (this->defined_in ())->decl ()):
- 0);
-
- if (def_scope && def_scope->node_type () != AST_Decl::NT_root && use_scope)
- // if both scopes exist and that we are not in the root scope
- {
- ACE_OS::strcpy (def_name, def_scope->fullname ());
- ACE_OS::strcpy (use_name, use_scope->fullname ());
-
- // find the first occurrence of a :: and advance the next pointers accordingly
- def_next = ACE_OS::strstr (def_curr, "::");
- use_next = ACE_OS::strstr (use_curr, "::");
-
- if (def_next)
- *def_next = 0;
-
- if (use_next)
- *use_next = 0;
-
- if (!ACE_OS::strcmp (def_curr, use_curr))
- {
- // initial prefix matches i.e., they have a common root
- // start by initializing the macro
-
- //@@ ACE_OS::sprintf (this->nested_type_name_, "ACE_NESTED_CLASS (");
- //@@ ACE_OS::strcat (this->nested_type_name_, def_curr); // initialize the first argument
-
- def_curr = (def_next ? (def_next+2) : 0); // skip the ::
- use_curr = (use_next ? (use_next+2) : 0); // skip the ::
-
- while (def_curr && use_curr)
- {
- // find the first occurrence of a :: and advance the next pointers accordingly
- def_next = ACE_OS::strstr (def_curr, "::");
- use_next = ACE_OS::strstr (use_curr, "::");
-
- if (def_next)
- *def_next = 0;
-
- if (use_next)
- *use_next = 0;
-
- if (!ACE_OS::strcmp (def_curr, use_curr))
- {
- // they have same prefix, append to arg1
- //@@ ACE_OS::strcat (this->nested_type_name_, "::");
- //@@ ACE_OS::strcat (this->nested_type_name_, def_curr);
- def_curr = (def_next ? (def_next+2) : 0); // skip the ::
- use_curr = (use_next ? (use_next+2) : 0); // skip the ::
- }
- else
- {
- // no match. This is the end of the first argument. Get out
- // of the loop as no more comparisons are necessary
- break;
- }
- }
-
- // start the 2nd argument of the macro
- //@@ ACE_OS::strcat (this->nested_type_name_, ", ");
-
- // copy the remaining def_name (if any left)
- if (def_curr)
- ACE_OS::strcat (this->nested_type_name_, def_curr);
-
- // append our local name
- ACE_OS::strcat (this->nested_type_name_, this->local_name ()->get_string ());
- if (suffix)
- ACE_OS::strcat (this->nested_type_name_, suffix);
- //@@ ACE_OS::strcat (this->nested_type_name_, ")");
- return this->nested_type_name_;
- } // end of if the root prefixes match
- }
-
- // otherwise just emit our fullname
- ACE_OS::sprintf (this->nested_type_name_, this->fullname ());
- if (suffix)
- ACE_OS::strcat (this->nested_type_name_, suffix);
-
- return this->nested_type_name_;
-}
-
-// *****************************
-// CODE GENERATION
-// *****************************
-
-// generate the _var definition for ourself
-int
-be_type::gen_var_defn (void)
-{
- return 0;
-}
-
-// implementation of the _var class. All of these get generated in the inline
-// file
-int
-be_type::gen_var_impl (void)
-{
- return 0;
-}
-
-// generate the _out definition
-int
-be_type::gen_out_defn (void)
-{
- return 0;
-}
-
-int
-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)
-{
- return visitor->visit_type (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_type, AST_Type, be_decl)
-IMPL_NARROW_FROM_DECL (be_type)
diff --git a/TAO/TAO_IDL/be/be_typedef.cpp b/TAO/TAO_IDL/be/be_typedef.cpp
deleted file mode 100644
index 2d7885d18db..00000000000
--- a/TAO/TAO_IDL/be/be_typedef.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_typedef.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Typedef that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-be_typedef::be_typedef (void)
-{
-}
-
-be_typedef::be_typedef (AST_Type *bt, UTL_ScopedName *n, UTL_StrList *p)
- : AST_Typedef (bt, n, p),
- AST_Decl (AST_Decl::NT_typedef, n, p)
-{
-}
-
-// given a typedef node, traverse the chain of base types until they are no
-// more typedefs, and return that most primitive base type
-be_type *
-be_typedef::primitive_base_type (void)
-{
- be_type *d;
-
- d = this;
- while (d && d->node_type () == AST_Decl::NT_typedef)
- {
- be_typedef *temp; // temporary
-
- temp = be_typedef::narrow_from_decl (d);
- d = be_type::narrow_from_decl (temp->base_type ());
- }
- return d;
-}
-
-int
-be_typedef::gen_client_header (void)
-{
- be_type *bt; // type node
- be_state *s; // state based code gen object
- TAO_OutStream *ch; // client header
-
- if (!this->cli_hdr_gen_) // not already generated
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- ch = cg->client_header ();
- cg->push (TAO_CodeGen::TAO_TYPEDEF_CH);
- s = cg->make_state ();
-
- bt = be_type::narrow_from_decl (this->base_type ());
- // first generate the mapping for our type. As a side effect, also
- // generate the mapping for the typedef
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR ((LM_ERROR, "be_typedef: error generating code for base type\n"));
- return -1;
- }
-
- // generate the typecode decl for this typedef node
- if (this->is_nested ())
- {
- // 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 "
- << idl_global->export_macro ()
- << " CORBA::TypeCode_ptr "
- << this->tc_name ()->last_component () << ";\n\n";
- }
-
- cg->pop ();
- this->cli_hdr_gen_ = I_TRUE;
- }
- return 0;
-}
-
-int
-be_typedef::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- be_type *bt;
- be_state *s; // state based code gen object
-
- if (!this->cli_stub_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_TYPEDEF_CS); // set current code gen state
-
- cs = cg->client_stubs ();
-
- s = cg->make_state ();
-
- bt = be_type::narrow_from_decl (this->base_type ());
- // first generate the mapping for our type. As a side effect, also
- // generate the mapping for the typedef
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR ((LM_ERROR, "be_typedef: error generating code for base type\n"));
- return -1;
- }
-
- // generate the typecode information here
- cs->indent (); // start from current indentation level
- *cs << "static const CORBA::Long _oc_" << this->flatname () << "[] =" <<
- nl;
- *cs << "{\n";
- cs->incr_indent (0);
- if (this->gen_encapsulation () == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error generating typecode\n\n"));
- return -1;
- }
- cs->decr_indent ();
- *cs << "};" << nl;
-
- *cs << "static CORBA::TypeCode _tc__tc_" << this->flatname () <<
- " (CORBA::tk_alias, sizeof (_oc_" << this->flatname () <<
- "), (char *) &_oc_" << this->flatname () <<
- ", CORBA::B_FALSE);" << nl;
- *cs << "CORBA::TypeCode_ptr " << this->tc_name () << " = &_tc__tc_" <<
- this->flatname () << ";\n\n";
-
-
- this->cli_stub_gen_ = I_TRUE;
- cg->pop ();
- }
-
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_typedef::gen_client_inline (void)
-{
- be_type *bt; // type node
- be_state *s; // state based code gen object
-
- if (!this->cli_inline_gen_) // not already generated
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cg->push (TAO_CodeGen::TAO_TYPEDEF_CI);
- s = cg->make_state ();
-
- bt = be_type::narrow_from_decl (this->base_type ());
- // first generate the mapping for our type
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR ((LM_ERROR, "be_typedef: error generating code for base type\n"));
- return -1;
- }
-
- cg->pop ();
- this->cli_inline_gen_ = I_TRUE;
- }
- return 0;
-}
-
-int
-be_typedef::gen_server_header (void)
-{
- return 0;
-}
-
-int
-be_typedef::gen_server_skeletons (void)
-{
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_typedef::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-int
-be_typedef::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "CORBA::tk_alias, // typecode kind for typedefs" << nl;
- *cs << this->tc_encap_len () << ", // encapsulation length\n";
- // now emit the encapsulation
- cs->incr_indent (0);
- if (this->gen_encapsulation () == -1)
- {
- return -1;
- }
-
- cs->decr_indent (0);
- return 0;
-}
-
-// generate encapsulation. A typedef is an alias to its base type
-int
-be_typedef::gen_encapsulation (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- long i, arrlen;
- long *arr; // an array holding string names converted to array of longs
- be_type *bt; // base type
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "TAO_ENCAP_BYTE_ORDER, // byte order" << nl;
- // generate repoID
- *cs << (ACE_OS::strlen (this->repoID ())+1) << ", ";
- (void)this->tc_name2long (this->repoID (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // repository ID = " << this->repoID () << nl;
-
- // generate name
- *cs << (ACE_OS::strlen (this->local_name ()->get_string ())+1) << ", ";
- (void)this->tc_name2long(this->local_name ()->get_string (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // name = " << this->local_name () << "\n";
-
- // generate typecode for the base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt || (bt->gen_typecode () == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_typedef::gen_encapsulation failed for base type\n"),
- -1);
- }
- return 0;
-}
-
-long
-be_typedef::tc_size (void)
-{
- // 4 bytes for enumeration, 4 bytes for storing encap length val, followed by the
- // actual encapsulation length
- return 4 + 4 + this->tc_encap_len ();
-}
-
-long
-be_typedef::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- be_type *bt; // base type
- this->encap_len_ = 4; // holds the byte order flag
-
- this->encap_len_ += this->repoID_encap_len (); // repoID
-
- // do the same thing for the local name
- this->encap_len_ += this->name_encap_len ();
-
- // add the encapsulation length of our base type
- bt = be_type::narrow_from_decl (this->base_type ());
- if (!bt)
- {
- ACE_ERROR ((LM_ERROR,
- "be_typedef::tc_encap_len - bad base type\n"));
- return 0;
- }
- this->encap_len_ += bt->tc_size ();
-
- }
- return this->encap_len_;
-}
-
-// compute the size type of the node in question
-int
-be_typedef::compute_size_type (void)
-{
- be_type *type = be_type::narrow_from_decl (this->base_type ());
- if (!type)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_typedef::compute_size_type - "
- "bad base type\n"), -1);
- }
-
- // our size type is the same as our type
- this->size_type (type->size_type ());
- 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)
-{
- return visitor->visit_typedef (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_typedef, AST_Typedef, be_type)
-IMPL_NARROW_FROM_DECL (be_typedef)
diff --git a/TAO/TAO_IDL/be/be_union.cpp b/TAO/TAO_IDL/be/be_union.cpp
deleted file mode 100644
index 46ea8ec2931..00000000000
--- a/TAO/TAO_IDL/be/be_union.cpp
+++ /dev/null
@@ -1,1190 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_union.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_Union that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_Union
- */
-
-be_union::be_union (void)
-{
-}
-
-be_union::be_union (AST_ConcreteType *dt, UTL_ScopedName *n, UTL_StrList *p)
- : AST_Union (dt, n, p),
- AST_Structure (AST_Decl::NT_union, n, p),
- AST_Decl (AST_Decl::NT_union, n, p),
- UTL_Scope (AST_Decl::NT_union),
- member_count_ (-1),
- default_index_ (-2)
-{
-}
-
-// compute total number of members
-int
-be_union::compute_member_count (void)
-{
- UTL_ScopeActiveIterator *si; // iterator
- AST_Decl *d; // temp node
-
- this->member_count_ = 0;
-
- // if there are elements in this scope
- if (this->nmembers () > 0)
- {
- // instantiate a scope iterator.
- si = new UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls);
-
- while (!(si->is_done ()))
- {
- // get the next AST decl node
- d = si->item ();
- this->member_count_++;
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-// compute total number of members
-int
-be_union::compute_default_index (void)
-{
- UTL_ScopeActiveIterator *si; // iterator
- AST_Decl *d; // temp node
- be_union_branch *bub; // union branch node
- int i = 0; // counter
-
- this->default_index_ = -1; // if not used at all, this is the value it will
- // take
-
- // if there are elements in this scope
- if (this->nmembers () > 0)
- {
- // instantiate a scope iterator.
- 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 ())
- {
- bub = be_union_branch::narrow_from_decl (d);
- if (bub->label ()->label_kind () == AST_UnionLabel::UL_default)
- this->default_index_ = i; // zero based indexing
- i++;
- }
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-// return the member count
-int
-be_union::member_count (void)
-{
- if (this->member_count_ == -1)
- this->compute_member_count ();
-
- return this->member_count_;
-}
-
-// return the default_index
-int
-be_union::default_index (void)
-{
- if (this->default_index_ == -2)
- this->compute_default_index ();
-
- return this->default_index_;
-}
-
-
-// ****************************
-// code generation
-// ****************************
-
-int
-be_union::gen_client_header (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- be_type *bt; // type node
- be_state *s; // code generation state
-
- if (!this->cli_hdr_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the ifdefined macro for the array type
- ch->gen_ifdef_macro (this->flatname ());
- ch->indent (); // start with the current indentation level
- *ch << "class " << idl_global->export_macro ()
- << " " << local_name () << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
-
- // generate default and copy constructors
- *ch << local_name () << " (void); // default constructor" << nl;
- *ch << local_name () << " (const " << local_name () <<
- " &); // copy constructor" << nl;
- // generate destructor
- *ch << "~" << local_name () << " (void); // destructor" << nl;
- // generate assignment operator
- *ch << local_name () << " &operator= (const " << local_name () <<
- " &); // copy constructor\n\n";
-
- // the discriminant type may have to be defined here if it was an enum
- // declaration inside of the union statement.
-
- cg->push (TAO_CodeGen::TAO_UNION_DISCTYPEDEFN_CH); // set current code gen state
- bt = be_type::narrow_from_decl (this->disc_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_header - "
- "bad disciminant type\n"), -1);
- }
-
- s = cg->make_state (); // get the code gen object for the current state
- if (!s)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_header - "
- "bad state\n"), -1);
- }
-
- if (s->gen_code (bt, this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_header - "
- "codegen for discriminant failed\n"), -1);
- }
- cg->pop (); // revert to previous state
-
- // now generate the public defn for the union branch members
- cg->push (TAO_CodeGen::TAO_UNION_PUBLIC_CH); // set current code gen state
- if (be_scope::gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_header - "
- "codegen for public defn of union members\n"),
- -1);
- }
-
- cg->pop ();
-
- // now generate the private data members of the union
- cg->push (TAO_CodeGen::TAO_UNION_PRIVATE_CH); // set current code gen state
- ch->decr_indent ();
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << bt->nested_type_name (this) << " disc_;" << nl; // emit the
- // ACE_NESTED_CLASS macro
-
- // the members are inside of a union
- *ch << "union" << nl;
- *ch << "{\n";
- ch->incr_indent (0);
- if (be_scope::gen_client_header () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_header - "
- "codegen for private members of union\n"), -1);
- }
-
- ch->decr_indent ();
- *ch << "}; // end of union\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
-
- // Generate the typecode decl
- if (this->is_nested ())
- {
- // 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 "
- << idl_global->export_macro ()
- << " CORBA::TypeCode_ptr "
- << this->tc_name ()->last_component () << ";\n\n";
- }
- ch->gen_endif ();
-
- // generate the ifdefined macro for the array type
- ch->gen_ifdef_macro (this->flatname (), "_var");
- // generate var defn
- if (this->gen_var_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_header - "
- "codegen for _var\n"), -1);
- }
- ch->gen_endif ();
-
- // generate the ifdefined macro for the array type
- ch->gen_ifdef_macro (this->flatname (), "_out");
- // a class is generated for an out defn only for a variable length struct
- if (this->size_type () == be_decl::VARIABLE)
- {
- if (this->gen_out_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_header - "
- "codegen for _out\n"), -1);
- }
- }
- else
- {
- ch->indent ();
- *ch << "typedef " << this->local_name () << " &" << this->local_name
- () << "_out;\n\n";
- }
- ch->gen_endif ();
-
- cg->pop ();
- this->cli_hdr_gen_ = I_TRUE;
- }
- return 0;
-}
-
-int
-be_union::gen_client_stubs (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
-
- if (!this->cli_stub_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- cs = cg->client_stubs ();
-
- // first generate code for any of the members (if required, e.g.,
- // anonymous sequences, structs, unions, arrays)
- cg->push (TAO_CodeGen::TAO_UNION_PUBLIC_CS); // set current code gen state
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_stubs - "
- "codegen for scope failed\n"), -1);
- }
- cg->pop ();
-
- // now generate the operations on the union such as the copy constructor
- // and the assignment operator
-
- *cs << "// *************************************************************"
- << nl;
- *cs << "// Operations for union " << this->name () << nl;
- *cs << "// *************************************************************\n\n";
-
- cg->push (TAO_CodeGen::TAO_UNION_PUBLIC_ASSIGN_CS);
-
- // generate the copy constructor and the assignment operator here
- cs->indent ();
- *cs << "// copy constructor" << nl;
- *cs << this->name () << "::" << this->local_name () << " (const " <<
- this->name () << " &u)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- // first set the discriminant
- *cs << "this->disc_ = u.disc_;" << nl;
- // now switch based on the disc value
- *cs << "switch (this->disc_)" << nl;
- *cs << "{\n";
- cs->incr_indent (0);
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_stubs - "
- "codegen for scope failed\n"), -1);
- }
-
- cs->decr_indent ();
- *cs << "}\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // assignment operator
- cs->indent ();
- *cs << "// assignment operator" << nl;
- *cs << this->name () << " &" << nl; // return type
- *cs << this->name () << "::operator= (const " <<
- this->name () << " &u)" << nl;
- *cs << "{\n";
- cs->incr_indent ();
- // first set the discriminant
- *cs << "this->disc_ = u.disc_;" << nl;
- // now switch based on the disc value
- *cs << "switch (this->disc_)" << nl;
- *cs << "{\n";
- cs->incr_indent (0);
- if (be_scope::gen_client_stubs () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_stubs - "
- "codegen for scope failed\n"), -1);
- }
-
- cs->decr_indent ();
- *cs << "}" << nl;
- *cs << "return *this;\n";
- cs->decr_indent ();
- *cs << "}\n\n";
-
- // generate the typecode information here
- cs->indent (); // start from current indentation level
- *cs << "static const CORBA::Long _oc_" << this->flatname () << "[] =" <<
- nl;
- *cs << "{\n";
- cs->incr_indent (0);
- if (this->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_stubs - "
- "codegen for encapsulation failed\n"), -1);
- }
-
- cs->decr_indent ();
- *cs << "};" << nl;
-
- *cs << "static CORBA::TypeCode _tc__tc_" << this->flatname () <<
- " (CORBA::tk_union, sizeof (_oc_" << this->flatname () <<
- "), (char *) &_oc_" << this->flatname () <<
- ", CORBA::B_FALSE);" << nl;
- *cs << "CORBA::TypeCode_ptr " << this->tc_name () << " = &_tc__tc_" <<
- this->flatname () << ";\n\n";
- this->cli_stub_gen_ = I_TRUE;
- cg->pop ();
- }
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_union::gen_client_inline (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- be_type *bt; // type node
- be_state *s; // code generation state
-
-
- if (!this->cli_inline_gen_)
- {
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- ci = cg->client_inline ();
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for union " << this->name () << nl;
- *ci << "// *************************************************************\n\n";
-
- // generate the default constructor and the destructor here
- ci->indent ();
- *ci << "// default constructor" << nl;
- *ci << "ACE_INLINE" << nl;
- *ci << this->name () << "::" << this->local_name () << " (void)" << nl;
- *ci << "{" << nl;
- *ci << "}" << nl << nl;
-
- *ci << "// destructor" << nl;
- *ci << "ACE_INLINE" << nl;
- *ci << this->name () << "::~" << this->local_name () << " (void)" << nl;
- *ci << "{" << nl;
- *ci << "}\n\n";
-
- // the discriminant type may have to be defined here if it was an enum
- // declaration inside of the union statement.
-
- cg->push (TAO_CodeGen::TAO_UNION_DISCTYPEDEFN_CI); // set current code gen state
- bt = be_type::narrow_from_decl (this->disc_type ());
-
- s = cg->make_state (); // get the code gen object for the current state
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR ((LM_ERROR, "be_union::gen_client_header\n"));
- ACE_ERROR ((LM_ERROR, "Discriminant type generation failure\n"));
- return -1;
- }
- cg->pop ();
-
- // now generate the implementation of the access methods
- cg->push (TAO_CodeGen::TAO_UNION_PUBLIC_CI); // set current code gen state
- if (be_scope::gen_client_inline () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_inline - "
- "codegen for scope failed\n"), -1);
- }
-
- cg->pop ();
-
- // generate the ifdefined macro for the array type
- ci->gen_ifdef_macro (this->flatname (), "_var");
- if (this->gen_var_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_inline - "
- "codegen for _var failed\n"), -1);
- }
- ci->gen_endif ();
-
- // generate the ifdefined macro for the array type
- ci->gen_ifdef_macro (this->flatname (), "_out");
- if (this->size_type () == be_decl::VARIABLE && this->gen_out_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union::"
- "gen_client_inline - "
- "codegen for _out failed\n"), -1);
- }
- ci->gen_endif ();
-
- this->cli_inline_gen_ = I_TRUE;
- }
- return 0;
-}
-
-int
-be_union::gen_server_header (void)
-{
- return 0;
-}
-
-int
-be_union::gen_server_skeletons (void)
-{
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_union::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-// generate typecode.
-// Typecode for union comprises the enumerated value followed by the
-// encapsulation of the parameters
-
-// generate the _var definition for ourself
-int
-be_union::gen_var_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // names
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_var", this->local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the var definition (always in the client header).
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- ch->indent (); // start with whatever was our current indent level
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
- // default constr
- *ch << namebuf << " (void); // default constructor" << nl;
- // constr
- *ch << namebuf << " (" << local_name () << " *);" << nl;
- // copy constructor
- *ch << namebuf << " (const " << namebuf <<
- " &); // copy constructor" << nl;
- // destructor
- *ch << "~" << namebuf << " (void); // destructor" << nl;
- *ch << nl;
- // assignment operator from a pointer
- *ch << namebuf << " &operator= (" << local_name () << " *);" << nl;
- // assignment from _var
- *ch << namebuf << " &operator= (const " << namebuf << " &);" << nl;
-
- // arrow operator
- *ch << local_name () << " *operator-> (void);" << nl;
- *ch << "const " << local_name () << " *operator-> (void) const;" << nl;
- *ch << nl;
-
- // other extra types (cast operators, [] operator, and others)
- *ch << "operator const " << local_name () << " &() const;" << nl;
- *ch << "operator " << local_name () << " &();" << nl;
- *ch << "operator " << local_name () << " &() const;" << nl;
- *ch << "// in, inout, out, _retn " << nl;
- // the return types of in, out, inout, and _retn are based on the parameter
- // passing rules and the base type
- if (this->size_type () == be_decl::FIXED)
- {
- *ch << "const " << local_name () << " &in (void) const;" << nl;
- *ch << local_name () << " &inout (void);" << nl;
- *ch << local_name () << " &out (void);" << nl;
- *ch << local_name () << " _retn (void);" << nl;
- }
- else
- {
- *ch << "const " << local_name () << " &in (void) const;" << nl;
- *ch << local_name () << " &inout (void);" << nl;
- *ch << local_name () << " *&out (void);" << nl;
- *ch << local_name () << " *_retn (void);" << nl;
- }
-
- // generate an additional member function that returns the underlying pointer
- *ch << local_name () << " *ptr(void) const;\n";
-
- *ch << "\n";
- ch->decr_indent ();
-
- // generate the private section
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << " *ptr_;\n";
- ch->decr_indent ();
- *ch << "};\n\n";
-
- return 0;
-}
-
-// implementation of the _var class. All of these get generated in the inline
-// file
-int
-be_union::gen_var_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _var names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_var", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_var", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // default constr
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname <<
- " (void) // default constructor" << nl;
- *ci << " " << ": ptr_ (0)" << nl;
- *ci << "{}\n\n";
-
- // constr from a pointer
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << " *p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (const " << fname <<
- " &p) // copy constructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (p.ptr_)" << nl;
- *ci << " this->ptr_ = new " << this->name () << "(*p.ptr_);" << nl;
- *ci << "else" << nl;
- *ci << " this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // destructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::~" << lname << " (void) // destructor" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from a pointer
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << name () <<
- " *p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment operator from _var
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (const " << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "if (this != &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = new " << this->name () << " (*p.ptr_);\n";
- ci->decr_indent ();
- *ci << "}" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // two arrow operators
- ci->indent ();
- *ci << "ACE_INLINE const " << this->name () << " *" << nl;
- *ci << fname << "::operator-> (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << " *" << nl;
- *ci << fname << "::operator-> (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - 3 cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator const " << name () <<
- " &() const // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << " &() // cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << name () << " &() const// cast " << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // in, inout, out, and _retn
- ci->indent ();
- *ci << "ACE_INLINE const " << name () << " &" << nl;
- *ci << fname << "::in (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << " &" << nl;
- *ci << fname << "::inout (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // the out is handled differently based on our size type
- ci->indent ();
- if (this->size_type () == be_decl::VARIABLE)
- {
- *ci << "// mapping for variable size " << nl;
- *ci << "ACE_INLINE " << name () << " *&" << nl;
- *ci << fname << "::out (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = 0;" << nl;
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << " *" << nl;
- *ci << fname << "::_retn (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << this->name () << " *tmp = this->ptr_;" << nl;
- *ci << "this->ptr_ = 0;" << nl;
- *ci << "return tmp;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- }
- else
- {
- *ci << "// mapping for fixed size " << nl;
- *ci << "ACE_INLINE " << name () << " &" << nl;
- *ci << fname << "::out (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- ci->indent ();
- *ci << "ACE_INLINE " << name () << nl;
- *ci << fname << "::_retn (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return *this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // the additional ptr () member function
- ci->indent ();
- *ci << "ACE_INLINE " << name () << " *" << nl;
- *ci << fname << "::ptr (void) const" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- }
-
- return 0;
-}
-
-// generate the _out definition
-int
-be_union::gen_out_defn (void)
-{
- TAO_OutStream *ch; // output stream
- TAO_NL nl; // end line
- char namebuf [NAMEBUFSIZE]; // to hold the _out name
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ch = cg->client_header ();
-
- // generate the out definition (always in the client header)
- ch->indent (); // start with whatever was our current indent level
-
- *ch << "class " << idl_global->export_macro ()
- << " " << namebuf << nl;
- *ch << "{" << nl;
- *ch << "public:\n";
- ch->incr_indent ();
-
- // No default constructor
-
- // constructor from a pointer
- *ch << namebuf << " (" << local_name () << " *&);" << nl;
- // constructor from a _var &
- *ch << namebuf << " (" << local_name () << "_var &);" << nl;
- // constructor from a _out &
- *ch << namebuf << " (" << namebuf << " &);" << nl;
- // assignment operator from a _out &
- *ch << namebuf << " &operator= (" << namebuf << " &);" << nl;
- // assignment operator from a pointer &, cast operator, ptr fn, operator
- // -> and any other extra operators
- // assignment
- *ch << namebuf << " &operator= (" << local_name () << " *);" << nl;
- // operator ()
- *ch << "operator " << local_name () << " *&();" << nl;
- // ptr fn
- *ch << local_name () << " *&ptr (void);" << nl;
- // operator ->
- *ch << local_name () << " *operator-> (void);" << nl;
-
- *ch << "\n";
- ch->decr_indent ();
- *ch << "private:\n";
- ch->incr_indent ();
- *ch << local_name () << " *&ptr_;" << nl;
- *ch << "// assignment from T_var not allowed" << nl;
- *ch << "void operator= (const " << local_name () << "_var &);\n";
-
- ch->decr_indent ();
- *ch << "};\n\n";
- return 0;
-}
-
-int
-be_union::gen_out_impl (void)
-{
- TAO_OutStream *ci; // output stream
- TAO_NL nl; // end line
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _out names
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_out", this->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_out", local_name ()->get_string ());
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- ci = cg->client_inline ();
-
- // generate the var implementation in the inline file
-
- ci->indent (); // start with whatever was our current indent level
-
- *ci << "// *************************************************************"
- << nl;
- *ci << "// Inline operations for class " << fname << nl;
- *ci << "// *************************************************************\n\n";
-
- // constr from a pointer
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << name () << " *&p)" << nl;
- *ci << " : ptr_ (p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // constructor from _var &
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << this->name () <<
- "_var &p) // constructor from _var" << nl;
- *ci << " : ptr_ (p.out ())" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "delete this->ptr_;" << nl;
- *ci << "this->ptr_ = 0;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // copy constructor
- ci->indent ();
- *ci << "ACE_INLINE" << nl;
- *ci << fname << "::" << lname << " (" << fname <<
- " &p) // copy constructor" << nl;
- *ci << " : ptr_ (p.ptr_)" << nl;
- *ci << "{}\n\n";
-
- // assignment operator from _out &
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << fname <<
- " &p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p.ptr_;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // assignment from _var is not allowed by a private declaration
-
- // assignment operator from pointer
- ci->indent ();
- *ci << "ACE_INLINE " << fname << " &" << nl;
- *ci << fname << "::operator= (" << this->name () <<
- " *p)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "this->ptr_ = p;" << nl;
- *ci << "return *this;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // other extra methods - cast operator ()
- ci->indent ();
- *ci << "ACE_INLINE " << nl;
- *ci << fname << "::operator " << this->name () <<
- " *&() // cast" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // ptr function
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << " *&" << nl;
- *ci << fname << "::ptr (void) // ptr" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
- // operator ->
- ci->indent ();
- *ci << "ACE_INLINE " << this->name () << " *" << nl;
- *ci << fname << "::operator-> (void)" << nl;
- *ci << "{\n";
- ci->incr_indent ();
- *ci << "return this->ptr_;\n";
- ci->decr_indent ();
- *ci << "}\n\n";
-
-
- return 0;
-}
-
-int
-be_union::gen_typecode (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "CORBA::tk_union, // typecode kind" << nl;
- *cs << this->tc_encap_len () << ", // encapsulation length\n";
- // now emit the encapsulation
- return this->gen_encapsulation ();
-}
-
-// generate encapsulation.
-// An encapsulation for ourselves will be necessary when we are part of some
-// other IDL type and a typecode for that other type is being generated. This
-// will comprise our typecode kind. IDL types with parameters will additionally
-// have the encapsulation length and the entire typecode description
-
-int
-be_union::gen_encapsulation (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- long i, arrlen;
- long *arr; // an array holding string names converted to array of longs
- be_type *discrim;
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- *cs << "TAO_ENCAP_BYTE_ORDER, // byte order" << nl;
- // generate repoID
- *cs << (ACE_OS::strlen (this->repoID ())+1) << ", ";
- (void)this->tc_name2long (this->repoID (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // repository ID = " << this->repoID () << nl;
- // generate name
- *cs << (ACE_OS::strlen (this->local_name ()->get_string ())+1) << ", ";
- (void)this->tc_name2long(this->local_name ()->get_string (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // name = " << this->local_name () << ",\n";
-
- // generate typecode for discriminant
- discrim = be_type::narrow_from_decl (this->disc_type ());
- if (discrim->gen_typecode () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_union: cannot generate typecode for discriminant\n"));
- return -1;
- }
-
- // generate the default used flag
- cs->indent ();
- *cs << this->default_index () << ", // default used index" << nl;
- // generate the member count
- *cs << this->member_count () << ", // member count\n";
- cs->incr_indent (0);
- // hand over to the scope to generate the typecode for elements
- if (be_scope::gen_encapsulation () == -1)
- {
- ACE_ERROR ((LM_ERROR, "be_union: cannot generate code for members\n"));
- return -1;
- }
- cs->decr_indent (0);
- return 0;
-}
-
-// compute typecode size
-long
-be_union::tc_size (void)
-{
- // 4 bytes for enumeration, 4 bytes for storing encap length val, followed by the
- // actual encapsulation length
- return 4 + 4 + this->tc_encap_len ();
-}
-
-long
-be_union::tc_encap_len (void)
-{
- if (this->encap_len_ == -1) // not computed yet
- {
- long slen;
- be_type *discrim;
-
- // Macro to avoid "warning: unused parameter" type warning.
- ACE_UNUSED_ARG (slen);
-
- this->encap_len_ = 4; // holds the byte order flag
-
- this->encap_len_ += this->repoID_encap_len (); // for repoID
-
- // do the same thing for the local name
- this->encap_len_ += this->name_encap_len (); // for name
-
- // add encapsulation size of discriminant typecode
- discrim = be_type::narrow_from_decl (this->disc_type ());
- this->encap_len_ += discrim->tc_size ();
-
- this->encap_len_ += 4; // to hold the "default used" flag
- this->encap_len_ += 4; // to hold the member count
-
- // compute encap length for members
- this->encap_len_ += be_scope::tc_encap_len ();
- }
- return this->encap_len_;
-}
-
-// compute the size type of the node in question
-int
-be_union::compute_size_type (void)
-{
- UTL_ScopeActiveIterator *si;
- AST_Decl *d;
- be_decl *bd;
-
- 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 ();
- bd = be_decl::narrow_from_decl (d);
- if (bd != 0)
- {
- // our sizetype depends on the sizetype of our members. Although
- // previous value of sizetype may get overwritten, we are
- // guaranteed by the "size_type" call that once the value reached
- // be_decl::VARIABLE, nothing else can overwrite it.
- this->size_type (bd->size_type ());
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "WARNING (%N:%l) be_structure::compute_size_type - "
- "narrow_from_decl returned 0\n"));
- }
- si->next ();
- } // end of while
- delete si; // free the iterator object
- }
- return 0;
-}
-
-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)
-{
- return visitor->visit_union (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS3 (be_union, AST_Union, be_scope, be_type)
-IMPL_NARROW_FROM_DECL (be_union)
-IMPL_NARROW_FROM_SCOPE (be_union)
diff --git a/TAO/TAO_IDL/be/be_union_branch.cpp b/TAO/TAO_IDL/be/be_union_branch.cpp
deleted file mode 100644
index 78defae5d7b..00000000000
--- a/TAO/TAO_IDL/be/be_union_branch.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_union_branch.cpp
-//
-// = DESCRIPTION
-// Extension of class AST_UnionBranch that provides additional means for C++
-// mapping.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// and
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_UnionBranch
- */
-be_union_branch::be_union_branch (void)
-{
-}
-
-be_union_branch::be_union_branch (AST_UnionLabel *lab, AST_Type *ft,
- UTL_ScopedName *n, UTL_StrList *p)
- : AST_UnionBranch (lab, ft, n, p),
- AST_Field (AST_Decl::NT_union_branch, ft, n, p),
- AST_Decl (AST_Decl::NT_union_branch, n, p)
-{
-}
-
-// ----------------------------------------
-// CODE GENERATION METHODS
-// ----------------------------------------
-
-// Generates the client-side header information for the union_branch
-int
-be_union_branch::gen_client_header (void)
-{
- be_type *bt; // the union_branch type
- be_state *s; // state based code gen object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- bt = be_type::narrow_from_decl (this->field_type ());
- s = cg->make_state ();
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union_branch::"
- "gen_client_header - "
- "state based code gen failed\n"), -1);
- }
- return 0;
-}
-
-// Generates the client-side stubs for the union_branch
-int
-be_union_branch::gen_client_stubs (void)
-{
- be_type *bt; // the union_branch type
- be_state *s; // state based code gen object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- bt = be_type::narrow_from_decl (this->field_type ());
- s = cg->make_state ();
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union_branch::"
- "gen_client_stubs - "
- "state based code gen failed\n"), -1);
- }
-
- return 0;
-}
-
-// Generates the client-side inline information
-int
-be_union_branch::gen_client_inline (void)
-{
- be_type *bt; // the union_branch type
- be_state *s; // state based code gen object
-
- // retrieve a singleton instance of the code generator
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- bt = be_type::narrow_from_decl (this->field_type ());
- s = cg->make_state ();
- if (!s || !bt || (s->gen_code (bt, this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_union_branch::"
- "gen_client_inline - "
- "state based code gen failed\n"), -1);
- }
- return 0;
-}
-
-// Generates the server-side header information for the union_branch
-int
-be_union_branch::gen_server_header (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side skeletons for the union_branch
-int
-be_union_branch::gen_server_skeletons (void)
-{
- // nothing to be done
- return 0;
-}
-
-// Generates the server-side inline
-int
-be_union_branch::gen_server_inline (void)
-{
- // nothing to be done
- return 0;
-}
-
-int
-be_union_branch::gen_encapsulation (void)
-{
- TAO_OutStream *cs; // output stream
- TAO_NL nl; // end line
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
- be_type *bt; // our type node
- long i, arrlen;
- long *arr; // an array holding string names converted to array of longs
-
- cs = cg->client_stubs ();
- cs->indent (); // start from whatever indentation level we were at
-
- // emit the case label value
- *cs << this->label ()->label_val ();
- *cs << ", // union case label (evaluated)" << nl;
- // emit name
- *cs << (ACE_OS::strlen (this->local_name ()->get_string ())+1) << ", ";
- (void)this->tc_name2long(this->local_name ()->get_string (), arr, arrlen);
- for (i=0; i < arrlen; i++)
- {
- cs->print ("0x%x, ", arr[i]);
- }
- *cs << " // name = " << this->local_name () << "\n";
-
- // hand over code generation to our type node
- bt = be_type::narrow_from_decl (this->field_type ());
- if (!bt)
- return -1;
- return bt->gen_typecode ();
-}
-
-long
-be_union_branch::tc_encap_len (void)
-{
- if (this->encap_len_ == -1)
- {
- be_type *bt;
-
- this->encap_len_ = 4; // case label;
- this->encap_len_ += this->name_encap_len (); // for name
- bt = be_type::narrow_from_decl (this->field_type ());
- if (!bt)
- {
- ACE_ERROR ((LM_ERROR, "be_union_branch: bad field type\n"));
- return -1;
- }
- this->encap_len_ += bt->tc_size (); // note that we add the typecode size
- // of the type
- }
- return this->encap_len_;
-}
-
-// compute the size type of the node in question
-int
-be_union_branch::compute_size_type (void)
-{
- be_type *type = be_type::narrow_from_decl (this->field_type ());
- if (!type)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_field::compute_size_type - "
- "bad field type\n"), -1);
- }
-
- // our size type is the same as our type
- this->size_type (type->size_type ()); // as a side effect will also update
- // the size type of parent
- return 0;
-}
-
-int
-be_union_branch::accept (be_visitor *visitor)
-{
- return visitor->visit_union_branch (this);
-}
-
-// Narrowing
-IMPL_NARROW_METHODS2 (be_union_branch, AST_UnionBranch, be_decl)
-IMPL_NARROW_FROM_DECL (be_union_branch)
diff --git a/TAO/TAO_IDL/be/be_union_label.cpp b/TAO/TAO_IDL/be/be_union_label.cpp
deleted file mode 100644
index 64d1f74893e..00000000000
--- a/TAO/TAO_IDL/be/be_union_label.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-/*
- * BE_UnionLabel
- */
-be_union_label::be_union_label()
-{
-}
-be_union_label::be_union_label(AST_UnionLabel::UnionLabel ul,
- AST_Expression *v)
- : AST_UnionLabel(ul, v)
-{
-}
-
-int
-be_union_label::accept (be_visitor *visitor)
-{
- return visitor->visit_union_label (this);
-}
-
diff --git a/TAO/TAO_IDL/be/be_visitor.cpp b/TAO/TAO_IDL/be/be_visitor.cpp
deleted file mode 100644
index 38e10c4eb16..00000000000
--- a/TAO/TAO_IDL/be/be_visitor.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-//
-// $Id$
-//
-/* -*- c++ -*- */
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor.h
-//
-// = DESCRIPTION
-// Abstract class for back end visitors.
-//
-// = NOTES
-// This is not a pure abstract class
-//
-// = AUTHOR
-// Aniruddha Gokhale and Carlos O'Ryan
-//
-// ============================================================================
-
-#include "idl.h"
-#include "be.h"
-#include "be_visitor.h"
-
-be_visitor::be_visitor (void)
-{
-}
-
-be_visitor::~be_visitor (void)
-{
-}
-
-// all the visit methods. Concrete visitors will selectively override each one
-int be_visitor::visit_decl (be_decl *)
-{
- return 0;
-}
-
-int be_visitor::visit_scope (be_scope *node)
-{
- return 0;
-}
-
-int be_visitor::visit_type (be_type *)
-{
- return 0;
-}
-
-int be_visitor::visit_predefined_type (be_predefined_type *)
-{
- return 0;
-}
-
-int be_visitor::visit_module (be_module *)
-{
- return 0;
-}
-
-int be_visitor::visit_interface (be_interface *)
-{
- return 0;
-}
-
-int be_visitor::visit_interface_fwd (be_interface_fwd *)
-{
- return 0;
-}
-
-int be_visitor::visit_structure (be_structure *)
-{
- return 0;
-}
-
-int be_visitor::visit_exception (be_exception *)
-{
- return 0;
-}
-
-int be_visitor::visit_expression (be_expression *)
-{
- return 0;
-}
-
-int be_visitor::visit_enum (be_enum *)
-{
- return 0;
-}
-
-int be_visitor::visit_operation (be_operation *)
-{
- return 0;
-}
-
-int be_visitor::visit_field (be_field *)
-{
- return 0;
-}
-
-int be_visitor::visit_argument (be_argument *)
-{
- return 0;
-}
-
-int be_visitor::visit_attribute (be_attribute *)
-{
- return 0;
-}
-
-int be_visitor::visit_union (be_union *)
-{
- return 0;
-}
-
-int be_visitor::visit_union_branch (be_union_branch *)
-{
- return 0;
-}
-
-int be_visitor::visit_union_label (be_union_label *)
-{
- return 0;
-}
-
-int be_visitor::visit_constant (be_constant *)
-{
- return 0;
-}
-
-int be_visitor::visit_enum_val (be_enum_val *)
-{
- return 0;
-}
-
-int be_visitor::visit_array (be_array *)
-{
- return 0;
-}
-
-int be_visitor::visit_sequence (be_sequence *)
-{
- return 0;
-}
-
-int be_visitor::visit_string (be_string *)
-{
- return 0;
-}
-
-int be_visitor::visit_typedef (be_typedef *)
-{
- return 0;
-}
-
-int be_visitor::visit_root (be_root *)
-{
- return 0;
-}
-
-int be_visitor::visit_native (be_native *)
-{
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_args.cpp b/TAO/TAO_IDL/be/be_visitor_args.cpp
deleted file mode 100644
index ec01a51770c..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_args.cpp
+++ /dev/null
@@ -1,2450 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_args.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Argument
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "be.h"
-#include "be_visitor_args.h"
-
-be_visitor_args::be_visitor_args (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_args::~be_visitor_args (void)
-{
-}
-
-int be_visitor_args::visit_argument (be_argument *node)
-{
- return -1;
-}
-
-// helper that returns the type name either as a nested type name (for header
-// files) or as a fully scoped name. In addition, we make sure that if the type
-// is an alias, we use that name
-const char *
-be_visitor_args::type_name (be_type *node, const char *suffix)
-{
- static char namebuf [NAMEBUFSIZE];
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
-
- be_type *bt; // type to use
-
- // use the typedefed name if that is the one used in the IDL defn
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // generate the NESTED_CLASS macro i.e., a relative path name to satisfy the
- // MSVC++ compiler
- switch (this->ctx_->stream ()->stream_type ())
- {
- case TAO_OutStream::TAO_CLI_HDR:
- ACE_OS::sprintf (namebuf, "%s", bt->nested_type_name
- (this->ctx_->scope (), suffix));
- break;
- default: // fullname for all other cases
- ACE_OS::sprintf (namebuf, "%s", bt->fullname ());
- if (suffix)
- ACE_OS::strcat (namebuf, suffix);
- }
-
- return namebuf;
-}
-
-// helper that returns the direction type of the argument
-AST_Argument::Direction
-be_visitor_args::direction (void)
-{
- // grab the argument node. We know that our context has stored the right
- // argument node
- be_argument *arg = this->ctx_->be_node_as_argument ();
-
- ACE_ASSERT (arg != 0);
- return arg->direction ();
-}
-
-// ************************************************************
-// be_visitor_args_arglist for parameter list in method declarations and
-// definitions
-// ************************************************************
-
-be_visitor_args_arglist::be_visitor_args_arglist (be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_arglist::~be_visitor_args_arglist (void)
-{
-}
-
-int be_visitor_args_arglist::visit_argument (be_argument *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_arglist::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- os->indent (); // start with current indentation level
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_arglist::"
- "visit_argument - "
- "cannot accept visitor\n"),
- -1);
- }
-
- *os << " " << node->local_name () << ",\n";
- return 0;
-}
-
-int be_visitor_args_arglist::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << "const " << this->type_name (node);
- break;
- case AST_Argument::dir_INOUT:
- *os << this->type_name (node);
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- }
- return 0;
-}
-
-int be_visitor_args_arglist::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << this->type_name (node);
- break;
- case AST_Argument::dir_INOUT:
- *os << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- }
- return 0;
-}
-
-int be_visitor_args_arglist::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << this->type_name (node, "_ptr");
- break;
- case AST_Argument::dir_INOUT: // inout
- *os << this->type_name (node, "_ptr") << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- }
- return 0;
-}
-
-int be_visitor_args_arglist::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << this->type_name (node, "_ptr");
- break;
- case AST_Argument::dir_INOUT: // inout
- *os << this->type_name (node, "_ptr") << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- }
- return 0;
-}
-
-int be_visitor_args_arglist::visit_native (be_native *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << this->type_name (node);
- break;
- case AST_Argument::dir_INOUT:
- *os << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node) << " &";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_arglist::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- // check if the type is an any
- if (node->pt () == AST_PredefinedType::PT_any)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << "const " << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_INOUT:
- *os << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- } // end switch direction
- } // end of if
- else if (node->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << this->type_name (node, "_ptr");
- break;
- case AST_Argument::dir_INOUT:
- *os << this->type_name (node, "_ptr") << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- } // end switch direction
- } // end else if
- else // simple predefined types
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << this->type_name (node);
- break;
- case AST_Argument::dir_INOUT:
- *os << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- } // end switch direction
- } // end of else
-
- return 0;
-}
-
-int be_visitor_args_arglist::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << "const " << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_INOUT:
- *os << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- }
- return 0;
-}
-
-int be_visitor_args_arglist::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << "const char *";
- break;
- case AST_Argument::dir_INOUT:
- *os << "char *&";
- break;
- case AST_Argument::dir_OUT:
- *os << "CORBA::String_out";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_arglist::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << "const " << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_INOUT:
- *os << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- }
- return 0;
-}
-
-int be_visitor_args_arglist::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- *os << "const " << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_INOUT:
- *os << this->type_name (node) << " &";
- break;
- case AST_Argument::dir_OUT:
- *os << this->type_name (node, "_out");
- break;
- }
- return 0;
-}
-
-int be_visitor_args_arglist::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
-
-// *************************************************************************
-// visitor for argument to do any pre docall processing. Not all types need
-// this. Only those that have an _out type need this. In addition, interfaces
-// need it because we ned to convert from the interface type to the base Object
-// type and vice versa.
-// *************************************************************************
-
-be_visitor_args_pre_docall_cs::be_visitor_args_pre_docall_cs
-(be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_pre_docall_cs::~be_visitor_args_pre_docall_cs (void)
-{
-}
-
-int
-be_visitor_args_pre_docall_cs::void_return_type (void)
-{
- // is the operation return type void?
- be_argument *arg = this->ctx_->be_node_as_argument ();
- ACE_ASSERT (arg != 0);
- be_operation *op = be_operation::narrow_from_scope (arg->defined_in ());
- ACE_ASSERT (arg != 0);
-
- be_type *bt = be_type::narrow_from_decl (op->return_type ());
- if (bt->node_type () == AST_Decl::NT_pre_defined
- && (be_predefined_type::narrow_from_decl (bt)->pt ()
- == AST_PredefinedType::PT_void))
- return 1;
- else
- return 0;
-}
-
-int be_visitor_args_pre_docall_cs::visit_argument (be_argument *node)
-{
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type of the argument
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_pre_docall_cs::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_pre_docall_cs::"
- "visit_argument - "
- "cannot accept visitor\n"),
- -1);
- }
-
- return 0;
-}
-
-int
-be_visitor_args_pre_docall_cs::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (this->direction ())
- {
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << bt->name () << "_slice *&_tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ".ptr ();\n";
- if (!this->void_return_type ())
- {
- *os << "ACE_NEW_RETURN (_tao_base_" << arg->local_name ()
- << ", " << bt->name () << "_slice, _tao_retval);\n";
- }
- else
- {
- *os << "ACE_NEW (_tao_base_" << arg->local_name ()
- << ", " << bt->name () << "_slice);\n";
- }
- break;
- default:
- break;
- }
- return 0;
-
-}
-
-int
-be_visitor_args_pre_docall_cs::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name () << ";\n";
- break;
- default:
- break;
- }
- return 0;
-}
-
-int
-be_visitor_args_pre_docall_cs::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name () << ";\n";
- break;
- default:
- break;
- }
- return 0;
-}
-
-int
-be_visitor_args_pre_docall_cs::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // pre do_call processing is valid only for pseudo objects and for Any
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << bt->name () << "_ptr &_tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ".ptr ();\n";
- break;
- default:
- break;
- }
- }
- break;
- case AST_PredefinedType::PT_any:
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << bt->name () << " *&_tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ".ptr ();" << be_nl;
- if (!this->void_return_type ())
- {
- *os << "ACE_NEW_RETURN (_tao_base_" << arg->local_name ()
- << ", CORBA::Any, _tao_retval);\n";
- }
- else
- {
- *os << "ACE_NEW (_tao_base_" << arg->local_name ()
- << ", CORBA::Any);\n";
- }
- break;
- default:
- break;
- }
- }
- break;
- default:
- break;
- }
- return 0;
-}
-
-int
-be_visitor_args_pre_docall_cs::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (this->direction ())
- {
- case AST_Argument::dir_OUT:
- // caller must have allocated the pointer
- os->indent ();
- *os << bt->name () << " *&_tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ".ptr ();" << be_nl;
- if (!this->void_return_type ())
- {
- *os << "ACE_NEW_RETURN (_tao_base_" << arg->local_name ()
- << ", " << bt->name () << ", _tao_retval);\n";
- }
- else
- {
- *os << "ACE_NEW (_tao_base_" << arg->local_name ()
- << ", " << bt->name () << ");\n";
- }
- break;
- default:
- break;
- }
- return 0;
-}
-
-int
-be_visitor_args_pre_docall_cs::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_OUT:
- // caller should have allocated the pointer
- os->indent ();
- *os << "char *&_tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ".ptr ();\n";
- break;
- default:
- break;
- }
- return 0;
-}
-
-int
-be_visitor_args_pre_docall_cs::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (node->size_type () == be_type::VARIABLE)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_OUT:
- // caller must have allocated the pointer
- os->indent ();
- *os << bt->name () << " *&_tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ".ptr ();" << be_nl;
- if (!this->void_return_type ())
- {
- *os << "ACE_NEW_RETURN (_tao_base_" << arg->local_name ()
- << ", " << bt->name () << ", _tao_retval);\n";
- }
- else
- {
- *os << "ACE_NEW (_tao_base_" << arg->local_name ()
- << ", " << bt->name () << ");\n";
- }
- break;
- default:
- break;
- }
- }
- return 0;
-}
-
-int
-be_visitor_args_pre_docall_cs::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (node->size_type () == be_type::VARIABLE)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << bt->name () << " *&_tao_base_" << arg->local_name ()
- << " = " << arg->local_name () << ".ptr ();" << be_nl;
- if (!this->void_return_type ())
- {
- *os << "ACE_NEW_RETURN (_tao_base_" << arg->local_name ()
- << ", " << bt->name () << ", _tao_retval);\n";
- }
- else
- {
- *os << "ACE_NEW (_tao_base_" << arg->local_name ()
- << ", " << bt->name () << ");\n";
- }
- break;
- default:
- break;
- }
- }
- return 0;
-}
-
-int
-be_visitor_args_pre_docall_cs::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
-
-// ****************************************************************************
-// visitor for argument passing to do_call. The do_call method takes a variable
-// number of parameters. The total number of parameters is determined by the
-// "calldata" parameter that must be passed before the variable list
-// starts. Each argument to the do_call is considered to be of type "void *".
-// Hence we pass the address of each argument. The case for _out is a bit
-// tricky where we must first retrieve the pointer, allocate memory and pass it
-// to do_call. This is done in the "pre_do_call" processing.
-// ****************************************************************************
-
-be_visitor_args_docall_cs::be_visitor_args_docall_cs (be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_docall_cs::~be_visitor_args_docall_cs (void)
-{
-}
-
-int be_visitor_args_docall_cs::visit_argument (be_argument *node)
-{
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type of the argument
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_docall_cs::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_docall_cs::"
- "visit_argument - "
- "cannot accept visitor\n"),
- -1);
- }
-
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- os->indent ();
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- *os << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- // pass reference to the pointer to slice
- *os << "_tao_base_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- os->indent ();
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- // pass the address. Storage is already allocated
- *os << "&" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- os->indent ();
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- *os << "&_tao_base_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- os->indent ();
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- *os << "&_tao_base_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get argument node
-
- os->indent ();
- // check if the type is an any
- if (node->pt () == AST_PredefinedType::PT_any)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- *os << "_tao_base_" << arg->local_name ();
- break;
- } // end switch direction
- } // end of if any
- else if (node->pt () == AST_PredefinedType::PT_pseudo) // e.g.,
- // CORBA::Object,
- // CORBA::TypeCode
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- *os << "&_tao_base_" << arg->local_name ();
- break;
- } // end switch direction
- } // end else if pseudo
- else // simple predefined types
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- *os << "&" << arg->local_name ();
- break;
- } // end switch direction
- } // end of else
-
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- os->indent ();
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- *os << "_tao_base_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- os->indent ();
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- *os << "&_tao_base_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- os->indent ();
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- {
- // check if the size type is VARIABLE
- if (node->size_type () == be_type::VARIABLE)
- *os << "_tao_base_" << arg->local_name ();
- else
- *os << "&" << arg->local_name ();
- }
- break;
- }
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- os->indent ();
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- {
- // check if the size type is VARIABLE
- if (node->size_type () == be_type::VARIABLE)
- *os << "_tao_base_" << arg->local_name ();
- else
- *os << "&" << arg->local_name ();
- }
- break;
- }
- return 0;
-}
-
-int be_visitor_args_docall_cs::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
-
-// *************************************************************************
-// visitor for argument to do any pre docall processing. Not all types need
-// this. Only those that have an _out type need this. In addition, interfaces
-// need it because we ned to convert from the interface type to the base Object
-// type and vice versa.
-// *************************************************************************
-
-be_visitor_args_post_docall_cs::be_visitor_args_post_docall_cs
-(be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_post_docall_cs::~be_visitor_args_post_docall_cs (void)
-{
-}
-
-int
-be_visitor_args_post_docall_cs::visit_argument (be_argument *node)
-{
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type of the argument
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_pre_docall_cs::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_pre_docall_cs::"
- "visit_argument - "
- "cannot accept visitor\n"),
- -1);
- }
-
- return 0;
-}
-
-int
-be_visitor_args_post_docall_cs::visit_interface (be_interface *node)
-{
- // we must narrow the out object reference to the appropriate type
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- {
- os->indent ();
- // assign the narrowed obj reference
- *os << arg->local_name () << " = " << node->name ()
- << "::_narrow (_tao_base_" << arg->local_name ()
- << ", _tao_environment);" << be_nl;
- *os << "CORBA::release (_tao_base_" << arg->local_name ()
- << ");\n";
- }
- break;
- }
- return 0;
-}
-
-int
-be_visitor_args_post_docall_cs::visit_interface_fwd (be_interface_fwd *node)
-{
- // we must narrow the out object reference to the appropriate type
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- {
- os->indent ();
- // assign the narrowed obj reference
- *os << arg->local_name () << " = " << node->name ()
- << "::_narrow (_tao_base_" << arg->local_name ()
- << ", _tao_environment);" << be_nl;
- *os << "CORBA::release (_tao_base_" << arg->local_name ()
- << ");\n";
- }
- break;
- }
- return 0;
-}
-
-int
-be_visitor_args_post_docall_cs::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
-
-// ************************************************************************
-// Visitor to generate code for argument variable declaration
-// ************************************************************************
-
-be_visitor_args_vardecl_ss::be_visitor_args_vardecl_ss (be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_vardecl_ss::~be_visitor_args_vardecl_ss (void)
-{
-}
-
-int be_visitor_args_vardecl_ss::visit_argument (be_argument *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_vardecl_ss::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_vardecl_ss::"
- "visit_argument - "
- "cannot accept visitor\n"),
- -1);
- }
-
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- if (node->size_type () == be_type::VARIABLE)
- {
- *os << bt->name () << "_slice *_tao_ptr_" << arg->local_name () << ";" << be_nl;
- *os << bt->name () << "_out " << arg->local_name ()
- << " (_tao_ptr_" << arg->local_name () << ");\n";
- }
- else
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << bt->name () << "_ptr " << arg->local_name () << ";" << be_nl;
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name () << ";\n";
- *os << bt->name () << "_ptr _tao_ptr_" << arg->local_name () << ";" << be_nl;
- *os << bt->name () << "_out " << arg->local_name ()
- << " (_tao_ptr_" << arg->local_name () << ");\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << bt->name () << "_ptr " << arg->local_name () << ";" << be_nl;
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "CORBA::Object_ptr _tao_base_" << arg->local_name () << ";\n";
- *os << bt->name () << "_ptr _tao_ptr_" << arg->local_name () << ";" << be_nl;
- *os << bt->name () << "_out " << arg->local_name ()
- << " (_tao_ptr_" << arg->local_name () << ");\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // check if the type is an any
- if (node->pt () == AST_PredefinedType::PT_any)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << bt->name () << " *_tao_ptr_" << arg->local_name () << ";" << be_nl;
- *os << bt->name () << "_out " << arg->local_name ()
- << " (_tao_ptr_" << arg->local_name () << ");\n";
- break;
- } // end switch direction
- } // end of if
- else if (node->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << bt->name () << "_ptr " << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << bt->name () << "_ptr _tao_ptr_" << arg->local_name () << ";" << be_nl;
- *os << bt->name () << "_out " << arg->local_name ()
- << " (_tao_ptr_" << arg->local_name () << ");\n";
- break;
- } // end switch direction
- } // end else if
- else // simple predefined types
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- } // end switch direction
- } // end of else
-
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << bt->name () << " *_tao_ptr_" << arg->local_name () << ";" << be_nl;
- *os << bt->name () << "_out " << arg->local_name ()
- << " (_tao_ptr_" << arg->local_name () << ");\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << "char *" << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "char *_tao_ptr_" << arg->local_name () << ";" << be_nl;
- *os << "CORBA::String_out " << arg->local_name ()
- << " (_tao_ptr_" << arg->local_name () << ");\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- // check if it is variable sized
- if (node->size_type () == be_type::VARIABLE)
- {
- *os << bt->name () << " *_tao_ptr_" << arg->local_name () << ";" << be_nl;
- *os << bt->name () << "_out " << arg->local_name ()
- << " (_tao_ptr_" << arg->local_name () << ");\n";
- }
- else
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- // if the current type is an alias, use that
- be_type *bt;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- // check if it is variable sized
- if (node->size_type () == be_type::VARIABLE)
- {
- *os << bt->name () << " *_tao_ptr_" << arg->local_name () << ";" << be_nl;
- *os << bt->name () << "_out " << arg->local_name ()
- << " (_tao_ptr_" << arg->local_name () << ");\n";
- }
- else
- *os << bt->name () << " " << arg->local_name () << ";\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_vardecl_ss::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
-
-// ************************************************************************
-// Visitor to generate code for passing argument to the marshal/demarshal
-// routines
-// ************************************************************************
-
-be_visitor_args_marshal_ss::be_visitor_args_marshal_ss (be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_marshal_ss::~be_visitor_args_marshal_ss (void)
-{
-}
-
-int be_visitor_args_marshal_ss::visit_argument (be_argument *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_marshal_ss::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_marshal_ss::"
- "visit_argument - "
- "cannot accept visitor\n"),
- -1);
- }
-
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_array (be_array *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "_tao_ptr_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_enum (be_enum *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "&" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_interface (be_interface *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "&_tao_base_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_interface_fwd (be_interface_fwd *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "&_tao_base_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- // check if the type is an any
- if (node->pt () == AST_PredefinedType::PT_any)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "_tao_ptr_" << arg->local_name ();
- break;
- } // end switch direction
- } // end of if
- else if (node->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "&_tao_ptr_" << arg->local_name ();
- break;
- } // end switch direction
- } // end else if
- else // simple predefined types
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "&" << arg->local_name ();
- break;
- } // end switch direction
- } // end of else
-
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_sequence (be_sequence *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "_tao_ptr_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "&_tao_ptr_" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- if (node->size_type () == be_type::VARIABLE)
- *os << "_tao_ptr_" << arg->local_name ();
- else
- *os << "&" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- os->indent ();
- *os << "&" << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- if (node->size_type () == be_type::VARIABLE)
- *os << "_tao_ptr_" << arg->local_name ();
- else
- *os << "&" << arg->local_name ();
- break;
- }
- return 0;
-}
-
-int be_visitor_args_marshal_ss::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
-
-// ************************************************************************
-// visitor for passing arguments to the upcall
-// ************************************************************************
-
-be_visitor_args_pre_upcall_ss::be_visitor_args_pre_upcall_ss (be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_pre_upcall_ss::~be_visitor_args_pre_upcall_ss (void)
-{
-}
-
-int be_visitor_args_pre_upcall_ss::visit_argument (be_argument *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_pre_upcall_ss::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_pre_upcall_ss::"
- "visit_argument - "
- "cannot accept visitor\n"),
- -1);
- }
-
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT: // inout
- os->indent ();
- *os << arg->local_name () << " = " << node->name ()
- << "::_narrow (_tao_base_" << arg->local_name ()
- << ", _tao_environment);\n";
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT: // inout
- os->indent ();
- *os << arg->local_name () << " = " << node->name ()
- << "::_narrow (_tao_base_" << arg->local_name ()
- << "_tao_environment);\n";
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- // check if the type is an any
- if (node->pt () == AST_PredefinedType::PT_any)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- } // end switch direction
- } // end of if
- else if (node->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- } // end switch direction
- } // end else if
- else // simple predefined types
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- } // end switch direction
- } // end of else
-
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_pre_upcall_ss::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
-
-// ************************************************************************
-// visitor for passing arguments to the upcall
-// ************************************************************************
-
-be_visitor_args_upcall_ss::be_visitor_args_upcall_ss (be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_upcall_ss::~be_visitor_args_upcall_ss (void)
-{
-}
-
-int be_visitor_args_upcall_ss::visit_argument (be_argument *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- switch (node->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << node->local_name ();
- break;
- }
- return 0;
-
-}
-
-// ************************************************************************
-// visitor for doing any post-processing after the upcall is made
-// ************************************************************************
-
-be_visitor_args_post_upcall_ss::be_visitor_args_post_upcall_ss (be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_post_upcall_ss::~be_visitor_args_post_upcall_ss (void)
-{
-}
-
-int be_visitor_args_post_upcall_ss::visit_argument (be_argument *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_post_upcall_ss::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_post_upcall_ss::"
- "visit_argument - "
- "cannot accept visitor\n"),
- -1);
- }
-
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT: // inout
- os->indent ();
- *os << "CORBA::release (_tao_base_" << arg->local_name () << ");"
- << be_nl;
- *os << "_tao_base_" << arg->local_name () << " = " << arg->local_name ()
- << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "_tao_base_" << arg->local_name () << " = _tao_ptr_"
- << arg->local_name () << ";\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT: // inout
- os->indent ();
- *os << "CORBA::release (_tao_base_" << arg->local_name () << ");"
- << be_nl;
- *os << "_tao_base_" << arg->local_name () << " = " << arg->local_name ()
- << ";\n";
- break;
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "_tao_base_" << arg->local_name () << " = _tao_ptr_"
- << arg->local_name () << ";\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- // check if the type is an any
- if (node->pt () == AST_PredefinedType::PT_any)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- } // end switch direction
- } // end of if
- else if (node->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- } // end switch direction
- } // end else if
- else // simple predefined types
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- } // end switch direction
- } // end of else
-
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_upcall_ss::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
-
-// ************************************************************************
-// visitor for doing any post-processing after the marshaling is done
-// ************************************************************************
-
-be_visitor_args_post_marshal_ss::be_visitor_args_post_marshal_ss (be_visitor_context *ctx)
- : be_visitor_args (ctx)
-{
-}
-
-be_visitor_args_post_marshal_ss::~be_visitor_args_post_marshal_ss (void)
-{
-}
-
-int be_visitor_args_post_marshal_ss::visit_argument (be_argument *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_post_marshal_ss::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_post_marshal_ss::"
- "visit_argument - "
- "cannot accept visitor\n"),
- -1);
- }
-
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT: // inout
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "CORBA::release (_tao_base_" << arg->local_name () << ");\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT: // inout
- case AST_Argument::dir_OUT:
- os->indent ();
- *os << "CORBA::release (_tao_base_" << arg->local_name () << ");\n";
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- // check if the type is an any
- if (node->pt () == AST_PredefinedType::PT_any)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- } // end switch direction
- } // end of if
- else if (node->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- } // end switch direction
- } // end else if
- else // simple predefined types
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- } // end switch direction
- } // end of else
-
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get the stream
-
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- return 0;
-}
-
-int be_visitor_args_post_marshal_ss::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_attribute.cpp b/TAO/TAO_IDL/be/be_visitor_attribute.cpp
deleted file mode 100644
index 4f51ea24be2..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_attribute.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_attribute.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Attribute
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_attribute.h"
-
-// Attribute gets mapped to one or possibly two operations based on whether
-// it is readonly or not. The two operations "get" and "set" the value of the
-// attribute.
-//
-// code generation for attributes is achieved by mapping an attribute node to
-// a corresponding operation node. The reason is that we do not want to
-// duplicate the code. However, an attribute node and an operation node have
-// different interfaces. Hence we need some form of an adapter that can take us
-// from an attribute node to an operation node. The following paragraph
-// describes how this is accomplished.
-//
-// For a "get" operation on the attribute, we create an operation node with the
-// same name as the attribute and a return type which is the same as the type
-// of the attribute. This operation has no arguments.
-//
-// For a "set" operation on the attribute (if it is not readonly), we create an
-// operation node with a "void" return type and an "in" parameter of the same
-// type as the attribute.
-
-// In both cases the context will hold sufficient information to indicate that
-// the operation node is really an attribute node.
-
-// *************************************************************************
-// primary visitor for "attribute". The context state decides the next state
-// *************************************************************************
-
-be_visitor_attribute::be_visitor_attribute (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_attribute::~be_visitor_attribute (void)
-{
-}
-
-int
-be_visitor_attribute::visit_attribute (be_attribute *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node
-
- os = this->ctx_->stream ();
- this->ctx_->node (node); // save the node
- this->ctx_->attribute (node); // save this attribute node
-
- be_operation *op;
-
- // first the "get" operation
- op = new be_operation (node->field_type (), AST_Operation::OP_noflags,
- node->name (), 0);
- op->set_name (node->name ());
- be_visitor_context ctx (*this->ctx_);
-
- // this switch statement eliminates the need for different classes that have
- // exactly the same code except different states.
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_CH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_CH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_CS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_CS);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_SH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_SS);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_COLLOCATED_SS);
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || !op || (op->accept (visitor) == -1))
- {
- delete visitor;
- delete op;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_attribute::"
- "visit_attribute - "
- "codegen for get_attribute failed\n"),
- -1);
- }
- delete op;
- delete visitor;
- if (node->readonly ())
- return 0; // nothing else to do
-
- // the set method.
- // the return type is "void"
- be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void,
- new UTL_ScopedName
- (new Identifier
- ("void", 1, 0, I_FALSE), 0),
- 0);
- // argument type is the same as the attribute type
- be_argument *arg = new be_argument (AST_Argument::dir_IN,
- node->field_type (),
- node->name (),
- 0);
- arg->set_name (node->name ());
- // create the operation
- op = new be_operation (rt, AST_Operation::OP_noflags,
- node->name (), 0);
- op->set_name (node->name ());
- op->add_argument_to_scope (arg);
-
- ctx = *this->ctx_;
- // this switch statement eliminates the need for different classes that have
- // exactly the same code except different states.
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ATTRIBUTE_CH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_CH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_CS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_CS);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_SH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_SS);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_COLLOCATED_SS);
- break;
- }
-
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || !op || (op->accept (visitor) == -1))
- {
- delete visitor;
- delete op;
- delete arg;
- delete rt;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_attribute::"
- "visit_attribute - "
- "codegen for set_attribute failed\n"),
- -1);
- }
- delete op;
- delete visitor;
- delete rt;
- delete arg;
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_constant.cpp b/TAO/TAO_IDL/be/be_visitor_constant.cpp
deleted file mode 100644
index f2b2d722164..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_constant.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_constant.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Constant
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_constant.h"
-
-// ********************************************************************
-// Visitor implementation for the Constant type
-// This one for the client header file
-// ********************************************************************
-
-be_visitor_constant_ch::be_visitor_constant_ch (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_constant_ch::~be_visitor_constant_ch (void)
-{
-}
-
-// visit the Constant_Ch node and its scope
-int
-be_visitor_constant_ch::visit_constant (be_constant *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- if (!node->cli_hdr_gen ())
- {
- // if we are defined in the outermost scope, then the value is assigned
- // to us here itself, else it will be in the *.cpp file
-
- os->indent (); // start from whatever indentation level we were at
- *os << "static const " << node->exprtype_to_string ()
- << " " << node->local_name ();
- if (!node->is_nested ())
- {
- // We were defined at the outermost scope. So we put the value in the
- // header itself
- *os << " = " << node->constant_value ();
- }
- *os << ";\n\n";
- node->cli_hdr_gen (I_TRUE);
- }
- return 0;
-}
-
-// ********************************************************************
-// Visitor implementation for the Constant type
-// This one for the client stubs file
-// ********************************************************************
-
-be_visitor_constant_cs::be_visitor_constant_cs (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_constant_cs::~be_visitor_constant_cs (void)
-{
-}
-
-// visit the Constant_cs node and its scope
-int
-be_visitor_constant_cs::visit_constant (be_constant *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- if (!node->cli_hdr_gen ())
- {
- if (node->is_nested ())
- {
- // for those constants not defined in the outer most scope, they get
- // assigned to their values in the impl file
- os->indent (); // start from whatever indentation level we were at
- *os << "const " << node->exprtype_to_string () << " " << node->name ()
- << " = " << node->constant_value () << ";\n\n";
- }
- node->cli_stub_gen (I_TRUE);
- }
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_context.cpp b/TAO/TAO_IDL/be/be_visitor_context.cpp
deleted file mode 100644
index 11ecf88da38..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_context.cpp
+++ /dev/null
@@ -1,463 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_context.cpp
-//
-// = DESCRIPTION
-// Maintains the context information for visitors
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-// constructor
-be_visitor_context::be_visitor_context (void)
- : state_ (TAO_CodeGen::TAO_UNKNOWN),
- os_ (0),
- scope_ (0),
- node_ (0),
- alias_ (0),
- tdef_ (0),
- attr_ (0),
- exception_ (0),
- comma_ (0)
-{
-}
-
-be_visitor_context::be_visitor_context (const be_visitor_context &ctx)
- : state_ (ctx.state_),
- os_ (ctx.os_),
- scope_ (ctx.scope_),
- node_ (ctx.node_),
- alias_ (ctx.alias_),
- tdef_ (ctx.tdef_),
- attr_ (ctx.attr_),
- exception_ (ctx.exception_),
- comma_ (ctx.comma_)
-{
-}
-
-be_visitor_context &
-be_visitor_context::operator= (const be_visitor_context &ctx)
-{
- this->state_ = ctx.state_;
- this->os_ = ctx.os_;
- this->scope_ = ctx.scope_;
- this->node_ = ctx.node_;
- this->alias_ = ctx.alias_;
- this->tdef_ = ctx.tdef_;
- this->attr_ = ctx.attr_;
- this->exception_ = ctx.exception_;
- this->comma_ = ctx.comma_;
-
- return *this;
-}
-
-be_visitor_context::~be_visitor_context (void)
-{
- // we do not own anything
-}
-
-//= helpers
-
-void
-be_visitor_context::stream (TAO_OutStream *os)
-{
- this->os_ = os;
-}
-
-TAO_OutStream *
-be_visitor_context::stream (void)
-{
- return this->os_;
-}
-
-void
-be_visitor_context::scope (be_decl *s)
-{
- this->scope_ = s;
-}
-
-be_decl *
-be_visitor_context::scope (void)
-{
- return this->scope_;
-}
-
-void
-be_visitor_context::node (be_decl *n)
-{
- this->node_ = n;
-}
-
-be_decl *
-be_visitor_context::node (void)
-{
- return this->node_;
-}
-
-void
-be_visitor_context::state (TAO_CodeGen::CG_STATE st)
-{
- this->state_ = st;
-}
-
-TAO_CodeGen::CG_STATE
-be_visitor_context::state (void)
-{
- return this->state_;
-}
-
-void
-be_visitor_context::tdef (be_typedef *node)
-{
- this->tdef_ = node;
-}
-
-be_typedef *
-be_visitor_context::tdef (void)
-{
- return this->tdef_;
-}
-
-void
-be_visitor_context::alias (be_typedef *node)
-{
- this->alias_ = node;
-}
-
-be_typedef *
-be_visitor_context::alias (void)
-{
- return this->alias_;
-}
-
-void
-be_visitor_context::attribute (be_attribute *node)
-{
- this->attr_ = node;
-}
-
-be_attribute *
-be_visitor_context::attribute (void)
-{
- return this->attr_;
-}
-
-void
-be_visitor_context::exception (idl_bool ib)
-{
- this->exception_ = ib;
-}
-
-idl_bool
-be_visitor_context::exception (void)
-{
- return this->exception_;
-}
-
-void
-be_visitor_context::comma (idl_bool ib)
-{
- this->comma_ = ib;
-}
-
-idl_bool
-be_visitor_context::comma (void)
-{
- return this->comma_;
-}
-
-// return the node as argument if possible
-be_argument *
-be_visitor_context::be_node_as_argument (void)
-{
- if (this->node_)
- return be_argument::narrow_from_decl (this->node_);
- else
- return (be_argument *)0;
-}
-
-// return the node as array if possible
-be_array *
-be_visitor_context::be_node_as_array (void)
-{
- if (this->node_)
- return be_array::narrow_from_decl (this->node_);
- else
- return (be_array *)0;
-}
-
-// return the node as attribute if possible
-be_attribute *
-be_visitor_context::be_node_as_attribute (void)
-{
- if (this->node_)
- return be_attribute::narrow_from_decl (this->node_);
- else
- return (be_attribute *)0;
-}
-
-// return the node as constant if possible
-be_constant *
-be_visitor_context::be_node_as_constant (void)
-{
- if (this->node_)
- return be_constant::narrow_from_decl (this->node_);
- else
- return (be_constant *)0;
-}
-
-// return the node as enum if possible
-be_enum *
-be_visitor_context::be_node_as_enum (void)
-{
- if (this->node_)
- return be_enum::narrow_from_decl (this->node_);
- else
- return (be_enum *)0;
-}
-
-// return the node as enum_val if possible
-be_enum_val *
-be_visitor_context::be_node_as_enum_val (void)
-{
- if (this->node_)
- return be_enum_val::narrow_from_decl (this->node_);
- else
- return (be_enum_val *)0;
-}
-
-// return the node as exception if possible
-be_exception *
-be_visitor_context::be_node_as_exception (void)
-{
- if (this->node_)
- return be_exception::narrow_from_decl (this->node_);
- else
- return (be_exception *)0;
-}
-
-// return the node as field if possible
-be_field *
-be_visitor_context::be_node_as_field (void)
-{
- if (this->node_)
- return be_field::narrow_from_decl (this->node_);
- else
- return (be_field *)0;
-}
-
-// return the node as interface if possible
-be_interface *
-be_visitor_context::be_node_as_interface (void)
-{
- if (this->node_)
- return be_interface::narrow_from_decl (this->node_);
- else
- return (be_interface *)0;
-}
-
-// return the node as interface_fwd if possible
-be_interface_fwd *
-be_visitor_context::be_node_as_interface_fwd (void)
-{
- if (this->node_)
- return be_interface_fwd::narrow_from_decl (this->node_);
- else
- return (be_interface_fwd *)0;
-}
-
-// return the node as module if possible
-be_module *
-be_visitor_context::be_node_as_module (void)
-{
- if (this->node_)
- return be_module::narrow_from_decl (this->node_);
- else
- return (be_module *)0;
-}
-
-// return the node as operation if possible
-be_operation *
-be_visitor_context::be_node_as_operation (void)
-{
- if (this->node_)
- return be_operation::narrow_from_decl (this->node_);
- else
- return (be_operation *)0;
-}
-
-// return the node as predefined_type if possible
-be_predefined_type *
-be_visitor_context::be_node_as_predefined_type (void)
-{
- if (this->node_)
- return be_predefined_type::narrow_from_decl (this->node_);
- else
- return (be_predefined_type *)0;
-}
-
-// return the node as root if possible
-be_root *
-be_visitor_context::be_node_as_root (void)
-{
- if (this->node_)
- return be_root::narrow_from_decl (this->node_);
- else
- return (be_root *)0;
-}
-
-// return the node as sequence if possible
-be_sequence *
-be_visitor_context::be_node_as_sequence (void)
-{
- if (this->node_)
- return be_sequence::narrow_from_decl (this->node_);
- else
- return (be_sequence *)0;
-}
-
-// return the node as string if possible
-be_string *
-be_visitor_context::be_node_as_string (void)
-{
- if (this->node_)
- return be_string::narrow_from_decl (this->node_);
- else
- return (be_string *)0;
-}
-
-// return the node as structure if possible
-be_structure *
-be_visitor_context::be_node_as_structure (void)
-{
- if (this->node_)
- return be_structure::narrow_from_decl (this->node_);
- else
- return (be_structure *)0;
-}
-
-// return the node as typedef if possible
-be_typedef *
-be_visitor_context::be_node_as_typedef (void)
-{
- if (this->node_)
- return be_typedef::narrow_from_decl (this->node_);
- else
- return (be_typedef *)0;
-}
-
-// return the node as union if possible
-be_union *
-be_visitor_context::be_node_as_union (void)
-{
- if (this->node_)
- return be_union::narrow_from_decl (this->node_);
- else
- return (be_union *)0;
-}
-
-// return the node as union_branch if possible
-be_union_branch *
-be_visitor_context::be_node_as_union_branch (void)
-{
- if (this->node_)
- return be_union_branch::narrow_from_decl (this->node_);
- else
- return (be_union_branch *)0;
-}
-
-// for scope
-
-// return the scope as enum if possible
-be_enum *
-be_visitor_context::be_scope_as_enum (void)
-{
- if (this->scope_)
- return be_enum::narrow_from_decl (this->scope_);
- else
- return (be_enum *)0;
-}
-
-// return the scope as exception if possible
-be_exception *
-be_visitor_context::be_scope_as_exception (void)
-{
- if (this->scope_)
- return be_exception::narrow_from_decl (this->scope_);
- else
- return (be_exception *)0;
-}
-
-// return the scope as interface if possible
-be_interface *
-be_visitor_context::be_scope_as_interface (void)
-{
- if (this->scope_)
- return be_interface::narrow_from_decl (this->scope_);
- else
- return (be_interface *)0;
-}
-
-// return the scope as module if possible
-be_module *
-be_visitor_context::be_scope_as_module (void)
-{
- if (this->scope_)
- return be_module::narrow_from_decl (this->scope_);
- else
- return (be_module *)0;
-}
-
-// return the scope as operation if possible
-be_operation *
-be_visitor_context::be_scope_as_operation (void)
-{
- if (this->scope_)
- return be_operation::narrow_from_decl (this->scope_);
- else
- return (be_operation *)0;
-}
-
-// return the scope as root if possible
-be_root *
-be_visitor_context::be_scope_as_root (void)
-{
- if (this->scope_)
- return be_root::narrow_from_decl (this->scope_);
- else
- return (be_root *)0;
-}
-
-// return the scope as structure if possible
-be_structure *
-be_visitor_context::be_scope_as_structure (void)
-{
- if (this->scope_)
- return be_structure::narrow_from_decl (this->scope_);
- else
- return (be_structure *)0;
-}
-
-// return the scope as union if possible
-be_union *
-be_visitor_context::be_scope_as_union (void)
-{
- if (this->scope_)
- return be_union::narrow_from_decl (this->scope_);
- else
- return (be_union *)0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_decl.cpp b/TAO/TAO_IDL/be/be_visitor_decl.cpp
deleted file mode 100644
index 86b6a179068..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_decl.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_decl.cpp
-//
-// = DESCRIPTION
-// Visitor for the base be_decl node. This serves to maintain the current
-// state (context) of code generation for the derived visitor.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_decl.h"
-
-// Root visitor for client header
-be_visitor_decl::be_visitor_decl (be_visitor_context *ctx)
- : ctx_ (ctx)
-{
-}
-
-be_visitor_decl::~be_visitor_decl (void)
-{
- delete this->ctx_;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_enum.cpp b/TAO/TAO_IDL/be/be_visitor_enum.cpp
deleted file mode 100644
index 08692251985..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_enum.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_enum.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Enum
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_enum.h"
-
-// ********************************************************************
-// Visitor implementation for the Enum type
-// This one for the client header file
-// ********************************************************************
-
-be_visitor_enum_ch::be_visitor_enum_ch (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_enum_ch::~be_visitor_enum_ch (void)
-{
-}
-
-// visit the Enum_Ch node and its scope
-int
-be_visitor_enum_ch::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- this->ctx_->comma (1); // comma to be generated by the scope visitor
-
- if (!node->cli_hdr_gen () && !node->imported ())
- {
- os->indent (); // start from whatever indentation level we were at
- *os << "enum " << node->local_name () << be_nl;
- *os << "{\n";
- os->incr_indent ();
- if (this->visit_scope (node) == 1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_enum_ch::"
- "visit_enum - "
- "scope generation failed\n"
- ), -1);
- }
- *os << "\n";
- os->decr_indent ();
- *os << "};" << be_nl;
- // As per the ORBOS spec, we need the following typedef
- *os << "typedef " << node->local_name () << " &" << node->local_name ()
- << "_out;\n";
-
- // Generate the typecode decl
- if (node->is_nested ())
- {
- // we have a scoped name
- os->indent ();
- *os << "static CORBA::TypeCode_ptr " << node->tc_name
- ()->last_component () << ";\n\n";
- }
- else
- {
- // we are in the ROOT scope
- os->indent ();
- *os << "extern CORBA::TypeCode_ptr " << node->tc_name
- ()->last_component () << ";\n\n";
- }
- node->cli_hdr_gen (I_TRUE);
- }
- return 0;
-}
-
-int
-be_visitor_enum_ch::post_process (void)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- *os << "," << be_nl;
- return 0;
-}
-
-int
-be_visitor_enum_ch::visit_enum_val (be_enum_val *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- os->indent ();
- *os << node->local_name ();
-
- return 0;
-}
-
-
-// ********************************************************************
-// Visitor implementation for the Enum type
-// This one for the client stubs file
-// ********************************************************************
-
-be_visitor_enum_cs::be_visitor_enum_cs (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_enum_cs::~be_visitor_enum_cs (void)
-{
-}
-
-// visit the Enum_cs node and its scope
-int
-be_visitor_enum_cs::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- if (!node->cli_stub_gen () && !node->imported ())
- {
- // generate the typecode information here
- os->indent (); // start from current indentation level
- *os << be_nl
- << "static const CORBA::Long _oc_" << node->flatname () << "[] ="
- << be_nl
- << "{" << be_idt_nl;
- if (node->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_enum_cs::"
- "visit_enum - "
- "scope generation failed\n"
- ), -1);
- }
- os->decr_indent ();
- *os << "};" << be_nl;
-
- *os << "static CORBA::TypeCode _tc__tc_" << node->flatname ()
- << " (CORBA::tk_enum, sizeof (_oc_" << node->flatname ()
- << "), (char *) &_oc_" << node->flatname ()
- << ", CORBA::B_FALSE);" << be_nl;
- *os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_"
- << node->flatname () << ";\n\n";
- node->cli_stub_gen (I_TRUE);
- }
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_exception.cpp b/TAO/TAO_IDL/be/be_visitor_exception.cpp
deleted file mode 100644
index 75e4bdb889d..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_exception.cpp
+++ /dev/null
@@ -1,909 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_exception.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Exception
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_exception.h"
-
-// generic struct visitor
-be_visitor_exception::be_visitor_exception (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_exception::~be_visitor_exception (void)
-{
-}
-
-// visit the Exception node and its scope
-int
-be_visitor_exception::visit_exception (be_exception *node)
-{
- return -1; // must be overriden
-}
-
-int
-be_visitor_exception::visit_field (be_field *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_EXCEPTION_CH:
- ctx.state (TAO_CodeGen::TAO_FIELD_CH);
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CI:
- ctx.state (TAO_CodeGen::TAO_FIELD_CI);
- break;
- case TAO_CodeGen::TAO_EXCEPTION_CS:
- ctx.state (TAO_CodeGen::TAO_FIELD_CS);
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception::"
- "visit_field - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception::"
- "visit_field - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception::"
- "visit_field - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// ******************************************************
-// for client header
-// ******************************************************
-
-be_visitor_exception_ch::be_visitor_exception_ch (be_visitor_context *ctx)
- : be_visitor_exception (ctx)
-{
-}
-
-be_visitor_exception_ch::~be_visitor_exception_ch (void)
-{
-}
-
-// visit the Exception node and its scope
-int be_visitor_exception_ch::visit_exception (be_exception *node)
-{
- TAO_OutStream *os; // output stream
-
- if (!node->cli_hdr_gen () && !node->imported ()) // not already generated and
- // not imported
- {
- os = this->ctx_->stream ();
-
- os->gen_ifdef_macro (node->flatname (), "_ptr");
-
- os->indent ();
- *os << "class " << node->local_name () << ";" << be_nl;
- // generate the _ptr declaration
- *os << "typedef " << node->local_name () << " *"
- << node->local_name () << "_ptr;" << be_nl;
- os->gen_endif ();
-
- os->gen_ifdef_macro (node->flatname ());
-
- os->indent ();
- *os << "class " << idl_global->export_macro ()
- << " " << node->local_name ()
- << " : public CORBA::UserException" << be_nl;
- *os << "{" << be_nl
- << "public:\n";
- os->incr_indent ();
- // constructors and destructor
- *os << node->local_name () << " (void); // default ctor" << be_nl;
- *os << node->local_name () << " (const " << node->local_name ()
- << " &); // copy ctor" << be_nl;
- *os << "~" << node->local_name () << "(void); // dtor" << be_nl;
-
- // generate constructor that takes each member as a parameter. We need a
- // new state. Such a constructor exists if we have members
- if (node->member_count () > 0)
- {
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CTOR_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor || (node->accept (visitor) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception::"
- "visit_exception - "
- "codegen for ctor failed\n"), -1);
- }
- delete visitor;
- }
-
- // assignment operator
- *os << node->local_name () << " &operator= (const "
- << node->local_name () << " &);" << be_nl;
- // the static _narrow method
- *os << "static " << node->local_name ()
- << " *_narrow (CORBA::Exception *);\n";
-
- // generate code for field members
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception_ch::"
- "visit_exception - "
- "codegen for scope failed\n"), -1);
- }
-
- os->decr_indent ();
- *os << "};" << be_nl;
-
- // generate the typecode decl
- if (node->is_nested ())
- {
- // we have a scoped name
- os->indent ();
- *os << "static CORBA::TypeCode_ptr "
- << node->tc_name ()->last_component () << ";\n\n";
- }
- else
- {
- // we are in the ROOT scope
- os->indent ();
- *os << "extern "
- << idl_global->export_macro ()
- << " CORBA::TypeCode_ptr "
- << node->tc_name ()->last_component () << ";\n\n";
- }
- os->gen_endif ();
-
- node->cli_hdr_gen (1);
-
- }
- return 0;
-}
-
-// ******************************************************
-// for client inline
-// ******************************************************
-
-be_visitor_exception_ci::be_visitor_exception_ci (be_visitor_context *ctx)
- : be_visitor_exception (ctx)
-{
-}
-
-be_visitor_exception_ci::~be_visitor_exception_ci (void)
-{
-}
-
-// visit the Exception node and its scope
-int be_visitor_exception_ci::visit_exception (be_exception *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
-
- if (!node->cli_inline_gen () && !node->imported ())
- {
- os = this->ctx_->stream ();
- os->indent ();
- *os << "// *************************************************************"
- << be_nl;
- *os << "// Inline operations for exception " << node->name () << be_nl;
- *os << "// *************************************************************\n\n";
-
- // generate inline code required of any anonymous types of members
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception::"
- "visit_exception -"
- "code for inline failed\n"), -1);
- }
-
- node->cli_inline_gen (I_TRUE);
- }
- return 0;
-}
-
-// ***************************************************************************
-// for client stubs
-// ***************************************************************************
-be_visitor_exception_cs::be_visitor_exception_cs (be_visitor_context *ctx)
- : be_visitor_exception (ctx)
-{
-}
-
-be_visitor_exception_cs::~be_visitor_exception_cs (void)
-{
-}
-
-// visit the Exception_Cs node and its scope
-int be_visitor_exception_cs::visit_exception (be_exception *node)
-{
- TAO_OutStream *os; // output stream
-
- if (!node->cli_stub_gen () && !node->imported ())
- {
- os = this->ctx_->stream ();
-
- // default constructor
- os->indent ();
- *os << "// default constructor" << be_nl;
- *os << node->name () << "::" << node->local_name () << " (void)" << be_nl;
- *os << " : CORBA_UserException (CORBA::TypeCode::_duplicate ("
- << node->tc_name () << "))\n";
- *os << "{" << be_nl;
- *os << "}\n\n";
-
- // destructor
- os->indent ();
- *os << "// destructor - all members are of self managing types" << be_nl;
- *os << node->name () << "::~" << node->local_name () << " (void)" << be_nl;
- *os << "{" << be_nl;
- *os << "}\n\n";
-
- // copy constructor
- os->indent ();
- *os << "// copy constructor" << be_nl;
- *os << node->name () << "::" << node->local_name () << " (const " <<
- node->name () << " &_tao_excp)" << be_nl;
- *os << " :CORBA_UserException (" <<
- "CORBA::TypeCode::_duplicate (_tao_excp._type ()))" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- // assign each individual member
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception_cs::"
- "visit_exception -"
- "codegen for scope failed\n"), -1);
- }
- delete visitor;
- os->decr_indent ();
- *os << "}\n\n";
-
- // assignment operator
- os->indent ();
- *os << "// assignment operator" << be_nl;
- *os << node->name () << "&" << be_nl;
- *os << node->name () << "::operator= (const " <<
- node->name () << " &_tao_excp)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "this->type_ = " <<
- "CORBA::TypeCode::_duplicate (_tao_excp._type ());\n";
- // assign each individual member
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception_cs::"
- "visit_exception -"
- "codegen for scope failed\n"), -1);
- }
- delete visitor;
- os->indent ();
- *os << "return *this;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // constructor taking all members. It exists only if there are any
- // members
- if (node->member_count () > 0)
- {
- // generate the signature
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CTOR_CS);
- visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor || (node->accept (visitor) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception::"
- "visit_exception - "
- "codegen for ctor failed\n"), -1);
- }
- delete visitor;
-
- *os << " : CORBA_UserException "
- << " (CORBA::TypeCode::_duplicate (" << node->tc_name ()
- << "))" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- // assign each individual member. We need yet another state
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CTOR_ASSIGN_CS);
- ctx.exception (1); // indicate that the special ctor is being
- // generated
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception_cs::"
- "visit_exception -"
- "codegen for scope failed\n"), -1);
- }
- delete visitor;
- os->decr_indent ();
- *os << "}\n\n";
- }
-
- // narrow method
- os->indent ();
- *os << "// narrow" << be_nl;
- *os << node->name () << "_ptr " << be_nl;
- *os << node->name () << "::_narrow (CORBA::Exception *exc)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "if (!ACE_OS::strcmp (\"" << node->repoID () <<
- "\", exc->_id ())) // same type" << be_nl;
- *os << " return ACE_dynamic_cast (" << node->name () << "_ptr, exc);" <<
- be_nl;
- *os << "else" << be_nl;
- *os << " return 0;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // generate the typecode information here
- os->indent (); // start from current indentation level
- *os << "static const CORBA::Long _oc_" << node->flatname () << "[] =" <<
- be_nl;
- *os << "{\n";
- os->incr_indent (0);
- // note that we just need the parameters here and hence we generate the
- // encapsulation for the parameters
- if (node->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_structure::gen_client_stubs -"
- "codegen for scope failed\n"), -1);
- }
- os->decr_indent ();
- *os << "};" << be_nl;
-
- *os << "static CORBA::TypeCode _tc__tc_" << node->flatname () <<
- " (CORBA::tk_struct, sizeof (_oc_" << node->flatname () <<
- "), (char *) &_oc_" << node->flatname () <<
- ", CORBA::B_FALSE);" << be_nl;
- *os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_" <<
- node->flatname () << ";\n\n";
-
- node->cli_stub_gen (I_TRUE);
- }
-
- return 0;
-}
-
-// ************************************************************************
-// code to generate the special ctor
-// ************************************************************************
-
-be_visitor_exception_ctor::be_visitor_exception_ctor
-(be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_exception_ctor::~be_visitor_exception_ctor (void)
-{
-}
-
-int
-be_visitor_exception_ctor::post_process (void)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- *os << ",\n";
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_exception (be_exception *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << node->local_name ();
- else
- *os << node->name () << "::" << node->local_name ();
- *os << "(" << be_idt << "\n";
-
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_exception_ctor_assign::"
- "visit_exception - "
- "codegen for scope failed\n"),
- -1);
- }
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << be_uidt << ");\n\n";
- else
- *os << be_uidt << ")\n\n";
-
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_field (be_field *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- // retrieve the type
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_exception_ctor::"
- "visit_exception - "
- "Bad field type\n"),
- -1);
- }
-
- os->indent ();
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_exception_ctor::"
- "visit_field - "
- "cannot accept visitor\n"),
- -1);
- }
-
- *os << " _tao_" << node->local_name ();
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << "const " << node->nested_type_name (this->ctx_->scope ());
- else
- *os << "const " << node->name ();
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << node->nested_type_name (this->ctx_->scope ());
- else
- *os << node->name ();
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << "const " << node->nested_type_name (this->ctx_->scope ());
- else
- *os << "const " << node->name ();
- *os << "_ptr ";
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << "const " << node->nested_type_name (this->ctx_->scope ());
- else
- *os << "const " << node->name ();
- *os << "_ptr ";
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- // check if the type is an any
- if (node->pt () == AST_PredefinedType::PT_any)
- {
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << "const " << node->nested_type_name (this->ctx_->scope ());
- else
- *os << "const " << node->name ();
- *os << " &";
- return 0;
- } // end of if
- else if (node->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << "const " << node->nested_type_name (this->ctx_->scope ());
- else
- *os << "const " << node->name ();
- *os << "_ptr ";
- } // end else if
- else // simple predefined types
- {
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << node->nested_type_name (this->ctx_->scope ());
- else
- *os << node->name ();
- } // end of else
-
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << "const " << node->nested_type_name (this->ctx_->scope ());
- else
- *os << "const " << node->name ();
- *os << " &";
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- *os << "const char *";
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << "const " << node->nested_type_name (this->ctx_->scope ());
- else
- *os << "const " << node->name ();
- *os << " &";
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_EXCEPTION_CTOR_CH)
- *os << "const " << node->nested_type_name (this->ctx_->scope ());
- else
- *os << "const " << node->name ();
- *os << " &";
- return 0;
-}
-
-int be_visitor_exception_ctor::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
-
-// ************************************************************************
-// used for the body of the assignment operator and the copy constructor
-// ************************************************************************
-
-be_visitor_exception_ctor_assign::be_visitor_exception_ctor_assign (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_exception_ctor_assign::~be_visitor_exception_ctor_assign (void)
-{
-}
-
-int be_visitor_exception_ctor_assign::visit_exception (be_exception *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_exception_ctor_assign::"
- "visit_exception - "
- "codegen for scope failed\n"),
- -1);
- }
-
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_field (be_field *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- this->ctx_->node (node); // save the argument node
-
- // retrieve the type
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_exception_ctor_assign::"
- "visit_field - "
- "Bad field type\n"),
- -1);
- }
-
- // Different types have different mappings when used as in/out or
- // inout parameters. Let this visitor deal with the type
-
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_exception_ctor_assign::"
- "visit_field - "
- "cannot accept visitor\n"),
- -1);
- }
-
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_array (be_array *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_decl *bd = this->ctx_->node ();
-
- os->indent ();
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = _tao_" << bd->local_name ()
- << ";\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = _tao_excp." << bd->local_name ()
- << ";\n";
- }
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_enum (be_enum *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_decl *bd = this->ctx_->node ();
-
- os->indent ();
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = _tao_" << bd->local_name ()
- << ";\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = _tao_excp." << bd->local_name ()
- << ";\n";
- }
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_decl *bd = this->ctx_->node ();
-
- os->indent ();
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = " << node->name ()
- << "::_duplicate (_tao_" << bd->local_name () << ");\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = " << node->name ()
- << "::_duplicate (_tao_excp." << bd->local_name () << ".in ());\n";
- }
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_decl *bd = this->ctx_->node ();
-
- os->indent ();
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = " << node->name ()
- << "::_duplicate (_tao_" << bd->local_name () << ");\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = " << node->name ()
- << "::_duplicate (_tao_excp." << bd->local_name () << ".in ());\n";
- }
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_decl *bd = this->ctx_->node ();
-
- os->indent ();
- return 0;
- // check if the type is an any
- if (node->pt () == AST_PredefinedType::PT_any)
- {
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = _tao_"
- << bd->local_name () << ";\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = _tao_excp."
- << bd->local_name () << ";\n";
- }
- } // end of if
- else if (node->pt () == AST_PredefinedType::PT_pseudo) // e.g., CORBA::Object
- {
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = "
- << node->name () << "::_duplicate (_tao_"
- << bd->local_name () << ");\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = "
- << node->name () << "::_duplicate (_tao_excp."
- << bd->local_name () << ".in ());\n";
- }
- } // end else if
- else // simple predefined types
- {
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = _tao_"
- << bd->local_name () << ";\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = _tao_excp."
- << bd->local_name () << ";\n";
- }
- } // end of else
-
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_sequence (be_sequence *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_decl *bd = this->ctx_->node ();
-
- os->indent ();
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = _tao_" << bd->local_name ()
- << ";\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = _tao_excp." << bd->local_name ()
- << ";\n";
- }
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_decl *bd = this->ctx_->node ();
-
- os->indent ();
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = CORBA::string_dup (_tao_"
- << bd->local_name () << ");\n";
- }
- else
- {
- *os << "this->" << bd->local_name ()
- << " = CORBA::string_dup (_tao_excp." << bd->local_name ()
- << ".in ());\n";
- }
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_structure (be_structure *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_decl *bd = this->ctx_->node ();
-
- os->indent ();
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = _tao_" << bd->local_name ()
- << ";\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = _tao_excp." << bd->local_name ()
- << ";\n";
- }
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_union (be_union *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_decl *bd = this->ctx_->node ();
-
- os->indent ();
- if (this->ctx_->exception ()) // special ctor
- {
- *os << "this->" << bd->local_name () << " = _tao_" << bd->local_name ()
- << ";\n";
- }
- else
- {
- *os << "this->" << bd->local_name () << " = _tao_excp." << bd->local_name ()
- << ";\n";
- }
- return 0;
-}
-
-int be_visitor_exception_ctor_assign::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_field.cpp b/TAO/TAO_IDL/be/be_visitor_field.cpp
deleted file mode 100644
index 655dfc073ca..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_field.cpp
+++ /dev/null
@@ -1,777 +0,0 @@
-//
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_field.cpp
-//
-// = DESCRIPTION
-// Concrete visitor for the base "BE_Field" node
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_field.h"
-
-// **********************************************
-// visitor for field in the client header file
-// **********************************************
-
-// constructor
-be_visitor_field_ch::be_visitor_field_ch (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-// destructor
-be_visitor_field_ch::~be_visitor_field_ch (void)
-{
-}
-
-// visit the field node
-int
-be_visitor_field_ch::visit_field (be_field *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // field's type
-
- os = this->ctx_->stream ();
- // first generate the type information
- bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_field - "
- "Bad field type\n"
- ), -1);
- }
-
- this->ctx_->node (node); // save the node
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_field - "
- "codegen for field type failed\n"
- ), -1);
- }
- // now output the field name
- *os << " " << node->local_name () << ";\n";
- return 0;
-}
-
-// =visit operations on all possible data types that a field can be
-
-// visit array type
-int
-be_visitor_field_ch::visit_array (be_array *node)
-{
- return 0;
-}
-
-// visit enum type
-int
-be_visitor_field_ch::visit_enum (be_enum *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt;
-
- os = this->ctx_->stream ();
-
- // set the right type;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // if not a typedef and we are defined in the use scope, we must be defined
- if (!this->ctx_->alias () // not a typedef
- && node->is_child (this->ctx_->scope ()))
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the enum declaration
- ctx.state (TAO_CodeGen::TAO_ENUM_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_enum - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_enum - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- // now use this enum as a "type" for the subsequent declarator
- os->indent (); // start from current indentation level
- *os << bt->nested_type_name (this->ctx_->scope ());
-
- return 0;
-}
-
-// visit interface type
-int
-be_visitor_field_ch::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt;
-
- os = this->ctx_->stream ();
- // set the right type;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // if not a typedef and we are defined in the use scope, we must be defined
- os->indent (); // start from current indentation level
- *os << bt->nested_type_name (this->ctx_->scope (), "_var");
- return 0;
-}
-
-// visit interface forward type
-int
-be_visitor_field_ch::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt;
-
- os = this->ctx_->stream ();
- // set the right type;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // if not a typedef and we are defined in the use scope, we must be defined
- os->indent (); // start from current indentation level
- *os << bt->nested_type_name (this->ctx_->scope (), "_var");
- return 0;
-}
-
-// visit predefined type
-int
-be_visitor_field_ch::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt;
-
- os = this->ctx_->stream ();
- // set the right type;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // if not a typedef and we are defined in the use scope, we must be defined
- os->indent (); // start from current indentation level
- if (node->pt () == AST_PredefinedType::PT_pseudo) // is a psuedo obj
- *os << bt->nested_type_name (this->ctx_->scope (), "_var");
- else
- *os << bt->nested_type_name (this->ctx_->scope ());
- return 0;
-}
-
-// visit sequence type
-int
-be_visitor_field_ch::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt;
-
- os = this->ctx_->stream ();
- // set the right type;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // if not a typedef and we are defined in the use scope, we must be defined
- if (!this->ctx_->alias () // not a typedef
- && node->is_child (this->ctx_->scope ()))
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the sequence declaration
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_sequence - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_sequence - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- os->indent (); // start from current indentation level
- *os << bt->nested_type_name (this->ctx_->scope ());
- return 0;
-}
-
-// visit string type
-int
-be_visitor_field_ch::visit_string (be_string *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
- os->indent (); // start from current indentation level
- *os << "CORBA::String_var";
- return 0;
-}
-
-// visit structure type
-int
-be_visitor_field_ch::visit_structure (be_structure *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt;
-
- os = this->ctx_->stream ();
- // set the right type;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // if not a typedef and we are defined in the use scope, we must be defined
-
- if (!this->ctx_->alias () // not a typedef
- && node->is_child (this->ctx_->scope ()))
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the struct declaration
- ctx.state (TAO_CodeGen::TAO_STRUCT_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_struct - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_struct - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- os->indent (); // start from current indentation level
- *os << bt->nested_type_name (this->ctx_->scope ());
- return 0;
-}
-
-// visit typedefed type
-int
-be_visitor_field_ch::visit_typedef (be_typedef *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
- os->indent (); // start from current indentation level
- this->ctx_->alias (node); // save the node for use in code generation and
- // indicate that the field of the field node
- // is a typedefed quantity
-
- // make a decision based on the primitive base type
- be_type *bt = node->primitive_base_type ();
- if (!bt || (bt->accept (this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_spec_ch::"
- "visit_typedef - "
- "Bad primitive type\n"
- ), -1);
- }
- return 0;
-}
-
-// visit union type
-int
-be_visitor_field_ch::visit_union (be_union *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt;
-
- os = this->ctx_->stream ();
- // set the right type;
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // if not a typedef and we are defined in the use scope, we must be defined
- if (!this->ctx_->alias () // not a typedef
- && node->is_child (this->ctx_->scope ()))
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the enum declaration
- ctx.state (TAO_CodeGen::TAO_ENUM_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_enum - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ch::"
- "visit_enum - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- os->indent (); // start from current indentation level
- *os << bt->nested_type_name (this->ctx_->scope ());
- return 0;
-}
-
-// **********************************************
-// visitor for field in the client inline file.
-//
-// Generate inline code for types that are defined
-// inside the structure
-// **********************************************
-
-// constructor
-be_visitor_field_ci::be_visitor_field_ci (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-// destructor
-be_visitor_field_ci::~be_visitor_field_ci (void)
-{
-}
-
-// visit the field node
-int
-be_visitor_field_ci::visit_field (be_field *node)
-{
- TAO_OutStream *os;
- be_type *bt; // field's type
-
- os = this->ctx_->stream ();
- // first generate the type information
- bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ci::"
- "visit_field - "
- "Bad field type\n"
- ), -1);
- }
-
- this->ctx_->node (node); // save the node
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ci::"
- "visit_field - "
- "codegen for field type failed\n"
- ), -1);
- }
- return 0;
-}
-
-// =visit operations on all possible data types that a field can be
-
-// visit array
-int
-be_visitor_field_ci::visit_array (be_array *node)
-{
- return 0;
-}
-
-// visit sequence
-int
-be_visitor_field_ci::visit_sequence (be_sequence *node)
-{
- return 0;
-}
-
-// visit structure type
-int
-be_visitor_field_ci::visit_structure (be_structure *node)
-{
- if (node->node_type () != AST_Decl::NT_typedef // not a typedef
- && node->is_child (this->ctx_->scope ())) // node is defined inside the
- // structure
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // generate the inline code for structs
- ctx.state (TAO_CodeGen::TAO_STRUCT_CI);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ci::"
- "visit_struct - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ci::"
- "visit_struct - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- return 0;
-}
-
-// visit typedef type
-int
-be_visitor_field_ci::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // save the typedef node for use in code generation
- // as we visit the base type
-
- // the node to be visited in the base primitve type that gets typedefed
- be_type *bt = node->primitive_base_type ();
- if (!bt || (bt->accept (this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_typedef - "
- "Bad primitive type\n"
- ), -1);
- }
-
- return 0;
-}
-
-// visit union type
-int
-be_visitor_field_ci::visit_union (be_union *node)
-{
- if (node->node_type () != AST_Decl::NT_typedef // not a typedef
- && node->is_child (this->ctx_->scope ())) // node is defined inside the
- // structure
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // generate the inline code for union
- ctx.state (TAO_CodeGen::TAO_UNION_CI);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ci::"
- "visit_struct - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_ci::"
- "visit_struct - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- return 0;
-}
-
-// **********************************************
-// visitor for field in the client stubs file
-// **********************************************
-
-// constructor
-be_visitor_field_cs::be_visitor_field_cs (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-// destructor
-be_visitor_field_cs::~be_visitor_field_cs (void)
-{
-}
-
-// visit the field node
-int
-be_visitor_field_cs::visit_field (be_field *node)
-{
- TAO_OutStream *os; // output stream
-
- be_type *bt; // field's type
-
- os = this->ctx_->stream ();
- // first generate the type information
- bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_field - "
- "Bad field type\n"
- ), -1);
- }
-
- this->ctx_->node (node); // save the node
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_field - "
- "codegen for field type failed\n"
- ), -1);
- }
- return 0;
-}
-
-// visit array
-int
-be_visitor_field_cs::visit_array (be_array *node)
-{
- return 0;
-}
-
-// visit enum type
-int
-be_visitor_field_cs::visit_enum (be_enum *node)
-{
- if (node->node_type () != AST_Decl::NT_typedef // not a typedef
- && node->is_child (this->ctx_->scope ())) // node is defined inside the
- // structure
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // generate the typcode for enums
- ctx.state (TAO_CodeGen::TAO_ENUM_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_enum - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_enum - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- return 0;
-}
-
-int
-be_visitor_field_cs::visit_sequence (be_sequence *node)
-{
- if (node->node_type () != AST_Decl::NT_typedef // not a typedef
- && node->is_child (this->ctx_->scope ())) // node is defined inside the
- // structure
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // generate the inline code for structs
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_sequence - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_sequence - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- return 0;
-}
-
-// visit structure type
-int
-be_visitor_field_cs::visit_structure (be_structure *node)
-{
- if (node->node_type () != AST_Decl::NT_typedef // not a typedef
- && node->is_child (this->ctx_->scope ())) // node is defined inside the
- // structure
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // generate the inline code for structs
- ctx.state (TAO_CodeGen::TAO_STRUCT_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_struct - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_struct - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- return 0;
-}
-
-// visit typedef type
-int
-be_visitor_field_cs::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // save the typedef node for use in code generation
- // as we visit the base type
-
- // the node to be visited in the base primitve type that gets typedefed
- be_type *bt = node->primitive_base_type ();
- if (!bt || (bt->accept (this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_typedef - "
- "Bad primitive type\n"
- ), -1);
- }
-
- return 0;
-}
-
-// visit union type
-int
-be_visitor_field_cs::visit_union (be_union *node)
-{
- if (node->node_type () != AST_Decl::NT_typedef // not a typedef
- && node->is_child (this->ctx_->scope ())) // node is defined inside the
- // structure
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // generate the inline code for union
- ctx.state (TAO_CodeGen::TAO_UNION_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_union - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_field_cs::"
- "visit_union - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface.cpp
deleted file mode 100644
index 7c93e617469..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_interface.cpp
+++ /dev/null
@@ -1,1934 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_interface.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Interface
-//
-// = AUTHOR
-// Aniruddha Gokhale and Carlos O'Ryan
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_interface.h"
-
-// ******************************************************
-// Generic Interface visitor
-// ******************************************************
-
-be_visitor_interface::be_visitor_interface (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_interface::~be_visitor_interface (void)
-{
-}
-
-// this method must be overridden by the derived interface visitors
-int
-be_visitor_interface::visit_interface (be_interface *node)
-{
- return -1;
-}
-
-// =all common visit methods for interface visitor
-
-// visit an attribute
-int
-be_visitor_interface::visit_attribute (be_attribute *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_INTERFACE_CH:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_CH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CS:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_CS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_SH:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_SH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_SS:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_SS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_COLLOCATED_SS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CI:
- case TAO_CodeGen::TAO_INTERFACE_SI:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_attribute - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_attribute - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_attribute - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit a constant
-int
-be_visitor_interface::visit_constant (be_constant *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_INTERFACE_CH:
- ctx.state (TAO_CodeGen::TAO_CONSTANT_CH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CS:
- ctx.state (TAO_CodeGen::TAO_CONSTANT_CS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS:
- case TAO_CodeGen::TAO_INTERFACE_CI:
- case TAO_CodeGen::TAO_INTERFACE_SH:
- case TAO_CodeGen::TAO_INTERFACE_SI:
- case TAO_CodeGen::TAO_INTERFACE_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_constant - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_constant - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_constant - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-//visit an enum
-int
-be_visitor_interface::visit_enum (be_enum *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_INTERFACE_CH:
- ctx.state (TAO_CodeGen::TAO_ENUM_CH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CS:
- ctx.state (TAO_CodeGen::TAO_ENUM_CS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CI:
- case TAO_CodeGen::TAO_INTERFACE_SH:
- case TAO_CodeGen::TAO_INTERFACE_SI:
- case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_enum - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_enum - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_enum - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an exception
-int
-be_visitor_interface::visit_exception (be_exception *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_INTERFACE_CH:
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CI:
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CI);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CS:
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_SH:
- case TAO_CodeGen::TAO_INTERFACE_SI:
- case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_exception - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_exception - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_exception - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an operation
-int
-be_visitor_interface::visit_operation (be_operation *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_INTERFACE_CH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_CH);
- // return node->gen_client_header ();
- break;
- case TAO_CodeGen::TAO_INTERFACE_CS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_CS);
- // return node->gen_client_stubs ();
- break;
- case TAO_CodeGen::TAO_INTERFACE_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_SH);
- // return node->gen_server_header ();
- break;
- case TAO_CodeGen::TAO_INTERFACE_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_SS);
- // return node->gen_server_skeletons ();
- break;
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_COLLOCATED_SS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CI:
- case TAO_CodeGen::TAO_INTERFACE_SI:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_operation - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- // grab the appropriate visitor
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_operation - "
- "NUL visitor\n"
- ), -1);
- }
-
- // visit the node using this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_operation - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an structure
-int
-be_visitor_interface::visit_structure (be_structure *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_INTERFACE_CH:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CI:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CI);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CS:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_SH:
- case TAO_CodeGen::TAO_INTERFACE_SI:
- case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_structure - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_structure - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_structure - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit a union
-int
-be_visitor_interface::visit_union (be_union *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_INTERFACE_CH:
- ctx.state (TAO_CodeGen::TAO_UNION_CH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CI:
- ctx.state (TAO_CodeGen::TAO_UNION_CI);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CS:
- ctx.state (TAO_CodeGen::TAO_UNION_CS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_SH:
- case TAO_CodeGen::TAO_INTERFACE_SI:
- case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_union - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_union - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_union - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit a typedef
-int
-be_visitor_interface::visit_typedef (be_typedef *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_INTERFACE_CH:
- ctx.state (TAO_CodeGen::TAO_TYPEDEF_CH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CI:
- ctx.state (TAO_CodeGen::TAO_TYPEDEF_CI);
- break;
- case TAO_CodeGen::TAO_INTERFACE_CS:
- ctx.state (TAO_CodeGen::TAO_TYPEDEF_CS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_SH:
- case TAO_CodeGen::TAO_INTERFACE_SI:
- case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_typedef - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_typedef - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_typedef - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// ******************************************************
-// Interface visitor for client header
-// ******************************************************
-
-be_visitor_interface_ch::be_visitor_interface_ch (be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_ch::~be_visitor_interface_ch (void)
-{
-}
-
-int
-be_visitor_interface_ch::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
- long i; // loop index
-
- if (!node->cli_hdr_gen () && !node->imported ()) // not already generated and
- // not imported
- {
-
- os = this->ctx_->stream ();
-
- // == STEP 1: generate the class name and class names we inherit ==
-
- // generate the ifdefined macro for the _ptr type
- os->gen_ifdef_macro (node->flatname (), "_ptr");
-
- // the following two are required to be under the ifdef macro to avoid
- // multiple declarations
-
- os->indent (); // start with whatever indentation level we are at
- // forward declaration
- *os << "class " << node->local_name () << ";" << be_nl;
- // generate the _ptr declaration
- *os << "typedef " << node->local_name () << " *" << node->local_name ()
- << "_ptr;" << be_nl;
-
- os->gen_endif ();
-
- // generate the ifdefined macro for the var type
- os->gen_ifdef_macro (node->flatname (), "_var");
-
- // generate the _var declaration
- if (node->gen_var_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "codegen for _var failed\n"), -1);
- }
- os->gen_endif ();
-
- // generate the ifdef macro for the _out class
- os->gen_ifdef_macro (node->flatname (), "_out");
-
- // generate the _out declaration - ORBOS/97-05-15 pg 16-20 spec
- if (node->gen_out_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "codegen for _out failed\n"), -1);
- }
- // generate the endif macro
- os->gen_endif ();
-
- // now the interface definition itself
- os->gen_ifdef_macro (node->flatname ());
-
- // now generate the class definition
- os->indent ();
- *os << "class " << idl_global->export_macro ()
- << " " << node->local_name ();
-
- if (node->n_inherits () > 0) // node interface inherits from other
- // interfaces
- {
- *os << ": ";
- for (i = 0; i < node->n_inherits (); i++)
- {
- be_interface *inherited =
- be_interface::narrow_from_decl (node->inherits ()[i]);
- be_decl *scope = 0;
- if (inherited->is_nested ())
- {
- // inherited node is used in the scope of "node" node
- scope = be_scope::narrow_from_scope (node->defined_in ())
- ->decl ();
- }
-
- *os << "public virtual ";
- *os << inherited->nested_type_name (scope); // dump the scoped name
- if (i < node->n_inherits () - 1) // node is the case of multiple
- // inheritance, so put a comma
- {
- *os << ", ";
- }
- } // end of for loop
- *os << be_nl;
- }
- else
- {
- // we do not inherit from anybody, hence we do so from the base
- // CORBA::Object class
- *os << " : public virtual CORBA::Object" << be_nl;
- }
-
- // generate the body
-
- *os << "{" << be_nl
- << "public:" << be_idt_nl
- // generate the static _duplicate, _narrow, and _nil operations
- << "// the static operations" << be_nl
- << "static " << node->local_name () << "_ptr " << "_duplicate ("
- << node->local_name () << "_ptr obj);" << be_nl
- << "static " << node->local_name () << "_ptr " << "_narrow ("
- << "CORBA::Object_ptr obj, CORBA::Environment &env);" << be_nl
- << "static " << node->local_name () << "_ptr " << "_nil (void);\n\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 (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "codegen for scope failed\n"), -1);
- }
- // the _is_a method
- os->indent ();
- *os << "virtual CORBA::Boolean _is_a ("
- << "const CORBA::Char *type_id, " << be_idt << be_idt_nl
- << "CORBA::Environment &env" << be_uidt_nl
- << ");" << be_uidt_nl
- << "virtual const char* "
- << "_interface_repository_id (void) const;" << be_uidt_nl;
-
- // generate the "protected" constructor so that users cannot instantiate
- // us
- *os << "protected:" << be_idt_nl
- << node->local_name () << " (void); // default constructor" << be_nl
- << node->local_name ()
- << " (STUB_Object *objref, " << be_idt << be_idt_nl
- << "TAO_ServantBase *_tao_servant = 0, " << be_nl
- << "CORBA::Boolean _tao_collocated = 0" << be_uidt_nl
- << ");" << be_uidt_nl
- << "virtual ~" << node->local_name () << " (void);" << be_uidt_nl;
-
- // private copy constructor and assignment operator. These are not
- // allowed, hence they are private.
- *os << "private:\n";
- os->incr_indent ();
- *os << node->local_name () << " (const " << node->local_name () << " &);"
- << be_nl
- << "void operator= (const " << node->local_name () << " &);\n";
- os->decr_indent ();
- *os << "};\n\n";
- os->gen_endif ();
-
-
- // generate the typecode decl. If we are in the outermost scope, our typecode
- // decl is extern
- if (node->is_nested ())
- {
- // we have a scoped name
- os->indent ();
- *os << "static CORBA::TypeCode_ptr "
- << node->tc_name ()->last_component () << ";\n\n";
- }
- else
- {
- // we are in the ROOT scope
- os->indent ();
- *os << "extern CORBA::TypeCode_ptr "
- << node->tc_name ()->last_component () << ";\n\n";
- }
-
- node->cli_hdr_gen (I_TRUE);
- } // if !cli_hdr_gen
- return 0;
-}
-
-// **************************************************
-// Interface visitor for client inline
-// **************************************************
-be_visitor_interface_ci::be_visitor_interface_ci (be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_ci::~be_visitor_interface_ci (void)
-{
-}
-
-int
-be_visitor_interface_ci::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
-
- if (node->cli_inline_gen () || node->imported ())
- return 0;
-
- os = this->ctx_->stream ();
-
- os->indent (); // start from the current indentation level
-
- // generate the constructors and destructor
- *os << "ACE_INLINE" << be_nl;
- *os << node->name () << "::" << node->local_name () <<
- " (void) // default constructor" << be_nl;
- *os << "{}" << be_nl << be_nl;
-
- *os << "ACE_INLINE" << be_nl;
- *os << node->name () << "::" << node->local_name () <<
- " (STUB_Object *objref, TAO_ServantBase *_tao_servant, "
- << "CORBA::Boolean _tao_collocated) // constructor" << be_nl;
- *os << " : CORBA_Object (objref, _tao_servant, _tao_collocated)" << be_nl;
- *os << "{}" << be_nl << be_nl;
-
- *os << "ACE_INLINE" << be_nl;
- *os << node->name () << "::~" << node->local_name () <<
- " (void) // destructor" << be_nl;
- *os << "{}\n\n";
-
- // generate the ifdefined macro for the _var type
- os->gen_ifdef_macro (node->flatname (), "_var");
- if (node->gen_var_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ci::"
- "visit_interface - "
- "codegen for _var failed\n"), -1);
- }
- os->gen_endif ();
-
- // generate the ifdefined macro for the _out type
- os->gen_ifdef_macro (node->flatname (), "_out");
- if (node->gen_out_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ci::"
- "visit_interface - "
- "codegen for _out failed\n"), -1);
- }
- os->gen_endif ();
-
- // generate inline methods for elements of our scope
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ci::"
- "visit_interface - "
- "codegen for scope failed\n"), -1);
- }
-
- return 0;
-}
-
-// ************************************************************
-// Interface visitor for client stubs
-// ************************************************************
-
-be_visitor_interface_cs::be_visitor_interface_cs (be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_cs::~be_visitor_interface_cs (void)
-{
-}
-
-int
-be_visitor_interface_cs::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
-
- if (node->cli_stub_gen () || node->imported ())
- return 0;
-
- os = this->ctx_->stream ();
-
- os->indent (); // start with whatever indentation level we are at
-
- // first generate the code for the static methods
-
- // The _duplicate method
- *os << node->name () << "_ptr " << node->name () << "::_duplicate ("
- << node->name () << "_ptr obj)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "if (!CORBA::is_nil (obj))\n";
- os->incr_indent ();
- *os << "obj->AddRef ();\n";
- os->decr_indent ();
- *os << be_nl;
- *os << "return obj;\n";
- os->decr_indent ();
- *os << "} // end of _duplicate" << be_nl << be_nl;
-
- // The _narrow method
- *os << node->name () << "_ptr " << node->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 " << node->name () << "::_nil ();" << be_uidt_nl
- << "if (!obj->_is_a (\"" << node->repoID () << "\", env))"
- << be_idt_nl
- << "return " << node->name () << "::_nil ();" << be_uidt_nl;
-
- *os << "if (!obj->_is_collocated ()" << be_idt << be_idt << be_idt_nl
- << " || !obj->_servant()" << be_nl
- << " || obj->_servant()->_downcast (\""
- << node->repoID () << "\") == 0" << be_uidt_nl
- << ")" << be_uidt << be_uidt_nl
- << "{" << be_idt_nl;
- *os << node->name () << "_ptr new_obj = new "
- << node->name () << "(obj->_get_parent ());" << be_nl
- << "return new_obj;" << be_uidt_nl
- << "} // end of if" << be_nl;
-
- *os << "STUB_Object *stub = obj->_servant ()->_create_stub (env);" << be_nl
- << "if (env.exception () != 0)" << be_idt_nl
- << "return " << node->name () << "::_nil ();" << be_uidt_nl
- << "void* servant = obj->_servant ()->_downcast (\""
- << node->repoID () << "\");" << be_nl
- << "return new ";
-
- // This may be necessary to work around a GCC compiler bug!
- const char *coll_name = node->full_coll_name ();
- const char *skel_name = node->full_skel_name ();
-
- *os << coll_name << "(" << be_idt << be_idt_nl
- << "ACE_reinterpret_cast(" << skel_name
- << "_ptr, servant)," << be_nl
- << "stub" << be_uidt_nl
- << ");" << be_uidt << be_uidt_nl
- << "}" << be_nl << be_nl;
-
- // _nil method
- *os << node->name () << "_ptr " << node->name () << "::_nil (void)" <<
- be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return (" << node->name () << "_ptr)NULL;\n";
- os->decr_indent ();
- *os << "} // end of _nil" << be_nl << be_nl;
-
- // generate code for the elements of the interface
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "codegen for scope failed\n"), -1);
- }
-
- // generate the is_a method
- os->indent ();
- *os << "CORBA::Boolean " << node->name () << "::_is_a (" <<
- "const CORBA::Char *value, CORBA::Environment &env)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "if (\n";
- os->incr_indent (0);
- if (node->traverse_inheritance_graph (be_interface::is_a_helper, os) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "_is_a method codegen failed\n"), -1);
- }
-
- os->indent ();
- *os << "(!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (env))))\n";
- *os << " return 1; // success using local knowledge\n";
- os->decr_indent ();
- *os << "else" << be_nl;
- *os << " return this->CORBA_Object::_is_a (value, env); // remote call\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
- *os << "const char* " << node->name ()
- << "::_interface_repository_id (void) const"
- << be_nl
- << "{" << be_idt_nl
- << "return \"" << node->repoID () << "\";" << be_uidt_nl
- << "}\n\n";
-
- // generate the typecode information here
- os->indent (); // start from current indentation level
- *os << "static const CORBA::Long _oc_" << node->flatname () << "[] =" <<
- be_nl;
- *os << "{\n";
- os->incr_indent (0);
- if (node->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "codegen for typecode failed\n"), -1);
- }
-
- os->decr_indent ();
- *os << "};" << be_nl;
-
- *os << "static CORBA::TypeCode _tc__tc_" << node->flatname () <<
- " (CORBA::tk_objref, sizeof (_oc_" << node->flatname () <<
- "), (char *) &_oc_" << node->flatname () <<
- ", CORBA::B_FALSE);" << be_nl;
- *os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_" <<
- node->flatname () << ";\n\n";
-
- return 0;
-}
-
-// ************************************************************
-// Interface visitor for server header
-// ************************************************************
-
-be_visitor_interface_sh::be_visitor_interface_sh (be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_sh::~be_visitor_interface_sh (void)
-{
-}
-
-int
-be_visitor_interface_sh::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
- long i; // loop index
- static char namebuf [NAMEBUFSIZE]; // holds the class name
-
- if (node->srv_hdr_gen () || node->imported ())
- return 0;
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
-
- os = this->ctx_->stream ();
-
- // generate the skeleton class name
-
- os->indent (); // start with whatever indentation level we are at
-
- // we shall have a POA_ prefix only if we are at the topmost level
- if (!node->is_nested ())
- {
- // we are outermost
- ACE_OS::sprintf (namebuf, "POA_%s", node->local_name ()->get_string ());
- }
- else
- {
- ACE_OS::sprintf (namebuf, "%s", node->local_name ()->get_string ());
- }
-
- *os << "class " << namebuf << ";" << be_nl;
-
- // generate the _ptr declaration
- *os << "typedef " << namebuf << " *" << namebuf
- << "_ptr;" << be_nl;
-
- // now generate the class definition
- *os << "class " << idl_global->export_macro ()
- << " " << namebuf << " : ";
- if (node->n_inherits () > 0) // this interface inherits from other interfaces
- {
- be_interface *intf; // inherited interface
-
- *os << "public virtual ";
- intf = be_interface::narrow_from_decl (node->inherits ()[0]);
- *os << intf->relative_skel_name (node->full_skel_name ());
- for (i = 1; i < node->n_inherits (); i++)
- {
- *os << ", public virtual ";
- intf = be_interface::narrow_from_decl (node->inherits ()[i]);
- *os << intf->relative_skel_name (node->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.
- *os << " public virtual PortableServer::ServantBase";
- }
- *os << be_nl
- << "{" << be_nl
- << "protected:" << be_idt_nl
- << namebuf << " (void);" << be_uidt_nl
- << "public:" << be_idt_nl
- << "virtual ~" << namebuf << " (void);" << 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
- << ");\n" << be_uidt;
-
- os->indent ();
- *os << "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 (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_sh::"
- "visit_interface - "
- "codegen for scope failed\n"),
- -1);
- }
- // add a skeleton for our _is_a method
- os->indent ();
- *os << "static void _is_a_skel (CORBA::ServerRequest &req, " <<
- "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
- if (node->traverse_inheritance_graph (be_interface::gen_skel_helper, os) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_sh::"
- "visit_interface - "
- "inheritance graph traversal failed\n"),
- -1);
- }
-
- // add the dispatch method
- os->indent ();
- *os << "virtual void _dispatch (CORBA::ServerRequest &_tao_req, "
- << "void *_tao_context, CORBA::Environment &_tao_env);\n\n";
-
- // Print out the _this() method.
- os->indent ();
- *os << node->name () << " *_this (CORBA::Environment &_tao_environment);\n";
- // the _interface_repository_id method
- os->indent ();
- *os << "virtual const char* _interface_repository_id"
- << " (void) const;\n";
-
- os->decr_indent ();
-
- *os << "};\n\n";
-
- // generate the collocated class
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_sh::"
- "visit_interface - "
- "codegen for collocated class failed\n"),
- -1);
- }
-
- *os << "\n";
-
- return 0;
-}
-
-// ************************************************************************
-// Interface visitor for server inline
-// ************************************************************************
-
-be_visitor_interface_si::be_visitor_interface_si (be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_si::~be_visitor_interface_si (void)
-{
-}
-
-int
-be_visitor_interface_si::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
-
- if (node->srv_inline_gen () || node->imported ())
- return 0;
-
- os = this->ctx_->stream ();
-
- os->indent (); // start with whatever indentation level we are at
-
- // Generate skeletons for operations of our base classes. These skeletons
- // just cast the pointer to the appropriate type before invoking the
- // call. Hence we generate these in the inline file
- if (node->traverse_inheritance_graph (be_interface::gen_skel_helper, os)
- == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_si::"
- "visit_interface - "
- "codegen for base class skeletons failed\n"), -1);
- }
-
- return 0;
-}
-
-// ************************************************************
-// Interface visitor for server skeletons
-// ************************************************************
-
-be_visitor_interface_ss::be_visitor_interface_ss (be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_ss::~be_visitor_interface_ss (void)
-{
-}
-
-int
-be_visitor_interface_ss::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
-
- if (node->srv_skel_gen () || node->imported ())
- return 0;
-
- os = this->ctx_->stream ();
-
- // generate the skeleton class name
-
- os->indent (); // start with whatever indentation level we are at
-
- if (node->gen_operation_table () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ss::"
- "visit_interface - "
- "codegen for operation table failed\n"),
- -1);
- }
-
- // constructor
- *os << "// skeleton constructor" << be_nl;
- // find if we are at the top scope or inside some module
- if (!node->is_nested ())
- {
- // we are outermost. So the POA_ prefix is prepended to our name
- *os << node->full_skel_name () << "::POA_" << node->local_name () <<
- " (void)" << be_nl;
- }
- else
- {
- // the POA_ prefix is prepended to our outermost module name
- *os << node->full_skel_name () << "::" << node->local_name () <<
- " (void)" << be_nl;
- }
-
- *os << "{" << be_idt_nl
- << "this->optable_ = &tao_" << node->flatname ()
- << "_optable;" << be_uidt_nl
- << "}\n\n";
-
- // destructor
- os->indent ();
- *os << "// skeleton destructor" << be_nl;
-
- if (!node->is_nested ())
- {
- // we are outermost. So the POA_ prefix is prepended to our name
- *os << node->full_skel_name () << "::~POA_" << node->local_name () <<
- " (void)" << be_nl;
- }
- else
- {
- // the POA_ prefix is prepended to our outermost module name
- *os << node->full_skel_name () << "::~" << node->local_name () <<
- " (void)" << be_nl;
- }
- *os << "{\n";
- *os << "}\n";
-
-
- // generate code for elements in the scope (e.g., operations)
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ss::"
- "visit_interface - "
- "codegen for scope failed\n"),
- -1);
- }
-
- // generate code for the _is_a skeleton
- os->indent ();
- *os << "static const TAO_Param_Data_Skel " << node->flatname ()
- << "_is_a_paramdata [] = " << be_nl;
- *os << "{" << be_idt_nl;
- *os << "{CORBA::_tc_boolean, 0, 0}," << be_nl;
- *os << "{CORBA::_tc_string, CORBA::ARG_IN, 0}" << be_uidt_nl;
- *os << "};" << be_nl;
- *os << "static const TAO_Call_Data_Skel " << node->flatname ()
- << "_is_a_calldata = " << be_nl;
- *os << "{\"_is_a\", 1, 2, " << node->flatname () << "_is_a_paramdata};" << be_nl;
- *os << "void " << node->full_skel_name ()
- << "::_is_a_skel (" << be_idt << be_idt_nl
- << "CORBA::ServerRequest &_tao_server_request, " << be_nl
- << "void * _tao_object_reference," << be_nl
- << "void * /*context*/," << be_nl
- << "CORBA::Environment &_tao_environment" << be_uidt_nl
- << ")" << be_uidt_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << node->full_skel_name () << "_ptr _tao_impl = ("
- << node->full_skel_name () << "_ptr) _tao_object_reference;"
- << be_nl;
- *os << "CORBA::Boolean _tao_retval;" << be_nl;
- *os << "char *_tao_value = 0;" << be_nl;
- *os << "_tao_server_request.demarshal (" << be_idt_nl
- << "_tao_environment, " << be_nl
- << "&" << node->flatname () << "_is_a_calldata, " << be_nl
- << "&_tao_retval, " << be_nl
- << "&_tao_value" << be_uidt_nl
- << ");" << be_nl;
- *os << "if (_tao_environment.exception () != 0) return;" << be_nl;
- *os << "_tao_retval = _tao_impl->_is_a (_tao_value, _tao_environment);"
- << be_nl;
- *os << "_tao_server_request.marshal (" << be_idt_nl
- << "_tao_environment, " << be_nl
- << "&" << node->flatname () << "_is_a_calldata, " << be_nl
- << "&_tao_retval, " << be_nl
- << "&_tao_value" << be_uidt_nl
- << ");" << be_nl;
- *os << "CORBA::string_free (_tao_value);" << be_uidt_nl;
- *os << "}\n\n";
-
-
- os->indent ();
- *os << "CORBA::Boolean " << node->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 (node->traverse_inheritance_graph (be_interface::is_a_helper, os) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ss::"
- "visit_interface - "
- "traversal of inhertance graph failed\n"),
- -1);
- }
-
- os->indent ();
- *os << "(!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";
-
- os->indent ();
- *os << "void* " << node->full_skel_name ()
- << "::_downcast (" << be_idt << be_idt_nl
- << "const char* logical_type_id" << be_uidt_nl
- << ")" << be_uidt_nl
- << "{" << be_idt_nl;
-
- if (node->traverse_inheritance_graph (be_interface::downcast_helper, os) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ss::"
- "visit_interface - "
- "traversal of inhertance graph failed\n"),
- -1);
- }
-
- *os << "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;
-
- *os << "return 0;" << be_uidt_nl
- << "}\n\n";
-
-
- // now the dispatch method
- os->indent ();
- *os << "void " << node->full_skel_name () <<
- "::_dispatch (CORBA::ServerRequest &req, " <<
- "void *context, CORBA::Environment &env)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "TAO_Skeleton skel; // pointer to skeleton for operation" << be_nl;
- *os << "CORBA::String opname = req.op_name (); // retrieve operation name"
- << be_nl;
- *os << "// find the skeleton corresponding to this opname" << be_nl;
- *os << "if (this->_find (opname, skel) == -1)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "env.exception (new CORBA_BAD_OPERATION (CORBA::COMPLETED_NO));"
- << be_nl;
- *os << "ACE_ERROR ((LM_ERROR, \"Bad operation <%s>\\n\", opname));\n";
- os->decr_indent ();
- *os << "}\n";
- *os << "else" << be_nl;
- *os << " skel (req, this, context, env);\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
- *os << "const char* " << node->full_skel_name ()
- << "::_interface_repository_id (void) const"
- << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return \"" << node->repoID () << "\";\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // generate the collocated class impl
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_INTERFACE_COLLOCATED_SS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ss::"
- "visit_interface - "
- "Bad visitor for collocated class\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ss::"
- "visit_interface - "
- "codegen for collocated class failed\n"),
- -1);
- }
- delete visitor;
-
- *os << "\n";
-
- // the _this () operation
- *os << node->name () << "*" << be_nl
- << node->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
- << "return new " << node->full_coll_name ()
- << " (this, stub);" << be_uidt << be_nl;
-
- *os << "}\n\n";
-
- return 0;
-}
-
-// ************************************************************
-// collocated class in header
-// ************************************************************
-
-be_visitor_interface_collocated_sh::be_visitor_interface_collocated_sh
-(be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_collocated_sh::~be_visitor_interface_collocated_sh (void)
-{
-}
-
-int be_visitor_interface_collocated_sh::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- os->gen_ifdef_macro (node->flatname (), "_collocated");
-
- // output the class defn
- os->indent ();
- *os << "class " << idl_global->export_macro ()
- << " " << node->local_coll_name ();
- os->incr_indent ();
- *os << " : public virtual " << node->name ();
-
- // generate base classes if any
- if (node->n_inherits () > 0)
- {
- for (int i = 0; i < node->n_inherits (); ++i)
- {
- *os << "," << be_nl;
- be_interface* parent =
- be_interface::narrow_from_decl (node->inherits()[i]);
- *os << " public virtual "
- << parent->relative_coll_name (node->full_coll_name ());
- }
- }
- *os << "\n";
- os->decr_indent ();
- *os << "{" << be_nl;
- *os << "public:\n";
- os->incr_indent ();
-
- *os << node->local_coll_name () << " (\n";
-
- os->incr_indent (0);
- os->incr_indent ();
-
- // XXXASG - can we make this a method to return the right name ??
- if (!node->is_nested ())
- {
- // The skeleton name is the outermost, we need to printout the
- // POA_ prefix that goes with it.
- *os << "POA_";
- }
-
- *os << node->local_name () << "_ptr "
- << " servant," << be_nl;
-
- *os << "STUB_Object *stub\n";
- os->decr_indent ();
- *os << ");\n";
- os->decr_indent (0);
-
- os->indent ();
- if (!node->is_nested ())
- {
- // The skeleton name is the outermost, we need to printout the
- // POA_ prefix that goes with it.
- *os << "POA_";
- }
- *os << node->local_name ()
- << "_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 (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_collocated_sh::"
- "visit_interface - "
- "codegen for scope failed\n"),
- -1);
- }
-
-#if 0
- // XXXASG - don't remove until we are sure that the scope visitor is doing
- // the task we expect it to do
- if (node->nmembers () > 0)
- {
- UTL_ScopeActiveIterator *si;
- ACE_NEW_RETURN (si,
- UTL_ScopeActiveIterator (node,
- UTL_Scope::IK_decls),
- -1);
- while (!si->is_done ())
- {
- AST_Decl *d = si->item ();
- si->next ();
- be_decl *bd = be_decl::narrow_from_decl (d);
- if (d->imported () || bd == 0)
- {
- continue;
- }
- if (bd->accept (this) == -1)
- {
- delete si;
- return -1;
- }
- }
- delete si;
- }
-#endif
-
- os->decr_indent ();
-
- *os << be_nl << "private:\n";
- os->incr_indent ();
- if (!node->is_nested ())
- {
- // The skeleton name is the outermost, we need to printout the
- // POA_ prefix that goes with it.
- *os << "POA_";
- }
- *os << node->local_name () << "_ptr servant_;\n";
- os->decr_indent ();
- *os << "};\n\n";
-
- os->gen_endif ();
-
- return 0;
-}
-
-#if 0
-int be_visitor_interface_collocated_sh::visit_operation (be_operation *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- os->indent (); // start with the current indentation level
-
- // every operation is declared virtual
- *os << "virtual ";
-
- // first generate the return type
- be_type *bt = be_type::narrow_from_decl (node->return_type ());
-
- // XXASG - this changes
- if (bt->write_as_return (os, bt) == -1)
- {
- return -1;
- }
-
- // generate the operation name
- *os << " " << node->local_name () << " ";
-
- // XXXASG - TODO
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_OTHERS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_colocated_sh::"
- "visit_operation - "
- "Bad visitor for arglist\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_colocated_sh::"
- "visit_operation - "
- "codegen for arglist failed\n"),
- -1);
- }
- *os << ";\n";
-
- return 0;
-}
-
-int be_visitor_interface_collocated_sh::visit_attribute (be_attribute *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- os->indent (); // start with the current indentation level
-
- be_type* bt = be_type::narrow_from_decl (node->field_type ());
-
- // the retrieve method is defined virtual
- *os << "virtual ";
-
- // XXXASG - change this
- if (bt->write_as_return (os, bt) == -1)
- {
- return -1;
- }
-
- *os << " " << node->local_name () << " (" << be_idt << be_idt_nl
- << "CORBA::Environment &env" << be_uidt_nl
- << ");\n" << be_uidt;
-
- if (!node->readonly ())
- {
- os->indent ();
- *os << "virtual void " << node->local_name ()
- << " (" << be_idt << be_idt;
-
- // XXXASG - TODO
- be_visitor_args_decl vdecl (os);
- vdecl.current_type_name (bt->name ());
- vdecl.argument_direction (AST_Argument::dir_IN);
- if (bt->accept (&vdecl) == -1)
- return -1;
-
- *os << " _tao_value," << be_nl
- << "CORBA::Environment &_tao_environment" << be_uidt_nl
- << ");\n" << be_uidt;
- }
- return 0;
-}
-#endif
-
-// ************************************************************
-// be_visitor_interface_collacted_ss
-// ************************************************************
-
-be_visitor_interface_collocated_ss::be_visitor_interface_collocated_ss
-(be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_collocated_ss::~be_visitor_interface_collocated_ss (void)
-{
-}
-
-int be_visitor_interface_collocated_ss::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = tao_cg->server_skeletons ();
- long i;
-
- this->ctx_->node (node);
-
- *os << node->full_coll_name () << "::"
- << node->local_coll_name () << " (\n";
-
- os->incr_indent (0);
- os->incr_indent ();
- *os << node->full_skel_name () << "_ptr "
- << " servant," << be_nl;
-
- *os << "STUB_Object *stub\n";
- os->decr_indent ();
- *os << ")\n";
- os->decr_indent (0);
-
- os->incr_indent ();
-#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)
- *os << ": " << node->local_name ()
- << " (stub, servant, CORBA::B_TRUE)," << be_nl;
-#else
- *os << ": " << 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 (node->n_inherits () > 0)
- {
- for (i = 0; i < node->n_inherits (); ++i)
- {
- be_interface* parent =
- be_interface::narrow_from_decl (node->inherits()[i]);
-#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)
- *os << " " << parent->local_coll_name () << " (servant, stub),"
- << be_nl;
-#else
- *os << " " << parent->full_coll_name () << " (servant, stub),"
- << be_nl;
-#endif /* ACE_WIN32 */
- }
- }
-
- *os << " CORBA_Object (stub, servant, CORBA::B_TRUE)," << be_nl
- << " servant_ (servant)";
-
- *os << "\n";
- os->decr_indent ();
- *os << "{\n";
- *os << "}\n\n";
-
- os->indent ();
- *os << node->full_skel_name () << "_ptr "
- << node->full_coll_name () << "::"
- << "_get_servant (void) const\n"
- << "{\n";
- os->incr_indent ();
- *os << "return this->servant_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
- *os << "CORBA::Boolean " << node->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 (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_collocated_ss::"
- "visit_scope - "
- "codegen for scope failed\n"),
- -1);
- }
-
-#if 0
- // XXXASG - DO NOT DELETE until the visit_scope has been tested
- if (node->nmembers () > 0)
- {
- UTL_ScopeActiveIterator *si;
- ACE_NEW_RETURN (si,
- UTL_ScopeActiveIterator (node,
- UTL_Scope::IK_decls),
- -1);
- while (!si->is_done ())
- {
- AST_Decl *d = si->item ();
- si->next ();
- be_decl *bd = be_decl::narrow_from_decl (d);
- // Only printout the operations, nested interfaces and
- // structures only go in the main declaration.
- if (d->imported () || bd == 0)
- {
- continue;
- }
- if (bd->accept (this) == -1)
- {
- delete si;
- return -1;
- }
- }
- delete si;
- }
-#endif
-
- return 0;
-}
-
-#if 0
-int be_visitor_interface_collocated_ss::visit_operation (be_operation *node)
-{
- TAO_OutStream *os = tao_cg->server_skeletons ();
- be_interface *intf = this->ctx_->be_scope_as_interface ();
-
- // retrieve the return type again because we have used bt to also retrieve
- // the argument types
- be_type *bt = be_type::narrow_from_decl (node->return_type ());
-
- if (bt->write_as_return (os, bt) == -1)
- {
- return -1;
- }
-
- *os << " " << intf->full_coll_name () << "::"
- << node->local_name () << " ";
-
- be_visitor_args_decl visitor (os);
- if (node->accept (&visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) args decl failed\n"), -1);
- }
- *os << "\n";
- os->indent ();
- *os << "{\n";
- os->incr_indent ();
-
- if (bt->node_type () != AST_Decl::NT_pre_defined
- || be_predefined_type::narrow_from_decl (bt)->pt () != AST_PredefinedType::PT_void)
- {
- *os << "return ";
- }
-
- *os << "this->servant_->" << node->local_name () << " (\n";
- os->incr_indent (0);
- os->incr_indent (0);
-
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_collocated_ss::"
- "visit_operation - "
- "codegen for scope failed\n"),
- -1);
- }
-
- os->indent ();
- *os << " _tao_environment\n";
- os->decr_indent ();
- *os << ");\n";
- os->decr_indent (0);
- os->decr_indent (0);
- *os << "}\n\n";
-
- return 0;
-}
-
-int be_visitor_interface_collocated_ss::visit_attribute (be_attribute *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_interface *intf = this->ctx_->be_scope_as_interface ();
-
- os->indent (); // start with the current indentation level
-
- be_type* bt = be_type::narrow_from_decl (node->field_type ());
-
- if (bt->write_as_return (os, bt) == -1)
- {
- return -1;
- }
-
- *os << be_nl << intf->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 ())
- {
- *os << be_nl
- << "void "
- << intf->full_coll_name ()
- << "::" << node->local_name ()
- << " (" << be_idt << be_idt_nl;
- // XXXASG - TODO
- be_visitor_args_decl vdecl (os);
- vdecl.current_type_name (bt->name ());
- vdecl.argument_direction (AST_Argument::dir_IN);
- if (bt->accept (&vdecl) == -1)
- return -1;
-
- *os << " _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_interface_collocated_ss::visit_argument (be_argument *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- os->indent ();
- *os << node->local_name () << ",\n";
- return 0;
-}
-#endif
diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd.cpp
deleted file mode 100644
index 03fa5598afc..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_interface_fwd.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_interface_fwd.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Interface_Fwd
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_interface_fwd.h"
-
-// ********************************************************************
-// Visitor implementation for the Interface_Fwd type
-// This one for the client header file
-// ********************************************************************
-
-be_visitor_interface_fwd_ch::be_visitor_interface_fwd_ch (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_interface_fwd_ch::~be_visitor_interface_fwd_ch (void)
-{
-}
-
-// visit the Interface_Fwd_Ch node and its scope
-int
-be_visitor_interface_fwd_ch::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- if (!node->cli_hdr_gen ())
- {
- os->indent (); // start from the current
-
- // all we do in this is generate a forward declaration of the class
- *os << "class " << node->local_name () << ";" << be_nl;
-
- // generate the ifdefined macro for the _ptr type
- os->gen_ifdef_macro (node->flatname (), "_ptr");
-
- // generate the _ptr declaration
- *os << "typedef " << node->local_name () << " *" << node->local_name ()
- << "_ptr;\n";
-
- os->gen_endif ();
-
- // enclose under an ifdef macro
- os->gen_ifdef_macro (node->flatname (), "_var");
-
- // generate the _var declaration
- if (node->gen_var_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_fwd_ch::"
- "visit_interface_fwd - "
- "codegen for _var failed\n"), -1);
- }
- // gen an endif
- os->gen_endif ();
-
- // enclose under an ifdef macro
- os->gen_ifdef_macro (node->flatname (), "_out");
-
- // generate the _out declaration - ORBOS/97-05-15 pg 16-20 spec
- if (node->gen_out_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_fwd_ch::"
- "visit_interface_fwd - "
- "codegen for _out failed\n"), -1);
- }
- // generate the endif macro
- os->gen_endif ();
- node->cli_hdr_gen (I_TRUE);
- }
- return 0;
-}
-
-// ********************************************************************
-// Visitor implementation for the Interface_Fwd type
-// This one for the client inline file
-// ********************************************************************
-
-be_visitor_interface_fwd_ci::be_visitor_interface_fwd_ci (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_interface_fwd_ci::~be_visitor_interface_fwd_ci (void)
-{
-}
-
-// visit the Interface_Fwd_ci node and its scope
-int
-be_visitor_interface_fwd_ci::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- if (!node->cli_inline_gen ())
- {
-
- // generate the ifdefined macro for the _var type
- os->gen_ifdef_macro (node->flatname (), "_var");
-
- if (node->gen_var_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_fwd_ci::"
- "visit_interface_fwd - "
- "codegen for _var failed\n"), -1);
- }
-
- os->gen_endif ();
-
- // generate the ifdefined macro for the _out type
- os->gen_ifdef_macro (node->flatname (), "_out");
-
- if (node->gen_out_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_fwd_ci::"
- "visit_interface_fwd - "
- "codegen for _out failed\n"), -1);
- }
- os->gen_endif ();
-
- node->cli_stub_gen (I_TRUE);
- }
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_module.cpp b/TAO/TAO_IDL/be/be_visitor_module.cpp
deleted file mode 100644
index 5b7107f9886..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_module.cpp
+++ /dev/null
@@ -1,658 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_module.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Module
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_module.h"
-
-// ******************************************************
-// Generic Module visitor
-// ******************************************************
-
-be_visitor_module::be_visitor_module (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_module::~be_visitor_module (void)
-{
-}
-
-// visit the Module node and its scope
-int be_visitor_module::visit_module (be_module *node)
-{
- // all we have to do is to visit the scope
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::visit_module - "
- "codegen for scope failed\n"), -1);
- }
- return 0;
-}
-
-// =all common visit methods for module visitor
-
-// visit a constant
-int
-be_visitor_module::visit_constant (be_constant *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_MODULE_CH:
- ctx.state (TAO_CodeGen::TAO_CONSTANT_CH);
- break;
- case TAO_CodeGen::TAO_MODULE_CS:
- ctx.state (TAO_CodeGen::TAO_CONSTANT_CS);
- break;
- case TAO_CodeGen::TAO_MODULE_CI:
- case TAO_CodeGen::TAO_MODULE_SH:
- case TAO_CodeGen::TAO_MODULE_SI:
- case TAO_CodeGen::TAO_MODULE_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_constant - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_constant - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_constant - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-//visit an enum
-int
-be_visitor_module::visit_enum (be_enum *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_MODULE_CH:
- ctx.state (TAO_CodeGen::TAO_ENUM_CH);
- break;
- case TAO_CodeGen::TAO_MODULE_CS:
- ctx.state (TAO_CodeGen::TAO_ENUM_CS);
- break;
- case TAO_CodeGen::TAO_MODULE_CI:
- case TAO_CodeGen::TAO_MODULE_SH:
- case TAO_CodeGen::TAO_MODULE_SI:
- case TAO_CodeGen::TAO_MODULE_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_enum - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_enum - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_enum - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an exception
-int
-be_visitor_module::visit_exception (be_exception *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_MODULE_CH:
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CH);
- break;
- case TAO_CodeGen::TAO_MODULE_CI:
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CI);
- break;
- case TAO_CodeGen::TAO_MODULE_CS:
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CS);
- break;
- case TAO_CodeGen::TAO_MODULE_SH:
- case TAO_CodeGen::TAO_MODULE_SI:
- case TAO_CodeGen::TAO_MODULE_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_exception - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_exception - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_exception - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an interface
-int
-be_visitor_module::visit_interface (be_interface *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_MODULE_CH:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_CH);
- break;
- case TAO_CodeGen::TAO_MODULE_CI:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_CI);
- break;
- case TAO_CodeGen::TAO_MODULE_CS:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_CS);
- break;
- case TAO_CodeGen::TAO_MODULE_SH:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_SH);
- break;
- case TAO_CodeGen::TAO_MODULE_SI:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_SI);
- break;
- case TAO_CodeGen::TAO_MODULE_SS:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_SS);
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_interface - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_interface - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_interface - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an interface_fwd
-int
-be_visitor_module::visit_interface_fwd (be_interface_fwd *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_MODULE_CH:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_FWD_CH);
- break;
- case TAO_CodeGen::TAO_MODULE_CI:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_FWD_CI);
- break;
- case TAO_CodeGen::TAO_MODULE_CS:
- case TAO_CodeGen::TAO_MODULE_SH:
- case TAO_CodeGen::TAO_MODULE_SI:
- case TAO_CodeGen::TAO_MODULE_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_interface_fwd - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_interface_fwd - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_interface_fwd - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an structure
-int
-be_visitor_module::visit_structure (be_structure *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_MODULE_CH:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CH);
- break;
- case TAO_CodeGen::TAO_MODULE_CI:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CI);
- break;
- case TAO_CodeGen::TAO_MODULE_CS:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CS);
- break;
- case TAO_CodeGen::TAO_MODULE_SH:
- case TAO_CodeGen::TAO_MODULE_SI:
- case TAO_CodeGen::TAO_MODULE_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_structure - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_structure - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_structure - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an union
-int
-be_visitor_module::visit_union (be_union *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_MODULE_CH:
- ctx.state (TAO_CodeGen::TAO_UNION_CH);
- break;
- case TAO_CodeGen::TAO_MODULE_CI:
- ctx.state (TAO_CodeGen::TAO_UNION_CI);
- break;
- case TAO_CodeGen::TAO_MODULE_CS:
- ctx.state (TAO_CodeGen::TAO_UNION_CS);
- break;
- case TAO_CodeGen::TAO_MODULE_SH:
- case TAO_CodeGen::TAO_MODULE_SI:
- case TAO_CodeGen::TAO_MODULE_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_union - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_union - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_union - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit a typedef
-int
-be_visitor_module::visit_typedef (be_typedef *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_MODULE_CH:
- ctx.state (TAO_CodeGen::TAO_TYPEDEF_CH);
- break;
- case TAO_CodeGen::TAO_MODULE_CI:
- ctx.state (TAO_CodeGen::TAO_TYPEDEF_CI);
- break;
- case TAO_CodeGen::TAO_MODULE_CS:
- ctx.state (TAO_CodeGen::TAO_TYPEDEF_CS);
- break;
- case TAO_CodeGen::TAO_MODULE_SH:
- case TAO_CodeGen::TAO_MODULE_SI:
- case TAO_CodeGen::TAO_MODULE_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_typedef - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_typedef - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module::"
- "visit_typedef - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// ******************************************************
-// Module visitor for client header
-// ******************************************************
-
-be_visitor_module_ch::be_visitor_module_ch (be_visitor_context *ctx)
- : be_visitor_module (ctx)
-{
-}
-
-be_visitor_module_ch::~be_visitor_module_ch (void)
-{
-}
-
-int
-be_visitor_module_ch::visit_module (be_module *node)
-{
- TAO_OutStream *os; // output stream
-
- if (!node->cli_hdr_gen () && !node->imported ())
- {
- os = this->ctx_->stream ();
-
- // XXXASG - Modules really map to namespace. We need to see if our target
- // compiler supports namespaces or not. This visitor generates a class for a
- // module. We can have the factory generate another module visitor that can
- // generate namespaces
-
- os->indent (); // start from whatever indentation level we were at
- // now generate the class definition
- *os << "class " << idl_global->export_macro ()
- << " " << node->local_name () << be_nl
- << "{" << be_nl
- << "public:\n";
- os->incr_indent (0);
-
- // generate code for the module 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 (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module_ch::"
- "visit_module - "
- "codegen for scope failed\n"), -1);
- }
-
- *os << be_uidt_nl
- << "}; // module " << node->name () << "\n\n";
-
- }
- return 0;
-}
-
-// ************************************************************
-// Module visitor for server header
-// ************************************************************
-
-be_visitor_module_sh::be_visitor_module_sh (be_visitor_context *ctx)
- : be_visitor_module (ctx)
-{
-}
-
-be_visitor_module_sh::~be_visitor_module_sh (void)
-{
-}
-
-int
-be_visitor_module_sh::visit_module (be_module *node)
-{
- TAO_OutStream *os; // output stream
-
- if (!node->srv_hdr_gen () && !node->imported ()) // not generated and not imported
- {
- os = this->ctx_->stream ();
-
- // generate the skeleton class name
-
- os->indent (); // start with whatever indentation level we are at
-
- // now generate the class definition. The prefix POA_ is prepended to our
- // name only if we are the outermost module
- if (!node->is_nested ())
- // we are outermost module
- *os << "class " << idl_global->export_macro ()
- << " POA_" << node->local_name () << be_nl;
- else
- // we are inside another module
- *os << "class " << idl_global->export_macro ()
- << " " << node->local_name () << be_nl;
-
- *os << "{" << be_nl
- << "public:"
- << be_idt;
-
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_module_sh::"
- "visit_module - "
- "codegen for scope failed\n"), -1);
- }
-
- os->decr_indent ();
- *os << "};\n\n";
- }
- return 0;
-
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation.cpp
deleted file mode 100644
index c988a6cccf0..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_operation.cpp
+++ /dev/null
@@ -1,3068 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_operation.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Operation
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_operation.h"
-
-// ******************************************************
-// primary visitor for "operation" in client header
-// ******************************************************
-
-be_visitor_operation_ch::be_visitor_operation_ch (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_ch::~be_visitor_operation_ch (void)
-{
-}
-
-int
-be_visitor_operation_ch::visit_operation (be_operation *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node
-
- os = this->ctx_->stream ();
- this->ctx_->node (node); // save the node
-
- os->indent (); // start with the current indentation level
-
- // every operation is declared virtual in the client code
- *os << "virtual ";
-
- // STEP I: generate the return type
- bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ch::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // grab the right visitor to generate the return type
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETTYPE_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_ch::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ch::"
- "visit_operation - "
- "codegen for return type failed\n"),
- -1);
- }
- delete visitor;
-
- // STEP 2: generate the operation name
- *os << " " << node->local_name ();
-
- // STEP 3: generate the argument list with the appropriate mapping. For these
- // we grab a visitor that generates the parameter listing
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_CH);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_ch::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ch::"
- "visit_operation - "
- "codegen for argument list failed\n"),
- -1);
- }
- delete visitor;
-
- return 0;
-}
-
-// ************************************************************
-// Operation visitor for client stubs
-// ************************************************************
-
-be_visitor_operation_cs::be_visitor_operation_cs (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_cs::~be_visitor_operation_cs (void)
-{
-}
-
-// processing to be done after every element in the scope is processed
-int
-be_visitor_operation_cs::post_process ()
-{
- // all we do here is to insert a comma and a newline
- TAO_OutStream *os = this->ctx_->stream ();
- *os << ",\n";
- return 0;
-}
-
-int
-be_visitor_operation_cs::visit_operation (be_operation *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node
-
- os = this->ctx_->stream ();
- this->ctx_->node (node); // save the node for future use
-
- os->indent (); // start with the current indentation level
-
- // retrieve the operation return type
- bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // STEP 1:
- // generate the param_data and call_data tables. We generate these if and
- // only if none of our arguments is of "native" type. Native types cannot be
- // marshaled. Hence, stubs for such operations will generate MARSHAL
- // exceptions. As a result it is pointless generating these tables
- if (!node->has_native ())
- {
- // native type does not exist. Generate the static tables
-
- // STEP 1A: generate the TAO_Param_Data table
- *os << "static const TAO_Param_Data ";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->flatname () <<
- "_paramdata [] = " << be_nl;
- *os << "{\n";
- os->incr_indent ();
-
- // entry for the return type
- *os << "{" << bt->tc_name () << ", PARAM_RETURN, 0}";
- if (node->nmembers () > 0)
- *os << ",\n";
-
- // generate entries for the param data table for arguments
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "visit scope failed\n"),
- -1);
- }
- *os << "\n";
- os->decr_indent ();
- *os << "}; // " << node->flatname () << "_paramdata\n\n";
-
- // STEP 1B: now generate the calldata table
- os->indent ();
- *os << "static const TAO_Call_Data ";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->flatname ()
- << "_calldata = " << be_nl
- << "{"
- << "\"";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->local_name () << "\", ";
-
- // are we oneway or two operation?
- if (node->flags () == AST_Operation::OP_oneway)
- {
- *os << "0, "; // for false
- }
- else
- {
- *os << "1, "; // for true
- }
- // insert the size of the paramdata table i.e., number of arguments + 1
- // for return type
- *os << (node->argument_count () + 1) << ", ";
-
- // insert the address of the paramdata table
- // first check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->flatname () << "_paramdata, ";
-
- // XXXASG - Exception list goes here (if it exists) - TODO
- *os << "0, 0};\n\n";
- } // end of if !(native)
-
- // STEP 2: generate the return type mapping (same as in the header file)
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETTYPE_OTHERS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_cs::"
- "visit_operation - "
- "Bad visitor for return type\n"),
- -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for return type failed\n"),
- -1);
- }
- delete visitor;
-
- // STEP 3: generate the operation name
- *os << " " << node->name ();
-
- // STEP 4: generate the argument list with the appropriate mapping (same as
- // in the header file)
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_OTHERS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_cs::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for argument list failed\n"),
- -1);
- }
- delete visitor;
-
- // STEP 5:
- // generate the actual code for the stub. However, if any of the argument
- // types is "native", we flag a MARSHAL exception.
- // last argument - is always CORBA::Environment
- *os << "{\n";
- os->incr_indent (0);
-
- // STEP 5A: declare a return type
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for return var decl failed\n"),
- -1);
- }
-
- os->indent ();
- if (node->has_native ()) // native exists => no stub
- {
- *os << "_tao_environment.exception (new CORBA::MARSHAL "
- << "(CORBA::COMPLETED_NO));" << be_nl;
- *os << "return _tao_retval;\n";
- }
- else
- {
- // STEP 5B:
- // generate code that retrieves the underlying stub object and then
- // invokes do_call on it.
- *os << "STUB_Object *istub = this->stubobj (_tao_environment);" << be_nl
- << "if (istub)" << be_nl
- << "{\n";
- os->incr_indent (0);
-
- // STEP 5C:
- // do any pre do_call processing with return type. This includes
- // allocating memory, initialization.
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_PRE_DOCALL_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for retval pre do_call failed\n"),
- -1);
- }
-
-
- // STEP 5D:
- // do any pre do_call stuff with arguments
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_PRE_DOCALL_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for argument pre do_call failed\n"),
- -1);
- }
-
- // STEP 5E:
- // call do_call with appropriate number of arguments
- os->indent ();
- *os << "istub->do_call (" << be_idt_nl
- << "_tao_environment, " << be_nl
- << "&";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->flatname () << "_calldata,\n";
-
- // pass the appropriate return value to docall
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_DOCALL_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for return var in do_call failed\n"),
- -1);
- }
- // insert a comma after the return val if there are arguments
- if (node->argument_count () > 0)
- {
- *os << ",\n";
- }
-
- // pass each argument to do_call
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_DOCALL_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for return var in do_call failed\n"),
- -1);
- }
-
- // end the do_call
- *os << be_uidt_nl;
- *os << ");\n";
-
- // STEP 5F:
- // do any post processing for the retval
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_POST_DOCALL_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for return type post do_call failed\n"),
- -1);
- }
-
- // STEP 5G: do any post processing for the arguments
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_POST_DOCALL_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for args in post do_call failed\n"),
- -1);
- }
-
- } // end of if (!native)
-
- os->decr_indent ();
- *os << "} // end of if (istub)\n";
- // STEP 5H: return the appropriate return value
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for return var failed\n"),
- -1);
- }
- os->decr_indent ();
- *os << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_operation_cs::visit_argument (be_argument *node)
-{
- // this method is used to generate the ParamData table entry
-
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt; // argument type
-
- // retrieve the type for this argument
- bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- os->indent ();
- *os << "{" << bt->tc_name () << ", ";
- switch (node->direction ())
- {
- case AST_Argument::dir_IN:
- *os << "PARAM_IN, ";
- break;
- case AST_Argument::dir_INOUT:
- *os << "PARAM_INOUT, ";
- break;
- case AST_Argument::dir_OUT:
- *os << "PARAM_OUT, ";
- break;
- }
- *os << "0}";
-
- return 0;
-}
-
-// ************************************************************
-// Operation visitor for server header
-// ************************************************************
-
-be_visitor_operation_sh::be_visitor_operation_sh (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_sh::~be_visitor_operation_sh (void)
-{
-}
-
-int
-be_visitor_operation_sh::visit_operation (be_operation *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node representing the return type
-
- os = this->ctx_->stream ();
- this->ctx_->node (node); // save the node
-
- os->indent (); // start with the current indentation level
-
- // every operation is declared virtual in the client code
- *os << "virtual ";
-
- // STEP I: generate the return type
- bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // grab the right visitor to generate the return type
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETTYPE_OTHERS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_sh::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "codegen for return type failed\n"),
- -1);
- }
- delete visitor;
-
- // STEP 2: generate the operation name
- *os << " " << node->local_name ();
-
- // STEP 3: generate the argument list with the appropriate mapping. For these
- // we grab a visitor that generates the parameter listing
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_SH);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_sh::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "codegen for argument list failed\n"),
- -1);
- }
- delete visitor;
-
- // generate the corresponding static skeleton method for this operation only
- // if there was no "native" type
- if (!node->has_native ())
- {
- os->indent ();
- *os << "static void ";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->local_name () <<
- "_skel (" << be_idt << be_idt_nl
- << "CORBA::ServerRequest &_tao_req, " << be_nl
- << "void *_tao_obj, " << be_nl
- << "void *_tao_context, " << be_nl
- << "CORBA::Environment &_tao_env"
- << be_uidt_nl << be_uidt << ");\n\n";
- }
-
- return 0;
-}
-
-// ************************************************************
-// Operation visitor for server skeletons
-// ************************************************************
-
-be_visitor_operation_ss::be_visitor_operation_ss (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_ss::~be_visitor_operation_ss (void)
-{
-}
-
-// processing to be done after every element in the scope is processed
-int
-be_visitor_operation_ss::post_process ()
-{
- // all we do here is to insert a comma and a newline
- TAO_OutStream *os = this->ctx_->stream ();
- *os << ",\n";
- return 0;
-}
-
-int
-be_visitor_operation_ss::visit_operation (be_operation *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node for return type
-
- os = this->ctx_->stream (); // grab the o/p stream
- this->ctx_->node (node); // save the node for future use
-
- os->indent (); // start with the current indentation level
-
- // if there is an argument of type "native", return immediately
- if (node->has_native ())
- return 0;
-
- // retrieve the operation return type
- bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // STEP 1:
- // generate the param_data and call_data tables. We generate these if and
- // only if none of our arguments is of "native" type. Native types cannot be
- // marshaled.
- // native type does not exist. Generate the static tables
-
- // STEP 1A: generate the TAO_Param_Data_Skel table
- *os << "static const TAO_Param_Data_Skel ";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->flatname () <<
- "_paramdata [] = " << be_nl;
- *os << "{\n";
- os->incr_indent ();
-
- // entry for the return type
- *os << "{" << bt->tc_name () << ", 0, 0}";
- if (node->nmembers () > 0)
- *os << ",\n";
-
- // generate entries for the param data table for arguments
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "visit scope failed\n"),
- -1);
- }
- *os << "\n";
- os->decr_indent ();
- *os << "}; // " << node->flatname () << "_paramdata\n\n";
-
- // STEP 1B: now generate the calldata table
- os->indent ();
- *os << "static const TAO_Call_Data_Skel ";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->flatname ()
- << "_calldata = " << be_nl
- << "{"
- << "\"";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->local_name () << "\", ";
-
- // are we oneway or two operation?
- if (node->flags () == AST_Operation::OP_oneway)
- {
- *os << "0, "; // for false
- }
- else
- {
- *os << "1, "; // for true
- }
- // insert the size of the paramdata table i.e., number of arguments + 1
- // for return type
- *os << (node->argument_count () + 1) << ", ";
-
- // insert the address of the paramdata table
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->flatname () << "_paramdata};\n\n";
-
- // We need the interface node in which this operation was defined. However,
- // if this operation node was an attribute node in disguise, we get this
- // information from the context
- be_interface *intf;
- intf = this->ctx_->attribute ()
- ? be_interface::narrow_from_scope (this->ctx_->attribute ()->defined_in ())
- : be_interface::narrow_from_scope (node->defined_in ());
-
- if (!intf)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "bad interface scope\n"),
- -1);
- }
-
- // STEP 2: generate the signature of the static skeleton
- os->indent ();
- *os << "void " << intf->full_skel_name () << "::";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->local_name ()
- << "_skel (" << be_idt << be_idt_nl
- << "CORBA::ServerRequest &_tao_server_request, " << be_nl
- << "void *_tao_object_reference, " << be_nl
- << "void * /* context */, " << be_nl
- << "CORBA::Environment &_tao_environment" << be_uidt << be_uidt_nl
- << ")" << be_nl;
-
- // STEP 3:
- // generate the actual code for the skeleton. However, if any of the argument
- // types is "native", we do not generate any skeleton
- // last argument - is always CORBA::Environment
- *os << "{" << be_idt_nl;
-
- // get the right object implementation.
- *os << intf->full_skel_name () << " *_tao_impl = ("
- << intf->full_skel_name () << " *)_tao_object_reference;\n";
-
- // STEP 3A: declare a return type variable
- be_visitor_context ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_SS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for return var decl failed\n"),
- -1);
- }
-
- // STEP 3B: declare variables for arguments
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_DECL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for return var decl failed\n"),
- -1);
- }
-
-
- // STEP 3C: setup parameters for demarshaling and demarshal them
- os->indent ();
- *os << "_tao_server_request.demarshal (" << be_idt_nl
- << "_tao_environment, " << be_nl
- << "&";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->flatname () << "_calldata,\n";
-
- // pass the appropriate return value to the demarshal operation
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_DEMARSHAL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for return var in demarshal failed\n"),
- -1);
- }
- // insert a comma after the return val if there are arguments
- if (node->argument_count () > 0)
- *os << ",\n";
-
- // pass each argument to the demarshal operation
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_DEMARSHAL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for argument in demarshal failed\n"),
- -1);
- }
-
- // end the demarshal call
- *os << be_uidt_nl;
- *os << ");\n";
-
- // STEP 3D: check for exception
- os->indent ();
- *os << "if (_tao_environment.exception ()) return;\n";
-
- // do pre upcall processing if any
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_PRE_UPCALL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for making upcall failed\n"),
- -1);
- }
- // STEP 3E: make the upcall and assign to the return val
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_ASSIGN_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for retval assignment failed\n"),
- -1);
- }
-
- // make the upcall
- *os << "_tao_impl->" << node->local_name () << " (" << be_idt << "\n";
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_UPCALL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for making upcall failed\n"),
- -1);
- }
- // last argument is the environment
- if (node->argument_count () > 0)
- *os << ",\n";
- os->indent ();
- *os << "_tao_environment";
- // end the upcall
- *os << be_uidt_nl;
- *os << ");" << be_nl;
-
- // STEP 3F: do any post processing for the arguments
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_POST_UPCALL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for args in post upcall failed\n"),
- -1);
- }
-
- // STEP 3C: setup parameters for marshaling and marshal them into the
- // outgoing stream
- *os << "_tao_server_request.marshal (" << be_idt_nl
- << "_tao_environment, " << be_nl
- << "&";
- // check if we are an attribute node in disguise
- if (this->ctx_->attribute ())
- {
- // now check if we are a "get" or "set" operation
- if (node->nmembers () == 1) // set
- *os << "_set_";
- else
- *os << "_get_";
- }
- *os << node->flatname () << "_calldata,\n";
-
- // pass the appropriate return value to the marshal operation
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_MARSHAL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for return var in marshal failed\n"),
- -1);
- }
- // insert a comma after the return val if there are arguments
- if (node->argument_count () > 0)
- {
- *os << ",\n";
- }
-
- // pass each argument to the marshal operation
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_MARSHAL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for argument in marshal failed\n"),
- -1);
- }
- // end the marshal call
- *os << be_uidt_nl;
- *os << ");\n";
-
- // STEP 3E:
- // do any post processing for the retval
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_POST_UPCALL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for return type post upcall failed\n"),
- -1);
- }
-
- // STEP 3F: do any post processing for the arguments
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_POST_MARSHAL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for args in post marshal failed\n"),
- -1);
- }
-
- os->decr_indent ();
- *os << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_operation_ss::visit_argument (be_argument *node)
-{
- // this method is used to generate the ParamData table entry
-
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt; // argument type
-
- // retrieve the type for this argument
- bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_argument - "
- "Bad argument type\n"),
- -1);
- }
-
- os->indent ();
- *os << "{" << bt->tc_name () << ", ";
- switch (node->direction ())
- {
- case AST_Argument::dir_IN:
- *os << "CORBA::ARG_IN, ";
- break;
- case AST_Argument::dir_INOUT:
- *os << "CORBA::ARG_INOUT, ";
- break;
- case AST_Argument::dir_OUT:
- *os << "CORBA::ARG_OUT, ";
- break;
- }
- *os << "0}";
-
- return 0;
-}
-
-// *************************************************************************
-// be_visitor_operation_collocated_sh --
-// This visitor generates code for the collocated operation signature in a
-// server header file
-// *************************************************************************
-
-be_visitor_operation_collocated_sh::be_visitor_operation_collocated_sh
-(be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_collocated_sh::~be_visitor_operation_collocated_sh (void)
-{
-}
-
-int be_visitor_operation_collocated_sh::visit_operation (be_operation *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node representing the return type
-
- os = this->ctx_->stream ();
- this->ctx_->node (node); // save the node
-
- os->indent (); // start with the current indentation level
-
- // every operation is declared virtual in the client code
- *os << "virtual ";
-
- // STEP I: generate the return type
- bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // grab the right visitor to generate the return type
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETTYPE_OTHERS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_sh::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "codegen for return type failed\n"),
- -1);
- }
- delete visitor;
-
- // STEP 2: generate the operation name
- *os << " " << node->local_name ();
-
- // STEP 3: generate the argument list with the appropriate mapping. For these
- // we grab a visitor that generates the parameter listing
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_COLLOCATED_SH);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_sh::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "codegen for argument list failed\n"),
- -1);
- }
- delete visitor;
-
- return 0;
-}
-
-// *************************************************************************
-// be_visitor_operation_collocated_ss --
-// This visitor generates code for the collocated operation signature in a
-// server skeletons file
-// *************************************************************************
-
-be_visitor_operation_collocated_ss::be_visitor_operation_collocated_ss
-(be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_collocated_ss::~be_visitor_operation_collocated_ss (void)
-{
-}
-
-int be_visitor_operation_collocated_ss::visit_operation (be_operation *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- // We need the interface node in which this operation was defined. However,
- // if this operation node was an attribute node in disguise, we get this
- // information from the context
- be_interface *intf;
- intf = this->ctx_->attribute ()
- ? be_interface::narrow_from_scope (this->ctx_->attribute ()->defined_in ())
- : be_interface::narrow_from_scope (node->defined_in ());
-
- if (!intf)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_collocated_ss::"
- "visit_operation - "
- "bad interface scope\n"),
- -1);
- }
-
- // retrieve the operation return type
- be_type *bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_collocated_ss::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // STEP 2: generate the return type mapping (same as in the header file)
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETTYPE_OTHERS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_collocated_ss::"
- "visit_operation - "
- "Bad visitor for return type\n"),
- -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_collocated_ss::"
- "visit_operation - "
- "codegen for return type failed\n"),
- -1);
- }
- delete visitor;
-
- *os << " " << intf->full_coll_name () << "::"
- << node->local_name () << " ";
-
- // STEP 4: generate the argument list with the appropriate mapping (same as
- // in the header file)
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_OTHERS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_cs::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for argument list failed\n"),
- -1);
- }
- delete visitor;
-
- *os << "{" << be_idt << "\n";
-
- os->indent ();
- if (bt->node_type () != AST_Decl::NT_pre_defined
- || be_predefined_type::narrow_from_decl (bt)->pt () != AST_PredefinedType::PT_void)
- {
- *os << "return ";
- }
-
- *os << "this->servant_->" << node->local_name () << " (" << be_idt << "\n";
-
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_UPCALL_SS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for making upcall failed\n"),
- -1);
- }
- // last argument is the environment
- if (node->argument_count () > 0)
- *os << ",\n";
- os->indent ();
- *os << "_tao_environment";
- // end the upcall
- *os << be_uidt_nl;
- *os << ");" << be_uidt_nl;
- *os << "}\n\n";
-
- return 0;
-}
-
-// ****************************************************************************
-// Operation visitor for return types. This generates the mapping for a return
-// type in an operation signature
-// ****************************************************************************
-
-be_visitor_operation_rettype::be_visitor_operation_rettype (be_visitor_context
- *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype::~be_visitor_operation_rettype (void)
-{
-}
-
-int
-be_visitor_operation_rettype::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope (), "_slice") << " *";
- else
- *os << bt->name () << "_slice *";
- return 0;
-}
-
-int
-be_visitor_operation_rettype::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ());
- else
- *os << bt->name ();
- return 0;
-}
-
-int
-be_visitor_operation_rettype::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope (), "_ptr");
- else
- *os << bt->name () << "_ptr";
- return 0;
-}
-
-int
-be_visitor_operation_rettype::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope (), "_ptr");
- else
- *os << bt->name () << "_ptr";
- return 0;
-}
-
-int
-be_visitor_operation_rettype::visit_native (be_native *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ()) << " *";
- else
- *os << bt->name () << " *";
- return 0;
-}
-
-int
-be_visitor_operation_rettype::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope (), "_ptr");
- else
- *os << bt->name () << "_ptr";
- break;
- case AST_PredefinedType::PT_any:
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ()) << " *";
- else
- *os << bt->name () << " *";
- break;
- default:
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ());
- else
- *os << bt->name ();
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype::visit_sequence (be_sequence *node)
-{
- // we should never directly be here because anonymous sequence return types
- // are not allowed
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ()) << " *";
- else
- *os << bt->name () << " *";
- return 0;
-}
-
-int
-be_visitor_operation_rettype::visit_string (be_string * /* node*/)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- *os << "char *";
- return 0;
-}
-
-int
-be_visitor_operation_rettype::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ());
- else
- *os << bt->name ();
-
- // based on whether we are variable or not, we return a pointer or the
- // aggregate type
- if (node->size_type () == be_decl::VARIABLE)
- *os << " *";
- return 0;
-}
-
-int
-be_visitor_operation_rettype::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-int
-be_visitor_operation_rettype::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_OPERATION_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ());
- else
- *os << bt->name ();
-
- // based on whether we are variable or not, we return a pointer or the
- // aggregate type
- if (node->size_type () == be_decl::VARIABLE)
- *os << " *";
- return 0;
-}
-
-// ************************************************************
-// operation visitor to generate the argument list.
-// We have separated code generation for this from the 4 main
-// visitors to avoid code duplication and tight coupling
-// ************************************************************
-
-be_visitor_operation_arglist::be_visitor_operation_arglist (be_visitor_context
- *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_arglist::~be_visitor_operation_arglist (void)
-{
-}
-
-int
-be_visitor_operation_arglist::visit_operation (be_operation *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- os->incr_indent (0); // these are for pretty printing
- os->incr_indent (0);
- *os << " (\n";
-
- // all we do is hand over code generation to our scope
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_arglist::"
- "visit_operation - "
- "codegen for scope failed\n"),
- -1);
- }
-
- // last argument - is always CORBA::Environment
- os->indent ();
- *os << "CORBA::Environment &_tao_environment\n";
- os->decr_indent ();
- *os << " )";
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_CH:
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_COLLOCATED_SH:
- *os << ";\n";
- break;
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_SH:
- // each method is pure virtual in the server header
- *os << " = 0;\n";
- break;
- default:
- *os << "\n";
- }
-
- os->decr_indent (0);
- return 0;
-}
-
-int
-be_visitor_operation_arglist::visit_argument (be_argument *node)
-{
- // get the visitor that will dump the argument's mapping in the operation
- // signature.
- be_visitor_context ctx (*this->ctx_);
-
- // first grab the interface definition inside which this operation is
- // defined. We need this since argument types may very well be declared
- // inside the scope of the interface node. In such cases, we would like to
- // generate the appropriate relative scoped names.
- be_operation *op = this->ctx_->be_scope_as_operation ();
- if (!op)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_arglist::"
- "visit_argument - "
- "Bad operation\n"),
- -1);
- }
-
- // We need the interface node in which this operation was defined. However,
- // if this operation node was an attribute node in disguise, we get this
- // information from the context
- be_interface *intf;
- intf = this->ctx_->attribute ()
- ? be_interface::narrow_from_scope (this->ctx_->attribute ()->defined_in ())
- : be_interface::narrow_from_scope (op->defined_in ());
-
- if (!intf)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_arglist::"
- "visit_argument - "
- "Bad interface\n"),
- -1);
- }
- ctx.scope (intf); // set new scope
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_CH:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_ARGLIST_CH);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_OTHERS:
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_SH:
- case TAO_CodeGen::TAO_OPERATION_ARGLIST_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_ARGLIST_OTHERS);
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_arglist::"
- "visit_argument - "
- "Bad context\n"),
- -1);
- }
- }
-
- // grab a visitor
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_arglist::"
- "visit_argument - "
- "Bad visitor\n"),
- -1);
- }
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_arglist::"
-
- "visit_argument - "
- "codegen for arglist failed\n"),
- -1);
- }
- delete visitor;
- return 0;
-}
-
-// ************************************************************
-// be_visitor_operation_rettype_vardecl_cs
-// This visitor generates code for variable declaration and initialization
-// of the return type.
-// ************************************************************
-
-be_visitor_operation_rettype_vardecl_cs::
-be_visitor_operation_rettype_vardecl_cs (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype_vardecl_cs::
-~be_visitor_operation_rettype_vardecl_cs (void)
-{
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- *os << bt->name () << "_slice *_tao_retval = 0;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- *os << bt->name () << " _tao_retval = (" << bt->name () << ")0;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- *os << bt->name () << "_ptr _tao_retval = " << bt->name () << "::_nil ();\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- *os << bt->name () << "_ptr _tao_retval = " << bt->name () << "::_nil ();\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- os->indent ();
- *os << bt->name () << "_ptr _tao_retval = 0;\n";
- break;
- case AST_PredefinedType::PT_any:
- os->indent ();
- *os << bt->name () << " *_tao_retval = 0;\n";
- break;
- case AST_PredefinedType::PT_void:
- break;
- default:
- os->indent ();
- *os << bt->name () << " _tao_retval = 0;\n";
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_sequence (be_sequence *node)
-{
- // we should never directly be here because anonymous sequence return types
- // are not allowed
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- *os << bt->name () << " *_tao_retval = 0;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_string (be_string * /* node*/)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "char *_tao_retval = 0;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- // based on whether we are variable or not, we return a pointer or the
- // aggregate type
- if (node->size_type () == be_decl::VARIABLE)
- *os << bt->name () << " *_tao_retval = 0;\n";
- else
- {
- *os << bt->name () << " _tao_retval;" << be_nl;
- *os << "ACE_OS::memset (&_tao_retval, 0, sizeof (" << bt->name () << "));\n";
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-int
-be_visitor_operation_rettype_vardecl_cs::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- // based on whether we are variable or not, we return a pointer or the
- // aggregate type
- if (node->size_type () == be_decl::VARIABLE)
- *os << bt->name () << " *_tao_retval = 0;\n";
- else
- {
- *os << bt->name () << " _tao_retval;" << be_nl;
- *os << "ACE_OS::memset (&_tao_retval, 0, sizeof (" << bt->name () << "));\n";
- }
- return 0;
-}
-
-// *****************************************************************************
-// be_visitor_operation_rettype_pre_docall_cs
-//
-// This visitor generates code that passes the return type variable to the
-// do_call method
-// *****************************************************************************
-
-be_visitor_operation_rettype_pre_docall_cs::
-be_visitor_operation_rettype_pre_docall_cs (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype_pre_docall_cs::
-~be_visitor_operation_rettype_pre_docall_cs (void)
-{
-}
-
-int
-be_visitor_operation_rettype_pre_docall_cs::visit_array (be_array *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_pre_docall_cs::visit_interface (be_interface *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "CORBA::Object_ptr _tao_base_retval = CORBA::Object::_nil ();\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_pre_docall_cs::visit_interface_fwd (be_interface_fwd *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "CORBA::Object_ptr _tao_base_retval = CORBA::Object::_nil ();\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_pre_docall_cs::
-visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_any:
- os->indent ();
- *os << "ACE_NEW_RETURN (_tao_retval, CORBA::Any, _tao_retval);\n";
- break;
- default:
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_pre_docall_cs::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "ACE_NEW_RETURN (_tao_retval, " << node->name () << ", _tao_retval);\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_pre_docall_cs::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- // check if the union is variable
- if (node->size_type () == be_type::VARIABLE)
- {
- os->indent ();
- *os << "ACE_NEW_RETURN (_tao_retval, " << node->name () << ", _tao_retval);\n";
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_pre_docall_cs::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-int
-be_visitor_operation_rettype_pre_docall_cs::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- // check if the union is variable
- if (node->size_type () == be_type::VARIABLE)
- {
- os->indent ();
- *os << "ACE_NEW_RETURN (_tao_retval, " << node->name () << ", _tao_retval);\n";
- }
- return 0;
-}
-
-// *****************************************************************************
-// be_visitor_operation_rettype_docall_cs
-//
-// This visitor generates code that passes the return type variable to the
-// do_call method
-// *****************************************************************************
-
-be_visitor_operation_rettype_docall_cs::be_visitor_operation_rettype_docall_cs
-(be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype_docall_cs::
-~be_visitor_operation_rettype_docall_cs (void)
-{
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_array (be_array *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_enum (be_enum *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "&_tao_retval";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_interface (be_interface *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "&_tao_base_retval";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_interface_fwd (be_interface_fwd *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "&_tao_base_retval";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_void:
- *os << "0";
- break;
- case AST_PredefinedType::PT_any:
- *os << "_tao_retval";
- break;
- default:
- *os << "&_tao_retval";
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_sequence (be_sequence *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "&_tao_retval";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- // check if the struct is variable
- if (node->size_type () == be_type::VARIABLE)
- *os << "_tao_retval";
- else
- *os << "&_tao_retval";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-int
-be_visitor_operation_rettype_docall_cs::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- // check if the union is variable
- if (node->size_type () == be_type::VARIABLE)
- *os << "_tao_retval";
- else
- *os << "&_tao_retval";
- return 0;
-}
-
-// *******************************************************************************
-// be_visitor_operation_rettype_post_docall_cs
-//
-// This visitor generates code that passes the return type variable to the
-// do_call method
-// ********************************************************************************
-
-be_visitor_operation_rettype_post_docall_cs::
-be_visitor_operation_rettype_post_docall_cs (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype_post_docall_cs::
-~be_visitor_operation_rettype_post_docall_cs (void)
-{
-}
-
-int
-be_visitor_operation_rettype_post_docall_cs::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = " << node->name ()
- << "::_narrow (_tao_base_retval, _tao_environment);" << be_nl;
- *os << "CORBA::release (_tao_base_retval);\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_post_docall_cs::
-visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = " << node->name ()
- << "::_narrow (_tao_base_retval, _tao_environment);" << be_nl;
- *os << "CORBA::release (_tao_base_retval);\n";
- return 0;
-}
-
-// ************************************************************
-// be_visitor_operation_rettype_return_cs
-//
-// code to generate the return statement of the stub.
-// ************************************************************
-
-be_visitor_operation_rettype_return_cs::be_visitor_operation_rettype_return_cs
-(be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype_return_cs::~be_visitor_operation_rettype_return_cs (void)
-{
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_array (be_array *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "return _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_enum (be_enum *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "return _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- // we must narrow it
- *os << "return _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- // we must narrow it
- *os << "return _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_void:
- *os << "return;\n";
- break;
- default:
- *os << "return _tao_retval;\n";
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_sequence (be_sequence *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "return _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "return _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_structure (be_structure *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "return _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-int
-be_visitor_operation_rettype_return_cs::visit_union (be_union *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "return _tao_retval;\n";
- return 0;
-}
-
-// ********************************************************************************
-// be_visitor_operation_rettype_vardecl_ss
-// This visitor generates code for variable declaration and initialization
-// of the return type.
-// ********************************************************************************
-
-be_visitor_operation_rettype_vardecl_ss::be_visitor_operation_rettype_vardecl_ss
-(be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype_vardecl_ss::
-~be_visitor_operation_rettype_vardecl_ss (void)
-{
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- *os << bt->name () << "_slice *_tao_retval = 0;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- *os << bt->name () << " _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::visit_interface (be_interface *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- // due to the virtual inheritance and the fact that we will be passing the
- // address of the objref to the marshaling routine, we use the base
- // CORBA::Object_ptr as the type for the return value even though the actual
- // return type may be some derived class
- *os << "CORBA::Object_ptr _tao_retval = CORBA::Object::_nil ();\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::
-visit_interface_fwd (be_interface_fwd *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- // due to the virtual inheritance and the fact that we will be passing the
- // address of the objref to the marshaling routine, we use the base
- // CORBA::Object_ptr as the type for the return value even though the actual
- // return type may be some derived class
- *os << "CORBA::Object_ptr _tao_retval = CORBA::Object::_nil ();\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::
-visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- os->indent ();
- *os << bt->name () << "_ptr _tao_retval = 0;\n";
- break;
- case AST_PredefinedType::PT_any:
- os->indent ();
- *os << bt->name () << " *_tao_retval = 0;\n";
- break;
- case AST_PredefinedType::PT_void:
- break;
- default:
- os->indent ();
- *os << bt->name () << " _tao_retval = 0;\n";
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::visit_sequence (be_sequence *node)
-{
- // we should never directly be here because anonymous sequence return types
- // are not allowed
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- *os << bt->name () << " *_tao_retval = 0;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::visit_string (be_string * /* node*/)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "char *_tao_retval = 0;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- // based on whether we are variable or not, we return a pointer or the
- // aggregate type
- if (node->size_type () == be_decl::VARIABLE)
- *os << bt->name () << " *_tao_retval = 0;\n";
- else
- *os << bt->name () << " _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-int
-be_visitor_operation_rettype_vardecl_ss::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os->indent ();
- // based on whether we are variable or not, we return a pointer or the
- // aggregate type
- if (node->size_type () == be_decl::VARIABLE)
- *os << bt->name () << " *_tao_retval = 0;\n";
- else
- *os << bt->name () << " _tao_retval;\n";
- return 0;
-}
-
-// ****************************************************************************
-// Visitor that passes the return value to the marshal/demarshal routine
-// ****************************************************************************
-
-be_visitor_operation_rettype_marshal_ss::
-be_visitor_operation_rettype_marshal_ss (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype_marshal_ss::
-~be_visitor_operation_rettype_marshal_ss (void)
-{
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::visit_array (be_array *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::visit_enum (be_enum *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "&_tao_retval";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::visit_interface (be_interface *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "&_tao_retval";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::
-visit_interface_fwd (be_interface_fwd *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "&_tao_retval";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::
-visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_void:
- os->indent ();
- *os << "0";
- break;
- case AST_PredefinedType::PT_pseudo:
- case AST_PredefinedType::PT_any:
- default:
- os->indent ();
- *os << "&_tao_retval";
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::visit_sequence (be_sequence *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::visit_string (be_string * /* node*/)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "&_tao_retval";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- if (node->size_type () == be_type::VARIABLE)
- *os << "_tao_retval";
- else
- *os << "&_tao_retval";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-int
-be_visitor_operation_rettype_marshal_ss::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- if (node->size_type () == be_type::VARIABLE)
- *os << "_tao_retval";
- else
- *os << "&_tao_retval";
-
- return 0;
-}
-
-// ****************************************************************************
-// visitor for assignment to a return value variable from the upcall
-// ****************************************************************************
-
-be_visitor_operation_rettype_assign_ss::
-be_visitor_operation_rettype_assign_ss (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype_assign_ss::
-~be_visitor_operation_rettype_assign_ss (void)
-{
-}
-
-int
-be_visitor_operation_rettype_assign_ss::visit_array (be_array *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = ";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_assign_ss::visit_enum (be_enum *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = ";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_assign_ss::visit_interface (be_interface *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = ";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_assign_ss::
-visit_interface_fwd (be_interface_fwd *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = ";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_assign_ss::
-visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_void:
- break;
- case AST_PredefinedType::PT_pseudo:
- case AST_PredefinedType::PT_any:
- default:
- *os << "_tao_retval = ";
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_assign_ss::visit_sequence (be_sequence *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = ";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_assign_ss::visit_string (be_string * /* node*/)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = ";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_assign_ss::visit_structure (be_structure *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = ";
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_assign_ss::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-int
-be_visitor_operation_rettype_assign_ss::visit_union (be_union *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "_tao_retval = ";
-
- return 0;
-}
-
-// ****************************************************************************
-// visitor to do any post processing for return type after an upcall
-// ****************************************************************************
-
-be_visitor_operation_rettype_post_upcall_ss::be_visitor_operation_rettype_post_upcall_ss (be_visitor_context
- *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_operation_rettype_post_upcall_ss::~be_visitor_operation_rettype_post_upcall_ss (void)
-{
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_array (be_array *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- os->indent ();
- *os << "delete _tao_retval;\n";
- return 0;
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- break;
- case AST_PredefinedType::PT_any:
- break;
- case AST_PredefinedType::PT_void:
- break;
- default:
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_sequence (be_sequence *node)
-{
- // we should never directly be here because anonymous sequence return types
- // are not allowed
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_string (be_string * /* node*/)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- return 0;
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-int
-be_visitor_operation_rettype_post_upcall_ss::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- return 0;
-}
-
-// ************************************************************
-// generic operation visitor to handle the pre/post do_call/upcall stuff with
-// arguments
-// ************************************************************
-
-be_visitor_operation_argument::be_visitor_operation_argument (be_visitor_context
- *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_argument::~be_visitor_operation_argument (void)
-{
-}
-
-int
-be_visitor_operation_argument::post_process (void)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_ARG_DOCALL_CS:
- case TAO_CodeGen::TAO_OPERATION_ARG_UPCALL_SS:
- case TAO_CodeGen::TAO_OPERATION_ARG_DEMARSHAL_SS:
- case TAO_CodeGen::TAO_OPERATION_ARG_MARSHAL_SS:
- *os << ",\n";
- break;
- default:
- break;
- }
- return 0;
-}
-
-int
-be_visitor_operation_argument::visit_operation (be_operation *node)
-{
- // all we do is hand over code generation to our scope
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_argument::"
- "visit_operation - "
- "codegen for scope failed\n"),
- -1);
- }
-
- return 0;
-}
-
-int
-be_visitor_operation_argument::visit_argument (be_argument *node)
-{
- // get the visitor that will dump the argument's mapping in the operation
- // signature.
- be_visitor_context ctx (*this->ctx_);
-
- // first grab the interface definition inside which this operation is
- // defined. We need this since argument types may very well be declared
- // inside the scope of the interface node. In such cases, we would like to
- // generate the appropriate relative scoped names.
- be_operation *op = this->ctx_->be_scope_as_operation ();
- if (!op)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_arglist::"
- "visit_argument - "
- "Bad operation\n"),
- -1);
- }
-
- // We need the interface node in which this operation was defined. However,
- // if this operation node was an attribute node in disguise, we get this
- // information from the context
- be_interface *intf;
- intf = this->ctx_->attribute ()
- ? be_interface::narrow_from_scope (this->ctx_->attribute ()->defined_in ())
- : be_interface::narrow_from_scope (op->defined_in ());
-
- if (!intf)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_arglist::"
- "visit_argument - "
- "Bad interface\n"),
- -1);
- }
- ctx.scope (intf); // set new scope
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_OPERATION_ARG_PRE_DOCALL_CS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_PRE_DOCALL_CS);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARG_DOCALL_CS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARG_POST_DOCALL_CS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_POST_DOCALL_CS);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARG_DECL_SS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_VARDECL_SS);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARG_DEMARSHAL_SS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_DEMARSHAL_SS);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARG_MARSHAL_SS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_MARSHAL_SS);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARG_PRE_UPCALL_SS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_PRE_UPCALL_SS);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARG_UPCALL_SS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARG_POST_UPCALL_SS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_POST_UPCALL_SS);
- break;
- case TAO_CodeGen::TAO_OPERATION_ARG_POST_MARSHAL_SS:
- ctx.state (TAO_CodeGen::TAO_ARGUMENT_POST_MARSHAL_SS);
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_argument::"
- "visit_argument - "
- "Bad context\n"),
- -1);
- }
- }
-
- // grab a visitor
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_argument::"
- "visit_argument - "
- "Bad visitor\n"),
- -1);
- }
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_argument::"
-
- "visit_argument - "
- "codegen for argument failed\n"),
- -1);
- }
- delete visitor;
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_root.cpp b/TAO/TAO_IDL/be/be_visitor_root.cpp
deleted file mode 100644
index cd291424a39..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_root.cpp
+++ /dev/null
@@ -1,796 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_root.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Root
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-#include "be_visitor_root.h"
-
-// Generic Root visitor
-be_visitor_root::be_visitor_root (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_root::~be_visitor_root (void)
-{
-}
-
-// this method must be overridden by the derived root visitors
-int
-be_visitor_root::init (void)
-{
- return -1;
-}
-
-// visit the Root node and its scope
-int be_visitor_root::visit_root (be_root *node)
-{
- // open the appropriate output file based on what state we are in. The
- // overridden "init" method of derived classes will do the job.
- if (this->init () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::init - "
- "failed to initialize context\n"), -1);
- }
-
- // all we have to do is to visit the scope
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::visit_root - "
- "codegen for scope failed\n"), -1);
- }
- return 0;
-}
-
-// =all common visit methods for root visitor
-
-// visit a constant
-int
-be_visitor_root::visit_constant (be_constant *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- ctx.state (TAO_CodeGen::TAO_CONSTANT_CH);
- break;
- case TAO_CodeGen::TAO_ROOT_CS:
- ctx.state (TAO_CodeGen::TAO_CONSTANT_CS);
- break;
- case TAO_CodeGen::TAO_ROOT_CI:
- case TAO_CodeGen::TAO_ROOT_SH:
- case TAO_CodeGen::TAO_ROOT_SI:
- case TAO_CodeGen::TAO_ROOT_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_constant - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_constant - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_constant - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-//visit an enum
-int
-be_visitor_root::visit_enum (be_enum *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- ctx.state (TAO_CodeGen::TAO_ENUM_CH);
- break;
- case TAO_CodeGen::TAO_ROOT_CS:
- ctx.state (TAO_CodeGen::TAO_ENUM_CS);
- break;
- case TAO_CodeGen::TAO_ROOT_CI:
- case TAO_CodeGen::TAO_ROOT_SH:
- case TAO_CodeGen::TAO_ROOT_SI:
- case TAO_CodeGen::TAO_ROOT_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_enum - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_enum - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_enum - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an exception
-int
-be_visitor_root::visit_exception (be_exception *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CH);
- break;
- case TAO_CodeGen::TAO_ROOT_CI:
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CI);
- break;
- case TAO_CodeGen::TAO_ROOT_CS:
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CS);
- break;
- case TAO_CodeGen::TAO_ROOT_SH:
- case TAO_CodeGen::TAO_ROOT_SI:
- case TAO_CodeGen::TAO_ROOT_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_exception - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_exception - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_exception - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an interface
-int
-be_visitor_root::visit_interface (be_interface *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_CH);
- break;
- case TAO_CodeGen::TAO_ROOT_CI:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_CI);
- break;
- case TAO_CodeGen::TAO_ROOT_CS:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_CS);
- break;
- case TAO_CodeGen::TAO_ROOT_SH:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_SH);
- break;
- case TAO_CodeGen::TAO_ROOT_SI:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_SI);
- break;
- case TAO_CodeGen::TAO_ROOT_SS:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_SS);
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_interface - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_interface - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_interface - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an interface_fwd
-int
-be_visitor_root::visit_interface_fwd (be_interface_fwd *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_FWD_CH);
- break;
- case TAO_CodeGen::TAO_ROOT_CI:
- ctx.state (TAO_CodeGen::TAO_INTERFACE_FWD_CI);
- break;
- case TAO_CodeGen::TAO_ROOT_CS:
- case TAO_CodeGen::TAO_ROOT_SH:
- case TAO_CodeGen::TAO_ROOT_SI:
- case TAO_CodeGen::TAO_ROOT_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_interface_fwd - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_interface_fwd - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_interface_fwd - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an module
-int
-be_visitor_root::visit_module (be_module *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- ctx.state (TAO_CodeGen::TAO_MODULE_CH);
- break;
- case TAO_CodeGen::TAO_ROOT_CI:
- ctx.state (TAO_CodeGen::TAO_MODULE_CI);
- break;
- case TAO_CodeGen::TAO_ROOT_CS:
- ctx.state (TAO_CodeGen::TAO_MODULE_CS);
- break;
- case TAO_CodeGen::TAO_ROOT_SH:
- ctx.state (TAO_CodeGen::TAO_MODULE_SH);
- break;
- case TAO_CodeGen::TAO_ROOT_SI:
- ctx.state (TAO_CodeGen::TAO_MODULE_SI);
- break;
- case TAO_CodeGen::TAO_ROOT_SS:
- ctx.state (TAO_CodeGen::TAO_MODULE_SS);
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_module - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_module - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_module - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an structure
-int
-be_visitor_root::visit_structure (be_structure *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CH);
- break;
- case TAO_CodeGen::TAO_ROOT_CI:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CI);
- break;
- case TAO_CodeGen::TAO_ROOT_CS:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CS);
- break;
- case TAO_CodeGen::TAO_ROOT_SH:
- case TAO_CodeGen::TAO_ROOT_SI:
- case TAO_CodeGen::TAO_ROOT_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_structure - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_structure - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_structure - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an union
-int
-be_visitor_root::visit_union (be_union *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- ctx.state (TAO_CodeGen::TAO_UNION_CH);
- break;
- case TAO_CodeGen::TAO_ROOT_CI:
- ctx.state (TAO_CodeGen::TAO_UNION_CI);
- break;
- case TAO_CodeGen::TAO_ROOT_CS:
- ctx.state (TAO_CodeGen::TAO_UNION_CS);
- break;
- case TAO_CodeGen::TAO_ROOT_SH:
- case TAO_CodeGen::TAO_ROOT_SI:
- case TAO_CodeGen::TAO_ROOT_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_union - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_union - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_union - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an typedef
-int
-be_visitor_root::visit_typedef (be_typedef *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_ROOT_CH:
- ctx.state (TAO_CodeGen::TAO_TYPEDEF_CH);
- break;
- case TAO_CodeGen::TAO_ROOT_CI:
- ctx.state (TAO_CodeGen::TAO_TYPEDEF_CI);
- break;
- case TAO_CodeGen::TAO_ROOT_CS:
- ctx.state (TAO_CodeGen::TAO_TYPEDEF_CS);
- break;
- case TAO_CodeGen::TAO_ROOT_SH:
- case TAO_CodeGen::TAO_ROOT_SI:
- case TAO_CodeGen::TAO_ROOT_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_typedef - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_typedef - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root::"
- "visit_typedef - "
- "failed to accept visitor"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// ********************************
-// Root visitor for client header
-// ********************************
-
-be_visitor_root_ch::be_visitor_root_ch (be_visitor_context *ctx)
- : be_visitor_root (ctx)
-{
-}
-
-be_visitor_root_ch::~be_visitor_root_ch (void)
-{
-}
-
-int
-be_visitor_root_ch::init (void)
-{
- // first open the client-side header file for writing
- if (tao_cg->client_header (idl_global->be_get_client_hdr_fname ()) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) be_visitor_root_ch::init - "
- "Error opening client header file\n"));
- return -1;
- }
-
- this->ctx_->stream (tao_cg->client_header ());
- return 0;
-}
-
-// *********************************
-// Root visitor for client inline
-// *********************************
-
-be_visitor_root_ci::be_visitor_root_ci (be_visitor_context *ctx)
- : be_visitor_root (ctx)
-{
-}
-
-be_visitor_root_ci::~be_visitor_root_ci (void)
-{
-}
-
-int
-be_visitor_root_ci::init (void)
-{
- // first open the client-side inline file for writing
- if (tao_cg->client_inline (idl_global->be_get_client_inline_fname ()) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) be_visitor_root_ci - "
- "Error opening client inline file\n"));
- return -1;
- }
-
- this->ctx_->stream (tao_cg->client_inline ());
- return 0;
-}
-
-// ***********************************
-// Root visitor for client stubs
-// ***********************************
-
-be_visitor_root_cs::be_visitor_root_cs (be_visitor_context *ctx)
- : be_visitor_root (ctx)
-{
-}
-
-be_visitor_root_cs::~be_visitor_root_cs (void)
-{
-}
-
-int
-be_visitor_root_cs::init (void)
-{
- // first open the file
- if (tao_cg->client_stubs (idl_global->be_get_client_stub_fname ()) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root_cs - "
- "Error opening client stub file\n"), -1);
- }
-
- this->ctx_->stream (tao_cg->client_stubs ()); // init stream
- return 0;
-}
-
-// ***********************************
-// Root visitor for server header
-// ***********************************
-
-be_visitor_root_sh::be_visitor_root_sh (be_visitor_context *ctx)
- : be_visitor_root (ctx)
-{
-}
-
-be_visitor_root_sh::~be_visitor_root_sh (void)
-{
-}
-
-int
-be_visitor_root_sh::init (void)
-{
- // open the file
- if (tao_cg->server_header (idl_global->be_get_server_hdr_fname ()) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root_sh::init - "
- "Error opening server header file\n"), -1);
- }
-
- // set the stream and the next state
- this->ctx_->stream (tao_cg->server_header ());
- return 0;
-}
-
-// ***********************************************
-// Root visitor for server inline
-// ***********************************************
-
-be_visitor_root_si::be_visitor_root_si (be_visitor_context *ctx)
- : be_visitor_root (ctx)
-{
-}
-
-be_visitor_root_si::~be_visitor_root_si (void)
-{
-}
-
-int
-be_visitor_root_si::init (void)
-{
- // first open the file for writing
- if (tao_cg->server_inline (idl_global->be_get_server_inline_fname ()) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root_si::init - "
- "server inline open failed\n"), -1);
- }
-
- this->ctx_->stream (tao_cg->server_inline ()); // init stream
- return 0;
-}
-
-// ******************************************************
-// Root visitor for server skeletons
-// ******************************************************
-
-be_visitor_root_ss::be_visitor_root_ss (be_visitor_context *ctx)
- : be_visitor_root (ctx)
-{
-}
-
-be_visitor_root_ss::~be_visitor_root_ss (void)
-{
-}
-
-int
-be_visitor_root_ss::init (void)
-{
- // first open the file for writing
- if (tao_cg->server_skeletons (idl_global->be_get_server_skeleton_fname ()) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_root_ss::init - "
- "Error opening server skeletons file\n"), -1);
- }
-
- this->ctx_->stream (tao_cg->server_skeletons ()); // set stream
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_scope.cpp b/TAO/TAO_IDL/be/be_visitor_scope.cpp
deleted file mode 100644
index 126e18ca3e2..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_scope.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_scope.cpp
-//
-// = DESCRIPTION
-// Visitor for the base be_scope node. This serves to maintain the current
-// state (context) of code generation for the derived visitor.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_scope.h"
-
-// ******************************************************
-// Generic visitor for a scope.
-// All elements that give rise to a scope inherit from
-// this class
-// ******************************************************
-
-be_visitor_scope::be_visitor_scope (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_scope::~be_visitor_scope (void)
-{
-}
-
-// visit the scope and its elements
-int
-be_visitor_scope::visit_scope (be_scope *node)
-{
- // proceed if the number of members in our scope is greater than 0
- if (node->nmembers () > 0)
- {
- // initialize an iterator to iterate thru our scope
- UTL_ScopeActiveIterator *si;
- ACE_NEW_RETURN (si,
- UTL_ScopeActiveIterator (node,
- UTL_Scope::IK_decls),
- -1);
- // continue until each element is visited
- while (!si->is_done ())
- {
- AST_Decl *d = si->item ();
- be_decl *bd = be_decl::narrow_from_decl (d);
- // set the scope node in which the code is being generated
- this->ctx_->scope (node->decl ());
- // set the node to be visited
- this->ctx_->node (bd);
- if (bd == 0 || bd->accept (this) == -1)
- {
- delete si;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_scope::visit_scope - "
- "codegen for scope failed\n"), -1);
-
- }
- si->next ();
- if (!si->is_done ())
- this->post_process (); // anything to be done after each element
- // except the last one is processed?
-
- } // end of while loop
- delete si;
- } // end of if
-
- return 0;
-}
-
-int
-be_visitor_scope::post_process (void)
-{
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence.cpp b/TAO/TAO_IDL/be/be_visitor_sequence.cpp
deleted file mode 100644
index fc7f39d0021..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_sequence.cpp
+++ /dev/null
@@ -1,1507 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_sequence.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Sequence
-//
-// = AUTHOR
-// Aniruddha Gokhale and Carlos O'Ryan
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-#include "be_visitor_sequence.h"
-
-// Root visitor for client header
-be_visitor_sequence_ch::be_visitor_sequence_ch (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_sequence_ch::~be_visitor_sequence_ch (void)
-{
-}
-
-int
-be_visitor_sequence_ch::gen_base_sequence_class (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt;
-
- // retrieve the base type since we may need to do some code
- // generation for the base type.
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "Bad element type\n"), -1);
- }
-
- // generate the appropriate sequence type
- switch (node->managed_type ())
- {
- case be_sequence::MNG_OBJREF: // sequence of objrefs
- if (node->unbounded ())
- *os << "TAO_Unbounded_Object_Sequence<";
- else
- *os << "TAO_Bounded_Object_Sequence<";
- break;
- case be_sequence::MNG_STRING: // sequence of strings
- if (node->unbounded ())
- *os << "TAO_Unbounded_String_Sequence";
- else
- *os << "TAO_Bounded_String_Sequence<";
- break;
- default: // not a managed type
- if (node->unbounded ())
- *os << "TAO_Unbounded_Sequence<";
- else
- *os << "TAO_Bounded_Sequence<";
- break;
- }
-
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_BASE_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "base type visit failed\n"),
- -1);
- }
- delete visitor;
-
- // find out if the sequence is of a managed type and if it is bounded or not
- if (node->managed_type () == be_sequence::MNG_STRING)
- {
- if (!node->unbounded ())
- {
- *os << node->max_size () << ">";
- }
- }
- else
- {
- if (node->unbounded ())
- {
- *os << ">";
- }
- else
- {
- *os << ", " << node->max_size () << ">";
- }
- }
- return 0;
-}
-
-int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
-{
- be_type *bt; // type node
- TAO_OutStream *os = this->ctx_->stream ();
-
- if (node->cli_hdr_gen () || node->imported ())
- return 0;
-
- // first create a name for ourselves
- if (node->create_name (this->ctx_->tdef ()) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "failed creating name\n"), -1);
- }
-
- // generate the ifdefined macro for the sequence type
- os->gen_ifdef_macro (node->flatname ());
-
- os->indent (); // start with the current indentation level
-
- // retrieve the base type since we may need to do some code
- // generation for the base type.
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "Bad element type\n"), -1);
- }
-
- *os << "// *************************************************************"
- << be_nl
- << "// " << node->local_name () << be_nl
- << "// *************************************************************"
- << be_nl << be_nl;
-
- // generate a typedef to a parametrized sequence
- *os << "class " << idl_global->export_macro ()
- << " " << node->local_name () << " : public ";
- if (this->gen_base_sequence_class (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "codegen for base sequence class\n"), -1);
- }
-
- *os << be_nl
- << "{" << be_nl
- << "public:" << be_idt_nl
- << node->local_name () << " (void); // default ctor" << be_nl;
- // for unbounded sequences, we have a different set of constructors
- if (node->unbounded ())
- {
- *os << node->local_name () << " (CORBA::ULong max); // uses max size"
- << be_nl;
- }
-
- *os << node->local_name () << " (";
- if (node->unbounded ())
- {
- // unbounded seq takes this extra parameter
- *os << "CORBA::ULong max, " << be_idt << be_idt_nl;
- }
- *os << "CORBA::ULong length, " << be_nl;
- // generate the base type for the buffer
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "Bad visitor\n"), -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "base type visit failed\n"),
- -1);
- }
- delete visitor;
- *os << " *buffer, " << be_nl
- << "CORBA::Boolean release=0" << be_uidt_nl
- << ");" << be_uidt_nl;
- *os << node->local_name () << " (const " << node->local_name ()
- << " &); // copy ctor" << be_nl;
- *os << "~" << node->local_name () << " (void); // dtor\n";
- os->decr_indent ();
- *os << "};" << be_nl;
-
- // define a _ptr type. This is just an extension for convenience
- *os << "typedef " << node->local_name () << " *"
- << node->local_name () << "_ptr;\n";
-
- // Generate the typecode decl
- if (node->is_nested ())
- {
- // we have a scoped name
- os->indent ();
- *os << "static CORBA::TypeCode_ptr "
- << node->tc_name ()->last_component () << "_seq;\n\n";
- }
- else
- {
- // we are in the ROOT scope
- os->indent ();
- *os << "extern "
- << idl_global->export_macro ()
- << " CORBA::TypeCode_ptr "
- << node->tc_name ()->last_component () << ";\n\n";
- }
-
-
- os->gen_endif (); // endif macro
-
- // generate the ifdefined macro for the var type
- os->gen_ifdef_macro (node->flatname (), "_var");
-
- // generate the var and out types
- if (this->gen_var_defn (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "codegen for _var failed\n"), -1);
- }
-
- os->gen_endif ();
-
- // generate the ifdefined macro for the _out type
- os->gen_ifdef_macro (node->flatname (), "_out");
-
- if (this->gen_out_defn (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "codegen for _out failed\n"),
- -1);
- }
- os->gen_endif ();
- node->cli_hdr_gen (1);
-
- return 0;
-}
-
-// generate the _var definition for ourself
-int
-be_visitor_sequence_ch::gen_var_defn (be_sequence *node)
-{
- TAO_OutStream *os; // output stream
- char namebuf [NAMEBUFSIZE]; // names
- be_type *bt; // base type
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_var", node->local_name ()->get_string ());
-
- os = this->ctx_->stream ();
-
- *os << "// *************************************************************"
- << be_nl;
- *os << "// class " << node->name () << "_var" << be_nl;
- *os << "// *************************************************************\n\n";
-
- // retrieve base type
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "gen_var_defn - "
- "Bad base type\n"),
- -1);
- }
-
- // generate the var definition (always in the client header).
- // Depending upon the data type, there are some differences which we account
- // for over here.
-
- os->indent (); // start with whatever was our current indent level
- *os << "class " << idl_global->export_macro ()
- << " " << namebuf << be_nl;
- *os << "{" << be_nl;
- *os << "public:\n";
- os->incr_indent ();
- // default constr
- *os << namebuf << " (void); // default constructor" << be_nl;
- // constr
- *os << namebuf << " (" << node->local_name () << " *);" << be_nl;
- // copy constructor
- *os << namebuf << " (const " << namebuf <<
- " &); // copy constructor" << be_nl;
- // destructor
- *os << "~" << namebuf << " (void); // destructor" << be_nl;
- *os << be_nl;
- // assignment operator from a pointer
- *os << namebuf << " &operator= (" << node->local_name () << " *);" << be_nl;
- // assignment from _var
- *os << namebuf << " &operator= (const " << namebuf <<
- " &);" << be_nl;
-
- // arrow operator
- *os << node->local_name () << " *operator-> (void);" << be_nl;
- *os << "const " << node->local_name () << " *operator-> (void) const;" << be_nl;
- *os << be_nl;
-
- // other extra types (cast operators, [] operator, and others)
-
- // cast operator
- *os << "operator const " << node->local_name () << " &() const;" << be_nl;
- *os << "operator " << node->local_name () << " &();" << be_nl;
- *os << "operator " << node->local_name () << " &() const;" << be_nl;
-
- // overloaded [] operator. The const version is not required for sequences
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "gen_var_defn - "
- "Bad visitor\n"), -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_var_defn - "
- "[] ret type gen failed\n"),
- -1);
- }
- delete visitor;
-
- *os << "operator[] (CORBA::ULong index);" << be_nl;
-
- *os << "// in, inout, out, _retn " << be_nl;
- // the return types of in, out, inout, and _retn are based on the parameter
- // passing rules and the base type
- *os << "const " << node->local_name () << " &in (void) const;" << be_nl;
- *os << node->local_name () << " &inout (void);" << be_nl;
- *os << node->local_name () << " *&out (void);" << be_nl;
- *os << node->local_name () << " *_retn (void);" << be_nl;
-
- // generate an additional member function that returns the underlying pointer
- *os << node->local_name () << " *ptr (void) const;\n";
-
- *os << "\n";
- os->decr_indent ();
-
- // generate the private section
- *os << "private:\n";
- os->incr_indent ();
- *os << node->local_name () << " *ptr_;\n";
-
- os->decr_indent ();
- *os << "};\n\n";
-
- return 0;
-}
-
-// generate the _out definition
-int
-be_visitor_sequence_ch::gen_out_defn (be_sequence *node)
-{
- TAO_OutStream *os; // output stream
- char namebuf [NAMEBUFSIZE]; // to hold the _out name
- be_type *bt; // base type
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf, "%s_out", node->local_name ()->get_string ());
- os = this->ctx_->stream ();
-
- // retrieve base type
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "gen_out_defn - "
- "Bad base type\n"),
- -1);
- }
-
- // generate the out definition (always in the client header)
- os->indent (); // start with whatever was our current indent level
-
- *os << "class " << idl_global->export_macro () << " "
- << namebuf << be_nl;
- *os << "{" << be_nl;
- *os << "public:\n";
- os->incr_indent ();
-
- // No default constructor
-
- // constructor from a pointer
- *os << namebuf << " (" << node->local_name () << " *&);" << be_nl;
- // constructor from a _var &
- *os << namebuf << " (" << node->local_name () << "_var &);" << be_nl;
- // constructor from a _out &
- *os << namebuf << " (" << namebuf << " &);" << be_nl;
- // assignment operator from a _out &
- *os << namebuf << " &operator= (" << namebuf << " &);" << be_nl;
- // assignment operator from a pointer &, cast operator, ptr fn, operator
- // -> and any other extra operators
- // assignment
- *os << namebuf << " &operator= (" << node->local_name () << " *);" << be_nl;
- // operator ()
- *os << "operator " << node->local_name () << " *&();" << be_nl;
- // ptr fn
- *os << node->local_name () << " *&ptr (void);" << be_nl;
- // operator ->
- *os << node->local_name () << " *operator-> (void);" << be_nl;
-
- // overloaded [] operator only for sequence. The const version is not
- // required
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "gen_out_defn - "
- "Bad visitor\n"), -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_var_defn - "
- "[] ret type gen failed\n"),
- -1);
- }
- delete visitor;
- *os << "operator[] (CORBA::ULong index);" << be_nl;
- *os << "\n";
- os->decr_indent ();
- *os << "private:\n";
- os->incr_indent ();
-
- *os << node->local_name () << " *&ptr_;" << be_nl;
- *os << "// assignment from T_var not allowed" << be_nl;
- *os << "void operator= (const " << node->local_name () << "_var &);\n";
-
- os->decr_indent ();
- *os << "};\n\n";
-
- return 0;
-}
-
-// ***********************************************************
-// sequence visitor for inline generation
-// ***********************************************************
-
-
-be_visitor_sequence_ci::be_visitor_sequence_ci (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_sequence_ci::~be_visitor_sequence_ci (void)
-{
-}
-
-int
-be_visitor_sequence_ci::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- if (node->cli_inline_gen () || node->imported ())
- return 0;
-
- // all we do is generate the _var and _out implementations
- if (this->gen_var_impl (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ci::"
- "visit_sequence - "
- "codegen for _var failed\n"), -1);
- }
-
- if (this->gen_out_impl (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ci::"
- "visit_sequence - "
- "codegen for _out failed\n"), -1);
- }
-
- return 0;
-}
-
-int
-be_visitor_sequence_ci::gen_var_impl (be_sequence *node)
-{
- TAO_OutStream *os; // output stream
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _var names
- be_type *bt; // base type
-
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_var", node->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_var", node->local_name ()->get_string ());
-
- os = this->ctx_->stream ();
-
- // retrieve base type
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ci::"
- "visit_sequence - "
- "Bad element type\n"), -1);
- }
-
- // generate the var implementation in the inline file
- os->indent (); // start with whatever was our current indent level
-
- *os << "// *************************************************************"
- << be_nl;
- *os << "// Inline operations for class " << fname << be_nl;
- *os << "// *************************************************************\n\n";
-
- // default constr
- *os << "ACE_INLINE" << be_nl
- << fname << "::" << lname
- << " (void) // default constructor" << be_nl
- << " " << ": ptr_ (0)" << be_nl
- << "{}\n\n";
-
- // constr from a _ptr
- os->indent ();
- *os << "ACE_INLINE" << be_nl;
- *os << fname << "::" << lname << " (" << node->name () << " *p)" << be_nl;
- *os << " : ptr_ (p)" << be_nl;
- *os << "{}\n\n";
-
- // copy constructor
- os->indent ();
- *os << "ACE_INLINE" << be_nl;
- *os << fname << "::" << lname << " (const " << fname <<
- " &p) // copy constructor" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "if (p.ptr_)" << be_nl;
- *os << " this->ptr_ = new " << node->name () << "(*p.ptr_);" << be_nl;
- *os << "else" << be_nl;
- *os << " this->ptr_ = 0;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // destructor
- os->indent ();
- *os << "ACE_INLINE" << be_nl;
- *os << fname << "::~" << lname << " (void) // destructor" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "delete this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // assignment operator from a pointer
- os->indent ();
- *os << "ACE_INLINE " << fname << " &" << be_nl;
- *os << fname << "::operator= (" << node->name () <<
- " *p)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "delete this->ptr_;" << be_nl;
- *os << "this->ptr_ = p;" << be_nl;
- *os << "return *this;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // assignment operator from _var
- os->indent ();
- *os << "ACE_INLINE " << fname << " &" << be_nl;
- *os << fname << "::operator= (const " << fname <<
- " &p) // deep copy" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "if (this != &p)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "delete this->ptr_;" << be_nl;
- *os << "this->ptr_ = new " << node->name () << " (*p.ptr_);\n";
- os->decr_indent ();
- *os << "}" << be_nl;
- *os << "return *this;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // two arrow operators
- os->indent ();
- *os << "ACE_INLINE const " << node->name () << " *" << be_nl;
- *os << fname << "::operator-> (void) const" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
- *os << "ACE_INLINE " << node->name () << " *" << be_nl;
- *os << fname << "::operator-> (void)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // other extra methods - 3 cast operator ()
- os->indent ();
- *os << "ACE_INLINE " << be_nl;
- *os << fname << "::operator const " << node->name () <<
- " &() const // cast" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return *this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
- *os << "ACE_INLINE " << be_nl;
- *os << fname << "::operator " << node->name () << " &() // cast " << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return *this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
- *os << "ACE_INLINE " << be_nl;
- *os << fname << "::operator " << node->name () << " &() const// cast " << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return *this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // operator []
- os->indent ();
- *os << "ACE_INLINE ";
-
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ci::"
- "gen_var_impl - "
- "Bad visitor\n"), -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ci::"
- "gen_var_impl - "
- "[] ret type gen failed\n"),
- -1);
- }
- delete visitor;
-
- *os << be_nl;
- *os << fname << "::operator[] (CORBA::ULong index)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->ptr_->operator[] (index);\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // in, inout, out, and _retn
- os->indent ();
- *os << "ACE_INLINE const " << node->name () << " &" << be_nl;
- *os << fname << "::in (void) const" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return *this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
- *os << "ACE_INLINE " << node->name () << " &" << be_nl;
- *os << fname << "::inout (void)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return *this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
- *os << "// mapping for variable size " << be_nl;
- *os << "ACE_INLINE " << node->name () << " *&" << be_nl;
- *os << fname << "::out (void)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "delete this->ptr_;" << be_nl;
- *os << "this->ptr_ = 0;" << be_nl;
- *os << "return this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
- *os << "ACE_INLINE " << node->name () << " *" << be_nl;
- *os << fname << "::_retn (void)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << node->name () << " *tmp = this->ptr_;" << be_nl;
- *os << "this->ptr_ = 0;" << be_nl;
- *os << "return tmp;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // the additional ptr () member function
- os->indent ();
- *os << "ACE_INLINE " << node->name () << " *" << be_nl;
- *os << fname << "::ptr (void) const" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- return 0;
-}
-
-int
-be_visitor_sequence_ci::gen_out_impl (be_sequence *node)
-{
- TAO_OutStream *os; // output stream
- char fname [NAMEBUFSIZE]; // to hold the full and
- char lname [NAMEBUFSIZE]; // local _out names
- be_type *bt; // base type
-
-
- ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_out", node->fullname ());
-
- ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (lname, "%s_out", node->local_name ()->get_string ());
-
- os = this->ctx_->stream ();
-
- // retrieve base type
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ci::"
- "gen_out_impl - "
- "Bad element type\n"), -1);
- }
-
- // generate the out implementation in the inline file
-
- os->indent (); // start with whatever was our current indent level
-
- *os << "// *************************************************************"
- << be_nl;
- *os << "// Inline operations for class " << fname << be_nl;
- *os << "// *************************************************************\n\n";
-
- // constr from a pointer
- os->indent ();
- *os << "ACE_INLINE" << be_nl;
- *os << fname << "::" << lname << " (" << node->name () << " *&p)" << be_nl;
- *os << " : ptr_ (p)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "this->ptr_ = 0;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // constructor from _var &
- os->indent ();
- *os << "ACE_INLINE" << be_nl;
- *os << fname << "::" << lname << " (" << node->name () <<
- "_var &p) // constructor from _var" << be_nl;
- *os << " : ptr_ (p.out ())" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "delete this->ptr_;" << be_nl;
- *os << "this->ptr_ = 0;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // copy constructor
- os->indent ();
- *os << "ACE_INLINE" << be_nl;
- *os << fname << "::" << lname << " (" << fname <<
- " &p) // copy constructor" << be_nl;
- *os << " : ptr_ (p.ptr_)" << be_nl;
- *os << "{}\n\n";
-
- // assignment operator from _out &
- os->indent ();
- *os << "ACE_INLINE " << fname << " &" << be_nl;
- *os << fname << "::operator= (" << fname <<
- " &p)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "this->ptr_ = p.ptr_;" << be_nl;
- *os << "return *this;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // assignment from _var is not allowed by a private declaration
-
- // assignment operator from pointer
- os->indent ();
- *os << "ACE_INLINE " << fname << " &" << be_nl;
- *os << fname << "::operator= (" << node->name () <<
- " *p)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "this->ptr_ = p;" << be_nl;
- *os << "return *this;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // other extra methods - cast operator ()
- os->indent ();
- *os << "ACE_INLINE " << be_nl;
- *os << fname << "::operator " << node->name () <<
- " *&() // cast" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // ptr function
- os->indent ();
- *os << "ACE_INLINE " << node->name () << " *&" << be_nl;
- *os << fname << "::ptr (void) // ptr" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // operator ->
- os->indent ();
- *os << "ACE_INLINE " << node->name () << " *" << be_nl;
- *os << fname << "::operator-> (void)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->ptr_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // sequence has an additional method
- os->indent ();
- *os << "ACE_INLINE ";
-
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_SEQELEM_RETTYPE_CI);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ci::"
- "gen_out_impl - "
- "Bad visitor\n"), -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ci::"
- "gen_out_impl - "
- "[] ret type gen failed\n"),
- -1);
- }
- delete visitor;
-
- *os << be_nl;
- *os << fname << "::operator[] (CORBA::ULong index)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return this->ptr_->operator[] (index);\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- return 0;
-}
-
-// ************************************************************
-// Root visitor for client stub class
-// ************************************************************
-
-be_visitor_sequence_cs::be_visitor_sequence_cs (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_sequence_cs::~be_visitor_sequence_cs (void)
-{
-}
-
-// XXXASG - this method is same as that in the _ch visitor. So we need some
-// abstraction for this
-
-int
-be_visitor_sequence_cs::gen_base_sequence_class (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt;
-
- // retrieve the base type since we may need to do some code
- // generation for the base type.
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_cs::"
- "gen_base_sequence_class - "
- "Bad element type\n"), -1);
- }
-
- // generate the appropriate sequence type
- switch (node->managed_type ())
- {
- case be_sequence::MNG_OBJREF: // sequence of objrefs
- if (node->unbounded ())
- *os << "TAO_Unbounded_Object_Sequence<";
- else
- *os << "TAO_Bounded_Object_Sequence<";
- break;
- case be_sequence::MNG_STRING: // sequence of strings
- if (node->unbounded ())
- *os << "TAO_Unbounded_String_Sequence";
- else
- *os << "TAO_Bounded_String_Sequence<";
- break;
- default: // not a managed type
- if (node->unbounded ())
- *os << "TAO_Unbounded_Sequence<";
- else
- *os << "TAO_Bounded_Sequence<";
- break;
- }
-
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_BASE_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_cs::"
- "visit_sequence - "
- "base type visit failed\n"),
- -1);
- }
- delete visitor;
-
- // find out if the sequence is of a managed type and if it is bounded or not
- if (node->managed_type () == be_sequence::MNG_STRING)
- {
- if (!node->unbounded ())
- {
- *os << "<" << node->max_size () << ">";
- }
- }
- else
- {
- if (node->unbounded ())
- {
- *os << ">";
- }
- else
- {
- *os << ", " << node->max_size () << ">";
- }
- }
- return 0;
-}
-
-int be_visitor_sequence_cs::visit_sequence (be_sequence *node)
-{
- // generate the constructors
- be_type *bt; // type node
- TAO_OutStream *os = this->ctx_->stream ();
-
- if (node->cli_stub_gen () || node->imported ())
- return 0;
-
- // generate the ifdefined macro for the sequence type
- os->gen_ifdef_macro (node->flatname ());
-
- os->indent (); // start with the current indentation level
-
- // retrieve the base type since we may need to do some code
- // generation for the base type.
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_cs::"
- "visit_sequence - "
- "Bad element type\n"), -1);
- }
-
- *os << "// *************************************************************"
- << be_nl
- << "// " << node->name () << be_nl
- << "// *************************************************************"
- << be_nl << be_nl;
-
- // default constructor
- *os << node->name () << "::" << node->local_name () << " (void)" << be_nl
- << "{}" << be_nl;
-
- // for unbounded sequences, we have a different set of constructors
- if (node->unbounded ())
- {
- *os << node->name () << "::" << node->local_name ()
- << " (CORBA::ULong max) // uses max size" << be_nl
- << " : ";
- // pass it to the base constructor
- if (this->gen_base_sequence_class (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_cs::"
- "visit_sequence - "
- "codegen for base sequence class\n"), -1);
- }
- *os << " (max)" << be_nl
- << "{}" << be_nl;
- }
-
- // constructor with the buffer
- *os << node->name () << "::" << node->local_name () << " (";
- if (node->unbounded ())
- {
- *os << "CORBA::ULong max, "; // unbounded seq takes this extra parameter
- }
- *os << "CORBA::ULong length, ";
- // generate the base type for the buffer
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "Bad visitor\n"), -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "base type visit failed\n"),
- -1);
- }
- delete visitor;
- *os << " *buffer, CORBA::Boolean release)" << be_nl
- << " : ";
- // pass it to the base constructor
- if (this->gen_base_sequence_class (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_cs::"
- "visit_sequence - "
- "codegen for base sequence class\n"), -1);
- }
- *os << " (";
- if (node->unbounded ())
- {
- *os << "max, ";
- }
- *os << "length, buffer, release)" << be_nl
- << "{}" << be_nl;
-
- // copy constructor
- *os << node->name () << "::" << node->local_name ()
- << " (const " << node->local_name ()
- << " &seq) // copy ctor" << be_nl
- << " : ";
- // pass it to the base constructor
- if (this->gen_base_sequence_class (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_cs::"
- "visit_sequence - "
- "codegen for base sequence class\n"), -1);
- }
- *os << " (seq)" << be_nl
- << "{}" << be_nl;
-
- // destructor
- *os << node->name () << "::~" << node->local_name ()
- << " (void) // dtor" << be_nl
- << "{}" << be_nl << be_nl;
-
- // generate the typecode information here
- os->indent (); // start from current indentation level
- *os << "static const CORBA::Long _oc_" << node->flatname () << "_seq[] ="
- << be_nl;
- *os << "{\n";
- os->incr_indent (0);
- if (node->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_sequence::"
- "gen_client_stubs - "
- "codegen for encapsulation failed\n"),
- -1);
- }
-
- os->decr_indent ();
- *os << "};" << be_nl;
-
- *os << "static CORBA::TypeCode _tc__tc_" << node->flatname ()
- << "_seq (CORBA::tk_sequence, sizeof (_oc_" << node->flatname ()
- << "_seq), (char *) &_oc_" << node->flatname ()
- << "_seq, CORBA::B_FALSE);" << be_nl;
- *os << "CORBA::TypeCode_ptr " << node->tc_name () << "_seq = &_tc__tc_"
- << node->flatname () << "_seq;\n\n";
- os->gen_endif ();
-
- return 0;
-}
-
-// ****************************************************************
-// We have to generate the parameters for the template that implements
-// each sequence type.
-// ****************************************************************
-
-be_visitor_sequence_base::
-be_visitor_sequence_base (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_sequence_base::~be_visitor_sequence_base (void)
-{
-}
-
-int
-be_visitor_sequence_base::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- *os << node->name ();
- return 0;
-}
-
-// helper
-int
-be_visitor_sequence_base::visit_node (be_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt;
-
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_SEQUENCE_BASE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ());
- else
- *os << bt->name ();
- return 0;
-}
-
-int
-be_visitor_sequence_base::visit_sequence (be_sequence *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_base::visit_interface (be_interface *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_base::visit_interface_fwd (be_interface_fwd *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_base::visit_string (be_string *)
-{
- // NO-OP, we have ad-hoc classes from strings.
- return 0;
-}
-
-int
-be_visitor_sequence_base::visit_structure (be_structure *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_base::visit_union (be_union *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_base::visit_enum (be_enum *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_base::visit_array (be_array *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_base::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-// ****************************************************************
-// We have to generate the buffer type in the constructor
-// ****************************************************************
-
-be_visitor_sequence_buffer_type::
-be_visitor_sequence_buffer_type (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_sequence_buffer_type::~be_visitor_sequence_buffer_type (void)
-{
-}
-
-// helper
-int
-be_visitor_sequence_buffer_type::visit_node (be_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt;
-
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ());
- else
- *os << bt->name ();
- return 0;
-}
-
-int
-be_visitor_sequence_buffer_type::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- if (node->pt () == AST_PredefinedType::PT_pseudo)
- *os << node->name () << "_ptr";
- else
- *os << node->name ();
- return 0;
-}
-
-int
-be_visitor_sequence_buffer_type::visit_sequence (be_sequence *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_buffer_type::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- if (this->ctx_->state () == TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CH)
- *os << node->nested_type_name (this->ctx_->scope (), "_ptr");
- else
- *os << node->name () << "_ptr";
- return 0;
-}
-
-int
-be_visitor_sequence_buffer_type::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- if (this->ctx_->state () == TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CH)
- *os << node->nested_type_name (this->ctx_->scope (), "_ptr");
- else
- *os << node->name () << "_ptr";
- return 0;
-}
-
-int
-be_visitor_sequence_buffer_type::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- *os << "char *";
- return 0;
-}
-
-int
-be_visitor_sequence_buffer_type::visit_structure (be_structure *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_buffer_type::visit_union (be_union *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_buffer_type::visit_enum (be_enum *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_buffer_type::visit_array (be_array *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_buffer_type::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node); // set the alias node
- return node->primitive_base_type ()->accept (this);
-}
-
-// ***********************************************************
-// sequence element type visitor for return types of [] methods
-// ***********************************************************
-
-
-be_visitor_sequence_elemtype::
-be_visitor_sequence_elemtype (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_sequence_elemtype::~be_visitor_sequence_elemtype (void)
-{
-}
-
-// helper
-int
-be_visitor_sequence_elemtype::visit_node (be_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt;
-
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (this->ctx_->state () == TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ()) << " &";
- else
- *os << bt->name () << " &";
- return 0;
-}
-
-int
-be_visitor_sequence_elemtype::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt;
-
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- *os << "TAO_Object_Manager<" << bt->name () << "> ";
- break;
- default:
- if (this->ctx_->state () == TAO_CodeGen::TAO_SEQELEM_RETTYPE_CH)
- *os << bt->nested_type_name (this->ctx_->scope ()) << " &";
- else
- *os << bt->name () << " &";
- }
- return 0;
-}
-
-int
-be_visitor_sequence_elemtype::visit_sequence (be_sequence *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_elemtype::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt;
-
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
-
- *os << "TAO_Object_Manager <"
- << bt->nested_type_name (this->ctx_->scope ())
- << " > ";
-
- return 0;
-}
-
-int
-be_visitor_sequence_elemtype::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_type *bt;
-
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
-
- *os << "TAO_Object_Manager <"
- << bt->nested_type_name (this->ctx_->scope ())
- << " > ";
-
- return 0;
-}
-
-int
-be_visitor_sequence_elemtype::visit_string (be_string *)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- *os << "TAO_String_Manager ";
- return 0;
-}
-
-int
-be_visitor_sequence_elemtype::visit_structure (be_structure *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_elemtype::visit_union (be_union *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_elemtype::visit_enum (be_enum *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_elemtype::visit_array (be_array *node)
-{
- return this->visit_node (node);
-}
-
-int
-be_visitor_sequence_elemtype::visit_typedef (be_typedef *node)
-{
- this->ctx_->alias (node);
- return node->primitive_base_type ()->accept (this);
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_structure.cpp b/TAO/TAO_IDL/be/be_visitor_structure.cpp
deleted file mode 100644
index 68df8b4baf6..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_structure.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_structure.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Structure
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_structure.h"
-
-// generic struct visitor
-be_visitor_structure::be_visitor_structure (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_structure::~be_visitor_structure (void)
-{
-}
-
-// visit the Structure node and its scope
-int
-be_visitor_structure::visit_structure (be_structure *node)
-{
- return -1; // must be overriden
-}
-
-int
-be_visitor_structure::visit_field (be_field *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_STRUCT_CH:
- ctx.state (TAO_CodeGen::TAO_FIELD_CH);
- break;
- case TAO_CodeGen::TAO_STRUCT_CI:
- ctx.state (TAO_CodeGen::TAO_FIELD_CI);
- break;
- case TAO_CodeGen::TAO_STRUCT_CS:
- ctx.state (TAO_CodeGen::TAO_FIELD_CS);
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure::"
- "visit_field - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure::"
- "visit_field - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure::"
- "visit_field - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// ******************************************************
-// for client header
-// ******************************************************
-
-be_visitor_structure_ch::be_visitor_structure_ch (be_visitor_context *ctx)
- : be_visitor_structure (ctx)
-{
-}
-
-be_visitor_structure_ch::~be_visitor_structure_ch (void)
-{
-}
-
-// visit the Structure node and its scope
-int be_visitor_structure_ch::visit_structure (be_structure *node)
-{
- TAO_OutStream *os; // output stream
-
- if (!node->cli_hdr_gen () && !node->imported ()) // not already generated and
- // not imported
- {
- os = this->ctx_->stream ();
-
- os->indent (); // start from whatever indentation level we were at
- *os << "struct " << node->local_name () << be_nl
- << "{\n" << be_idt;
-
- // generate code for field members
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_ch::"
- "visit_structure - "
- "codegen for scope failed\n"), -1);
- }
-
- os->decr_indent ();
- *os << "};\n\n";
-
- // generate var defn
- if (node->gen_var_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_ch::"
- "visit_structure - "
- "codegen for _var failed\n"), -1);
- }
-
- // a class is generated for an out defn only for a variable length struct
- if (node->size_type () == be_decl::VARIABLE)
- {
- if (node->gen_out_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_ch::"
- "visit_structure - "
- "codegen for _out failed\n"), -1);
- }
- }
- else
- {
- os->indent ();
- *os << "typedef " << node->local_name () << " &" << node->local_name
- () << "_out;\n\n";
- }
-
- // generate the typecode decl
- if (node->is_nested ())
- {
- // we have a scoped name
- os->indent ();
-
- *os << "static CORBA::TypeCode_ptr " << node->tc_name
- ()->last_component () << ";\n\n";
- }
- else
- {
- // we are in the ROOT scope
- os->indent ();
- *os << "extern CORBA::TypeCode_ptr " << node->tc_name
- ()->last_component () << ";\n\n";
- }
- node->cli_hdr_gen (I_TRUE);
- }
- return 0;
-}
-
-// ******************************************************
-// for client inline
-// ******************************************************
-
-be_visitor_structure_ci::be_visitor_structure_ci (be_visitor_context *ctx)
- : be_visitor_structure (ctx)
-{
-}
-
-be_visitor_structure_ci::~be_visitor_structure_ci (void)
-{
-}
-
-// visit the Structure node and its scope
-int be_visitor_structure_ci::visit_structure (be_structure *node)
-{
- if (!node->cli_inline_gen () && !node->imported ())
- {
- if (node->gen_var_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_ci::"
- "visit_structure - "
- "codegen for _var failed\n"), -1);
- }
- if (node->size_type () == be_decl::VARIABLE &&
- node->gen_out_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_ci::"
- "visit_structure - "
- "codegen for _out failed\n"), -1);
- }
- // all we have to do is to visit the scope
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_ci::"
- "visit_structure - "
- "codegen for scope failed\n"), -1);
- }
- node->cli_inline_gen (I_TRUE);
- }
- return 0;
-}
-
-// ***************************************************************************
-// for client stubs
-// ***************************************************************************
-be_visitor_structure_cs::be_visitor_structure_cs (be_visitor_context *ctx)
- : be_visitor_structure (ctx)
-{
-}
-
-be_visitor_structure_cs::~be_visitor_structure_cs (void)
-{
-}
-
-// visit the Structure_Cs node and its scope
-int be_visitor_structure_cs::visit_structure (be_structure *node)
-{
- TAO_OutStream *os; // output stream
-
- if (!node->cli_stub_gen () && !node->imported ())
- {
- os = this->ctx_->stream ();
-
- // generate the typecode information here
- os->indent (); // start from current indentation level
- *os << "static const CORBA::Long _oc_" << node->flatname () << "[] =" <<
- be_nl;
- *os << "{\n";
- os->incr_indent (0);
- // note that we just need the parameters here and hence we generate the
- // encapsulation for the parameters
- if (node->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_cs::"
- "visit_structure - "
- "codegen for typecode failed\n"), -1);
- }
- os->decr_indent ();
- *os << "};" << be_nl;
-
- *os << "static CORBA::TypeCode _tc__tc_" << node->flatname () <<
- " (CORBA::tk_struct, sizeof (_oc_" << node->flatname () <<
- "), (char *) &_oc_" << node->flatname () <<
- ", CORBA::B_FALSE);" << be_nl;
- *os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_" <<
- node->flatname () << ";\n\n";
-
- // do any code generation required for the scope members
- // all we have to do is to visit the scope
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_cs::"
- "visit_structure - "
- "codegen for scope failed\n"), -1);
- }
- node->cli_stub_gen (I_TRUE);
- }
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_typedef.cpp b/TAO/TAO_IDL/be/be_visitor_typedef.cpp
deleted file mode 100644
index 5c3f0abb3d8..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_typedef.cpp
+++ /dev/null
@@ -1,1147 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_typedef.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Typedef
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_typedef.h"
-
-// ******************************************************
-// Generic Typedef visitor
-// ******************************************************
-
-be_visitor_typedef::be_visitor_typedef (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_typedef::~be_visitor_typedef (void)
-{
-}
-
-// visit the Typedef node and its scope
-int be_visitor_typedef::visit_typedef (be_typedef *node)
-{
- return -1; // must be overridden
-}
-
-// =all common visit methods for typedef visitor
-
-// visit a array
-int
-be_visitor_typedef::visit_array (be_array *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- ctx.state (TAO_CodeGen::TAO_ARRAY_CH);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- ctx.state (TAO_CodeGen::TAO_ARRAY_CS);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- ctx.state (TAO_CodeGen::TAO_ARRAY_CI);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_SH:
- case TAO_CodeGen::TAO_TYPEDEF_SI:
- case TAO_CodeGen::TAO_TYPEDEF_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_array - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_array - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_array - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-//visit an enum
-int
-be_visitor_typedef::visit_enum (be_enum *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- ctx.state (TAO_CodeGen::TAO_ENUM_CH);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- ctx.state (TAO_CodeGen::TAO_ENUM_CS);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- case TAO_CodeGen::TAO_TYPEDEF_SH:
- case TAO_CodeGen::TAO_TYPEDEF_SI:
- case TAO_CodeGen::TAO_TYPEDEF_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_enum - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_enum - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_enum - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an predefined type
-int
-be_visitor_typedef::visit_predefined_type (be_predefined_type *node)
-{
- return 0;
-}
-
-// visit an sequence
-int
-be_visitor_typedef::visit_sequence (be_sequence *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_CH);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_CI);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_CS);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_SH:
- case TAO_CodeGen::TAO_TYPEDEF_SI:
- case TAO_CodeGen::TAO_TYPEDEF_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_sequence - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_sequence - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_sequence - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an structure
-int
-be_visitor_typedef::visit_string (be_string *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CH);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CI);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CS);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_SH:
- case TAO_CodeGen::TAO_TYPEDEF_SI:
- case TAO_CodeGen::TAO_TYPEDEF_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_string - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_string - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_string - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an structure
-int
-be_visitor_typedef::visit_structure (be_structure *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CH);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CI);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- ctx.state (TAO_CodeGen::TAO_STRUCT_CS);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_SH:
- case TAO_CodeGen::TAO_TYPEDEF_SI:
- case TAO_CodeGen::TAO_TYPEDEF_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_structure - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_structure - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_structure - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit an union
-int
-be_visitor_typedef::visit_union (be_union *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_TYPEDEF_CH:
- ctx.state (TAO_CodeGen::TAO_UNION_CH);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CI:
- ctx.state (TAO_CodeGen::TAO_UNION_CI);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_CS:
- ctx.state (TAO_CodeGen::TAO_UNION_CS);
- break;
- case TAO_CodeGen::TAO_TYPEDEF_SH:
- case TAO_CodeGen::TAO_TYPEDEF_SI:
- case TAO_CodeGen::TAO_TYPEDEF_SS:
- return 0; // nothing to be done
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_union - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_union - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef::"
- "visit_union - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// ******************************************************
-// Typedef visitor for client header
-// ******************************************************
-
-be_visitor_typedef_ch::be_visitor_typedef_ch (be_visitor_context *ctx)
- : be_visitor_typedef (ctx)
-{
-}
-
-be_visitor_typedef_ch::~be_visitor_typedef_ch (void)
-{
-}
-
-int
-be_visitor_typedef_ch::visit_typedef (be_typedef *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
-
- // In general, we may have a chain of typedefs. i.e.,
- // typedef sequence<long> X;
- // typedef X Y;
- // typedef Y Z; and so on
- // The first time we will be in will be for node Z for which the code
- // generation has to take place. However, it is not enough to just generate
- // code that looks like -
- // typedef Y Z;
- // For different types (in this case we have a sequence), we will need
- // typedefs for the _var and _out types for Z. If it had been an array, we
- // will additionally have the _forany type as well as inlined *_alloc, _dup,
- // and _free methods.
- //
- // Finally, we need to differentiate between the case where we were
- // generating code for
- // typedef sequence<long> X; and
- // typedef Y Z; where Y was somehow aliased to the sequence. In the former
- // case, we will need to generate all the code for sequence<long> or whatever
- // the type maybe. In the latter, we just need typedefs for the type and all
- // associated _var, _out, and other types.
-
- be_type *bt; // base type
-
- if (this->ctx_->tdef ())
- {
- // the fact that we are here indicates that we were generating code for a
- // typedef node whose base type also happens to be another typedef-ed
- // (i.e. an alias) node for another (possibly alias) node
-
- this->ctx_->alias (node); // save this alias
-
- // grab the most primitive base type in the chain to avoid recusrsively
- // going thru this visit method
- bt = node->primitive_base_type ();
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "bad primitive base type\n"
- ), -1);
- }
-
- // accept on this base type, but generate code for the typedef node
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "failed to accept visitor\n"
- ), -1);
- }
- }
- else
- {
- // the context has not stored any "tdef" node. So we must be in here for
- // the first time
- this->ctx_->tdef (node); // save the typedef node
-
- // grab the immediate base type node
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "bad base type\n"
- ), -1);
- }
-
- // accept on this base type, but generate code for the typedef node
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "failed to accept visitor\n"
- ), -1);
- }
-
- // generate the typecode decl for this typedef node
- if (!node->imported ())
- {
- if (node->is_nested ())
- {
- // we have a scoped name
- os->indent ();
- *os << "static CORBA::TypeCode_ptr "
- << node->tc_name ()->last_component () << ";\n\n";
- }
- else
- {
- // we are in the ROOT scope
- os->indent ();
- *os << "extern CORBA::TypeCode_ptr "
- << node->tc_name ()->last_component () << ";\n\n";
- }
- }
- }
-
- return 0;
-}
-
-int
-be_visitor_typedef_ch::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!bt->imported () &&
- bt->node_type () == AST_Decl::NT_array) // direct typedef of a base node
- // type
- {
- // let the base class visitor handle this case
- if (this->be_visitor_typedef::visit_array (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_array - "
- "base class visitor failed \n"
- ), -1);
- }
- }
-
- // now generate the typedefs
- os->indent ();
- // typedef the type and the _slice type
- *os << "typedef " << bt->nested_type_name (scope)
- << " " << tdef->nested_type_name (scope) << ";" << be_nl;
- *os << "typedef " << bt->nested_type_name (scope, "_slice")
- << " " << tdef->nested_type_name (scope, "_slice") << ";" << be_nl;
- // typedef the _var, _out, and _forany types
- *os << "typedef " << bt->nested_type_name (scope, "_var")
- << " " << tdef->nested_type_name (scope, "_var") << ";" << be_nl;
- *os << "typedef " << bt->nested_type_name (scope, "_out")
- << " " << tdef->nested_type_name (scope, "_out") << ";" << be_nl;
- *os << "typedef " << bt->nested_type_name (scope, "_forany")
- << " " << tdef->nested_type_name (scope, "_forany") << ";" << be_nl;
- // the _alloc, _dup, and free methods
- *os << tdef->nested_type_name (scope, "_slice") << " *"
- << tdef->nested_type_name (scope, "_alloc") << " (void);" << be_nl;
- *os << tdef->nested_type_name (scope, "_slice") << " *"
- << tdef->nested_type_name (scope, "_dup") << " ("
- << tdef->nested_type_name (scope, "_slice") << " *slice);" << be_nl;
- *os << tdef->nested_type_name (scope, "_slice") << " *"
- << tdef->nested_type_name (scope, "_free") << " ("
- << tdef->nested_type_name (scope, "_slice") << " *slice);" << be_nl;
- return 0;
-}
-
-int
-be_visitor_typedef_ch::visit_enum (be_enum *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (bt->node_type () == AST_Decl::NT_enum) // direct typedef of a base node
- // type
- {
- // let the base class visitor handle this case
- if (this->be_visitor_typedef::visit_enum (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_enum - "
- "base class visitor failed \n"
- ), -1);
- }
- }
-
- // now generate the typedefs
- os->indent ();
- // typedef the type and the _slice type
- *os << "typedef " << bt->nested_type_name (scope)
- << " " << tdef->nested_type_name (scope) << ";" << be_nl;
- // typedef the _out
- *os << "typedef " << bt->nested_type_name (scope, "_out")
- << " " << tdef->nested_type_name (scope, "_out") << ";" << be_nl;
- return 0;
-}
-
-int
-be_visitor_typedef_ch::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- // now generate the typedefs
- os->indent ();
- // typedef the type
- *os << "typedef " << bt->nested_type_name (scope)
- << " " << tdef->nested_type_name (scope) << ";" << be_nl;
- if (node->pt () == AST_PredefinedType::PT_pseudo)
- {
- // typedef the _ptr
- *os << "typedef " << bt->nested_type_name (scope, "_ptr")
- << " " << tdef->nested_type_name (scope, "_ptr") << ";" << be_nl;
- }
- // typedef the _out
- *os << "typedef " << bt->nested_type_name (scope, "_out")
- << " " << tdef->nested_type_name (scope, "_out") << ";" << be_nl;
- return 0;
-}
-
-int
-be_visitor_typedef_ch::visit_string (be_string *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
-
- // now generate the typedefs
- os->indent ();
- // typedef the type and the _slice type
- *os << "typedef char *"
- << " " << tdef->nested_type_name (scope) << ";" << be_nl;
- // typedef the _var, _out, and _forany types
- *os << "typedef CORBA::String_var"
- << " " << tdef->nested_type_name (scope, "_var") << ";" << be_nl;
- *os << "typedef CORBA::String_out"
- << " " << tdef->nested_type_name (scope, "_out") << ";" << be_nl;
- return 0;
-}
-
-int
-be_visitor_typedef_ch::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (bt->node_type () == AST_Decl::NT_sequence) // direct typedef of a base node
- // type
- {
- // let the base class visitor handle this case
- if (this->be_visitor_typedef::visit_sequence (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_sequence - "
- "base class visitor failed \n"
- ), -1);
- }
- }
- else
- {
- // now generate the typedefs
- os->indent ();
- // typedef the type and the _slice type
- *os << "typedef " << bt->nested_type_name (scope)
- << " " << tdef->nested_type_name (scope) << ";" << be_nl;
- // typedef the _var, _out types
- *os << "typedef " << bt->nested_type_name (scope, "_var")
- << " " << tdef->nested_type_name (scope, "_var") << ";" << be_nl;
- *os << "typedef " << bt->nested_type_name (scope, "_out")
- << " " << tdef->nested_type_name (scope, "_out") << ";" << be_nl;
- }
- return 0;
-}
-
-int
-be_visitor_typedef_ch::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (bt->node_type () == AST_Decl::NT_struct) // direct typedef of a base node
- // type
- {
- // let the base class visitor handle this case
- if (this->be_visitor_typedef::visit_structure (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_structure - "
- "base class visitor failed \n"
- ), -1);
- }
- }
-
- // now generate the typedefs
- os->indent ();
- // typedef the type
- *os << "typedef " << bt->nested_type_name (scope)
- << " " << tdef->nested_type_name (scope) << ";" << be_nl;
- // typedef the _var, _out types
- *os << "typedef " << bt->nested_type_name (scope, "_var")
- << " " << tdef->nested_type_name (scope, "_var") << ";" << be_nl;
- *os << "typedef " << bt->nested_type_name (scope, "_out")
- << " " << tdef->nested_type_name (scope, "_out") << ";" << be_nl;
- return 0;
-}
-
-int
-be_visitor_typedef_ch::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (bt->node_type () == AST_Decl::NT_union) // direct typedef of a base node
- // type
- {
- // let the base class visitor handle this case
- if (this->be_visitor_typedef::visit_union (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_union - "
- "base class visitor failed \n"
- ), -1);
- }
- }
-
- // now generate the typedefs
- os->indent ();
- // typedef the type and the _slice type
- *os << "typedef " << bt->nested_type_name (scope)
- << " " << tdef->nested_type_name (scope) << ";" << be_nl;
- // typedef the _var, _out types
- *os << "typedef " << bt->nested_type_name (scope, "_var")
- << " " << tdef->nested_type_name (scope, "_var") << ";" << be_nl;
- *os << "typedef " << bt->nested_type_name (scope, "_out")
- << " " << tdef->nested_type_name (scope, "_out") << ";" << be_nl;
- return 0;
-}
-
-// ******************************************************
-// Typedef visitor for client inline
-// ******************************************************
-
-be_visitor_typedef_ci::be_visitor_typedef_ci (be_visitor_context *ctx)
- : be_visitor_typedef (ctx)
-{
-}
-
-be_visitor_typedef_ci::~be_visitor_typedef_ci (void)
-{
-}
-
-int
-be_visitor_typedef_ci::visit_typedef (be_typedef *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
-
- // In general, we may have a chain of typedefs. i.e.,
- // typedef sequence<long> X;
- // typedef X Y;
- // typedef Y Z; and so on
- // The first time we will be in will be for node Z for which the code
- // generation has to take place. However, it is not enough to just generate
- // code that looks like -
- // typedef Y Z;
- // For different types (in this case we have a sequence), we will need
- // typedefs for the _var and _out types for Z. If it had been an array, we
- // will additionally have the _forany type as well as inlined *_alloc
- // methods.
- //
- // Finally, we need to differentiate between the case where we were
- // generating code for
- // typedef sequence<long> X; and
- // typedef Y Z; where Y was somehow aliased to the sequence. In the former
- // case, we will need to generate all the code for sequence<long> or whatever
- // the type maybe. In the latter, we just need typedefs for the type and all
- // associated _var, _out, and other types.
-
- be_type *bt; // base type
-
- if (this->ctx_->tdef ())
- {
- // the fact that we are here indicates that we were generating code for a
- // typedef node whose base type also happens to be another typedef-ed
- // (i.e. an alias) node for another (possibly alias) node
-
- this->ctx_->alias (node); // save this alias
-
- // grab the most primitive base type in the chain to avoid recusrsively
- // going thru this visit method
- bt = node->primitive_base_type ();
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "bad primitive base type\n"
- ), -1);
- }
- }
- else
- {
- // the context has not stored any "tdef" node. So we must be in here for
- // the first time
- this->ctx_->tdef (node); // save the typedef node
-
- // grab the immediate base type node
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "bad base type\n"
- ), -1);
- }
- }
- // accept on this base type
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "failed to accept visitor\n"
- ), -1);
- }
-
- return 0;
-}
-
-int
-be_visitor_typedef_ci::visit_array (be_array *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (bt->node_type () == AST_Decl::NT_array) // direct typedef of a base node
- // type
- {
- // let the base class visitor handle this case
- if (this->be_visitor_typedef::visit_array (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ci::"
- "visit_array - "
- "base class visitor failed \n"
- ), -1);
- }
- }
- return 0;
-}
-
-int
-be_visitor_typedef_ci::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (bt->node_type () == AST_Decl::NT_sequence) // direct typedef of a base node
- // type
- {
- // let the base class visitor handle this case
- if (this->be_visitor_typedef::visit_sequence (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ci::"
- "visit_sequence - "
- "base class visitor failed \n"
- ), -1);
- }
- }
- return 0;
-}
-
-int
-be_visitor_typedef_ci::visit_structure (be_structure *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (bt->node_type () == AST_Decl::NT_struct) // direct typedef of a base node
- // type
- {
- // let the base class visitor handle this case
- if (this->be_visitor_typedef::visit_structure (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ci::"
- "visit_structure - "
- "base class visitor failed \n"
- ), -1);
- }
- }
- return 0;
-}
-
-int
-be_visitor_typedef_ci::visit_union (be_union *node)
-{
- TAO_OutStream *os = this->ctx_->stream (); // output stream
- be_typedef *tdef = this->ctx_->tdef (); // typedef node
- be_decl *scope = this->ctx_->scope (); // scope in which it is used
- be_type *bt;
-
- if (this->ctx_->alias ()) // typedef of a typedef
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (bt->node_type () == AST_Decl::NT_union) // direct typedef of a base node
- // type
- {
- // let the base class visitor handle this case
- if (this->be_visitor_typedef::visit_union (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ci::"
- "visit_union - "
- "base class visitor failed \n"
- ), -1);
- }
- }
- return 0;
-}
-
-// ******************************************************
-// Typedef visitor for client stubs
-// ******************************************************
-
-be_visitor_typedef_cs::be_visitor_typedef_cs (be_visitor_context *ctx)
- : be_visitor_typedef (ctx)
-{
-}
-
-be_visitor_typedef_cs::~be_visitor_typedef_cs (void)
-{
-}
-
-int
-be_visitor_typedef_cs::visit_typedef (be_typedef *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
-
- // In general, we may have a chain of typedefs. i.e.,
- // typedef sequence<long> X;
- // typedef X Y;
- // typedef Y Z; and so on
- // The first time we will be in will be for node Z for which the code
- // generation has to take place. However, it is not enough to just generate
- // code that looks like -
- // typedef Y Z;
- // For different types (in this case we have a sequence), we will need
- // typedefs for the _var and _out types for Z. If it had been an array, we
- // will additionally have the _forany type as well as inlined *_alloc
- // methods.
- //
- // Finally, we need to differentiate between the case where we were
- // generating code for
- // typedef sequence<long> X; and
- // typedef Y Z; where Y was somehow aliased to the sequence. In the former
- // case, we will need to generate all the code for sequence<long> or whatever
- // the type maybe. In the latter, we just need typedefs for the type and all
- // associated _var, _out, and other types.
-
- be_type *bt; // base type
-
- if (this->ctx_->tdef ())
- {
- // the fact that we are here indicates that we were generating code for a
- // typedef node whose base type also happens to be another typedef-ed
- // (i.e. an alias) node for another (possibly alias) node
-
- this->ctx_->alias (node); // save this alias
-
- // grab the most primitive base type in the chain to avoid recusrsively
- // going thru this visit method
- bt = node->primitive_base_type ();
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "bad primitive base type\n"
- ), -1);
- }
- // accept on this base type
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "failed to accept visitor\n"
- ), -1);
- }
- }
- else
- {
- // the context has not stored any "tdef" node. So we must be in here for
- // the first time
- this->ctx_->tdef (node); // save the typedef node
-
- // grab the immediate base type node
- bt = be_type::narrow_from_decl (node->base_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "bad base type\n"
- ), -1);
- }
- // accept on this base type
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typedef_ch::"
- "visit_typedef - "
- "failed to accept visitor\n"
- ), -1);
- }
-
- if (!node->imported ())
- {
- // generate the typecode information here
- os->indent (); // start from current indentation level
- *os << "static const CORBA::Long _oc_" << node->flatname () << "[] ="
- << be_nl;
- *os << "{\n";
- os->incr_indent (0);
- if (node->gen_encapsulation () == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error generating typecode\n\n"));
- return -1;
- }
- os->decr_indent ();
- *os << "};" << be_nl;
-
- *os << "static CORBA::TypeCode _tc__tc_" << node->flatname ()
- << " (CORBA::tk_alias, sizeof (_oc_" << node->flatname ()
- << "), (char *) &_oc_" << node->flatname ()
- << ", CORBA::B_FALSE);" << be_nl;
- *os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_"
- << node->flatname () << ";\n\n";
-
- }
- }
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_union.cpp b/TAO/TAO_IDL/be/be_visitor_union.cpp
deleted file mode 100644
index 935f173fe20..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_union.cpp
+++ /dev/null
@@ -1,851 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_union.cpp
-//
-// = DESCRIPTION
-// Visitors for generation of code for Union
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_union.h"
-
-// generic struct visitor
-be_visitor_union::be_visitor_union (be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_union::~be_visitor_union (void)
-{
-}
-
-// visit the Union node and its scope
-int
-be_visitor_union::visit_union (be_union *node)
-{
- return -1; // must be overriden
-}
-
-int
-be_visitor_union::visit_union_branch (be_union_branch *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // this switch is acceptable rather than having derived visitors overriding
- // this method and differing only in what state they set
-
- switch (this->ctx_->state ())
- {
- case TAO_CodeGen::TAO_UNION_PUBLIC_CH:
- ctx.state (TAO_CodeGen::TAO_UNION_PUBLIC_CH);
- break;
- case TAO_CodeGen::TAO_UNION_PRIVATE_CH:
- ctx.state (TAO_CodeGen::TAO_UNION_PRIVATE_CH);
- break;
- case TAO_CodeGen::TAO_UNION_PUBLIC_CI:
- ctx.state (TAO_CodeGen::TAO_UNION_PUBLIC_CI);
- break;
- case TAO_CodeGen::TAO_UNION_PUBLIC_CS:
- ctx.state (TAO_CodeGen::TAO_UNION_PUBLIC_CS);
- break;
- case TAO_CodeGen::TAO_UNION_PUBLIC_ASSIGN_CS:
- ctx.state (TAO_CodeGen::TAO_UNION_PUBLIC_ASSIGN_CS);
- break;
- default:
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union::"
- "visit_union_branch - "
- "Bad context state\n"
- ), -1);
- }
- break;
- }
-
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union::"
- "visit_union_branch - "
- "NUL visitor\n"
- ), -1);
- }
-
- // let the node accept this visitor
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union::"
- "visit_union_branch - "
- "failed to accept visitor\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// ******************************************************
-// for client header
-// ******************************************************
-
-be_visitor_union_ch::be_visitor_union_ch (be_visitor_context *ctx)
- : be_visitor_union (ctx)
-{
-}
-
-be_visitor_union_ch::~be_visitor_union_ch (void)
-{
-}
-
-// visit the Union node and its scope
-int be_visitor_union_ch::visit_union (be_union *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
-
- if (!node->cli_hdr_gen () && !node->imported ()) // not already generated and
- // not imported
- {
- os = this->ctx_->stream ();
-
- // generate the ifdefined macro for the union type
- os->gen_ifdef_macro (node->flatname ());
- os->indent (); // start with the current indentation level
- *os << "class " << node->local_name () << be_nl
- << "{" << be_nl
- << "public:" << be_idt_nl
-
- // generate default and copy constructors
- << node->local_name () << " (void); // default constructor" << be_nl
- << node->local_name () << " (const " << node->local_name ()
- << " &); // copy constructor" << be_nl
- // generate destructor
- << "~" << node->local_name () << " (void); // destructor" << be_nl
- // generate assignment operator
- << node->local_name () << " &operator= (const "
- << node->local_name () << " &); // copy constructor\n\n";
-
- // retrieve the disriminant type
- bt = be_type::narrow_from_decl (node->disc_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "bad disciminant type\n"), -1);
- }
-
- // the discriminant type may have to be defined here if it was an enum
- // declaration inside of the union statement.
-
- ctx.state (TAO_CodeGen::TAO_UNION_DISCTYPEDEFN_CH); // set current code
- // gen state
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "bad visitor\n"), -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- " visit_union - "
- "codegen for discriminant failed\n"), -1);
- }
- delete visitor;
-
- // now generate the public defn for the union branch members. For this,
- // set our state to reflect what we are aiming to do
- this->ctx_->state (TAO_CodeGen::TAO_UNION_PUBLIC_CH); // set current code
- // gen state
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "codegen for public defn of union members\n"),
- -1);
- }
-
- // now generate the private data members of the union
- os->decr_indent ();
- *os << "private:\n";
- os->incr_indent ();
- *os << bt->nested_type_name (node) << " disc_;" << be_nl; // emit the
- // ACE_NESTED_CLASS macro
-
- // the members are inside of a union
- *os << "union" << be_nl;
- *os << "{\n";
- os->incr_indent (0);
- this->ctx_->state (TAO_CodeGen::TAO_UNION_PRIVATE_CH); // set current
- // code gen state
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "codegen for private members of union\n"), -1);
- }
-
- os->decr_indent ();
- *os << "}; // end of union \n";
-
- os->decr_indent ();
- *os << "}; // " << node->name () << "\n\n";
-
- // Generate the typecode decl
- if (node->is_nested ())
- {
- // we have a scoped name
- os->indent ();
- *os << "static CORBA::TypeCode_ptr " << node->tc_name
- ()->last_component () << ";\n\n";
- }
- else
- {
- // we are in the ROOT scope
- os->indent ();
- *os << "extern CORBA::TypeCode_ptr " << node->tc_name
- ()->last_component () << ";\n\n";
- }
- os->gen_endif ();
-
- // generate the ifdefined macro for the _var type
- os->gen_ifdef_macro (node->flatname (), "_var");
- // generate var defn
- if (node->gen_var_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "codegen for _var\n"), -1);
- }
- os->gen_endif ();
-
- // generate the ifdefined macro for the array type
- os->gen_ifdef_macro (node->flatname (), "_out");
- // a class is generated for an out defn only for a variable length struct
- if (node->size_type () == be_decl::VARIABLE)
- {
- if (node->gen_out_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "codegen for _out\n"), -1);
- }
- }
- else
- {
- os->indent ();
- *os << "typedef " << node->local_name () << " &" << node->local_name
- () << "_out;\n\n";
- }
- os->gen_endif ();
-
- node->cli_hdr_gen (I_TRUE);
- }
-
- return 0;
-}
-
-// ******************************************************
-// for client inline
-// ******************************************************
-
-be_visitor_union_ci::be_visitor_union_ci (be_visitor_context *ctx)
- : be_visitor_union (ctx)
-{
-}
-
-be_visitor_union_ci::~be_visitor_union_ci (void)
-{
-}
-
-// visit the Union node and its scope
-int be_visitor_union_ci::visit_union (be_union *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
-
- if (!node->cli_inline_gen () && !node->imported ())
- {
- os = this->ctx_->stream ();
-
- *os << "// *************************************************************"
- << be_nl;
- *os << "// Inline operations for union " << node->name () << be_nl;
- *os << "// *************************************************************\n\n";
-
- // generate the default constructor and the destructor here
- os->indent ();
- *os << "// default constructor" << be_nl
- << "ACE_INLINE" << be_nl
- << node->name () << "::" << node->local_name () << " (void)" << be_nl
- << "{" << be_nl
- << "}" << be_nl << be_nl;
-
- *os << "// destructor" << be_nl
- << "ACE_INLINE" << be_nl
- << node->name () << "::~" << node->local_name () << " (void)" << be_nl
- << "{" << be_nl
- << "}\n\n";
-
- // the discriminant type may have to be defined here if it was an enum
- // declaration inside of the union statement.
-
- bt = be_type::narrow_from_decl (node->disc_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ci::"
- "visit_union - "
- "bad discriminant type\n"), -1);
- }
-
- ctx.state (TAO_CodeGen::TAO_UNION_DISCTYPEDEFN_CI); // set current code
- // gen state
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ci::"
- "visit_union - "
- "bad visitor\n"), -1);
- }
- // generate code for the discriminant
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ci::"
- "visit union - "
- "codegen for discrminant failed\n"), -1);
- }
-
- // now generate the implementation of the access methods for the
- // union. For this set our state
- this->ctx_->state (TAO_CodeGen::TAO_UNION_PUBLIC_CI);
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ci::"
- "visit_union - "
- "codegen for scope failed\n"), -1);
- }
-
- // generate the ifdefined macro for the array type
- os->gen_ifdef_macro (node->flatname (), "_var");
- if (node->gen_var_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ci::"
- "visit_union - "
- "codegen for _var failed\n"), -1);
- }
- os->gen_endif ();
-
- // generate the ifdefined macro for the array type then generate the _out
- // impl
- os->gen_ifdef_macro (node->flatname (), "_out");
- if (node->size_type () == be_decl::VARIABLE
- && node->gen_out_impl () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ci::"
- "visit_union - "
- "codegen for _out failed\n"), -1);
- }
- os->gen_endif ();
-
- node->cli_inline_gen (I_TRUE);
- }
- return 0;
-}
-
-// ******************************************************
-// for client stubs
-// ******************************************************
-
-be_visitor_union_cs::be_visitor_union_cs (be_visitor_context *ctx)
- : be_visitor_union (ctx)
-{
-}
-
-be_visitor_union_cs::~be_visitor_union_cs (void)
-{
-}
-
-// visit the Union_cs node and its scope
-int be_visitor_union_cs::visit_union (be_union *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // for discriminant type
-
- if (!node->cli_stub_gen () && !node->imported ())
- {
- os = this->ctx_->stream ();
-
- be_visitor_context ctx (*this->ctx_);
- // the discriminant type may have to be defined here if it was an enum
- // declaration inside of the union statement. We need to generate its
- // typecode
-
- bt = be_type::narrow_from_decl (node->disc_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_cs::"
- "visit_union - "
- "bad discriminant type\n"), -1);
- }
-
- ctx.state (TAO_CodeGen::TAO_UNION_DISCTYPEDEFN_CS); // set current code
- // gen state
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_cs::"
- "visit_union - "
- "bad visitor\n"), -1);
- }
- // generate code for the discriminant
- if (bt->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_cs::"
- "visit union - "
- "codegen for discrminant failed\n"), -1);
- }
-
- // first generate code for any of the members (if required, e.g.,
- // anonymous sequences, structs, unions, arrays)
- this->ctx_->state (TAO_CodeGen::TAO_UNION_PUBLIC_CS); // set current code
- // gen state
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_cs"
- "visit_union - "
- "codegen for scope failed\n"), -1);
- }
-
- // now generate the operations on the union such as the copy constructor
- // and the assignment operator
-
- *os << "// *************************************************************"
- << be_nl;
- *os << "// Operations for union " << node->name () << be_nl;
- *os << "// *************************************************************\n\n";
-
- this->ctx_->state (TAO_CodeGen::TAO_UNION_PUBLIC_ASSIGN_CS);
-
- // generate the copy constructor and the assignment operator here
- os->indent ();
- *os << "// copy constructor" << be_nl;
- *os << node->name () << "::" << node->local_name () << " (const " <<
- node->name () << " &u)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- // first set the discriminant
- *os << "this->disc_ = u.disc_;" << be_nl;
- // now switch based on the disc value
- *os << "switch (this->disc_)" << be_nl;
- *os << "{\n";
- os->incr_indent (0);
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_cs"
- "visit_union - "
- "codegen for copy ctor failed\n"), -1);
- }
-
- os->decr_indent ();
- *os << "}\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // assignment operator
- os->indent ();
- *os << "// assignment operator" << be_nl;
- *os << node->name () << " &" << be_nl; // return type
- *os << node->name () << "::operator= (const " <<
- node->name () << " &u)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- // first set the discriminant
- *os << "this->disc_ = u.disc_;" << be_nl;
- // now switch based on the disc value
- *os << "switch (this->disc_)" << be_nl;
- *os << "{\n";
- os->incr_indent (0);
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_cs"
- "visit_union - "
- "codegen for assign op failed\n"), -1);
- }
-
- os->decr_indent ();
- *os << "}" << be_nl;
- *os << "return *this;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- // generate the typecode information here
- os->indent (); // start from current indentation level
- *os << "static const CORBA::Long _oc_" << node->flatname () << "[] =" <<
- be_nl;
- *os << "{\n";
- os->incr_indent (0);
- if (node->gen_encapsulation () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_cs"
- "visit_union - "
- "codegen for encapsulation failed\n"), -1);
- }
-
- os->decr_indent ();
- *os << "};" << be_nl;
-
- *os << "static CORBA::TypeCode _tc__tc_" << node->flatname () <<
- " (CORBA::tk_union, sizeof (_oc_" << node->flatname () <<
- "), (char *) &_oc_" << node->flatname () <<
- ", CORBA::B_FALSE);" << be_nl;
- *os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_" <<
- node->flatname () << ";\n\n";
- node->cli_stub_gen (I_TRUE);
- }
- return 0;
-}
-
-
-// *************************************************************************
-// be_visitor_discriminant_ch - visitor for discriminant in client header file
-// *************************************************************************
-
-be_visitor_union_discriminant_ch::be_visitor_union_discriminant_ch
-(be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_union_discriminant_ch::~be_visitor_union_discriminant_ch (void)
-{
-}
-
-int
-be_visitor_union_discriminant_ch::visit_enum (be_enum *node)
-{
- TAO_OutStream *os; // output stream
- be_union *bu =
- this->ctx_->be_node_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the enum declaration
- ctx.state (TAO_CodeGen::TAO_ENUM_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_discriminant_ch::"
- "visit_enum - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_discriminant_ch::"
- "visit_enum - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- os->indent ();
- // the set method
- *os << "void _d (" << bt->nested_type_name (bu) << ");" << be_nl;
- // the get method
- *os << bt->nested_type_name (bu) << " _d (void) const;\n\n";
- return 0;
-}
-
-int
-be_visitor_union_discriminant_ch::visit_predefined_type (be_predefined_type
- *node)
-{
- TAO_OutStream *os; // output stream
- be_union *bu =
- this->ctx_->be_node_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os = this->ctx_->stream ();
-
- os->indent ();
- // the set method
- *os << "void _d (" << bt->nested_type_name (bu) << ");" << be_nl;
- // the get method
- *os << bt->nested_type_name (bu) << " _d (void) const;\n\n";
- return 0;
-}
-
-int
-be_visitor_union_discriminant_ch::visit_typedef (be_typedef *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
- this->ctx_->alias (node); // save the typedef node for use in code generation
- // as we visit the base type
-
- // the node to be visited in the base primitve type that gets typedefed
- be_type *bt = node->primitive_base_type ();
- if (!bt || (bt->accept (this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_discriminant_ch::"
- "visit_typedef - "
- "Bad primitive type\n"
- ), -1);
- }
-
- return 0;
-}
-
-// *************************************************************************
-// be_visitor_discriminant_ci - visitor for discriminant in client inline file
-// *************************************************************************
-
-be_visitor_union_discriminant_ci::be_visitor_union_discriminant_ci
-(be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_union_discriminant_ci::~be_visitor_union_discriminant_ci (void)
-{
-}
-
-int
-be_visitor_union_discriminant_ci::visit_enum (be_enum *node)
-{
- TAO_OutStream *os; // output stream
- be_union *bu =
- this->ctx_->be_node_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os = this->ctx_->stream ();
-
- os->indent ();
- // the set method
- *os << "// accessor to set the discriminant" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::_d (" << bt->name ()
- << " discval)" << be_nl
- << "{" << be_idt_nl
- << "this->disc_ = discval;" << be_uidt_nl
- << "}" << be_nl;
-
- // the get method
- *os << "// accessor to get the discriminant" << be_nl
- << "ACE_INLINE " << bt->name () << be_nl
- << bu->name () << "::_d (void) const" << be_nl
- << "{" << be_idt_nl
- << "return this->disc_;" << be_uidt_nl
- << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_union_discriminant_ci::visit_predefined_type (be_predefined_type
- *node)
-{
- TAO_OutStream *os; // output stream
- be_union *bu =
- this->ctx_->be_node_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os = this->ctx_->stream ();
-
- os->indent ();
- // the set method
- *os << "// accessor to set the discriminant" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::_d (" << bt->name ()
- << " discval)" << be_nl
- << "{" << be_idt_nl
- << "this->disc_ = discval;" << be_uidt_nl
- << "}" << be_nl;
-
- // the get method
- *os << "// accessor to get the discriminant" << be_nl
- << "ACE_INLINE " << bt->name () << be_nl
- << bu->name () << "::_d (void) const" << be_nl
- << "{" << be_idt_nl
- << "return this->disc_;" << be_uidt_nl
- << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_union_discriminant_ci::visit_typedef (be_typedef *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
- this->ctx_->alias (node); // save the typedef node for use in code generation
- // as we visit the base type
-
- // the node to be visited in the base primitve type that gets typedefed
- be_type *bt = node->primitive_base_type ();
- if (!bt || (bt->accept (this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_discriminant_ci::"
- "visit_typedef - "
- "Bad primitive type\n"
- ), -1);
- }
-
- return 0;
-}
-
-// *************************************************************************
-// be_visitor_discriminant_cs - visitor for discriminant in client stubs
-// *************************************************************************
-
-be_visitor_union_discriminant_cs::be_visitor_union_discriminant_cs
-(be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_union_discriminant_cs::~be_visitor_union_discriminant_cs (void)
-{
-}
-
-int
-be_visitor_union_discriminant_cs::visit_enum (be_enum *node)
-{
- TAO_OutStream *os; // output stream
- be_union *bu =
- this->ctx_->be_node_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // generate the typecode for the enum
- ctx.state (TAO_CodeGen::TAO_ENUM_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_discriminant_cs::"
- "visit_enum - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_discriminant_cs::"
- "visit_enum - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch.cpp
deleted file mode 100644
index a95dd718597..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_union_branch.cpp
+++ /dev/null
@@ -1,2107 +0,0 @@
-//
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_union_branch.cpp
-//
-// = DESCRIPTION
-// Concrete visitor for the base "BE_Union_Branch" node
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_union_branch.h"
-
-// **********************************************
-// visitor for union_branch in the client header file
-// **********************************************
-
-// constructor
-be_visitor_union_branch_public_ch::be_visitor_union_branch_public_ch
-(be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-// destructor
-be_visitor_union_branch_public_ch::~be_visitor_union_branch_public_ch (void)
-{
-}
-
-// visit the union_branch node
-int
-be_visitor_union_branch_public_ch::visit_union_branch (be_union_branch *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // union_branch's type
-
- os = this->ctx_->stream ();
- // first generate the type information
- bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_union_branch - "
- "Bad union_branch type\n"
- ), -1);
- }
-
- this->ctx_->node (node); // save the node
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_union_branch - "
- "codegen for union_branch type failed\n"
- ), -1);
- }
- return 0;
-}
-
-// =visit operations on all possible data types that a union_branch can be
-
-// visit array type
-int
-be_visitor_union_branch_public_ch::visit_array (be_array *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch member
- be_decl *bu = this->ctx_->scope (); // get the enclosing union node
- be_type *bt;
-
- // check if we are visiting this via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_array - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the enum declaration
- ctx.state (TAO_CodeGen::TAO_ARRAY_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_array - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_array - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- // now use this enum as a "type" for the subsequent declarator
- os->indent (); // start from current indentation
- // the set method
- *os << "void " << ub->local_name () << " ("
- << bt->nested_type_name (bu) << ");// set"
- << be_nl;
- // the get method
- *os << bt->nested_type_name (bu, "_slice *") << " " << ub->local_name ()
- << " (void) const; // get method\n\n";
-
- return 0;
-}
-
-// visit enum type
-int
-be_visitor_union_branch_public_ch::visit_enum (be_enum *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch member
- be_decl *bu = this->ctx_->scope (); // get the enclosing union node
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_enum - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the enum declaration
- ctx.state (TAO_CodeGen::TAO_ENUM_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_enum - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_enum - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- // now use this enum as a "type" for the subsequent declarator
- os->indent (); // start from current indentation
- // the set method
- *os << "void " << ub->local_name () << " ("
- << bt->nested_type_name (bu) << ");// set"
- << be_nl;
- // the get method
- *os << bt->nested_type_name (bu) << " " << ub->local_name ()
- << " (void) const; // get method\n\n";
-
- return 0;
-}
-
-// visit interface type
-int
-be_visitor_union_branch_public_ch::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_interface - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent (); // start from current indentation
- // set method
- *os << "void " << ub->local_name () << " ("
- << bt->nested_type_name (bu, "_ptr")
- << ");// set" << be_nl;
- // get method
- *os << bt->nested_type_name (bu, "_ptr") << " " << ub->local_name ()
- << " (void) const; // get method\n\n";
- return 0;
-}
-
-// visit interface forward type
-int
-be_visitor_union_branch_public_ch::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_interface_fwd - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent (); // start from current indentation
- // set method
- *os << "void " << ub->local_name () << " ("
- << bt->nested_type_name (bu, "_ptr")
- << ");// set" << be_nl;
- // get method
- *os << bt->nested_type_name (bu, "_ptr") << " " << ub->local_name ()
- << " (void) const; // get method\n\n";
- return 0;
-}
-
-// visit predefined type
-int
-be_visitor_union_branch_public_ch::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_predefined_type - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent (); // start from current indentation
- if (node->pt () == AST_PredefinedType::PT_pseudo)
- {
- // set method
- *os << "void " << ub->local_name () << " ("
- << bt->nested_type_name (bu, "_ptr") << ");// set" << be_nl;
- // get method
- *os << bt->nested_type_name (bu, "_ptr") << " " << ub->local_name ()
- << " (void) const; // get method\n\n";
- }
- else
- {
- // set method
- *os << "void " << ub->local_name () << " ("
- << bt->nested_type_name (bu) << ");// set" << be_nl;
- // get method
- *os << bt->nested_type_name (bu) << " " << ub->local_name ()
- << " (void) const; // get method\n\n";
- }
- return 0;
-}
-
-// visit sequence type
-int
-be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_sequence - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the sequence declaration
- ctx.state (TAO_CodeGen::TAO_SEQUENCE_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_sequence - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_sequence - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- os->indent ();
- // set method
- *os << "void " << ub->local_name () << " (const "
- << bt->nested_type_name (bu) << " &);// set" << be_nl;
- // read-only
- *os << "const " << bt->nested_type_name (bu) << " &"
- << ub->local_name () << " (void) const; // get method (read only)"
- << be_nl;
- // read/write
- *os << bt->nested_type_name (bu) << " &" << ub->local_name ()
- << " (void); // get method (read/write only)\n\n";
-
- return 0;
-}
-
-// visit string type
-int
-be_visitor_union_branch_public_ch::visit_string (be_string *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_string - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent ();
- // three methods to set the string value
- *os << "void " << ub->local_name () << " (char *); // set" << be_nl;
- *os << "void " << ub->local_name () << " (const char *); // set"
- << be_nl;
- *os << "void " << ub->local_name () << " (const CORBA::String_var&); // set"
- << be_nl;
- //get method
- *os << "const char *" << ub->local_name ()
- << " (void) const; // get method\n\n";
- return 0;
-}
-
-// visit structure type
-int
-be_visitor_union_branch_public_ch::visit_structure (be_structure *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_structure - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the sequence declaration
- ctx.state (TAO_CodeGen::TAO_STRUCT_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_structure - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_structure - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- os->indent ();
- // set method
- *os << "void " << ub->local_name () << " (const "
- << bt->nested_type_name (bu) << " &);// set" << be_nl
- // read-only
- << "const " << bt->nested_type_name (bu) << " &"
- << ub->local_name () << " (void) const; // get method (read only)"
- << be_nl
- // read/write
- << bt->nested_type_name (bu) << " &" << ub->local_name ()
- << " (void); // get method (read/write only)\n\n";
-
- return 0;
-}
-
-// visit typedefed type
-int
-be_visitor_union_branch_public_ch::visit_typedef (be_typedef *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
- os->indent (); // start from current indentation level
- this->ctx_->alias (node); // save the node for use in code generation and
- // indicate that the union_branch of the union_branch node
- // is a typedefed quantity
-
- // make a decision based on the primitive base type
- be_type *bt = node->primitive_base_type ();
- if (!bt || (bt->accept (this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_spec_ch::"
- "visit_typedef - "
- "Bad primitive type\n"
- ), -1);
- }
- return 0;
-}
-
-// visit union type
-int
-be_visitor_union_branch_public_ch::visit_union (be_union *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_union - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the sequence declaration
- ctx.state (TAO_CodeGen::TAO_STRUCT_CH);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_union - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ch::"
- "visit_union - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
- os->indent ();
- // set method
- *os << "void " << ub->local_name () << " (const "
- << bt->nested_type_name (bu) << " &);// set" << be_nl
- // read-only
- << "const " << bt->nested_type_name (bu) << " &"
- << ub->local_name () << " (void) const; // get method (read only)"
- << be_nl
- // read/write
- << bt->nested_type_name (bu) << " &" << ub->local_name ()
- << " (void); // get method (read/write only)\n\n";
-
- return 0;
-}
-
-// **********************************************
-// visitor for union_branch in the client header generating the private information
-// **********************************************
-
-// constructor
-be_visitor_union_branch_private_ch::be_visitor_union_branch_private_ch (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-// destructor
-be_visitor_union_branch_private_ch::~be_visitor_union_branch_private_ch (void)
-{
-}
-
-// visit the union_branch node
-int
-be_visitor_union_branch_private_ch::visit_union_branch (be_union_branch *node)
-{
- TAO_OutStream *os;
- be_type *bt; // union_branch's type
-
- os = this->ctx_->stream ();
- // first generate the type information
- bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_cs::"
- "visit_union_branch - "
- "Bad union_branch type\n"
- ), -1);
- }
-
- this->ctx_->node (node); // save the node
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_cs::"
- "visit_union_branch - "
- "codegen for union_branch type failed\n"
- ), -1);
- }
- return 0;
-}
-
-// =visit operations on all possible data types that a union_branch can be
-
-int
-be_visitor_union_branch_private_ch::visit_array (be_array *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_array - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent ();
- *os << bt->nested_type_name (bu, "_slice") << " *" << ub->local_name ()
- << "_;\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_private_ch::visit_enum (be_enum *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_enum - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bu) << " " << ub->local_name () << "_;\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_private_ch::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_interface - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent (); // start from current indentation
- // C++ does not allow an object declaration inside a union. Hence we
- // must have a pointer. This changes some of the methods
- *os << bt->nested_type_name (bu, "_var") << " *" << ub->local_name () <<
- "_;\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_private_ch::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_interface_fwd - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent (); // start from current indentation
- // C++ does not allow an object declaration inside a union. Hence we
- // must have a pointer. This changes some of the methods
- *os << bt->nested_type_name (bu, "_var") << " *" << ub->local_name () <<
- "_;\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_private_ch::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_predefined_type - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- if (node->pt () == AST_PredefinedType::PT_pseudo)
- {
- // Cannot have an object inside of a union
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bu, "_var") << " *" << ub->local_name () <<
- "_;\n";
- }
- else
- {
- os->indent (); // start from current indentation
- *os << bt->nested_type_name (bu) << " " << ub->local_name () <<
- "_;\n";
- }
- return 0;
-}
-
-int
-be_visitor_union_branch_private_ch::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_sequence - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent ();
- // C++ doesn't allow object instances inside unions, so we need a
- // pointer
- *os << bt->nested_type_name (bu) << " *" << ub->local_name () << "_;\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_private_ch::visit_string (be_string *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_string - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- *os << "CORBA::String_var *" << ub->local_name () << "_;\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_private_ch::visit_structure (be_structure *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_structure - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent ();
- *os << bt->nested_type_name (bu) << " " << ub->local_name () << "_;\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_private_ch::visit_typedef (be_typedef *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
- this->ctx_->alias (node); // save the typedef node for use in code generation
- // as we visit the base type
-
- // the node to be visited in the base primitve type that gets typedefed
- be_type *bt = node->primitive_base_type ();
- if (!bt || (bt->accept (this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_typedef - "
- "Bad primitive type\n"
- ), -1);
- }
-
- return 0;
-}
-
-int
-be_visitor_union_branch_private_ch::visit_union (be_union *node)
-{
- TAO_OutStream *os; // output stream
- be_decl *ub = this->ctx_->node (); // get union branch
- be_decl *bu = this->ctx_->scope (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_private_ch::"
- "visit_union - "
- "bad context information\n"
- ), -1);
- }
-
- os = this->ctx_->stream ();
-
- os->indent ();
- // C++ doesn't allow object instances inside unions, so we need a
- // pointer
- *os << bt->nested_type_name (bu) << " *" << ub->local_name () << "_;\n";
- return 0;
-}
-
-// *****************************************************
-// visitor for union_branch in the client inline file
-// *****************************************************
-
-// constructor
-be_visitor_union_branch_public_ci::be_visitor_union_branch_public_ci (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-// destructor
-be_visitor_union_branch_public_ci::~be_visitor_union_branch_public_ci (void)
-{
-}
-
-// visit the union_branch node
-int
-be_visitor_union_branch_public_ci::visit_union_branch (be_union_branch *node)
-{
- TAO_OutStream *os;
- be_type *bt; // union_branch's type
-
- os = this->ctx_->stream ();
- // first generate the type information
- bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_cs::"
- "visit_union_branch - "
- "Bad union_branch type\n"
- ), -1);
- }
-
- this->ctx_->node (node); // save the node
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_cs::"
- "visit_union_branch - "
- "codegen for union_branch type failed\n"
- ), -1);
- }
- return 0;
-}
-
-// =visit operations on all possible data types that a union_branch can be
-
-int
-be_visitor_union_branch_public_ci::visit_array (be_array *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_enum - "
- "bad context information\n"
- ), -1);
- }
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the enum declaration
- ctx.state (TAO_CodeGen::TAO_ARRAY_CI);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_array - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_array - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- // set method
- os->indent (); // start from current indentation
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name () << " (" << bt->name ()
- << " val)// set" << be_nl
- << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- be_nl;
- }
- *os << "// set the value" << be_nl
- << "this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << be_nl;
-
- // get method
- *os << "// retrieve the member" << be_nl
- << "ACE_INLINE " << bt->name () << "_slice *" << be_nl
- << bu->name () << "::" << ub->local_name () << " (void) const" << be_nl
- << "{\n";
- os->incr_indent ();
- *os << "return this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_public_ci::visit_enum (be_enum *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_enum - "
- "bad context information\n"
- ), -1);
- }
- os = this->ctx_->stream ();
-
- // set method
- os->indent (); // start from current indentation
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name () << " (" << bt->name ()
- << " val)// set" << be_nl
- << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- be_nl;
- }
- *os << "// set the value" << be_nl
- << "this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << be_nl;
-
- // get method
- *os << "// retrieve the member" << be_nl
- << "ACE_INLINE " << bt->name () << be_nl
- << bu->name () << "::" << ub->local_name () << " (void) const" << be_nl
- << "{\n";
- os->incr_indent ();
- *os << "return this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_public_ci::visit_interface (be_interface *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_interface - "
- "bad context information\n"
- ), -1);
- }
- os = this->ctx_->stream ();
-
- // set method
- os->indent (); // start from current indentation
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name () << " (" << bt->name ()
- << "_ptr val)// set" << be_nl
- << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- be_nl;
- }
- *os << "// set the value" << be_nl
- << "this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << be_nl;
-
- // get method
- *os << "// retrieve the member" << be_nl
- << "ACE_INLINE " << bt->name () << "_ptr " << be_nl
- << bu->name () << "::" << ub->local_name () << " (void) const" << be_nl
- << "{\n";
- os->incr_indent ();
- *os << "return this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_public_ci::visit_interface_fwd (be_interface_fwd *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_interface_fwd - "
- "bad context information\n"
- ), -1);
- }
- os = this->ctx_->stream ();
-
- // set method
- os->indent (); // start from current indentation
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name () << " (" << bt->name ()
- << "_ptr val)// set" << be_nl
- << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- be_nl;
- }
- *os << "// set the value" << be_nl
- << "this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << be_nl;
-
- // get method
- *os << "// retrieve the member" << be_nl
- << "ACE_INLINE " << bt->name () << "_ptr " << be_nl
- << bu->name () << "::" << ub->local_name () << " (void) const" << be_nl
- << "{\n";
- os->incr_indent ();
- *os << "return this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_public_ci::visit_predefined_type (be_predefined_type *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_interface - "
- "bad context information\n"
- ), -1);
- }
- os = this->ctx_->stream ();
-
- // set method
- os->indent (); // start from current indentation
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name () << " (" << bt->name ();
- if (node->pt () == AST_PredefinedType::PT_pseudo)
- *os << "_ptr";
- *os << " val)// set" << be_nl
- << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- be_nl;
- }
- *os << "// set the value" << be_nl
- << "this->" << ub->local_name () << "_ = val;\n";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- os->decr_indent ();
- *os << "}" << be_nl;
-
- // get method
- *os << "// retrieve the member" << be_nl
- << "ACE_INLINE " << bt->name ();
- if (node->pt () == AST_PredefinedType::PT_pseudo)
- *os << "_ptr";
- *os << be_nl;
- *os << bu->name () << "::" << ub->local_name () << " (void) const" << be_nl
- << "{\n";
- os->incr_indent ();
- *os << "return this->" << ub->local_name () << "_;\n";
- os->decr_indent ();
- *os << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_public_ci::visit_sequence (be_sequence *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_sequence - "
- "bad context information\n"
- ), -1);
- }
- os = this->ctx_->stream ();
-
- // (1) set from a const
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name ()
- << " (const " << bt->name () << " &val)" << be_nl
- << "{" << be_idt_nl;
-
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";"
- << be_nl;
- }
- *os << "// set the value" << be_nl
- << "*this->" << ub->local_name () << "_ = val;" << be_uidt_nl;
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- *os << "}" << be_nl;
-
- // readonly get method
- *os << "// readonly get method " << be_nl
- << "ACE_INLINE const " << bt->name () << " &" << be_nl
- << bu->name () << "::" << ub->local_name () << " (void) const" << be_nl
- << "{" << be_idt_nl
- << "return *this->" << ub->local_name () << "_;" << be_uidt_nl
- << "}" << be_nl;
-
- // read/write get method
- *os << "// read/write get method " << be_nl
- << "ACE_INLINE " << bt->name () << " &" << be_nl
- << bu->name () << "::" << ub->local_name () << " (void)" << be_nl
- << "{" << be_idt_nl
- << "return *this->" << ub->local_name () << "_;" << be_uidt_nl
- << "}\n\n";
-
- return 0;
-}
-
-int
-be_visitor_union_branch_public_ci::visit_string (be_string *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_string - "
- "bad context information\n"
- ), -1);
- }
- os = this->ctx_->stream ();
-
- // three methods to set the string value
-
- // (1) set method from char*
- os->indent (); // start from current indentation
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name () << " (char *val)"
- << be_nl
- << "{" << be_idt_nl;
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- be_nl;
- }
- *os << "// set the value" << be_nl
- << "if (!this->" << ub->local_name () << "_) // does not exist"
- << be_nl
- << " this->" << ub->local_name ()
- << "_ = new CORBA::String_var (val);" << be_nl
- << "else" << be_nl
- << " *this->" << ub->local_name () << "_ = val;";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- *os << be_uidt_nl << "}" << be_nl;
-
- // (2) set method from const char *
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name ()
- << " (const char *val)" << be_nl
- << "{\n";
- os->incr_indent ();
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- be_nl;
- }
- *os << "// set the value" << be_nl
- << "if (!this->" << ub->local_name () << "_) // does not exist"
- << be_nl
- << " this->" << ub->local_name ()
- << "_ = new CORBA::String_var (val);" << be_nl
- << "else" << be_nl
- << " *this->" << ub->local_name () << "_ = val;" << be_uidt_nl;
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
-
- *os << "}" << be_nl;
-
- // (3) set from const String_var&
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name ()
- << " (const CORBA::String_var &val)" << be_nl
- << "{" << be_idt_nl;
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- be_nl;
- }
- *os << "// set the value" << be_nl
- << "if (!this->" << ub->local_name () << "_) // does not exist"
- << be_nl
- << " this->" << ub->local_name ()
- << "_ = new CORBA::String_var (val);" << be_nl
- << "else" << be_nl
- << " *this->" << ub->local_name () << "_ = val;";
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- *os << be_uidt_nl << "}" << be_nl;
-
- // get method
- *os << "ACE_INLINE const char *" << be_nl
- << bu->name () << "::" << ub->local_name ()
- << " (void) const // get method" << be_nl
- << "{" << be_idt_nl
- << "return *this->" << ub->local_name () << "_;" << be_uidt_nl
- << "}\n\n";
- return 0;
-}
-
-int
-be_visitor_union_branch_public_ci::visit_structure (be_structure *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_structure - "
- "bad context information\n"
- ), -1);
- }
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the enum declaration
- ctx.state (TAO_CodeGen::TAO_STRUCT_CI);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_structure - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_structure - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- // (1) set from a const
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name ()
- << " (const " << bt->name () << " &val)" << be_nl
- << "{" << be_idt_nl;
-
- // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";"
- << be_nl;
- }
- *os << "// set the value" << be_nl
- << "this->" << ub->local_name () << "_ = val;" << be_uidt_nl;
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- *os << "}" << be_nl;
-
- // readonly get method
- *os << "// readonly get method " << be_nl
- << "ACE_INLINE const " << bt->name () << " &" << be_nl
- << bu->name () << "::" << ub->local_name () << " (void) const" << be_nl
- << "{" << be_idt_nl
- << "return this->" << ub->local_name () << "_;" << be_uidt_nl
- << "}" << be_nl;
-
- // read/write get method
- *os << "// read/write get method " << be_nl
- << "ACE_INLINE " << bt->name () << " &" << be_nl
- << bu->name () << "::" << ub->local_name () << " (void)" << be_nl
- << "{" << be_idt_nl
- << "return this->" << ub->local_name () << "_;" << be_uidt_nl
- << "}\n\n";
-
- return 0;
-}
-
-int
-be_visitor_union_branch_public_ci::visit_typedef (be_typedef *node)
-{
- TAO_OutStream *os; // output stream
-
- os = this->ctx_->stream ();
- this->ctx_->alias (node); // save the typedef node for use in code generation
- // as we visit the base type
-
- // the node to be visited in the base primitve type that gets typedefed
- be_type *bt = node->primitive_base_type ();
- if (!bt || (bt->accept (this) == -1))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_typedef - "
- "Bad primitive type\n"
- ), -1);
- }
-
- return 0;
-}
-
-int
-be_visitor_union_branch_public_ci::visit_union (be_union *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
- be_type *bt;
-
- // check if we are visiting this node via a visit to a typedef node
- if (this->ctx_->alias ())
- bt = this->ctx_->alias ();
- else
- bt = node;
-
- if (!ub || !bu)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_union - "
- "bad context information\n"
- ), -1);
- }
- os = this->ctx_->stream ();
-
- if (bt->node_type () != AST_Decl::NT_typedef // not a typedef
- && bt->is_child (bu)) // bt is defined inside the union
- {
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope
- // is still the same
-
- // first generate the enum declaration
- ctx.state (TAO_CodeGen::TAO_UNION_CI);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_union - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_ci::"
- "visit_union - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- }
-
- // (1) set from a const
- *os << "// accessor to set the member" << be_nl
- << "ACE_INLINE void" << be_nl
- << bu->name () << "::" << ub->local_name ()
- << " (const " << bt->name () << " &val)" << be_nl
- << "{" << be_idt_nl;
- os->incr_indent (); // set the discriminant to the appropriate label
- if (ub->label ()->label_kind () == AST_UnionLabel::UL_label)
- {
- // valid label
- *os << "// set the discriminant val" << be_nl;
- // check if the case label is a symbol or a literal
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "this->disc_ = " << ub->label ()->label_val ()->n ()
- << ";" << be_nl;
- }
- else
- {
- *os << "this->disc_ = " << ub->label ()->label_val () << ";" <<
- be_nl;
- }
- *os << "// set the value" << be_nl
- << "*this->" << ub->local_name () << "_ = val;" << be_uidt_nl;
- }
- else
- {
- // default label
- // XXXASG - TODO
- }
- *os << "}" << be_nl;
-
- // readonly get method
- *os << "// readonly get method " << be_nl
- << "ACE_INLINE const " << bt->name () << " &" << be_nl
- << bu->name () << "::" << ub->local_name () << " (void) const" << be_nl
- << "{" << be_idt_nl
- << "return *this->" << ub->local_name () << "_;" << be_uidt_nl
- << "}" << be_nl;
-
- // read/write get method
- *os << "// read/write get method " << be_nl
- << "ACE_INLINE " << bt->name () << " &" << be_nl
- << bu->name () << "::" << ub->local_name () << " (void)" << be_nl
- << "{" << be_idt_nl
- << "return *this->" << ub->local_name () << "_;" << be_uidt_nl
- << "}\n\n";
-
- return 0;
-}
-
-// **********************************************
-// visitor for union_branch in the client stubs file
-// **********************************************
-
-// constructor
-be_visitor_union_branch_public_cs::be_visitor_union_branch_public_cs (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-// destructor
-be_visitor_union_branch_public_cs::~be_visitor_union_branch_public_cs (void)
-{
-}
-
-// visit the union_branch node
-int
-be_visitor_union_branch_public_cs::visit_union_branch (be_union_branch *node)
-{
- TAO_OutStream *os; // output stream
-
- be_type *bt; // union_branch's type
-
- os = this->ctx_->stream ();
- // first generate the type information
- bt = be_type::narrow_from_decl (node->field_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_cs::"
- "visit_union_branch - "
- "Bad union_branch type\n"
- ), -1);
- }
-
- this->ctx_->node (node); // save the node
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_cs::"
- "visit_union_branch - "
- "codegen for union_branch type failed\n"
- ), -1);
- }
- return 0;
-}
-
-// visit array type
-int
-be_visitor_union_branch_public_cs::visit_array (be_array *node)
-{
- return 0;
-}
-
-// visit enum type
-int
-be_visitor_union_branch_public_cs::visit_enum (be_enum *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // generate the typcode for enums
- ctx.state (TAO_CodeGen::TAO_ENUM_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_cs::"
- "visit_enum - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_cs::"
- "visit_enum - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit sequence type
-int
-be_visitor_union_branch_public_cs::visit_sequence (be_sequence *node)
-{
- return 0;
-}
-
-// visit string type
-int
-be_visitor_union_branch_public_cs::visit_string (be_string *node)
-{
- return 0;
-}
-
-// visit structure type
-int
-be_visitor_union_branch_public_cs::visit_structure (be_structure *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // generate the inline code for structs
- ctx.state (TAO_CodeGen::TAO_STRUCT_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_cs::"
- "visit_struct - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_cs::"
- "visit_struct - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-// visit union type
-int
-be_visitor_union_branch_public_cs::visit_union (be_union *node)
-{
- // instantiate a visitor context with a copy of our context. This info
- // will be modified based on what type of node we are visiting
- be_visitor_context ctx (*this->ctx_);
- ctx.node (node); // set the node to be the node being visited. The scope is
- // still the same
-
- // generate the inline code for union
- ctx.state (TAO_CodeGen::TAO_UNION_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_cs::"
- "visit_union - "
- "Bad visitor\n"
- ), -1);
- }
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_branch_public_cs::"
- "visit_union - "
- "codegen failed\n"
- ), -1);
- }
- delete visitor;
- return 0;
-}
-
-
-// **********************************************
-// visitor for union_branch in the client stubs file generating the code for
-// the copy ctor and assignment operator
-// **********************************************
-
-// constructor
-be_visitor_union_branch_public_assign_cs::be_visitor_union_branch_public_assign_cs
-(be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-// destructor
-be_visitor_union_branch_public_assign_cs::~be_visitor_union_branch_public_assign_cs
-(void)
-{
-}
-
-// visit the union_branch node
-int
-be_visitor_union_branch_public_assign_cs::visit_union_branch (be_union_branch *node)
-{
- TAO_OutStream *os; // output stream
- be_union_branch *ub =
- this->ctx_->be_node_as_union_branch (); // get union branch
- be_union *bu =
- this->ctx_->be_scope_as_union (); // get the enclosing union backend
-
- os = this->ctx_->stream ();
-
- // This visitor is used when we are generating the copy ctor and
- // assignment operator for the union.
- // Individual assignment of the members takes place inside a case
- // statement because the type of member assigned is based on the value
- // of the discriminant
- os->indent ();
- if (ub->label ()->label_val ()->ec () == AST_Expression::EC_symbol)
- {
- *os << "case " << ub->label ()->label_val ()->n () << ":" << be_idt_nl;
- }
- else
- {
- *os << "case " << ub->label ()->label_val () << ":" << be_idt_nl;
- }
-
- *os << "this->" << ub->local_name () << "_ = u." << ub->local_name ()
- << "_;" << be_nl
- << "break;\n";
- os->decr_indent (0);
-
- return 0;
-}