diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-28 10:39:32 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-28 10:39:32 +0000 |
commit | 2af278df0048347e4aa33f6697b7e64d28fec28a (patch) | |
tree | 6f46154e3a224f67a1edde17d355c3ece61bc882 /TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp | |
parent | 4a9f8dcddb002c378341723fed23f9b465c18ad0 (diff) | |
download | ATCD-2af278df0048347e4aa33f6697b7e64d28fec28a.tar.gz |
Changed to use different visitors for thru_poa and direct collocated stubs generation.
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp index c6e2dcdd647..a579be1839e 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp @@ -188,18 +188,39 @@ be_visitor_interface_sh::visit_interface (be_interface *node) *os << be_uidt_nl << "};\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)) + be_visitor *visitor = 0; + + // generate the collocated class + if (idl_global->gen_thru_poa_collocation ()) { - delete visitor; - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_interface_sh::" - "visit_interface - " - "codegen for collocated class failed\n"), - -1); + ctx.state (TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH); + 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 thru_poa_collocated class failed\n"), + -1); + } + } + + if (idl_global->gen_direct_collocation ()) + { + ctx = *this->ctx_; + ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH); + 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 direct_collocated class failed\n"), + -1); + } } // generate the TIE class. |