Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ASNMP / asnmp / gauge.h
blob3e5a87fc02e7d93ce3d594e6fae8b2c849aeecd4
1 /* -*-C++-*- */
2 #ifndef GAUGE_
3 #define GAUGE_
4 //=============================================================================
5 /**
6 * @file gauge.h
8 * Class definition for SMI Gauge32 class.
9 * This class currently does not behave as defined by the abstract model
10 * in RFC 1155 section 3.2.3.4 (ie the value doesn't latch on the max value)
12 * @author Peter E Mellquist
14 //=============================================================================
16 /*===================================================================
17 Copyright (c) 1996
18 Hewlett-Packard Company
20 ATTENTION: USE OF THIS SOFTWARE IS SUBJECT TO THE FOLLOWING TERMS.
21 Permission to use, copy, modify, distribute and/or sell this software
22 and/or its documentation is hereby granted without fee. User agrees
23 to display the above copyright notice and this license notice in all
24 copies of the software and any documentation of the software. User
25 agrees to assume all liability for the use of the software; Hewlett-Packard
26 makes no representations about the suitability of this software for any
27 purpose. It is provided "AS-IS without warranty of any kind,either express
28 or implied. User hereby grants a royalty-free license to any and all
29 derivatives based upon this software code base.
30 =====================================================================*/
32 #include "asnmp/integer.h"
34 //------------[ Gauge32 Class ]------------------------------------------
35 // The gauge class allows all the functionality of unsigned
36 // integers but is recognized as a distinct SMI type. Gauge32
37 // objects may be set or get into Vb objects.
40 /**
41 * @class Gauge32:
43 * @brief Define RFC1902 Gauge datatype from RFC 1155 section 3.2.3.4
44 * Note that this datatype does not behave exactly (acts like a long)
46 class ASNMP_Export Gauge32: public SnmpUInt32
48 public:
49 /// constructor with a value
50 explicit Gauge32( const unsigned long i = 0);
52 /// copy constructor
53 Gauge32 ( const Gauge32 &g);
55 /// destructor for a Gauge32 (ensure that Value::~Value() is overridden)
56 ~Gauge32();
58 /// syntax type
59 SmiUINT32 get_syntax();
61 /// create a new instance of this Value
62 SnmpSyntax *clone() const;
64 /// overloaded assignment
65 Gauge32& operator=( const Gauge32 &uli);
67 /// overloaded assignment
68 Gauge32& operator=( const unsigned long i);
70 /// otherwise, behave like an unsigned int
71 operator unsigned long();
73 /// copy an instance of this Value
74 SnmpSyntax& operator=( SnmpSyntax &val);
76 #endif //GAUGE_