summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp62
1 files changed, 4 insertions, 58 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp
index 43506413a5d..00e54c68f37 100644
--- a/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp
@@ -43,67 +43,13 @@ be_visitor_component_ch::visit_component (be_component *node)
return 0;
}
- TAO_OutStream *os = this->ctx_->stream ();
-
- // == STEP 1: generate the class name and class names we inherit ==
-
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__;
-
- // Generate the ifdefined macro for the _ptr type.
- os->gen_ifdef_macro (node->flat_name (),
- "_ptr");
-
- // The following two are required to be under the ifdef macro to avoid
- // multiple declarations.
-
- // Forward declaration.
- *os << be_nl << be_nl << "class " << node->local_name () << ";";
- // Generate the _ptr declaration.
- *os << be_nl << "typedef " << node->local_name () << " *"
- << node->local_name () << "_ptr;";
-
- os->gen_endif ();
-
- // Generate the ifdefined macro for the var type.
- os->gen_ifdef_macro (node->flat_name (), "_var");
-
- // Generate the _var declaration.
- if (node->gen_var_defn () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "codegen for _var failed\n"),
- -1);
- }
-
- os->gen_endif ();
-
- // Generate the ifdef macro for the _out class.
- os->gen_ifdef_macro (node->flat_name (),
- "_out");
-
- // Generate the _out declaration.
- if (node->gen_out_defn () == -1)
+ if (node->var_out_seq_decls_gen () == 0)
{
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "codegen for _out failed\n"),
- -1);
+ node->gen_var_out_seq_decls ();
+ node->var_out_seq_decls_gen (1);
}
- // Generate the endif macro.
- os->gen_endif ();
-
- // The above code could have been executed by the forward declaration
- // as long as it wasn't imported. The code below can only be
- // executed by an interface definition, also non-imported.
- if (node->imported ())
- {
- return 0;
- }
+ TAO_OutStream *os = this->ctx_->stream ();
*os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
<< "// " << __FILE__ << ":" << __LINE__;