Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ace / Monitor_Control / Bytes_Received_Monitor.h
blobde3158513d36ca3247222bdf6c1b79758e95f0ba
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Bytes_Received_Monitor.h
7 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
8 */
9 //=============================================================================
11 #ifndef BYTES_RECEIVED_MONITOR_H
12 #define BYTES_RECEIVED_MONITOR_H
14 #include /**/ "ace/pre.h"
16 #include "ace/Monitor_Base.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1)
24 #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H)
25 #include "ace/Monitor_Control/Windows_Multi_Instance_Monitor.h"
26 #elif defined (ACE_LINUX)
27 #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h"
28 #elif defined (__FreeBSD__) || defined (__Lynx__)
29 #include "ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h"
30 #elif defined (__NetBSD__) || defined (__OpenBSD__)
31 #include "ace/Monitor_Control/BSD_Network_Interface_Monitor.h"
32 #else
33 #include "ace/Monitor_Control/Null_Network_Interface_Monitor.h"
34 #endif
36 #include "ace/Monitor_Control/Monitor_Control_export.h"
38 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
40 namespace ACE
42 namespace Monitor_Control
44 /**
45 * @class Bytes_Received_Monitor
47 * @brief Monitors total bytes received over all network interfaces.
49 class MONITOR_CONTROL_Export Bytes_Received_Monitor
50 : public Monitor_Base
51 #if defined (ACE_HAS_WIN32_PDH)
52 , public Windows_Multi_Instance_Monitor
53 #elif defined (ACE_LINUX)
54 , public Linux_Network_Interface_Monitor
55 #elif defined (__NetBSD__) || defined (__OpenBSD__)
56 , public BSD_Network_Interface_Monitor
57 #elif defined (__FreeBSD__) || defined (__Lynx__)
58 , public FreeBSD_Network_Interface_Monitor
59 #else
60 , public Null_Network_Interface_Monitor
61 #endif
63 public:
64 Bytes_Received_Monitor (const char* name);
66 /// Implementation of the pure virtual method.
67 virtual void update ();
69 /// Stores the default name, used if none is supplied by the user.
70 static const char* default_name ();
72 private:
73 /// Overridden reset, calls platform-specific reset.
74 virtual void clear_i ();
76 private:
77 static const char* default_name_;
82 ACE_END_VERSIONED_NAMESPACE_DECL
84 #endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */
86 #include /**/ "ace/post.h"
88 #endif // BYTES_RECEIVED_MONITOR_H