summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_module
diff options
context:
space:
mode:
authormk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-29 09:09:45 +0000
committermk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-29 09:09:45 +0000
commitf10f27ecd438d60ce441cae4ffd2053d43080090 (patch)
treea52d75525aa46b30f06a844102f57cd6685641e1 /TAO/TAO_IDL/be/be_visitor_module
parentc88e5cdb0b561d06edc4f3ad783cf82c6dd05fe0 (diff)
downloadATCD-f10f27ecd438d60ce441cae4ffd2053d43080090.tar.gz
ChangeLogTag: Wed Sep 29 04:01:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_module')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_module/module.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_module/module.cpp b/TAO/TAO_IDL/be/be_visitor_module/module.cpp
index 95414c29cb3..d09d4eeaeaf 100644
--- a/TAO/TAO_IDL/be/be_visitor_module/module.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_module/module.cpp
@@ -486,6 +486,9 @@ be_visitor_module::visit_valuetype (be_valuetype *node)
}
}
+ // Change the state depending on the kind of node strategy
+ ctx.state (node->next_state (ctx.state ()));
+
be_visitor *visitor = tao_cg->make_visitor (&ctx);
if (!visitor)
{
@@ -506,6 +509,37 @@ be_visitor_module::visit_valuetype (be_valuetype *node)
), -1);
}
delete visitor;
+ visitor = 0;
+
+ // Do addtional "extra" code generation if necessary
+ if (node->has_extra_code_generation (ctx.state ()))
+ {
+ // Change the state depending on the kind of node strategy
+ ctx.state (node->next_state (ctx.state (), 1));
+
+ visitor = tao_cg->make_visitor (&ctx);
+ if (!visitor)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_module::"
+ "visit_valuetype - "
+ "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_valuetype - "
+ "failed to accept visitor\n"
+ ), -1);
+ }
+ delete visitor;
+ visitor = 0;
+ }
+
return 0;
}