Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / LF_Follower_Auto_Ptr.h
blob6ba7dd34691320d86e152abe61304877fc017c39
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file LF_Follower_Auto_Ptr.h
7 * @author Carlos O'Ryan <coryan@uci.edu>
8 */
9 //=============================================================================
11 #ifndef TAO_LF_FOLLOWER_AUTO_PTR_H
12 #define TAO_LF_FOLLOWER_AUTO_PTR_H
14 #include /**/ "ace/pre.h"
16 #include "tao/LF_Follower.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Leader_Follower.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 /**
27 * @brief Implement an auto_ptr-like class for the TAO_LF_Followers
28 * allocated via a TAO_Leader_Follower set.
30 * The Leader/Follower set is a factory for TAO_LF_Follower objects
32 class TAO_Export TAO_LF_Follower_Auto_Ptr
34 public:
35 /// Constructor
36 TAO_LF_Follower_Auto_Ptr (TAO_Leader_Follower &);
38 /// Destructor
39 ~TAO_LF_Follower_Auto_Ptr ();
41 /// Implement the smart pointer methods
42 TAO_LF_Follower *get ();
43 TAO_LF_Follower *operator->();
44 operator TAO_LF_Follower *();
46 private:
47 /// Keep a reference to the leader follower
48 TAO_Leader_Follower &leader_follower_;
50 /// The follower
51 TAO_LF_Follower *follower_;
54 TAO_END_VERSIONED_NAMESPACE_DECL
56 #if defined (__ACE_INLINE__)
57 # include "tao/LF_Follower_Auto_Ptr.inl"
58 #endif /* __ACE_INLINE__ */
60 #include /**/ "ace/post.h"
62 #endif /* TAO_LF_FOLLOWER_AUTO_PTR_H */