Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / ORT / ObjectReferenceFactory.h
blob7eaa3fce6a65538a33087cb06cedaa6347c24836
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ObjectReferenceFactory.h
8 * @author Ossama Othman <ossama@uci.edu>
9 */
10 //=============================================================================
12 #ifndef TAO_OBJECT_REFERENCE_FACTORY_H
13 #define TAO_OBJECT_REFERENCE_FACTORY_H
15 #include "ObjectReferenceFactoryC.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #if defined(_MSC_VER)
22 #pragma warning(push)
23 #pragma warning(disable:4250)
24 #endif /* _MSC_VER */
26 /**
27 * @class ObjectReferenceFactory
29 * @brief Implementation of the PortableInterceptor::ObjectReferenceFactory
30 * interface.
32 * This ObjectReferenceFactory creates simply delegates all tasks on
33 * to the old ObjectReferenceFactory. It merely exists to test the
34 * @c IORInfo::current_factory attribute internals.
36 class ObjectReferenceFactory
37 : public virtual OBV_ORT_Test::ObjectReferenceFactory
38 , public virtual CORBA::DefaultValueRefCountBase
40 public:
41 /// Constructor
42 ObjectReferenceFactory (
43 PortableInterceptor::ObjectReferenceFactory * old_orf);
45 virtual ::CORBA::ValueBase *_copy_value (void);
47 /**
48 * @name PortableInterceptor::ObjectReferenceFactory Methods
50 * Methods required by the
51 * PortableInterceptor::ObjectReferenceFactory interface.
53 //@{
54 virtual CORBA::Object_ptr make_object (
55 const char *repository_id,
56 const PortableInterceptor::ObjectId & id);
57 //@}
59 protected:
60 /// Destructor
61 /**
62 * Protected destructor to enforce proper memory management via
63 * reference counting.
65 ~ObjectReferenceFactory (void);
67 private:
68 /// The old ObjectReferenceFactory used to create object references.
69 /**
70 * This ObjectReferenceFactory will still be used when creating
71 * object references. However, it will be invoked through this
72 * ObjectReferenceFactory.
74 PortableInterceptor::ObjectReferenceFactory_var old_orf_;
77 #if defined (_MSC_VER)
78 #pragma warning(pop)
79 #endif /* _MSC_VER */
81 #endif /* TAO_OBJECT_REFERENCE_FACTORY_H */