Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Monitor_Control / Windows_Monitor.h
blobdb3f7e326508dd8bfa74d0a5d21ec1ce5d09e1b5
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Windows_Monitor.h
7 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
8 */
9 //=============================================================================
11 #ifndef WINDOWS_MONITOR_H
12 #define WINDOWS_MONITOR_H
14 #include /**/ "ace/pre.h"
16 #include "ace/SString.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/os_include/os_pdh.h"
24 #include "ace/Monitor_Control/Monitor_Control_export.h"
26 #if defined (ACE_HAS_WIN32_PDH)
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 namespace ACE
32 namespace Monitor_Control
34 /**
35 * @class Windows_Monitor
37 * @brief Mixin class for concrete monitors compiled on Windows machines.
39 class MONITOR_CONTROL_Export Windows_Monitor
41 friend class Windows_Multi_Instance_Monitor;
43 protected:
44 Windows_Monitor (const ACE_TCHAR *path);
46 /// Platform-specific implementation.
47 void update_i ();
49 /// Platform-specific reset.
50 void clear_impl ();
52 protected:
53 double value_;
55 private:
56 /// Code common to constructor and clear_impl().
57 void init ();
59 /// Make these persistent as members so they don't have to be
60 /// created & destroyed with each update.
61 private:
62 ACE_TString path_;
63 HQUERY query_;
64 HCOUNTER counter_;
65 PDH_STATUS status_;
70 ACE_END_VERSIONED_NAMESPACE_DECL
72 #include /**/ "ace/post.h"
74 #endif /* defined (ACE_HAS_WIN32_PDH) */
76 #endif // WINDOWS_MONITOR_H