summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/LWFT/Monitor_Manager.h
blob: aa7c24c722d3d5680921294f85c0290af09ee3f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// -*- C++ -*-

//=============================================================================
/**
 * @file Monitor_Manager.h
 *
 * $Id$
 *
 * @brief An auto ptr type class for Monitor_Base and its
 *        subclasses, which are all reference counted
 *
 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
 */
//=============================================================================

#ifndef MONITOR_MANAGER_H
#define MONITOR_MANAGER_H

#include /**/ "ace/pre.h"

#include "ace/Monitor_Base.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1)

ACE_BEGIN_VERSIONED_NAMESPACE_DECL

namespace ACE
{
  namespace Monitor_Control
  {
    class Monitor_Manager
    {
    public:
      Monitor_Manager (void);
      Monitor_Manager (Monitor_Base *);
      Monitor_Manager (const Monitor_Manager &);
      ~Monitor_Manager (void);
      
      Monitor_Manager & operator= (Monitor_Base *);
      Monitor_Manager & operator= (const Monitor_Manager &);
      Monitor_Base * operator-> (void) const;
      
      Monitor_Base * get (void) const;
      Monitor_Base * release (void);
      
    private:
      void free (void);
      void reset (Monitor_Base *);
      
    private:
      Monitor_Base * ptr_;
    };
  }
}

ACE_END_VERSIONED_NAMESPACE_DECL

#if defined (__ACE_INLINE__)
#include "Monitor_Manager.inl"
#endif /* __ACE_INLINE__ */

#endif // ACE_HAS_MONITOR_FRAMEWORK == 1

#include /**/ "ace/post.h"

#endif // MONITOR_MANAGER_H