summaryrefslogtreecommitdiff
path: root/CIAO/docs/templates/CIAO_Glue_Session_Template.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/docs/templates/CIAO_Glue_Session_Template.cpp')
-rw-r--r--CIAO/docs/templates/CIAO_Glue_Session_Template.cpp368
1 files changed, 130 insertions, 238 deletions
diff --git a/CIAO/docs/templates/CIAO_Glue_Session_Template.cpp b/CIAO/docs/templates/CIAO_Glue_Session_Template.cpp
index b692eb6a859..aedbcd3769b 100644
--- a/CIAO/docs/templates/CIAO_Glue_Session_Template.cpp
+++ b/CIAO/docs/templates/CIAO_Glue_Session_Template.cpp
@@ -33,20 +33,20 @@
// get_component implementation.
CORBA::Object_ptr
-[ciao module name]::[facet type]_Servant::_get_component (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[facet type]_Servant::_get_component ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
::Components::SessionContext_var sc =
::Components::SessionContext::_narrow (this->ctx_.in ());
if (! CORBA::is_nil(sc.in ()))
- return sc->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return sc->get_CCM_object ();
::Components::EntityContext_var ec =
::Components::EntityContext::_narrow (this->ctx_.in ());
if (! CORBA::is_nil(ec.in ()))
- return ec->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return ec->get_CCM_object ();
ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
}
@@ -64,7 +64,7 @@ CORBA::Object_ptr
// [receptacle name]Connections typedef'ed as a sequence of
// struct [receptacle name]Connection.
[receptacle name]Connections *
-[ciao module name]::[component name]_Context::get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Context::get_connections_[receptacle name] ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
// @@ Strategized locking here.
@@ -93,15 +93,12 @@ CORBA::Object_ptr
##foreach [event name] with [eventtype] in (list of all event sources) generate:
void
-[ciao module name]::[component name]_Context::push_[event name] ([eventtype] *ev
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Context::push_[event name] ([eventtype] *ev)
ACE_THROW_SPEC ((CORBA::SystemException))
{
## if [event name] belongs to an 'emits' port
- this->ciao_emits_[event name]_consumer_->push_[event name] (ev
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+ this->ciao_emits_[event name]_consumer_->push_[event name] (ev);
+
## else [event name] belongs to a 'publishes' port
ACE_Active_Map_Manager<[eventtype]Consumer_var>::iterator
end = this->ciao_publishes_[event name]_map_.end ();
@@ -113,9 +110,7 @@ void
ACE_Active_Map_Manager<[eventtype]Consumer_var>::ENTRY &entry = *iter;
[eventtype]Consumer_var c
= [eventtype]Consumer::_narrow (entry.int_id_.in ());
- c->push_[eventtype] (ev
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ c->push_[eventtype] (ev);
}
## endif [event name]
}
@@ -126,8 +121,7 @@ void
// Operations for publishes interfaces.
##foreach [publish name] with [eventtype] in (list of all publishers) generate:
::Components::Cookie *
-[ciao module name]::[component name]_Context::subscribe_[publish name] ([eventtype]Consumer_ptr c
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Context::subscribe_[publish name] ([eventtype]Consumer_ptr c)
ACE_THROW_SPEC ((CORBA::SystemException,
::Components::ExceededConnectionLimit))
{
@@ -148,8 +142,7 @@ void
}
[eventtype]Consumer_ptr
-[ciao module name]::[component name]_Context::unsubscribe_[publish name] (::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Context::unsubscribe_[publish name] (::Components::Cookie *ck)
ACE_THROW_SPEC ((CORBA::SystemException,
::Components::InvalidConnection))
{
@@ -174,7 +167,7 @@ void
## if [receptacle name] is a simplex receptacle ('uses')
[uses type]_ptr
-[ciao module name]::[component name]_Context::get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+[ciao module name]::[component name]_Context::get_connection_[receptacle name] ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
return [uses type]::_duplicate (this->ciao_uses_[receptacle name]_.in ());
@@ -182,29 +175,28 @@ void
// Simplex [receptacle name] connection management operations
void
-[ciao module name]::[component name]_Context::connect_[receptacle name] ([uses type]_ptr c
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Context::connect_[receptacle name] ([uses type]_ptr c)
ACE_THROW_SPEC ((CORBA::SystemException,
::Components::AlreadyConnected,
::Components::InvalidConnection))
{
if (! CORBA::is_nil (this->ciao_uses_[receptacle name]_.in ()))
- ACE_THROW (::Components::AlreadyConnected ());
+ throw ::Components::AlreadyConnected ();
if (CORBA::is_nil (c))
- ACE_THROW (::Components::InvalidConnection ());
+ throw ::Components::InvalidConnection ();
// When do we throw InvalidConnection exception?
this->ciao_uses_[receptacle name]_ = [uses type]::_duplicate (c);
}
[uses type]_ptr
-[ciao module name]::[component name]_Context::disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Context::disconnect_[receptacle name] ()
ACE_THROW_SPEC ((CORBA::SystemException,
::Components::NoConnection))
{
if (CORBA::is_nil (this->ciao_uses_[receptacle name]_.in ()))
- ACE_THROW (::Components::NoConnection ());
+ throw ::Components::NoConnection ();
return this->ciao_uses_[receptacle name]_._retn ();
}
@@ -212,8 +204,7 @@ void
## else ([receptacle name] is a multiplex ('uses multiple') receptacle)
// Multiplex [receptacle name] connection management operations
::Components::Cookie *
-[ciao module name]::[component name]_Context::connect_[receptacle name] ([uses type]_ptr c
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Context::connect_[receptacle name] ([uses type]_ptr c)
ACE_THROW_SPEC ((CORBA::SystemException,
::Components::ExceedConnectionLimit,
::Components::InvalidConnection))
@@ -235,8 +226,7 @@ void
}
[uses type]_ptr
-[ciao module name]::[component name]_Context::disconnect_[receptacle name] (::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Context::disconnect_[receptacle name] (::Components::Cookie *ck)
ACE_THROW_SPEC ((CORBA::SystemException,
::Components::InvalidConnection))
{
@@ -259,7 +249,7 @@ void
// Operations for ::Components::SessionContext interface
CORBA::Object_ptr
-[ciao module name]::[component name]_Context::get_CCM_object (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Context::get_CCM_object ()
ACE_THROW_SPEC ((CORBA::SystemException,
Components::IllegalState))
{
@@ -269,13 +259,9 @@ CORBA::Object_ptr
if (CORBA::is_nil (this->component_.in ()))
{
- CORBA::Object_var obj = this->container_->get_objref (this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ CORBA::Object_var obj = this->container_->get_objref (this->servant_);
- this->component_ = [component name]::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ this->component_ = [component name]::_narrow (obj.in ());
if (CORBA::is_nil (this->component_.in ()))
ACE_THROW_RETURN (CORBA::INTERNAL (), 0); // This should not happen...
@@ -295,45 +281,36 @@ CORBA::Object_ptr
{
this->context_ = new [ciao module name]::[component name]_Context (h, c, this);
- ACE_TRY_NEW_ENV
+ try
{
Components::SessionComponent_var scom =
- Components::SessionComponent::_narrow (exe
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ Components::SessionComponent::_narrow (exe);
if (! CORBA::is_nil (scom.in ()))
- scom->set_session_context (this->context_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ scom->set_session_context (this->context_);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
// @@ Ignore any exceptions? What happens if
// set_session_context throws an CCMException?
}
- ACE_ENDTRY;
}
[ciao module name]::[component name]_Servant::~[component name]_Servant (void)
{
- ACE_TRY_NEW_ENV
+ try
{
Components::SessionComponent_var scom =
- Components::SessionComponent::_narrow (this->executor_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ Components::SessionComponent::_narrow (this->executor_.in ());
if (! CORBA::is_nil (scom.in ()))
- scom->ccm_remove (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ scom->ccm_remove ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
// @@ Ignore any exceptions? What happens if
// set_session_context throws an CCMException?
}
- ACE_ENDTRY;
this->context_->_remove_ref ();
}
@@ -341,13 +318,12 @@ CORBA::Object_ptr
##foreach [facet name] with [facet type] in (list of all provided interfaces) generate:
[facet type]_ptr
-[ciao module name]::[component name]_Servant::provide_[facet name] (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::provide_[facet name] ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
if (CORBA::is_nil (this->provide_[facet name]_.in ()))
{
- CCM_[facet type]_var fexe = this->executor_->get_[facet name] (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ CCM_[facet type]_var fexe = this->executor_->get_[facet name] ();
if (CORBA::is_nil (fexe.in ()))
ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
@@ -357,13 +333,9 @@ CORBA::Object_ptr
this->context_);
PortableServer::ServantBase_var safe_servant (svt);
- CORBA::Object_var obj = this->container_->install_servant (svt
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ CORBA::Object_var obj = this->container_->install_servant (svt);
- [facet type]_var fo = [facet type]::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ [facet type]_var fo = [facet type]::_narrow (obj.in ());
this->provide_[facet name]_ = fo;
}
@@ -379,27 +351,25 @@ CORBA::Object_ptr
// Inherit from ::Compopnents::EventBConsumerBase
void
-[ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant::push_event (EventBase *ev
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant::push_event (EventBase *ev)
ACE_THROW_SPEC ((CORBA::SystemException,
::Components::BadEventType))
{
[eventtype]_var ev_type = [eventtype]::_downcast (ev);
if (ev_type != 0)
{
- this->push_[eventtype] (ev_type.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->push_[eventtype] (ev_type.in ());
return;
}
// @@ This include the case when we receive a parent eventtype of [eventtype]
- ACE_THROW (::Components::BadEventType ());
+ throw ::Components::BadEventType ();
}
// get_component implementation.
[eventtype]Consumer_ptr
-[ciao module name]::[component name]_Servant::get_consumer_[consumer name] (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_consumer_[consumer name] ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
if (CORBA::is_nil (this->consumes_[consumer name]_.in ()))
@@ -409,13 +379,9 @@ void
this->context_);
PortableServer::ServantBase_var safe_servant (svt);
- CORBA::Object_var obj = this->container_->install_servant (svt
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ CORBA::Object_var obj = this->container_->install_servant (svt);
- [eventtype]Consumer_var eco = [eventtype]Consumer::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ [eventtype]Consumer_var eco = [eventtype]Consumer::_narrow (obj.in ());
this->consumes_[consumer name]_ = eco;
}
@@ -427,8 +393,7 @@ void
// Operations for Navigation interface
CORBA::Object_ptr
-[ciao module name]::[component name]_Servant::provide_facet (const char * name
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::provide_facet (const char * name)
ACE_THROW_SPEC ((CORBA::SystemException ,
Components::InvalidName))
{
@@ -442,14 +407,14 @@ CORBA::Object_ptr
##foreach [facet name] with [facet type] in (list of all provided interfaces) generate:
if (ACE_OS_String::strcmp (name, "[facet name]") == 0)
- return this->provide_[facet name] (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->provide_[facet name] ();
##end foreach [facet name] with [facet type]
ACE_THROW_RETURN (::Components::InvalidName (), 0);
}
::Components::FacetDescriptions *
-[ciao module name]::[component name]_Servant::get_all_facets (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_all_facets ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
::Components::FacetDescriptions_var collection
@@ -467,9 +432,8 @@ CORBA::Object_ptr
x->Name ((const char *)"[facet name]");
x->type_id ((const char *) "[facet type's repo id]"); //
- x->facet_ref (this->provide_[facet name] (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK_RETURN (0);
-
+ x->facet_ref (this->provide_[facet name] ());
+
collection[i] = x._retn ();
++i;
##end foreach [facet name] with [facet type]
@@ -479,8 +443,7 @@ CORBA::Object_ptr
}
::Components::FacetDescriptions *
-[ciao module name]::[component name]_Servant::get_named_facets (const Components::NameList & names
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_named_facets (const Components::NameList & names)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName))
{
@@ -500,8 +463,7 @@ CORBA::Object_ptr
{
x->Name ((const char *)"[facet name]");
x->type_id ((const char *) "[facet type's repo id]"); //
- x->facet_ref (this->provide_[facet name] (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK_RETURN (0);
+ x->facet_ref (this->provide_[facet name] ());
}
##end foreach [facet name] with [facet type]
else
@@ -513,28 +475,23 @@ CORBA::Object_ptr
}
CORBA::Boolean
-[ciao module name]::[component name]_Servant::same_component (CORBA::Object_ptr object_ref
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::same_component (CORBA::Object_ptr object_ref)
ACE_THROW_SPEC ((CORBA::SystemException))
{
if (CORBA::is_nil (object_ref))
ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0);
- CORBA::Object_var the_other = object_ref->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ CORBA::Object_var the_other = object_ref->_get_component ();
- CORBA::Object_var me = this->context_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ CORBA::Object_var me = this->context_->get_CCM_object ();
- return me->_is_equivalent (object_ref
- ACE_ENV_ARG_PARAMETER);
+ return me->_is_equivalent (object_ref);
}
// Operations for Receptacles interface
::Components::Cookie *
[ciao module name]::[component name]_Servant::connect (const char * name,
- CORBA::Object_ptr connection
- ACE_ENV_ARG_DECL)
+ CORBA::Object_ptr connection)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName,
Components::InvalidConnection,
@@ -549,20 +506,16 @@ CORBA::Boolean
if (ACE_OS_String::strcmp (name, "[receptacle name]") == 0)
{
[uses type]_var _ciao_conn =
- [uses type]::_narrow (connection
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ [uses type]::_narrow (connection);
if (CORBA::is_nil (_ciao_conn.in ()))
ACE_THROW_RETURN (::Components::InvalidConnection (), 0);
## if [receptacle name] is a simplex receptacle ('uses')
- this->connect_[receptacle name] (_caio_conn.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->connect_[receptacle name] (_caio_conn.in ());
return 0;
## else ([receptacle name] is a multiplex ('uses multiple') receptacle)
- return this->connect_[receptacle name] (_ciao_conn.in ()
- ACE_ENV_ARG_PARAMETER);
+ return this->connect_[receptacle name] (_ciao_conn.in ());
## endif [receptacle name]
}
##end foreach [receptacle name] with [uses type]
@@ -580,8 +533,7 @@ CORBA::Boolean
CORBA::Object_ptr
[ciao module name]::[component name]_Servant::disconnect (const char * name,
- Components::Cookie *ck
- ACE_ENV_ARG_DECL)
+ Components::Cookie *ck)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName,
Components::InvalidConnection,
@@ -595,10 +547,9 @@ CORBA::Object_ptr
##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate:
if (ACE_OS_String::strcmp (name, "[receptacle name]") == 0)
## if [receptacle name] is a simplex receptacle ('uses')
- return this->disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->disconnect_[receptacle name] ();
## else ([receptacle name] is a multiplex ('uses multiple') receptacle)
- return this->connect_[receptacle name] (ck
- ACE_ENV_ARG_PARAMETER);
+ return this->connect_[receptacle name] (ck);
## endif [receptacle name]
##end foreach [receptacle name] with [uses type]
@@ -606,8 +557,7 @@ CORBA::Object_ptr
}
::Components::ConnectionDescriptions *
-[ciao module name]::[component name]_Servant::get_connections (const char * name
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_connections (const char * name)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName))
{
@@ -625,13 +575,12 @@ CORBA::Object_ptr
retv[0] = new OBV_Components::ConnectionDescription;
retv[0]->ck = 0;
- retv[0]->objref = this->get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ retv[0]->objref = this->get_connection_[receptacle name] ();
return retv._retn ();
## else ([receptacle name] is a multiplex ('uses multiple') receptacle)
// @@ Return type does not match here. We can not return directly.
- return this->get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->get_connections_[receptacle name] ();
## endif [receptacle name]
}
##end foreach [receptacle name] with [uses type]
@@ -640,7 +589,7 @@ CORBA::Object_ptr
}
::Components::ReceptacleDescriptions *
-[ciao module name]::[component name]_Servant::get_all_receptacles (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_all_receptacles ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
::Components::ReceptacleDescriptions_var retv =
@@ -659,9 +608,7 @@ CORBA::Object_ptr
## else ([receptacle name] is a multiplex ('uses multiple') receptacle)
retv[i]->is_multiple (1);
## endif [receptacle name]
- retv[i]->connections (*this->get_connections ("[receptacle name]"
- ACE_ENV_ARG_PARAMETER));
- ACE_CHECK_RETURN (0);
+ retv[i]->connections (*this->get_connections ("[receptacle name]"));
++i;
##end foreach [receptacle name] with [uses type]
@@ -669,8 +616,7 @@ CORBA::Object_ptr
}
::Components::ReceptacleDescriptions *
-[ciao module name]::[component name]_Servant::get_named_receptacles (const Components::NameList & names
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_named_receptacles (const Components::NameList & names)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName))
{
@@ -692,9 +638,7 @@ CORBA::Object_ptr
## else ([receptacle name] is a multiplex ('uses multiple') receptacle)
retv[i]->is_multiple (1);
## endif [receptacle name]
- retv[i]->connections (*this->get_connections ("[receptacle name]"
- ACE_ENV_ARG_PARAMETER));
- ACE_CHECK_RETURN (0);
+ retv[i]->connections (*this->get_connections ("[receptacle name]"));
}
##end foreach [receptacle name] with [uses type]
else
@@ -705,8 +649,7 @@ CORBA::Object_ptr
// Operations for Events interface
::Components::EventConsumerBase_ptr
-[ciao module name]::[component name]_Servant::get_consumer (const char * sink_name
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_consumer (const char * sink_name)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName))
{
@@ -716,15 +659,14 @@ CORBA::Object_ptr
##foreach [consumer name] with [eventtype] in (list of all consumers) generate:
if (ACE_OS_String::strcmp (sink_name, "[consumer name]") == 0)
- return this->get_consumer_[consumer name] (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->get_consumer_[consumer name] ();
##end foreach [consumer name] with [eventtype]
ACE_THROW_RETURN (Components::InvalidName (), 0);
}
::Components::Cookie *
[ciao module name]::[component name]_Servant::subscribe (const char * publisher_name,
- Components::EventConsumerBase_ptr subscriber
- ACE_ENV_ARG_DECL)
+ Components::EventConsumerBase_ptr subscriber)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName,
Components::InvalidConnection,
@@ -738,15 +680,12 @@ CORBA::Object_ptr
if (ACE_OS_String::strcmp (publisher_name, "[publish name]") == 0)
{
[eventtype]Consumer_var _ciao_consumer =
- [eventtype]Consumer::_narrow (subscriber
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ [eventtype]Consumer::_narrow (subscriber);
if (CORBA::is_nil (_ciao_consumer.in ()))
ACE_THROW_RETURN (Components::InvalidConnection (), 0);
- return this->subscribe_[publish name] (_ciao_consumer.in ()
- ACE_ENV_ARG_PARAMETER);
+ return this->subscribe_[publish name] (_ciao_consumer.in ());
}
##end foreach [publish name] with [eventtype]
@@ -755,8 +694,7 @@ CORBA::Object_ptr
::Components::EventConsumerBase_ptr
[ciao module name]::[component name]_Servant::unsubscribe (const char * publisher_name,
- Components::Cookie *ck
- ACE_ENV_ARG_DECL)
+ Components::Cookie *ck)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName,
Components::InvalidConnection))
@@ -768,8 +706,7 @@ CORBA::Object_ptr
##foreach [publish name] with [eventtype] in (list of all publishers) generate:
if (ACE_OS_String::strcmp (publisher_name, "[publish name]") == 0)
{
- return this->unsubscribe_[publish name] (ck
- ACE_ENV_ARG_PARAMETER);
+ return this->unsubscribe_[publish name] (ck);
}
##end foreach [publish name] with [eventtype]
@@ -778,8 +715,7 @@ CORBA::Object_ptr
void
[ciao module name]::[component name]_Servant::connect_consumer (const char * emitter_name,
- Components::EventConsumerBase_ptr consumer
- ACE_ENV_ARG_DECL)
+ Components::EventConsumerBase_ptr consumer)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName,
Components::AlreadyConnected,
@@ -787,31 +723,27 @@ void
{
// @@ We can omit this if clause if there's no emitter in this component.
if (emitter_name == 0)
- ACE_THROW (Components::InvalidName ());
+ throw Components::InvalidName ();
##foreach [emit name] with [eventtype] in (list of all emitters) generate:
if (ACE_OS_String::strcmp (emitter_name, "[emit name]") == 0)
{
[eventtype]Consumer_var _ciao_consumer =
- [eventtype]Consumer::_narrow (consumer
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ [eventtype]Consumer::_narrow (consumer);
if (CORBA::is_nil (_ciao_consumer.in ()))
- ACE_THROW (Components::InvalidConnection);
+ throw Components::InvalidConnection;
- this->connect_[emit name] (_ciao_consumer.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->connect_[emit name] (_ciao_consumer.in ());
return;
}
##end foreach [emit name] with [eventtype]
- ACE_THROW (Components::InvalidName ());
+ throw Components::InvalidName ();
}
::Components::EventConsumerBase_ptr
-[ciao module name]::[component name]_Servant::disconnect_consumer (const char * source_name
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::disconnect_consumer (const char * source_name)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName,
Components::NoConnection))
@@ -823,7 +755,7 @@ void
##foreach [emit name] with [eventtype] in (list of all emitters) generate:
if (ACE_OS_String::strcmp (source_name, "[emit name]") == 0)
{
- return this->disconnect_[emit name] (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->disconnect_[emit name] ();
}
##end foreach [emit name] with [eventtype]
@@ -831,7 +763,7 @@ void
}
::Components::ConsumerDescriptions *
-[ciao module name]::[component name]_Servant::get_all_consumers (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_all_consumers ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
::Components::ConsumerDescriptions_var retv =
@@ -845,8 +777,7 @@ void
retv[i]->Name ("[consumer name]");
retv[i]->type_id ("[eventtype]Consumer repo id");
[eventtype]Consumer_var c
- = this->get_consumer_[consumer name] (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ = this->get_consumer_[consumer name] ();
retv[i]->consumer (c.in ());
@@ -857,8 +788,7 @@ void
}
::Components::ConsumerDescriptions *
-[ciao module name]::[component name]_Servant::get_named_consumers (const Components::NameList & names
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_named_consumers (const Components::NameList & names)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName))
{
@@ -877,8 +807,7 @@ void
retv[i]->Name ("[consumer name]");
retv[i]->type_id ("[eventtype]Consumer repo id");
[eventtype]Consumer_var c =
- this->get_consumer_[consumer name] (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ this->get_consumer_[consumer name] ();
retv[i]->consumer (c.in ());
}
@@ -890,7 +819,7 @@ void
}
::Components::EmitterDescriptions *
-[ciao module name]::[component name]_Servant::get_all_emitters (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_all_emitters ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
::Components::EmitterDescriptions_var retv =
@@ -912,8 +841,7 @@ void
}
::Components::EmitterDescriptions *
-[ciao module name]::[component name]_Servant::get_named_emitters (const Components::NameList & names
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_named_emitters (const Components::NameList & names)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName))
{
@@ -941,7 +869,7 @@ void
}
::Components::PublisherDescriptions *
-[ciao module name]::[component name]_Servant::get_all_publishers (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_all_publishers ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
// @@ to-do
@@ -952,8 +880,7 @@ void
}
::Components::PublisherDescriptions *
-[ciao module name]::[component name]_Servant::get_named_publishers (const Components::NameList & names
- ACE_ENV_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_named_publishers (const Components::NameList & names)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidName))
{
@@ -966,7 +893,7 @@ void
// Operations for CCMObject interface
::CORBA::IRObject_ptr
-[ciao module name]::[component name]_Servant::get_component_def (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_component_def ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
// @@ to-do: Connect to an IfR?
@@ -974,14 +901,14 @@ void
}
::Components::CCMHome_ptr
-[ciao module name]::[component name]_Servant::get_ccm_home (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_ccm_home ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
- return this->context_->get_CCM_home (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->context_->get_CCM_home ();
}
::Components::PrimaryKeyBase *
-[ciao module name]::[component name]_Servant::get_primary_key (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_primary_key ()
ACE_THROW_SPEC ((CORBA::SystemException,
Components::NoKeyAvailable))
{
@@ -990,7 +917,7 @@ void
}
void
-[ciao module name]::[component name]_Servant::configuration_complete (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+[ciao module name]::[component name]_Servant::configuration_complete ()
ACE_THROW_SPEC ((CORBA::SystemException,
Components::InvalidConfiguration))
{
@@ -999,7 +926,7 @@ void
}
void
-[ciao module name]::[component name]_Servant::remove (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::remove ()
ACE_THROW_SPEC ((CORBA::SystemException,
Components::RemoveFailure))
{
@@ -1009,31 +936,26 @@ void
}
::Components::ComponentPortDescription *
-[ciao module name]::[component name]_Servant::get_all_ports (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::get_all_ports ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
::Components::ComponentPortDescription_var retv =
new OBV_Components::ComponentPortDescription;
::Components::FacetDescriptions_var facets_desc
- = this->get_all_facets (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
+ = this->get_all_facets ();
+
::Components::ReceptacleDescriptions_var receptacle_desc
- = get_all_receptacles (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ = get_all_receptacles ();
::Components::ConsumerDescriptions_var consumer_desc
- = this->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ = this->get_all_consumers ();
::Components::EmitterDescriptions_var emitter_desc
- = this->get_all_emitters (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
+ = this->get_all_emitters ();
+
::Components::PublisherDescriptions_var publisher_desc
- = this->get_all_publishers (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ = this->get_all_publishers ();
retv->facets (facets_desc.in());
retv->receptacles (receptacle_desc.in());
@@ -1046,14 +968,14 @@ void
// get_component implementation.
CORBA::Object_ptr
-[ciao module name]::[component name]_Servant::_get_component (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::_get_component ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
::Components::SessionContext_var sc =
::Components::SessionContext::_narrow (this->context_);
if (! CORBA::is_nil(sc.in ()))
- return sc->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return sc->get_CCM_object ();
// @@ Do we need to try the following case here? We are afterall implementing
// a session component here.
@@ -1061,35 +983,31 @@ CORBA::Object_ptr
::Components::EntityContext::_narrow (this->context_);
if (! CORBA::is_nil(ec.in ()))
- return ec->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return ec->get_CCM_object ();
ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
}
void
-[ciao module name]::[component name]_Servant::_ciao_activate (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::_ciao_activate ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
::Components::SessionComponent_var temp =
- ::Components::SessionComponent::_narrow (this->executor_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ::Components::SessionComponent::_narrow (this->executor_.in ());
if (! CORBA::is_nil (temp.in ()))
- temp->ccm_activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ temp->ccm_activate ();
}
void
-[ciao module name]::[component name]_Servant::_ciao_passivate (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[component name]_Servant::_ciao_passivate ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
::Components::SessionComponent_var temp =
- ::Components::SessionComponent::_narrow (this->executor_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ::Components::SessionComponent::_narrow (this->executor_.in ());
if (! CORBA::is_nil (temp.in ()))
- temp->ccm_passivate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ temp->ccm_passivate ();
}
//////////////////////////////////////////////////////////////////
@@ -1097,19 +1015,14 @@ void
//////////////////////////////////////////////////////////////////
[component name]_ptr
-[ciao module name]::[home name]_Servant::_ciao_activate_component (CCM_[component name]_ptr exe
- ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[home name]_Servant::_ciao_activate_component (CCM_[component name]_ptr exe)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CORBA::Object_var hobj
- = this->container_->get_objref (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ = this->container_->get_objref (this);
::Components::CCMHome_var home
- = ::Components::CCMHome::_narrow (hobj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ = ::Components::CCMHome::_narrow (hobj.in ());
[ciao module name]::[component name]_Servant *svt =
new [ciao module name]::[component name]_Servant (exe,
@@ -1120,17 +1033,12 @@ void
CORBA::Object_var objref
= this->container_->install_component (svt,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ oid.out ());
- svt->_ciao_activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ svt->_ciao_activate ();
[component name]_var ho
- = [component name]::_narrow (objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ = [component name]::_narrow (objref.in ());
if (this->component_map_.bind (oid.in (), svt) == 0)
{
@@ -1141,23 +1049,19 @@ void
}
void
-[ciao module name]::[home name]_Servant::_ciao_passivate_component ([component name]_ptr comp
- ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[home name]_Servant::_ciao_passivate_component ([component name]_ptr comp)
ACE_THROW_SPEC ((CORBA::SystemException))
{
PortableServer::ObjectId_var oid;
this->container_->uninstall_component (comp,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ oid.out ());
[ciao module name]::[component name]_Servant *servant = 0;
if (this->component_map_.unbind (oid.in (), servant) == 0)
{
PortableServer::ServantBase_var safe (servant);
- servant->_ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ servant->_ciao_passivate ();
}
// What happen if unbind failed?
@@ -1165,7 +1069,7 @@ void
// Operations for Implicit Home interface
[component name]_ptr
-[ciao module name]::[home name]_Servant::create (ACE_ENV_SINGLE_ARG_DECL)
+[ciao module name]::[home name]_Servant::create ()
ACE_THROW_SPEC ((CORBA::SystemException,
Components::CreateFailure))
{
@@ -1173,58 +1077,46 @@ void
ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
Components::EnterpriseComponent_var _ciao_ec =
- this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ this->executor_->create ();
CCM_[component name]_var _ciao_comp
- = CCM_[component name]::_narrow (_ciao_ec.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ = CCM_[component name]::_narrow (_ciao_ec.in ());
- return this->_ciao_activate_component (_ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
+ return this->_ciao_activate_component (_ciao_comp.in ());
}
// Operations for CCMHome interface
void
-[ciao module name]::[home name]_Servant::remove_component (Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL)
+[ciao module name]::[home name]_Servant::remove_component (Components::CCMObject_ptr comp)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::RemoveFailure))
{
[component name]_var _ciao_comp
- = [component name]::_narrow (comp
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ = [component name]::_narrow (comp);
if (CORBA::is_nil (_ciao_comp.in ()))
- ACE_THROW (CORBA::INTERNAL ()); // What is the right exception to throw here?
+ throw CORBA::INTERNAL (); // What is the right exception to throw here?
// @@ It seems to me that we need to make sure this is a component
// generated by this home before calling remove on this component.
- _ciao_comp->remove (ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ _ciao_comp->remove ();
// Removing the object reference? get the servant from the POA with
// the objref, and call remove() on the component, deactivate the
// component, and then remove-ref the servant?
- this->_ciao_passivate_component (_ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->_ciao_passivate_component (_ciao_comp.in ());
}
extern "C" [SERVANT]_Export ::PortableServer::Servant
create[home name]_Servant (::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL);
+ CIAO::Session_Container *c);
{
if (p == 0)
return 0;
CCM_[home name]_var x
- = CCM_[home name]::_narrow (p
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ = CCM_[home name]::_narrow (p);
if (CORBA::is_nil (x.in ()))
return 0;