diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-10 00:23:31 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-10 00:23:31 +0000 |
commit | 0211060918c7af912ff17b9f25d94952970218c3 (patch) | |
tree | aa4836fd8a585cd26c6f243aceabf931290a23aa | |
parent | b538f6356dda9df81fd775b37b7022fa59026767 (diff) | |
download | ATCD-0211060918c7af912ff17b9f25d94952970218c3.tar.gz |
Wed Jun 9 19:19:43 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
-rw-r--r-- | TAO/TAO_IDL/be/Makefile.am | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_argument.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_factory.cpp | 22 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface.cpp | 32 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation.cpp | 5 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/argument.cpp | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_codegen.h | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_visitor_argument.h | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_visitor_operation.h | 6 |
9 files changed, 88 insertions, 3 deletions
diff --git a/TAO/TAO_IDL/be/Makefile.am b/TAO/TAO_IDL/be/Makefile.am index 67b85a70c01..0ef64553405 100644 --- a/TAO/TAO_IDL/be/Makefile.am +++ b/TAO/TAO_IDL/be/Makefile.am @@ -39,6 +39,7 @@ libbe_a_SOURCES = \ be_module.cpp \ be_native.cpp \ be_operation.cpp \ + be_operation_ami.cpp \ be_predefined_type.cpp \ be_produce.cpp \ be_root.cpp \ @@ -68,6 +69,7 @@ libbe_a_SOURCES = \ be_visitor_interface_fwd.cpp \ be_visitor_module.cpp \ be_visitor_operation.cpp \ + be_visitor_operation_ami.cpp \ be_visitor_root.cpp \ be_visitor_scope.cpp \ be_visitor_sequence.cpp \ diff --git a/TAO/TAO_IDL/be/be_visitor_argument.cpp b/TAO/TAO_IDL/be/be_visitor_argument.cpp index 82984108372..45b12712dc7 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument.cpp @@ -39,5 +39,9 @@ #include "be_visitor_argument/compiled_marshal_ss.cpp" #include "be_visitor_argument/pre_invoke_cs.cpp" +// #if defined (TAO_IDL_HAS_AMI) +#include "be_visitor_argument/arglist_ami.cpp" +// #endif /* TAO_IDL_HAS_AMI */ + ACE_RCSID(be, be_visitor_argument, "$Id$") diff --git a/TAO/TAO_IDL/be/be_visitor_factory.cpp b/TAO/TAO_IDL/be/be_visitor_factory.cpp index 8a43593f058..8540bed1c97 100644 --- a/TAO/TAO_IDL/be/be_visitor_factory.cpp +++ b/TAO/TAO_IDL/be/be_visitor_factory.cpp @@ -232,6 +232,24 @@ TAO_Common_Visitor_Factory::make_visitor (be_visitor_context *ctx) # endif /* IDL_HAS_VALUETYPE */ +// #if defined TAO_IDL_HAS_AMI + case TAO_CodeGen::TAO_OPERATION_AMI: + return new be_visitor_operation_ami (new_ctx); + + case TAO_CodeGen::TAO_OPERATION_ARGLIST_AMI: + return new be_visitor_operation_arglist_ami (new_ctx); + + case TAO_CodeGen::TAO_OPERATION_ARG_AMI: + return new be_visitor_operation_argument (new_ctx); + + case TAO_CodeGen::TAO_ARGUMENT_AMI: + // @@ I am not sure about this case, yet (Alex). + return new be_visitor_decl (new_ctx); // noop + + case TAO_CodeGen::TAO_ARGUMENT_ARGLIST_AMI: + return new be_visitor_args_arglist_ami (new_ctx); +// #endif /* TAO_IDL_HAS_AMI */ + case TAO_CodeGen::TAO_STRUCT_CH: return new be_visitor_structure_ch (new_ctx); case TAO_CodeGen::TAO_STRUCT_CS: @@ -639,8 +657,8 @@ TAO_Compiled_Visitor_Factory::make_visitor (be_visitor_context *ctx) return new be_visitor_decl (new_ctx); case TAO_CodeGen::TAO_OPERATION_ARGLIST_CH: case TAO_CodeGen::TAO_OPERATION_ARGLIST_SH: - case TAO_CodeGen::TAO_OPERATION_ARGLIST_IH: - case TAO_CodeGen::TAO_OPERATION_ARGLIST_IS: + case TAO_CodeGen::TAO_OPERATION_ARGLIST_IH: + case TAO_CodeGen::TAO_OPERATION_ARGLIST_IS: case TAO_CodeGen::TAO_OPERATION_ARGLIST_COLLOCATED_SH: case TAO_CodeGen::TAO_OPERATION_ARGLIST_OTHERS: return new be_visitor_operation_arglist (new_ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp index e56524b2b25..879dbc67a6b 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp @@ -451,6 +451,38 @@ be_visitor_interface::visit_operation (be_operation *node) ), -1); } delete visitor; + + // #if defined (TAO_IDL_HAS_AMI) + // Generate AMI stub for this operation, if you are doing client + // side header. + if (this->ctx_->state () == TAO_CodeGen::TAO_INTERFACE_CH) + { + // AMI. + ctx.state (TAO_CodeGen::TAO_OPERATION_AMI); + + // grab the appropriate 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; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation.cpp index 6e15900c125..3666b954bcc 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation.cpp @@ -55,5 +55,10 @@ #include "be_visitor_operation/compiled_marshal.cpp" #include "be_visitor_operation/rettype_pre_invoke_cs.cpp" +// #if defined (TAO_IDL_HAS_AMI) +#include "be_visitor_operation/operation_ami.cpp" +#include "be_visitor_operation/arglist_ami.cpp" +// #endif /* TAO_IDL_HAS_AMI */ + ACE_RCSID(be, be_visitor_operation, "$Id$") diff --git a/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp b/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp index 284c7d11c25..4a009c456af 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp @@ -154,6 +154,12 @@ be_visitor_operation_argument::visit_argument (be_argument *node) case TAO_CodeGen::TAO_OPERATION_ARG_POST_MARSHAL_SS: ctx.state (TAO_CodeGen::TAO_ARGUMENT_POST_MARSHAL_SS); break; + // #if defined (TAO_IDL_HAS_AMI) + case TAO_CodeGen::TAO_OPERATION_ARG_AMI: + // @@ I am not sure about this case. (Alex). + ctx.state (TAO_CodeGen::TAO_ARGUMENT_AMI); + break; + // #endif /* TAO_IDL_HAS_AMI */ default: { ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/TAO_IDL/be_include/be_codegen.h b/TAO/TAO_IDL/be_include/be_codegen.h index 1c26fd0b14a..f0b316b7bee 100644 --- a/TAO/TAO_IDL/be_include/be_codegen.h +++ b/TAO/TAO_IDL/be_include/be_codegen.h @@ -263,7 +263,7 @@ public: TAO_OPERATION_TIE_SH, TAO_OPERATION_TIE_SI, - TAO_OBV_OPERATION_ARGLIST_CH, // parameter list in obv op signature + TAO_OBV_OPERATION_ARGLIST_CH, // parameter list in obv op signature // ... for client header TAO_OBV_OPERATION_ARGLIST_OBV_CH, // ... for OBV_ class TAO_OBV_OPERATION_ARGLIST_SH, // ... for server header @@ -272,6 +272,14 @@ public: TAO_OBV_OPERATION_ARGLIST_COLLOCATED_SH, // ... for collocated server TAO_OBV_OPERATION_ARGLIST_OTHERS, // ... for all other cases + TAO_OPERATION_AMI, // Visit the operation for + // AMI generation. + TAO_OPERATION_ARGLIST_AMI, // AMI stubs in client header + TAO_OPERATION_ARG_AMI, // AMI stub. + TAO_ARGUMENT_AMI, // Argument in AMI stub. + TAO_ARGUMENT_ARGLIST_AMI, // Arg list in AMI stub. + + // emitting code for root TAO_ROOT_CH, TAO_ROOT_CI, diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument.h b/TAO/TAO_IDL/be_include/be_visitor_argument.h index 560d37f2859..336c390f562 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_argument.h +++ b/TAO/TAO_IDL/be_include/be_visitor_argument.h @@ -40,4 +40,8 @@ #include "be_visitor_argument/compiled_marshal_ss.h" #include "be_visitor_argument/pre_invoke_cs.h" +// #if defined (TAO_IDL_HAS_AMI) +#include "be_visitor_argument/arglist_ami.h" +// #endif /* TAO_IDL_HAS_AMI */ + #endif /* _BE_VISITOR_ARGUMENT_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation.h b/TAO/TAO_IDL/be_include/be_visitor_operation.h index b74e135e9e4..0265de0167c 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation.h @@ -54,4 +54,10 @@ #include "be_visitor_operation/compiled_marshal.h" #include "be_visitor_operation/rettype_pre_invoke_cs.h" +// #if defined TAO_IDL_HAS_AMI +#include "be_visitor_operation/operation_ami.h" +#include "be_visitor_operation/arglist_ami.h" +// #endif /* TAO_IDL_HAS_AMI */ + + #endif // TAO_BE_VISITOR_OPERATION_H |