summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp49
1 files changed, 7 insertions, 42 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp
index 574cee004b2..99699d86b47 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp
@@ -29,53 +29,18 @@ be_visitor_amh_interface_ch::~be_visitor_amh_interface_ch (void)
int
be_visitor_amh_interface_ch::visit_interface (be_interface *node)
{
- TAO_OutStream *os = this->ctx_->stream ();
-
// If not already generated and not imported.
- if (!node->cli_hdr_gen () && !node->imported ())
- {
- // == STEP 1: generate the class name and class names we inherit ==
-
- // 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 << "class " << node->local_name () << ";" << be_nl;
- // Generate the _ptr declaration.
- *os << "typedef " << node->local_name () << " *"
- << node->local_name () << "_ptr;" << be_nl;
-
- 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 ();
-
- }
-
- // 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 ())
+ if (node->cli_hdr_gen () || node->imported ())
{
return 0;
}
+ // This will be a no-op if it has already been done by a forward
+ // declaration.
+ node->gen_var_out_seq_decls ();
+
+ TAO_OutStream *os = this->ctx_->stream ();
+
// Now the interface definition itself.
os->gen_ifdef_macro (node->flat_name ());