00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ORT_Adapter_Impl.h 00006 * 00007 * $Id: ORT_Adapter_Impl.h 76995 2007-02-11 12:51:42Z johnnyw $ 00008 * 00009 * This is the implementation of the TAO::ORT_Adapter 00010 * 00011 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00012 */ 00013 //============================================================================= 00014 00015 #ifndef TAO_ORT_ADAPTER_IMPL_H 00016 #define TAO_ORT_ADAPTER_IMPL_H 00017 00018 #include /**/ "ace/pre.h" 00019 00020 #include "tao/ObjRefTemplate/ort_export.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 #include "tao/PortableServer/ORT_Adapter.h" 00027 #include "tao/ObjRefTemplate/ObjectReferenceTemplate_i.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 namespace TAO 00032 { 00033 /** 00034 * @class ObjectReferenceTemplate_Adapter_Impl 00035 * 00036 * @brief Implementation of the TAO::ORT_Adapter 00037 */ 00038 class ORT_Adapter_Impl 00039 : public ORT_Adapter 00040 { 00041 public: 00042 /// Activate this adapter 00043 virtual int activate (const char *server_id, 00044 const char *orb_id, 00045 PortableInterceptor::AdapterName *adapter_name, 00046 PortableServer::POA_ptr poa); 00047 00048 /// Accessor methods to ObjectReferenceTemplate template 00049 virtual PortableInterceptor::ObjectReferenceTemplate *get_adapter_template (void); 00050 00051 /// Accessor methods to PortableInterceptor::ObjectReferenceFactory 00052 virtual PortableInterceptor::ObjectReferenceFactory * get_obj_ref_factory (void); 00053 00054 /// Set a different ort_factory to be used. 00055 virtual int set_obj_ref_factory ( 00056 PortableInterceptor::ObjectReferenceFactory * current_factory); 00057 00058 /** 00059 * @see @c TAO::ORT_Adapter for details. 00060 */ 00061 virtual void release (PortableInterceptor::ObjectReferenceTemplate * ort); 00062 00063 /** 00064 * @name Adapter methods for PortableInterceptor::ObjectReferenceTemplate 00065 * Methods 00066 */ 00067 //@{ 00068 virtual char * tao_server_id (void); 00069 00070 virtual char * tao_orb_id (void); 00071 00072 virtual PortableInterceptor::AdapterName * tao_adapter_name (void); 00073 //@} 00074 00075 /** 00076 * @name PortableInterceptor::ObjectReferenceFactory Methods 00077 * 00078 * Methods required by the 00079 * PortableInterceptor::ObjectReferenceFactory ValueType. 00080 */ 00081 //@{ 00082 virtual CORBA::Object_ptr make_object ( 00083 const char * repository_id, 00084 const PortableInterceptor::ObjectId & id); 00085 //@} 00086 00087 private: 00088 00089 /// The ORT Template, this is the factory and its identity. 00090 PortableInterceptor::ObjectReferenceTemplate_var ort_template_; 00091 00092 /// The ORT Factory. 00093 PortableInterceptor::ObjectReferenceFactory_var ort_factory_; 00094 00095 }; 00096 00097 } 00098 00099 TAO_END_VERSIONED_NAMESPACE_DECL 00100 00101 #include /**/ "ace/post.h" 00102 00103 #endif /* TAO_ORT_ADAPTER_IMPL_H */