summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-07-31 06:43:04 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-07-31 06:43:04 +0000
commit0862cb9489e0169e568a6e70f9024d0127816f04 (patch)
treee0a1763f10a3d9d74e7c64a6c9a661e5b6cbe55e
parente31a45f0fa8db9de199fa4bc3cfd6a5caebba1b8 (diff)
downloadATCD-0862cb9489e0169e568a6e70f9024d0127816f04.tar.gz
Tue Jul 31 06:40:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog18
-rw-r--r--TAO/MPC/config/core_minimum_corba.mpb2
-rw-r--r--TAO/TAO_IDL/be/be_global.cpp34
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp78
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp47
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp45
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp46
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp94
-rw-r--r--TAO/TAO_IDL/be_include/be_global.h9
-rw-r--r--TAO/docs/compiler.html7
-rw-r--r--TAO/tao/Object.h5
-rw-r--r--TAO/tao/PortableServer/Servant_Base.cpp3
-rw-r--r--TAO/tao/PortableServer/Servant_Base.h2
13 files changed, 254 insertions, 136 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index a8934817703..f09e913155c 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,21 @@
+Tue Jul 31 06:40:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * docs/compiler.html:
+ * MPC/config/core_minimum_corba.mpb:
+ * tao/Object.h:
+ * tao/PortableServer/Servant_Base.{h,cpp}:
+ * TAO_IDL/be/be_global.cpp:
+ * TAO_IDL/be/be_interface.cpp:
+ * TAO_IDL/be/be_visitor_component/component_sh.cpp:
+ * TAO_IDL/be/be_visitor_interface/amh_sh.cpp:
+ * TAO_IDL/be/be_visitor_interface/interface_sh.cpp:
+ * TAO_IDL/be/be_visitor_interface/interface_ss.cpp:
+ * TAO_IDL/be_include/be_global.h:
+ Added -Gmc to the IDL compiler to generate code targeted for
+ Minimum CORBA. When this option is enabled we suppress several
+ methods from the generation of the skeleton. This fixes
+ bugzilla 3017
+
Tue Jul 31 05:42:34 UTC 2007 Iliyan Jeliazkov <iliyan@ociweb.com>
* tao/TAO_Server_Request.cpp:
diff --git a/TAO/MPC/config/core_minimum_corba.mpb b/TAO/MPC/config/core_minimum_corba.mpb
index dd8dc2f75a4..8428a96cfc5 100644
--- a/TAO/MPC/config/core_minimum_corba.mpb
+++ b/TAO/MPC/config/core_minimum_corba.mpb
@@ -2,6 +2,6 @@
// $Id$
feature(minimum_corba) : taoidldefaults {
- idlflags += -DTAO_HAS_MINIMUM_POA
+ idlflags += -DTAO_HAS_MINIMUM_POA -Gmc
macros += TAO_HAS_MINIMUM_CORBA=1
}
diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp
index 77035ac76ce..5debd35b6b6 100644
--- a/TAO/TAO_IDL/be/be_global.cpp
+++ b/TAO/TAO_IDL/be/be_global.cpp
@@ -84,6 +84,7 @@ BE_GlobalData::BE_GlobalData (void)
gen_thru_poa_collocation_ (true), // Default is thru_poa.
gen_direct_collocation_ (false),
gen_corba_e_ (false),
+ gen_minimum_corba_ (false),
opt_tc_ (false),
ami_call_back_ (false),
gen_amh_classes_ (false),
@@ -1050,6 +1051,17 @@ BE_GlobalData::gen_corba_e (void) const
return this->gen_corba_e_;
}
+void
+BE_GlobalData::gen_minimum_corba (bool val)
+{
+ this->gen_minimum_corba_ = val;
+}
+
+bool
+BE_GlobalData::gen_minimum_corba (void) const
+{
+ return this->gen_minimum_corba_;
+}
void
BE_GlobalData::opt_tc (bool val)
@@ -2040,6 +2052,24 @@ BE_GlobalData::parse_args (long &i, char **av)
}
break;
}
+ else if (av[i][2] == 'm')
+ {
+ if (av[i][3] == 'c')
+ {
+ // Minimum corba.
+ be_global->gen_minimum_corba (true);
+ }
+ else
+ {
+ ACE_ERROR ((
+ LM_ERROR,
+ ACE_TEXT ("IDL: I don't understand ")
+ ACE_TEXT ("the '%s' option\n"),
+ av[i]
+ ));
+ }
+ break;
+ }
else if (av[i][2] == 't')
{
// Optimized typecode generation.
@@ -2626,6 +2656,10 @@ BE_GlobalData::usage (void) const
));
ACE_DEBUG ((
LM_DEBUG,
+ ACE_TEXT (" -Gmc \t\t\tGenerate code optimized for Minimum CORBA\n")
+ ));
+ ACE_DEBUG ((
+ LM_DEBUG,
ACE_TEXT (" -Gd \t\t\tGenerate the code for direct collocation. Default ")
ACE_TEXT ("is thru-POA collocation\n")
));
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index 1078781b6c9..0b8f2009219 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -830,30 +830,39 @@ be_interface::gen_operation_table (const char *flat_name,
*os << "{\"_is_a\", &" << skeleton_class_name
<< "::_is_a_skel, 0}," << be_nl;
- this->skel_count_++;
+ ++this->skel_count_;
- *os << "{\"_non_existent\", &" << skeleton_class_name
- << "::_non_existent_skel, 0}," << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ *os << "{\"_non_existent\", &" << skeleton_class_name
+ << "::_non_existent_skel, 0}," << be_nl;
- this->skel_count_++;
+ ++this->skel_count_;
+ }
- if (!be_global->gen_corba_e ())
+ if (!be_global->gen_corba_e () && !be_global->gen_minimum_corba ())
{
*os << "{\"_component\", &" << skeleton_class_name
<< "::_component_skel, 0}," << be_nl;
- this->skel_count_++;
+ ++this->skel_count_;
}
- *os << "{\"_interface\", &" << skeleton_class_name
- << "::_interface_skel, 0}," << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ *os << "{\"_interface\", &" << skeleton_class_name
+ << "::_interface_skel, 0}," << be_nl;
- this->skel_count_++;
+ ++this->skel_count_;
+ }
- *os << "{\"_repository_id\", &" << skeleton_class_name
- << "::_repository_id_skel, 0}" << be_uidt_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ *os << "{\"_repository_id\", &" << skeleton_class_name
+ << "::_repository_id_skel, 0}" << be_uidt_nl;
- this->skel_count_++;
+ ++this->skel_count_;
+ }
*os << "};" << be_nl << be_nl;
*os << "static const ::CORBA::Long _tao_" << flat_name
@@ -992,32 +1001,41 @@ be_interface::gen_operation_table (const char *flat_name,
<< skeleton_class_name
<< "::_is_a_skel, 0" << be_nl;
- this->skel_count_++;
+ ++this->skel_count_;
- *os << "_non_existent,&"
- << skeleton_class_name
- << "::_non_existent_skel, 0" << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ *os << "_non_existent,&"
+ << skeleton_class_name
+ << "::_non_existent_skel, 0" << be_nl;
- this->skel_count_++;
+ ++this->skel_count_;
+ }
- if (!be_global->gen_corba_e ())
+ if (!be_global->gen_corba_e () && !be_global->gen_minimum_corba ())
{
*os << "_component,&"
<< skeleton_class_name
<< "::_component_skel, 0" << be_nl;
- this->skel_count_++;
+ ++this->skel_count_;
}
- *os << "_interface,&"
- << skeleton_class_name
- << "::_interface_skel, 0" << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ *os << "_interface,&"
+ << skeleton_class_name
+ << "::_interface_skel, 0" << be_nl;
- this->skel_count_++;
+ ++this->skel_count_;
+ }
- *os << "_repository_id,&"
- << skeleton_class_name
- << "::_repository_id_skel, 0" << be_nl;
- this->skel_count_++;
+ if (!be_global->gen_minimum_corba ())
+ {
+ *os << "_repository_id,&"
+ << skeleton_class_name
+ << "::_repository_id_skel, 0" << be_nl;
+ ++this->skel_count_;
+ }
// Input to the gperf is ready. Run gperf and get things
// done. This method also unlinks the temp file that we used
@@ -1220,7 +1238,7 @@ be_interface::gen_optable_entries (be_interface *derived_interface,
*os << "\n";
- this->skel_count_++;
+ ++this->skel_count_;
}
else if (d->node_type () == AST_Decl::NT_attr)
{
@@ -1250,7 +1268,7 @@ be_interface::gen_optable_entries (be_interface *derived_interface,
*os << "\n";
- this->skel_count_++;
+ ++this->skel_count_;
if (!attr->readonly ())
{
@@ -1272,7 +1290,7 @@ be_interface::gen_optable_entries (be_interface *derived_interface,
*os << "\n";
- this->skel_count_++;
+ ++this->skel_count_;
}
}
}
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 8f8f22d2978..7e0bb0afb0b 100644
--- a/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp
@@ -169,21 +169,27 @@ be_visitor_component_sh::visit_component (be_component *node)
<< "void *servant_upcall" << be_uidt_nl
<< ");" << be_uidt_nl << be_nl;
- // Add a skeleton for our _non_existent method.
- *os << "static void _non_existent_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest &req," << be_nl
- << "void *servant," << be_nl
- << "void *servant_upcall" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ // Add a skeleton for our _non_existent method.
+ *os << "static void _non_existent_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest &req," << be_nl
+ << "void *servant," << be_nl
+ << "void *servant_upcall" << be_uidt_nl
+ << ");" << be_uidt_nl << be_nl;
+ }
- // Add a skeleton for our _interface method.
- *os << "static void _interface_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest &req," << be_nl
- << "void *servant," << be_nl
- << "void *servant_upcall" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ // Add a skeleton for our _interface method.
+ *os << "static void _interface_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest &req," << be_nl
+ << "void *servant," << be_nl
+ << "void *servant_upcall" << be_uidt_nl
+ << ");" << be_uidt_nl << be_nl;
+ }
- if (!be_global->gen_corba_e ())
+ if (!be_global->gen_corba_e () && !be_global->gen_minimum_corba ())
{
// Add a skeleton for our _component method.
*os << "static void _component_skel (" << be_idt << be_idt_nl
@@ -193,12 +199,15 @@ be_visitor_component_sh::visit_component (be_component *node)
<< ");" << be_uidt_nl << be_nl;
}
- // Add a skeleton for our _repository_id method.
- *os << "static void _repository_id_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest &req," << be_nl
- << "void *servant," << be_nl
- << "void *servant_upcall);" << be_uidt
- << be_uidt_nl << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ // Add a skeleton for our _repository_id method.
+ *os << "static void _repository_id_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest &req," << be_nl
+ << "void *servant," << be_nl
+ << "void *servant_upcall);" << be_uidt
+ << be_uidt_nl << be_nl;
+ }
// Add the dispatch method.
*os << "virtual void _dispatch (" << be_idt << be_idt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp
index 0d3bc9a9e2d..bb96fba6371 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp
@@ -129,19 +129,25 @@ be_visitor_amh_interface_sh::visit_interface (be_interface *node)
<< "void *servant_upcall" << be_uidt_nl
<< ");" << be_uidt_nl << be_nl;
- // Add a skeleton for our _non_existent method.
- *os << "static void _non_existent_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest &req," << be_nl
- << "void *obj," << be_nl
- << "void *servant_upcall" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ // Add a skeleton for our _non_existent method.
+ *os << "static void _non_existent_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest &req," << be_nl
+ << "void *obj," << be_nl
+ << "void *servant_upcall" << be_uidt_nl
+ << ");" << be_uidt_nl << be_nl;
+ }
- // Add a skeleton for our _interface method.
- *os << "static void _interface_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest &req," << be_nl
- << "void *obj," << be_nl
- << "void *servant_upcall" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ // Add a skeleton for our _interface method.
+ *os << "static void _interface_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest &req," << be_nl
+ << "void *obj," << be_nl
+ << "void *servant_upcall" << be_uidt_nl
+ << ");" << be_uidt_nl << be_nl;
+ }
if (!be_global->gen_corba_e ())
{
@@ -153,12 +159,15 @@ be_visitor_amh_interface_sh::visit_interface (be_interface *node)
<< ");" << be_uidt_nl << be_nl;
}
- // Add a skeleton for our _repository_id method.
- *os << "static void _repository_id_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest &req," << be_nl
- << "void *obj," << be_nl
- << "void *servant_upcall" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ // Add a skeleton for our _repository_id method.
+ *os << "static void _repository_id_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest &req," << be_nl
+ << "void *obj," << be_nl
+ << "void *servant_upcall" << be_uidt_nl
+ << ");" << be_uidt_nl << be_nl;
+ }
// Add the dispatch method.
*os << "virtual void _dispatch (" << be_idt << be_idt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
index 93442a1b0ad..d0e48eb2f05 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
@@ -177,19 +177,25 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
<< "void * servant" << be_uidt_nl
<< ");" << be_uidt_nl << be_nl;
- // Add a skeleton for our _non_existent method.
- *os << "static void _non_existent_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest & req," << be_nl
- << "void * servant_upcall," << be_nl
- << "void * servant" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ // Add a skeleton for our _non_existent method.
+ *os << "static void _non_existent_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest & req," << be_nl
+ << "void * servant_upcall," << be_nl
+ << "void * servant" << be_uidt_nl
+ << ");" << be_uidt_nl << be_nl;
+ }
- // Add a skeleton for our _interface method.
- *os << "static void _interface_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest & req," << be_nl
- << "void * servant_upcall," << be_nl
- << "void * servant" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ // Add a skeleton for our _interface method.
+ *os << "static void _interface_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest & req," << be_nl
+ << "void * servant_upcall," << be_nl
+ << "void * servant" << be_uidt_nl
+ << ");" << be_uidt_nl << be_nl;
+ }
if (!be_global->gen_corba_e ())
{
@@ -201,13 +207,15 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
<< ");" << be_uidt_nl << be_nl;
}
- // Add a skeleton for our _repository_id method.
- *os << "static void _repository_id_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest & req," << be_nl
- << "void * servant_upcall," << be_nl
- << "void * servant);" << be_uidt
- << be_uidt_nl << be_nl;
-
+ if (!be_global->gen_minimum_corba ())
+ {
+ // Add a skeleton for our _repository_id method.
+ *os << "static void _repository_id_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest & req," << be_nl
+ << "void * servant_upcall," << be_nl
+ << "void * servant);" << be_uidt
+ << be_uidt_nl << be_nl;
+ }
// Add the dispatch method.
*os << "virtual void _dispatch (" << be_idt << be_idt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
index 3c473fd1ebb..41a517fc3e9 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
@@ -288,8 +288,9 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
s.get ()->destroy ();
}
- // Generate code for the _non_existent skeleton.
+ if (!be_global->gen_minimum_corba ())
{
+ // Generate code for the _non_existent skeleton.
be_predefined_type rt (AST_PredefinedType::PT_boolean, 0);
// @@ Cheat a little by placing a space before the operation name
// to prevent the IDL compiler from interpreting the leading
@@ -392,8 +393,9 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
rt.destroy ();
}
- // Generate code for the _repository_id skeleton.
+ if (!be_global->gen_minimum_corba ())
{
+ // Generate code for the _repository_id skeleton.
auto_ptr<AST_String> s (
idl_global->gen ()->create_string (
idl_global->gen ()->create_expr ((idl_uns_long) 0,
@@ -500,57 +502,59 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
s.get ()->destroy ();
}
- *os << be_nl << be_nl << "// TAO_IDL - Generated from " << be_nl
- << "// " << __FILE__ << ":" << __LINE__;
-
- *os << be_nl << be_nl
- << "void " << full_skel_name
- << "::_interface_skel (" << be_idt << be_idt_nl
- << "TAO_ServerRequest & server_request, " << be_nl
- << "void * /* servant_upcall */," << be_nl
- << "void * servant)" << be_uidt << be_uidt_nl;
- *os << "{" << be_idt_nl;
- *os << "TAO_IFR_Client_Adapter *_tao_adapter =" << be_idt_nl
- << "ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ("
- << be_idt << be_idt_nl
- << "TAO_ORB_Core::ifr_client_adapter_name ()" << be_uidt_nl
- << ");" << be_uidt_nl << be_uidt_nl;
- *os << "if (_tao_adapter == 0)" << be_idt_nl
- << "{" << be_idt_nl
- << "throw ::CORBA::INTF_REPOS (::CORBA::OMGVMCID | 1, ::CORBA::COMPLETED_NO);"
- << be_uidt_nl
- << "}" << be_uidt_nl << be_nl;
-
- // Get the right object implementation.
- *os << full_skel_name << " * const impl =" << be_idt_nl
- << "static_cast<"
- << full_skel_name << " *> (servant);"
- << be_uidt_nl;
+ if (!be_global->gen_minimum_corba ())
+ {
+ *os << be_nl << be_nl << "// TAO_IDL - Generated from " << be_nl
+ << "// " << __FILE__ << ":" << __LINE__;
- *os << "::CORBA::InterfaceDef_ptr _tao_retval = impl->_get_interface ();"
- << be_nl
- << "server_request.init_reply ();" << be_nl
- << "TAO_OutputCDR &_tao_out = *server_request.outgoing ();"
- << be_nl << be_nl
- << "::CORBA::Boolean const _tao_result =" << be_idt_nl
- << "_tao_adapter->interfacedef_cdr_insert (_tao_out, _tao_retval);"
- << be_uidt_nl << be_nl
- << "_tao_adapter->dispose (_tao_retval);" << be_nl << be_nl;
+ *os << be_nl << be_nl
+ << "void " << full_skel_name
+ << "::_interface_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest & server_request, " << be_nl
+ << "void * /* servant_upcall */," << be_nl
+ << "void * servant)" << be_uidt << be_uidt_nl;
+ *os << "{" << be_idt_nl;
+ *os << "TAO_IFR_Client_Adapter *_tao_adapter =" << be_idt_nl
+ << "ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ("
+ << be_idt << be_idt_nl
+ << "TAO_ORB_Core::ifr_client_adapter_name ()" << be_uidt_nl
+ << ");" << be_uidt_nl << be_uidt_nl;
+ *os << "if (_tao_adapter == 0)" << be_idt_nl
+ << "{" << be_idt_nl
+ << "throw ::CORBA::INTF_REPOS (::CORBA::OMGVMCID | 1, ::CORBA::COMPLETED_NO);"
+ << be_uidt_nl
+ << "}" << be_uidt_nl << be_nl;
- *os << "if (_tao_result == false)" << be_idt_nl
- << "{" << be_idt_nl
- << "throw ::CORBA::MARSHAL ();" << be_uidt_nl
- << "}" << be_uidt;
+ // Get the right object implementation.
+ *os << full_skel_name << " * const impl =" << be_idt_nl
+ << "static_cast<"
+ << full_skel_name << " *> (servant);"
+ << be_uidt_nl;
- this->generate_send_reply (os);
+ *os << "::CORBA::InterfaceDef_ptr _tao_retval = impl->_get_interface ();"
+ << be_nl
+ << "server_request.init_reply ();" << be_nl
+ << "TAO_OutputCDR &_tao_out = *server_request.outgoing ();"
+ << be_nl << be_nl
+ << "::CORBA::Boolean const _tao_result =" << be_idt_nl
+ << "_tao_adapter->interfacedef_cdr_insert (_tao_out, _tao_retval);"
+ << be_uidt_nl << be_nl
+ << "_tao_adapter->dispose (_tao_retval);" << be_nl << be_nl;
+
+ *os << "if (_tao_result == false)" << be_idt_nl
+ << "{" << be_idt_nl
+ << "throw ::CORBA::MARSHAL ();" << be_uidt_nl
+ << "}" << be_uidt;
- *os << be_uidt_nl
- << "}" << be_nl << be_nl;
+ this->generate_send_reply (os);
+ *os << be_uidt_nl
+ << "}" << be_nl << be_nl;
+ }
// Generate code for the _component skeleton, don't generate it when
// we use CORBA/e
- if (!be_global->gen_corba_e ())
+ if (!be_global->gen_corba_e () && !be_global->gen_minimum_corba ())
{
be_predefined_type rt (AST_PredefinedType::PT_object, 0);
// @@ Cheat a little by placing a space before the operation name
diff --git a/TAO/TAO_IDL/be_include/be_global.h b/TAO/TAO_IDL/be_include/be_global.h
index 61af090c140..c46d3fdfe8a 100644
--- a/TAO/TAO_IDL/be_include/be_global.h
+++ b/TAO/TAO_IDL/be_include/be_global.h
@@ -436,6 +436,12 @@ public:
bool gen_corba_e (void) const;
// Check if we want to generate for CORBA/e
+ void gen_minimum_corba (bool);
+ // Set whether we want to generate for Minimum CORBA
+
+ bool gen_minimum_corba (void) const;
+ // Check if we want to generate for Minimum CORBA
+
void opt_tc (bool);
// Set optimized typecodes.
@@ -713,6 +719,9 @@ private:
bool gen_corba_e_;
// are we generating for CORBA/e
+ bool gen_minimum_corba_;
+ // are we generating for Minimum CORBA
+
bool opt_tc_;
// do we generate optimized typecodes?
diff --git a/TAO/docs/compiler.html b/TAO/docs/compiler.html
index cbd7f9ce69a..8089704cdc3 100644
--- a/TAO/docs/compiler.html
+++ b/TAO/docs/compiler.html
@@ -651,6 +651,13 @@ also receives other options that are specific to it.<p>
<td>&nbsp;</td>
</tr>
+ <tr><a name="Gmc">
+ <td><tt>-Gmc </tt></td>
+
+ <td>Generated code for Minimum CORBA. This reduces the size of the generated code</td>
+ <td>&nbsp;</td>
+ </tr>
+
<tr><a name="Gsp">
<td><tt>-Gsp </tt></td>
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index 2b2e5787d92..9cd6bd9b6eb 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -134,7 +134,6 @@ namespace CORBA
/// implementation method and does no remote invocations!
virtual const char* _interface_repository_id (void) const;
-
/**
* Return a (potentially non-unique) hash value for this object.
* This method relies on the representation of the object
@@ -313,11 +312,11 @@ namespace CORBA
#if defined (GEN_OSTREAM_OPS)
/// Used by optionally generated ostream operators for interface
- /// to output the actual repo id for debugging.
+ /// to output the actual repo id for debugging.
static std::ostream& _tao_stream (std::ostream &strm,
const Object_ptr _tao_objref);
virtual std::ostream& _tao_stream_v (std::ostream &strm) const;
-
+
#endif /* GEN_OSTREAM_OPS */
/// Accessor to the flag..
diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp
index b567d78be90..e77ebc3ab53 100644
--- a/TAO/tao/PortableServer/Servant_Base.cpp
+++ b/TAO/tao/PortableServer/Servant_Base.cpp
@@ -87,6 +87,7 @@ TAO_ServantBase::_is_a (const char *logical_type_id)
return ACE_OS::strcmp (logical_type_id, id) == 0;
}
+#if (TAO_HAS_MINIMUM_CORBA == 0)
CORBA::Boolean
TAO_ServantBase::_non_existent (void)
{
@@ -124,6 +125,7 @@ TAO_ServantBase::_repository_id (void)
{
return CORBA::string_dup (this->_interface_repository_id ());
}
+#endif /* TAO_HAS_MINIMUM_CORBA */
int
TAO_ServantBase::_find (const char *opname,
@@ -165,7 +167,6 @@ TAO_ServantBase::_create_stub (void)
poa_current_impl->object_key (),
this->_interface_repository_id (),
poa_current_impl->priority ()
-
);
}
else
diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h
index c2d41eb59ab..27e4ed3993b 100644
--- a/TAO/tao/PortableServer/Servant_Base.h
+++ b/TAO/tao/PortableServer/Servant_Base.h
@@ -72,6 +72,7 @@ public:
/// Local implementation of the CORBA::Object::_is_a method.
virtual CORBA::Boolean _is_a (const char *logical_type_id);
+#if (TAO_HAS_MINIMUM_CORBA == 0)
/// Default _non_existent: always returns false.
virtual CORBA::Boolean _non_existent (void);
@@ -85,6 +86,7 @@ public:
/// Get the repository id.
virtual char * _repository_id (void);
+#endif /* TAO_HAS_MINIMUM_CORBA */
/// This is an auxiliary method for _this() and _narrow().
virtual TAO_Stub *_create_stub (void);