diff options
Diffstat (limited to 'CIAO/docs/templates/CIAO_Glue_Session_Template.h')
-rw-r--r-- | CIAO/docs/templates/CIAO_Glue_Session_Template.h | 300 |
1 files changed, 77 insertions, 223 deletions
diff --git a/CIAO/docs/templates/CIAO_Glue_Session_Template.h b/CIAO/docs/templates/CIAO_Glue_Session_Template.h index 25c7813db53..c1344c06ab8 100644 --- a/CIAO/docs/templates/CIAO_Glue_Session_Template.h +++ b/CIAO/docs/templates/CIAO_Glue_Session_Template.h @@ -70,8 +70,7 @@ namespace CIAO_GLUE // get_component implementation. virtual CORBA::Object_ptr - _get_component () - ACE_THROW_SPEC ((CORBA::SystemException)); + _get_component (); protected: // Facet executor. @@ -108,55 +107,41 @@ namespace CIAO_GLUE ##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: ## if [receptacle name] is a simplex receptacle ('uses') [uses type]_ptr - get_connection_[receptacle name] () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_connection_[receptacle name] (); ## else ([receptacle name] is a multiplex ('uses multiple') receptacle) // [receptacle name]Connections typedef'ed as a sequence of // struct [receptacle name]Connection. [receptacle name]Connections * - get_connections_[receptacle name] (); - ACE_THROW_SPEC ((CORBA::SystemException)); + get_connections_[receptacle name] ();; ## endif [receptacle name] ##end foreach [receptacle name] with [uses type] ##foreach [event name] with [eventtype] in (list of all event sources) generate: - void push_[event name] ([eventtype] *ev) - ACE_THROW_SPEC ((CORBA::SystemException)); + void push_[event name] ([eventtype] *ev); ##end foreach [event name] with [eventtype] // Operations for ::Components::CCMContext virtual ::Components::Principal_ptr - get_caller_principal () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_caller_principal (); virtual ::Components::CCMHome_ptr - get_CCM_home () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_CCM_home (); virtual CORBA::Boolean - get_rollback_only () - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); + get_rollback_only (); virtual ::Components::Transaction::UserTransaction_ptr - get_user_transaction () - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); + get_user_transaction (); virtual CORBA::Boolean - is_caller_in_role (const char * role) - ACE_THROW_SPEC ((CORBA::SystemException)); + is_caller_in_role (const char * role); virtual void - set_rollback_only () - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); + set_rollback_only (); // Operations for ::Components::SessionContext interface virtual CORBA::Object_ptr - get_CCM_object () - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); + get_CCM_object (); protected: // We need to generate, in protected section, stuff that manage // connections and consumers of this component. @@ -165,15 +150,10 @@ namespace CIAO_GLUE ## if [receptacle name] is a simplex receptacle ('uses') // Simplex [receptacle name] connection management operations void - connect_[receptacle name] ([uses type]_ptr c) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); + connect_[receptacle name] ([uses type]_ptr c); [uses type]_ptr - disconnect_[receptacle name] () - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)); + disconnect_[receptacle name] (); // Simplex [receptacle name] connection [uses type]_var ciao_uses_[receptacle name]_; @@ -181,15 +161,10 @@ namespace CIAO_GLUE ## else ([receptacle name] is a multiplex ('uses multiple') receptacle) // Multiplex [receptacle name] connection management operations ::Components::Cookie * - connect_[receptacle name] ([uses type]_ptr c) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceedConnectionLimit, - ::Components::InvalidConnection)); + connect_[receptacle name] ([uses type]_ptr c); [uses type]_ptr - disconnect_[receptacle name] (::Components::Cookie *ck) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)); + disconnect_[receptacle name] (::Components::Cookie *ck); // Multiplex [receptacle name] connections @@ -200,14 +175,10 @@ namespace CIAO_GLUE // Operations for emits interfaces. ##foreach [emit name] with [eventtype] in (list of all emitters) generate: void - connect_[emit name] ([eventtype]Consumer_ptr c) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::AlreadyConnected)); + connect_[emit name] ([eventtype]Consumer_ptr c); [eventtype]Consumer_ptr - disconnect_[emit name] () - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)); + disconnect_[emit name] (); [eventtype]Consumer_var ciao_emits_[emit name]_consumer_; ##end foreach [emit name] with [eventtype] @@ -215,14 +186,10 @@ namespace CIAO_GLUE // Operations for publishes interfaces. ##foreach [publish name] with [eventtype] in (list of all publishers) generate: ::Components::Cookie * - subscribe_[publish name] ([eventtype]Consumer_ptr c) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceededConnectionLimit)); + subscribe_[publish name] ([eventtype]Consumer_ptr c); [eventtype]Consumer_ptr - unsubscribe_[publish name] (::Components::Cookie *ck) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)); + unsubscribe_[publish name] (::Components::Cookie *ck); ACE_Active_Map_Manager<[eventtype]Consumer_var> ciao_publishes_[publish name]_map_; ##end foreach [publish name] with [eventtype] @@ -265,8 +232,7 @@ namespace CIAO_GLUE // Operations for provides interfaces. ##foreach [facet name] with [facet type] in (list of all provided interfaces) generate: virtual [facet type]_ptr - provide_[facet name] () - ACE_THROW_SPEC ((CORBA::SystemException)); + provide_[facet name] (); ##end foreach [facet name] with [facet type] // Operations for receptacles interfaces. @@ -275,35 +241,23 @@ namespace CIAO_GLUE ## if [receptacle name] is a simplex receptacle ('uses') // Simplex [receptacle name] connection management operations virtual void - connect_[receptacle name] ([uses type]_ptr c) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); + connect_[receptacle name] ([uses type]_ptr c); virtual [uses type]_ptr - disconnect_[receptacle name] () - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)); + disconnect_[receptacle name] (); virtual [uses type]_ptr - get_connection_[receptacle name] () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_connection_[receptacle name] (); ## else ([receptacle name] is a multiplex ('uses multiple') receptacle) // Multiplex [receptacle name] connection management operations virtual ::Components::Cookie * - connect_[receptacle name] ([uses type]_ptr c) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceedConnectionLimit, - ::Components::InvalidConnection)); + connect_[receptacle name] ([uses type]_ptr c); virtual [uses type]_ptr - disconnect_[receptacle name] (::Components::Cookie *ck) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)); + disconnect_[receptacle name] (::Components::Cookie *ck); virtual [receptacle name]Connections * - get_connections_[receptacle name] () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_connections_[receptacle name] (); ## endif [receptacle name] ##end foreach [receptacle name] with [uses type] @@ -322,19 +276,15 @@ namespace CIAO_GLUE ~[event type]Consumer_[consumer name]_Servant (); ## foreach [type] in ([eventtype] and all its parent eventtype, if any) - virtual void push_[type] ([type] *evt) - ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void push_[type] ([type] *evt); ## end [type] // Inherit from ::Compopnents::EventConsumerBase - virtual void push_event (::Components::EventBase *ev) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::BadEventType)); + virtual void push_event (::Components::EventBase *ev); // get_component implementation. virtual CORBA::Object_ptr - _get_component () - ACE_THROW_SPEC ((CORBA::SystemException)); + _get_component (); protected: // Executor @@ -345,193 +295,126 @@ namespace CIAO_GLUE }; virtual [eventtype]Consumer_ptr - get_consumer_[consumer name] () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_consumer_[consumer name] (); ##end foreach [consumer name] with [eventtype] // Operations for emits interfaces. ##foreach [emit name] with [eventtype] in (list of all emitters) generate: virtual void - connect_[emit name] ([eventtype]Consumer_ptr c) - ACE_THROW_SPEC ((CORBA::SystemException - ::Components::AlreadyConnected)); + connect_[emit name] ([eventtype]Consumer_ptr c); virtual [eventtype]Consumer_ptr - disconnect_[emit name] () - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)); + disconnect_[emit name] (); ##end foreach [emit name] with [eventtype] // Operations for publishes interfaces. ##foreach [publish name] with [eventtype] in (list of all publishers) generate: virtual ::Components::Cookie * - subscribe_[publish name] ([eventtype]Consumer_ptr c) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceededConnectionLimit)); + subscribe_[publish name] ([eventtype]Consumer_ptr c); virtual [eventtype]Consumer_ptr - unsubscribe_[publish name] (::Components::Cookie *ck) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)); + unsubscribe_[publish name] (::Components::Cookie *ck); ##end foreach [publish name] with [eventtype] // Operations for Navigation interface virtual CORBA::Object_ptr - provide_facet (const char * name) - ACE_THROW_SPEC ((CORBA::SystemException , - Components::InvalidName)) ; + provide_facet (const char * name); virtual ::Components::FacetDescriptions * - get_all_facets () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_all_facets (); virtual ::Components::FacetDescriptions * - get_named_facets (const Components::NameList & names) - ACE_THROW_SPEC ((CORBA::SystemException , - Components::InvalidName)); + get_named_facets (const Components::NameList & names); virtual CORBA::Boolean - same_component (CORBA::Object_ptr object_ref) - ACE_THROW_SPEC ((CORBA::SystemException)); + same_component (CORBA::Object_ptr object_ref); // Operations for Receptacles interface virtual ::Components::Cookie * connect (const char * name, - CORBA::Object_ptr connection) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection, - Components::AlreadyConnected, - Components::ExceededConnectionLimit)); + CORBA::Object_ptr connection); virtual CORBA::Object_ptr disconnect (const char * name, - Components::Cookie *ck) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection, - Components::CookieRequired, - Components::NoConnection)); + Components::Cookie *ck); virtual ::Components::ConnectionDescriptions * - get_connections (const char * name) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); + get_connections (const char * name); virtual ::Components::ReceptacleDescriptions * - get_all_receptacles () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_all_receptacles (); virtual ::Components::ReceptacleDescriptions * - get_named_receptacles (const Components::NameList & names) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); + get_named_receptacles (const Components::NameList & names); // Operations for Events interface virtual ::Components::EventConsumerBase_ptr - get_consumer (const char * sink_name) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); + get_consumer (const char * sink_name); virtual ::Components::Cookie * subscribe (const char * publisher_name, - Components::EventConsumerBase_ptr subscriber) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection, - Components::ExceededConnectionLimit)); + Components::EventConsumerBase_ptr subscriber); virtual ::Components::EventConsumerBase_ptr unsubscribe (const char * publisher_name, - Components::Cookie *ck) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection)); + Components::Cookie *ck); virtual void connect_consumer (const char * emitter_name, - Components::EventConsumerBase_ptr consumer) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::AlreadyConnected, - Components::InvalidConnection)); + Components::EventConsumerBase_ptr consumer); virtual ::Components::EventConsumerBase_ptr - disconnect_consumer (const char * source_name) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::NoConnection)); + disconnect_consumer (const char * source_name); virtual ::Components::ConsumerDescriptions * - get_all_consumers () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_all_consumers (); virtual ::Components::ConsumerDescriptions * - get_named_consumers (const Components::NameList & names) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); + get_named_consumers (const Components::NameList & names); virtual ::Components::EmitterDescriptions * - get_all_emitters () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_all_emitters (); virtual ::Components::EmitterDescriptions * - get_named_emitters (const Components::NameList & names) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); + get_named_emitters (const Components::NameList & names); virtual ::Components::PublisherDescriptions * - get_all_publishers () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_all_publishers (); virtual ::Components::PublisherDescriptions * - get_named_publishers (const Components::NameList & names) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); + get_named_publishers (const Components::NameList & names); // Operations for CCMObject interface virtual ::CORBA::IRObject_ptr - get_component_def () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_component_def (); virtual ::Components::CCMHome_ptr - get_ccm_home () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_ccm_home (); virtual ::Components::PrimaryKeyBase * - get_primary_key () - ACE_THROW_SPEC ((CORBA::SystemException, - Components::NoKeyAvailable)); + get_primary_key (); virtual void - configuration_complete () - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidConfiguration)); + configuration_complete (); virtual void - remove () - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)); + remove (); virtual ::Components::ComponentPortDescription * - get_all_ports () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_all_ports (); // get_component implementation. virtual CORBA::Object_ptr - _get_component () - ACE_THROW_SPEC ((CORBA::SystemException)); + _get_component (); // CIAO specific operations. // Activate the object in the container_ void - _ciao_activate () - ACE_THROW_SPEC ((CORBA::SystemException)); + _ciao_activate (); void - _ciao_passivate () - ACE_THROW_SPEC ((CORBA::SystemException)); + _ciao_passivate (); protected: // My Executor. @@ -582,10 +465,7 @@ namespace CIAO_GLUE // for factory operations inherit from parent home(s), they should return // the corresponding component types their homes manage virtual [component name]_ptr - [factory name] (....) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::CreateFailure, - ....)); + [factory name] (....); ##end foreach [factory name] // Finder operations @@ -593,77 +473,51 @@ namespace CIAO_GLUE // for finder operations inherit from parent home(s), they should return // the corresponding component types their homes manage virtual [component name]_ptr - [finder name] (....) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::FinderFailure, - ....)); + [finder name] (....); ##end foreach [finder name] ## if [home name] is a keyless home // Operations for KeylessHome interface virtual ::Components::CCMObject_ptr - create_component () - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)); + create_component (); ## else [home basename] is keyed home with [key type] // We do not support key'ed home at the moment but we might // as well generate the mapping. - virtual [component name]_ptr create ([key type] *key) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::CreationFailure, - ::Components::DuplicateKeyValue, - ::Components::InvalidKey)); + virtual [component name]_ptr create ([key type] *key); virtual [component name]_ptr - find_by_primary_key ([key type] *key) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::FinderFailure, - ::Components::UnknownKeyValue, - ::Components::InvalidKey)); - - virtual void remove ([key type] *key) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::RemoveFailure, - ::Components::UnknownKeyValue, - ::Components::InvalidKey)); + find_by_primary_key ([key type] *key); + + virtual void remove ([key type] *key); virtual [key type] * - get_primary_key ([component name]_ptr comp) - ACE_THROW_SPEC ((CORBA::SystemException)); + get_primary_key ([component name]_ptr comp); ## endif (keyed or keyless home) // Operations for Implicit Home interface virtual [component name]_ptr - create () - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)); + create (); // Operations for CCMHome interface virtual ::CORBA::IRObject_ptr - get_component_def () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_component_def (); virtual ::CORBA::IRObject_ptr - get_home_def () - ACE_THROW_SPEC ((CORBA::SystemException)); + get_home_def (); - virtual void remove_component (Components::CCMObject_ptr comp) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)); + virtual void remove_component (Components::CCMObject_ptr comp); protected: // Helper method for factory operations. [component name]_ptr - _ciao_activate_component (CCM_[component name]_ptr exe) - ACE_THROW_SPEC ((CORBA::SystemException)); + _ciao_activate_component (CCM_[component name]_ptr exe); void - _ciao_passivate_component ([component name]_ptr comp) - ACE_THROW_SPEC ((CORBA::SystemException)); + _ciao_passivate_component ([component name]_ptr comp); // My Executor. CCM_[home name]_var executor_; |