diff options
Diffstat (limited to 'TAO/tao/Domain/DomainS_T.h')
-rw-r--r-- | TAO/tao/Domain/DomainS_T.h | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/TAO/tao/Domain/DomainS_T.h b/TAO/tao/Domain/DomainS_T.h index baeca4df868..ce809a2dc64 100644 --- a/TAO/tao/Domain/DomainS_T.h +++ b/TAO/tao/Domain/DomainS_T.h @@ -30,6 +30,139 @@ #pragma warning(disable:4250) #endif /* _MSC_VER */ +#if defined (ACE_HAS_USING_KEYWORD) + +// TIE class: Refer to CORBA v2.2, Section 20.34.4 +template <class T> +class TAO_Domain_Export POA_CORBA_DomainManager_tie : public POA_CORBA_DomainManager +{ +public: + POA_CORBA_DomainManager_tie (T &t); + // the T& ctor + POA_CORBA_DomainManager_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + POA_CORBA_DomainManager_tie (T *tp, CORBA::Boolean release=1); + // ctor taking pointer and an ownership flag + POA_CORBA_DomainManager_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release=1); + // ctor with T*, ownership flag and a POA + ~POA_CORBA_DomainManager_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, CORBA::Boolean release=1); + // set the underlying object and the ownership flag + CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner (CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ); + CORBA::Policy_ptr get_domain_policy ( + CORBA::PolicyType policy_type, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +private: + T *ptr_; + PortableServer::POA_var poa_; + CORBA::Boolean rel_; + + // copy and assignment are not allowed + POA_CORBA_DomainManager_tie (const POA_CORBA_DomainManager_tie &); + void operator= (const POA_CORBA_DomainManager_tie &); +}; + + +// TIE class: Refer to CORBA v2.2, Section 20.34.4 +template <class T> +class TAO_Domain_Export POA_CORBA_ConstructionPolicy_tie : public POA_CORBA_ConstructionPolicy +{ +public: + POA_CORBA_ConstructionPolicy_tie (T &t); + // the T& ctor + POA_CORBA_ConstructionPolicy_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + POA_CORBA_ConstructionPolicy_tie (T *tp, CORBA::Boolean release=1); + // ctor taking pointer and an ownership flag + POA_CORBA_ConstructionPolicy_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release=1); + // ctor with T*, ownership flag and a POA + ~POA_CORBA_ConstructionPolicy_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, CORBA::Boolean release=1); + // set the underlying object and the ownership flag + CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner (CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ); + void make_domain_manager ( + CORBA::InterfaceDef_ptr object_type, + CORBA::Boolean constr_policy, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + CORBA::PolicyType policy_type ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + CORBA::Policy_ptr copy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + void destroy ( + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +private: + T *ptr_; + PortableServer::POA_var poa_; + CORBA::Boolean rel_; + + // copy and assignment are not allowed + POA_CORBA_ConstructionPolicy_tie (const POA_CORBA_ConstructionPolicy_tie &); + void operator= (const POA_CORBA_ConstructionPolicy_tie &); +}; + +#endif /* ACE_HAS_USING_KEYWORD */ #if defined (__ACE_INLINE__) #include "DomainS_T.i" |