diff options
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_root/root.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
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; +} |