Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / PolicyFactory / Policy.h
blob13dbb42bc9486929bf69933b6db95a6348705a82
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:
33 /// Constructor.
34 Policy (CORBA::ULong val);
36 /// Test method defined in test IDL.
37 virtual CORBA::ULong value (void);
39 virtual CORBA::PolicyType policy_type (void);
41 virtual CORBA::Policy_ptr copy (void);
43 virtual void destroy (void);
45 protected:
47 /// Destructor.
48 /**
49 * Protected destructor to enforce proper memory management through
50 * the reference counting mechanism.
52 ~Policy (void);
54 private:
56 /// Pseudo-reference to the ORB.
57 const CORBA::ULong value_;
61 #endif /* POLICY_H */