Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / POA / Bug_1592_Regression / ServantLocator.h
blobeef4dec7c8fa02b70fd365064c31ef95e735b95f
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ServantLocator.h
7 * Implementation header for the PortableServer::ServantLocator for
8 * the PortableInterceptor / ServantLocator test.
10 * @author Ossama Othman <ossama@dre.vanderbilt.edu>
12 //=============================================================================
14 #ifndef SERVANT_LOCATOR_H
15 #define SERVANT_LOCATOR_H
17 #include "ace/config-all.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/PortableServer/PortableServer.h"
24 #include "tao/PortableServer/ServantLocatorC.h"
25 #include "tao/PortableServer/Servant_Base.h"
26 #include "tao/LocalObject.h"
27 #include "tao/ORB.h"
29 #if defined(_MSC_VER)
30 #pragma warning(push)
31 #pragma warning(disable:4250)
32 #endif /* _MSC_VER */
34 /**
35 * @class ServantLocator
37 * @brief Test PortableServer::ServantLocator.
39 * PortableServer::ServantLocator used for this test.
41 class ServantLocator
42 : public virtual PortableServer::ServantLocator,
43 public virtual ::CORBA::LocalObject
45 public:
46 /// Constructor.
47 ServantLocator (CORBA::ORB_ptr orb);
49 virtual PortableServer::Servant preinvoke (
50 const PortableServer::ObjectId & oid,
51 PortableServer::POA_ptr adapter,
52 const char * operation,
53 PortableServer::ServantLocator::Cookie & the_cookie);
55 virtual void postinvoke (
56 const PortableServer::ObjectId & oid,
57 PortableServer::POA_ptr adapter,
58 const char * operation,
59 PortableServer::ServantLocator::Cookie the_cookie,
60 PortableServer::Servant the_servant);
62 bool error_status_;
63 protected:
64 /// Destructor.
65 ~ServantLocator ();
67 private:
68 /// Pseudo-reference to the ORB.
69 CORBA::ORB_var orb_;
71 /// Pointer to the test servant.
72 PortableServer::ServantBase_var servant_;
75 #if defined(_MSC_VER)
76 #pragma warning(pop)
77 #endif /* _MSC_VER */
79 #endif /* SERVANT_LOCATOR_H */