From 6d7640a8c34aa2be46881ee30b032d4fec512229 Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Wed, 30 May 2007 20:10:04 +0000 Subject: ChangeLogTag: Wed May 30 20:06:04 UTC 2007 Adam Mitz --- TAO/TAO_IDL/be/be_visitor_root/root.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/TAO/TAO_IDL/be/be_visitor_root/root.cpp b/TAO/TAO_IDL/be/be_visitor_root/root.cpp index 74b1174c595..140ef6a4a93 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root.cpp @@ -1746,3 +1746,35 @@ be_visitor_root::visit_typedef (be_typedef *node) return 0; } +int +be_visitor_root::visit_native (be_native *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); + int status = 0; + + switch (this->ctx_->state ()) + { + case TAO_CodeGen::TAO_ROOT_CH: + { + be_visitor_native_ch visitor (&ctx); + status = node->accept (&visitor); + break; + } + default: + return 0; // nothing to be done + } + + if (status == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_root::" + "visit_native - " + "failed to accept visitor\n"), + -1); + } + + return 0; +} -- cgit v1.2.1