summaryrefslogtreecommitdiff
path: root/ASNMP/asnmp/timetick.h
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-08-04 08:25:27 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-08-04 08:25:27 +0000
commit93b4311ec91b2d008ecc3a26200e4a44481494e8 (patch)
treec8f6ac63d26985c0b40ef84e7611871cfffb0b4b /ASNMP/asnmp/timetick.h
parent95433e3dbe5d6d6fc4ba640a14d290b609b90a73 (diff)
downloadATCD-93b4311ec91b2d008ecc3a26200e4a44481494e8.tar.gz
*** empty log message ***
Diffstat (limited to 'ASNMP/asnmp/timetick.h')
-rw-r--r--ASNMP/asnmp/timetick.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/ASNMP/asnmp/timetick.h b/ASNMP/asnmp/timetick.h
new file mode 100644
index 00000000000..0d9b9b9f171
--- /dev/null
+++ b/ASNMP/asnmp/timetick.h
@@ -0,0 +1,84 @@
+/* -*-C++-*- */
+#ifndef TIMETICKS_
+#define TIMETICKS_
+// ============================================================================
+//
+// = LIBRARY
+// asnmp
+//
+// = FILENAME
+// timetick.h
+//
+// = DESCRIPTION
+// Class definition for SMI Timeticks class.
+//
+// = AUTHOR
+// Michael R. MacFaden <mrm@cisco.com>
+//
+// ============================================================================
+/*===================================================================
+ Copyright (c) 1996
+ Hewlett-Packard Company
+
+ ATTENTION: USE OF THIS SOFTWARE IS SUBJECT TO THE FOLLOWING TERMS.
+ Permission to use, copy, modify, distribute and/or sell this software
+ and/or its documentation is hereby granted without fee. User agrees
+ to display the above copyright notice and this license notice in all
+ copies of the software and any documentation of the software. User
+ agrees to assume all liability for the use of the software; Hewlett-Packard
+ makes no representations about the suitability of this software for any
+ purpose. It is provided "AS-IS without warranty of any kind,either express
+ or implied. User hereby grants a royalty-free license to any and all
+ derivatives based upon this software code base.
+=====================================================================*/
+
+#include "asnmp/integer.h"
+
+#define TICKOUTBUF 30 // max formatted time string
+
+//------------[ TimeTicks Class ]-----------------------------------
+// The timeticks class allows all the functionality of unsigned
+// integers but is recognized as a distinct SMI type. TimeTicks
+// objects may be get or set into Vb objects.
+//
+class ACE_Export TimeTicks: public SnmpUInt32
+ // = TITLE
+ // Define RFC1155 TimeTicks Data object
+
+{
+
+ public:
+ TimeTicks( const unsigned long i = 0);
+
+ TimeTicks( const TimeTicks &t);
+ // copy constructor
+
+ ~TimeTicks();
+ // destructor
+
+ SmiUINT32 get_syntax();
+ // syntax type
+
+ char *to_string();
+ // get a printable ASCII value
+
+ SnmpSyntax *clone() const;
+ // create a new instance of this Value
+
+ SnmpSyntax& operator=(SnmpSyntax &val);
+ // copy an instance of this Value
+
+ TimeTicks& operator=( const TimeTicks &uli);
+ // overloaded assignment
+
+ TimeTicks& operator=( const unsigned long int i);
+ // overloaded assignment
+
+ operator unsigned long();
+ // otherwise, behave like an unsigned long
+
+ protected:
+ char output_buffer[TICKOUTBUF];
+ // for storing printed form
+};
+#endif // TIMETICKS_