diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2004-08-13 12:18:17 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2004-08-13 12:18:17 +0000 |
commit | 5b2632b5fd6e75dcbd00e570fdc72fab58c2a5d4 (patch) | |
tree | f069d346f9228499cfcaccdbfec8cad4893b4105 | |
parent | 800efc8d7f01f98dcf78a926bd0ffa273b785324 (diff) | |
download | ATCD-5b2632b5fd6e75dcbd00e570fdc72fab58c2a5d4.tar.gz |
*** empty log message ***
-rwxr-xr-x | TAO/tao/PortableServer/ObjectReferenceTemplate_Adapter.cpp | 23 | ||||
-rwxr-xr-x | TAO/tao/PortableServer/ObjectReferenceTemplate_Adapter.h | 83 |
2 files changed, 106 insertions, 0 deletions
diff --git a/TAO/tao/PortableServer/ObjectReferenceTemplate_Adapter.cpp b/TAO/tao/PortableServer/ObjectReferenceTemplate_Adapter.cpp new file mode 100755 index 00000000000..4bf34ef5aec --- /dev/null +++ b/TAO/tao/PortableServer/ObjectReferenceTemplate_Adapter.cpp @@ -0,0 +1,23 @@ +// $Id$ + +#include "tao/PortableServer/ObjectReferenceTemplate_Adapter.h" +#include "ace/Dynamic_Service.h" + +ACE_RCSID(tao, ObjectReferenceTemplate_Adapter, "$Id$") + + +TAO_ObjectReferenceTemplate_Adapter::~TAO_ObjectReferenceTemplate_Adapter (void) +{ +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Dynamic_Service<TAO_ObjectReferenceTemplate_Adapter>; + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate ACE_Dynamic_Service<TAO_ObjectReferenceTemplate_Adapter> + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + + diff --git a/TAO/tao/PortableServer/ObjectReferenceTemplate_Adapter.h b/TAO/tao/PortableServer/ObjectReferenceTemplate_Adapter.h new file mode 100755 index 00000000000..c6f35040034 --- /dev/null +++ b/TAO/tao/PortableServer/ObjectReferenceTemplate_Adapter.h @@ -0,0 +1,83 @@ +// This may look like C, but it's really -*- C++ -*- + +//============================================================================= +/** + * @file ObjectReferenceTemplate_Adapter.h + * + * $Id$ + * + * @author Johnny Willemsen <jwillemsen@remedy.nl> + */ +//============================================================================= +#ifndef TAO_OBJECTREFERENCETEMPLATE_ADAPTER_H +#define TAO_OBJECTREFERENCETEMPLATE_ADAPTER_H + +#include /**/ "ace/pre.h" +#include "ace/Service_Object.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Exception.h" +#include "tao/PI_ForwardC.h" + +class TAO_POA; + +namespace CORBA +{ + class Object; + typedef Object *Object_ptr; +} + +/** + * @class TAO_ObjectReferenceTemplate_Adapter + * + * @brief TAO_ObjectReferenceTemplate_Adapter. + * + * Class that offers an interface to the POA to load and manipulate + * ORT library. + */ +class TAO_Export TAO_ObjectReferenceTemplate_Adapter : public ACE_Service_Object +{ +public: + + /// The virtual destructor + virtual ~TAO_ObjectReferenceTemplate_Adapter (void); + + /// Activate the ORT library + virtual int activate (const char *server_id, + const char *orb_id, + TAO_POA *poa) = 0; + + /// Set the underlying POA pointer. + /** + * Upon destruction of the POA that this ObjectReferenceTemplate is + * associated with, the underlying POA pointer will be set to zero + * to forcibly break all ties with the POA. This is necessary to + * prevent this ObjectReferenceTemplate from invoking the POA after + * it has been destroyed. + */ + virtual void poa (TAO_POA * poa) = 0; + + /** + * @name PortableInterceptor::ObjectReferenceFactory Methods + * + * Methods required by the + * PortableInterceptor::ObjectReferenceFactory ValueType. + */ + //@{ + virtual CORBA::Object_ptr make_object ( + const char * repository_id, + const PortableInterceptor::ObjectId & id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + //@} + + +}; + +#include /**/ "ace/post.h" +#endif /* TAO_OBJECTREFERENCETEMPLATE_ADAPTER_H */ |