Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / PolicyFactory / Policy.h
blob5fc98b06d6b2e51cfd00fe4925e2469eb6cc92cf
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Policy.h
7 * Implementation header for the test Policy.
9 * @author Ossama Othman <ossama@dre.vanderbilt.edu>
11 //=============================================================================
13 #ifndef POLICY_H
14 #define POLICY_H
16 #include "testC.h"
17 #include "tao/LocalObject.h"
19 /**
20 * @class Policy
22 * @brief Implementation of the Test::Policy interface.
24 * This policy merely returns the value that was passed to it when it
25 * was constructed.
27 class Policy
28 : public virtual Test::Policy,
29 public virtual ::CORBA::LocalObject
31 public:
32 /// Constructor.
33 Policy (CORBA::ULong val);
35 /// Test method defined in test IDL.
36 virtual CORBA::ULong value ();
38 virtual CORBA::PolicyType policy_type ();
40 virtual CORBA::Policy_ptr copy ();
42 virtual void destroy ();
44 protected:
45 /// Destructor.
46 /**
47 * Protected destructor to enforce proper memory management through
48 * the reference counting mechanism.
50 ~Policy ();
52 private:
53 /// Pseudo-reference to the ORB.
54 const CORBA::ULong value_;
57 #endif /* POLICY_H */