Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / ObjRefTemplate / ObjectReferenceTemplate_i.h
blobce424be95cb962b34610ad79a1082a77486459e9
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ObjectReferenceTemplate_i.h
7 * This is the implementation of the
8 * PortableInterceptor::ObjectReferenceTemplate ValueType.
10 * @author Johnny Willemsen <jwillemsen@remedy.nl>
12 //=============================================================================
14 #ifndef TAO_OBJECT_REFERENCE_TEMPLATE_I_H
15 #define TAO_OBJECT_REFERENCE_TEMPLATE_I_H
17 #include /**/ "ace/pre.h"
19 #include "tao/ObjRefTemplate/ort_export.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "tao/ObjRefTemplate/Default_ORTC.h"
27 #if defined(_MSC_VER)
28 #pragma warning(push)
29 #pragma warning(disable:4250)
30 #endif /* _MSC_VER */
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 namespace PortableServer
36 class POA;
38 typedef POA *POA_ptr;
39 typedef TAO_Objref_Var_T<POA> POA_var;
42 namespace TAO
44 /**
45 * @class ObjectReferenceTemplate
47 * @brief Implementation of the PortableInterceptor::ObjectReferenceTemplate
48 * interface. This is a default implementation created to be returned
49 * by the IORInfo when the user requests the ORT or ORF.
51 class ObjectReferenceTemplate
52 : public virtual OBV_TAO_Default_ORT::ObjectReferenceTemplate,
53 public virtual CORBA::DefaultValueRefCountBase
55 public:
56 /// Constructor
57 ObjectReferenceTemplate (const char *server_id,
58 const char *orb_id,
59 PortableInterceptor::AdapterName *adapter_name,
60 PortableServer::POA_ptr poa);
61 ::CORBA::ValueBase *_copy_value ();
63 /**
64 * @name PortableInterceptor::ObjectReferenceTemplate Methods
66 * Methods required by the
67 * PortableInterceptor::ObjectReferenceTemplate ValueType.
69 //@{
70 virtual char * server_id ();
72 virtual char * orb_id ();
74 virtual PortableInterceptor::AdapterName * adapter_name ();
75 //@}
77 /**
78 * @name PortableInterceptor::ObjectReferenceFactory Methods
80 * Methods required by the
81 * PortableInterceptor::ObjectReferenceFactory ValueType.
83 //@{
84 virtual CORBA::Object_ptr make_object (
85 const char * repository_id,
86 const PortableInterceptor::ObjectId & id);
87 //@}
89 protected:
90 /// Destructor
91 /**
92 * Protected destructor to enforce proper memory management via
93 * reference counting.
95 ~ObjectReferenceTemplate ();
97 private:
98 const char *server_id_;
99 const char *orb_id_;
100 PortableInterceptor::AdapterName_var adapter_name_;
101 PortableServer::POA_var poa_;
105 TAO_END_VERSIONED_NAMESPACE_DECL
107 #if defined(_MSC_VER)
108 #pragma warning(pop)
109 #endif /* _MSC_VER */
111 #include /**/ "ace/post.h"
113 #endif /* TAO_OBJECT_REFERENCE_TEMPLATE_I_H */