00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ObjectReferenceTemplate_i.h 00006 * 00007 * $Id: ObjectReferenceTemplate_i.h 76995 2007-02-11 12:51:42Z johnnyw $ 00008 * 00009 * This is the implementation of the 00010 * PortableInterceptor::ObjectReferenceTemplate ValueType. 00011 * 00012 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00013 */ 00014 //============================================================================= 00015 00016 #ifndef TAO_OBJECT_REFERENCE_TEMPLATE_I_H 00017 #define TAO_OBJECT_REFERENCE_TEMPLATE_I_H 00018 00019 #include /**/ "ace/pre.h" 00020 00021 #include "tao/ObjRefTemplate/ort_export.h" 00022 00023 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00024 # pragma once 00025 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00026 00027 #include "tao/ObjRefTemplate/Default_ORTC.h" 00028 00029 #if defined(_MSC_VER) 00030 #pragma warning(push) 00031 #pragma warning(disable:4250) 00032 #endif /* _MSC_VER */ 00033 00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00035 00036 namespace PortableServer 00037 { 00038 class POA; 00039 00040 typedef POA *POA_ptr; 00041 typedef TAO_Objref_Var_T<POA> POA_var; 00042 } 00043 00044 namespace TAO 00045 { 00046 /** 00047 * @class ObjectReferenceTemplate 00048 * 00049 * @brief Implementation of the PortableInterceptor::ObjectReferenceTemplate 00050 * interface. This is a default implementation created to be returned 00051 * by the IORInfo when the user requests the ORT or ORF. 00052 */ 00053 class ObjectReferenceTemplate 00054 : public virtual OBV_TAO_Default_ORT::ObjectReferenceTemplate, 00055 public virtual CORBA::DefaultValueRefCountBase 00056 { 00057 public: 00058 /// Constructor 00059 ObjectReferenceTemplate (const char *server_id, 00060 const char *orb_id, 00061 PortableInterceptor::AdapterName *adapter_name, 00062 PortableServer::POA_ptr poa); 00063 00064 /** 00065 * @name PortableInterceptor::ObjectReferenceTemplate Methods 00066 * 00067 * Methods required by the 00068 * PortableInterceptor::ObjectReferenceTemplate ValueType. 00069 */ 00070 //@{ 00071 virtual char * server_id (void); 00072 00073 virtual char * orb_id (void); 00074 00075 virtual PortableInterceptor::AdapterName * adapter_name (void); 00076 //@} 00077 00078 /** 00079 * @name PortableInterceptor::ObjectReferenceFactory Methods 00080 * 00081 * Methods required by the 00082 * PortableInterceptor::ObjectReferenceFactory ValueType. 00083 */ 00084 //@{ 00085 virtual CORBA::Object_ptr make_object ( 00086 const char * repository_id, 00087 const PortableInterceptor::ObjectId & id); 00088 //@} 00089 00090 protected: 00091 00092 /// Destructor 00093 /** 00094 * Protected destructor to enforce proper memory management via 00095 * reference counting. 00096 */ 00097 ~ObjectReferenceTemplate (void); 00098 00099 private: 00100 const char *server_id_; 00101 const char *orb_id_; 00102 PortableInterceptor::AdapterName_var adapter_name_; 00103 PortableServer::POA_var poa_; 00104 }; 00105 } 00106 00107 TAO_END_VERSIONED_NAMESPACE_DECL 00108 00109 #if defined(_MSC_VER) 00110 #pragma warning(pop) 00111 #endif /* _MSC_VER */ 00112 00113 #include /**/ "ace/post.h" 00114 00115 #endif /* TAO_OBJECT_REFERENCE_TEMPLATE_I_H */