diff options
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp index 80392e6076b..8dc85a2fdf2 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp @@ -59,6 +59,15 @@ be_visitor_component_sh::visit_component (be_component *node) } } + if (this->generate_amh_classes (node) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "be_visitor_interface_sh::" + "visit_interface - " + "codegen for AMH classes failed\n"), + -1); + } + TAO_OutStream *os = this->ctx_->stream (); ACE_CString class_name; @@ -108,16 +117,16 @@ be_visitor_component_sh::visit_component (be_component *node) *os << "class " << be_global->skel_export_macro () << " " << class_name.c_str () << be_idt_nl << ": " << be_idt; - int has_concrete_parent = 0; - AST_Component *base = node->base_component (); if (base != 0) { - has_concrete_parent = 1; - *os << "public virtual POA_" << base->name (); } + else + { + *os << "public virtual POA_Components::CCMObject"; + } long nsupports = node->n_inherits (); AST_Interface **supports = node->supports (); @@ -132,19 +141,8 @@ be_visitor_component_sh::visit_component (be_component *node) continue; } - if (has_concrete_parent) - { - *os << "," << be_nl; - } - + *os << "," << be_nl; *os << "public virtual POA_" << supported->name (); - - has_concrete_parent = 1; - } - - if (has_concrete_parent == 0) - { - *os << "public virtual PortableServer::ServantBase"; } *os << be_uidt << be_uidt_nl @@ -316,3 +314,15 @@ be_visitor_component_sh::visit_component (be_component *node) return 0; } + +int +be_visitor_component_sh::generate_amh_classes (be_component *node) +{ + if (be_global->gen_amh_classes ()) + { + be_visitor_amh_interface_sh amh_intf (this->ctx_); + return amh_intf.visit_interface (node); + } + + return 0; +} |