diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-10-29 12:52:13 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-10-29 12:52:13 +0000 |
commit | 81880503000153b64b4f0ee3ee4018b54220ba38 (patch) | |
tree | c7e6c002eef4e633f0f6af28d87ff7f146c6c53e /modules/TAO/TAO_IDL/be/be_visitor_component_scope.cpp | |
parent | 5428ca2afc9c5afc5c3fb61c272e39eff53ad6c2 (diff) | |
download | ATCD-81880503000153b64b4f0ee3ee4018b54220ba38.tar.gz |
ChangeLogTag: Thu Oct 29 12:50:35 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>idl3_plus_v2
Diffstat (limited to 'modules/TAO/TAO_IDL/be/be_visitor_component_scope.cpp')
-rw-r--r-- | modules/TAO/TAO_IDL/be/be_visitor_component_scope.cpp | 87 |
1 files changed, 86 insertions, 1 deletions
diff --git a/modules/TAO/TAO_IDL/be/be_visitor_component_scope.cpp b/modules/TAO/TAO_IDL/be/be_visitor_component_scope.cpp index 4e4502653e3..28af75ff4c3 100644 --- a/modules/TAO/TAO_IDL/be/be_visitor_component_scope.cpp +++ b/modules/TAO/TAO_IDL/be/be_visitor_component_scope.cpp @@ -26,6 +26,7 @@ #include "be_provides.h" #include "be_uses.h" +#include "be_helper.h" #include "be_extern.h" #include "utl_identifier.h" @@ -201,4 +202,88 @@ be_visitor_component_scope::pre_process (be_decl *node) } return 0; -}
\ No newline at end of file +} + +void +be_visitor_component_scope::gen_svnt_entrypoint_decl (void) +{ + os_ << be_nl << be_nl + << "extern \"C\" " << export_macro_.c_str () + << " ::PortableServer::Servant" << be_nl + << "create_" << node_->flat_name () + << "_Servant (" << be_idt_nl + << "::Components::EnterpriseComponent_ptr p," << be_nl + << "::CIAO::Container_ptr c," << be_nl + << "const char * ins_name);" << be_uidt; +} + +void +be_visitor_component_scope::gen_svnt_entrypoint_defn (void) +{ + ACE_CString sname_str ( + ScopeAsDecl (node_->defined_in ())->full_name ()); + const char *sname = sname_str.c_str (); + const char *lname = node_->local_name (); + const char *global = (sname_str == "" ? "" : "::"); + + os_ << be_nl << be_nl + << "extern \"C\" " << export_macro_.c_str () + << " ::PortableServer::Servant" << be_nl + << "create_" << node_->flat_name () + << "_Servant (" << be_idt_nl + << "::Components::EnterpriseComponent_ptr p," << be_nl + << "::CIAO::Container_ptr c," << be_nl + << "const char * ins_name)" << be_uidt_nl + << "{" << be_idt_nl + << global << sname << "::CCM_" << lname + << "_var x =" << be_idt_nl + << global << sname << "::CCM_" << lname + << "::_narrow (p);" << be_uidt_nl << be_nl + << "if ( ::CORBA::is_nil (x.in ()))" << be_idt_nl + << "{" << be_idt_nl + << "return 0;" << be_uidt_nl + << "}" << be_uidt_nl << be_nl + << "::PortableServer::Servant retval = 0;" << be_nl + << "ACE_NEW_RETURN (retval," << be_nl + << " " << lname << "_Servant (" << be_idt_nl + << " x.in ()," << be_nl + << " ::Components::CCMHome::_nil ()," << be_nl + << " ins_name," << be_nl + << " 0," << be_nl + << " c)," << be_uidt_nl + << " 0);" << be_nl << be_nl + << "return retval;" << be_uidt_nl + << "}"; +} + +void +be_visitor_component_scope::gen_exec_entrypoint_decl (void) +{ + os_ << be_nl << be_nl + << "extern \"C\" " << export_macro_.c_str () + << " ::Components::EnterpriseComponent_ptr" << be_nl + << "create_" << node_->flat_name () + << "_Impl (void);"; +} + +void +be_visitor_component_scope::gen_exec_entrypoint_defn (void) +{ + os_ << be_nl << be_nl + << "extern \"C\" " << export_macro_.c_str () + << " ::Components::EnterpriseComponent_ptr" << be_nl + << "create_" << node_->flat_name () + << "_Impl (void)" << be_nl + << "{" << be_idt_nl + << "::Components::EnterpriseComponent_ptr retval =" + << be_idt_nl + << "::Components::EnterpriseComponent::_nil ();" + << be_uidt_nl << be_nl + << "ACE_NEW_NORETURN (" << be_idt_nl + << "retval," << be_nl + << node_->local_name () << "_exec_i);" + << be_uidt_nl << be_nl + << "return retval;" << be_uidt_nl + << "}"; +} + |