sipxportlib  Version 3.3
UtlIntPtr.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2011 SIPez LLC. All rights reserved.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2006 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 
15 #ifndef _UtlIntPtr_h_
16 #define _UtlIntPtr_h_
17 
18 // SYSTEM INCLUDES
19 // APPLICATION INCLUDES
20 #include "utl/UtlDefs.h"
22 
23 // DEFINES
24 // MACROS
25 // EXTERNAL FUNCTIONS
26 // EXTERNAL VARIABLES
27 // CONSTANTS
28 // STRUCTS
29 // TYPEDEFS
30 // FORWARD DECLARATIONS
31 
36 {
37 /* //////////////////////////// PUBLIC //////////////////////////////////// */
38 public:
39  static const UtlContainableType TYPE ;
41 /* ============================ CREATORS ================================== */
42 
46  UtlIntPtr(intptr_t initialValue = 0) ;
47  UtlIntPtr(const UtlIntPtr& rhs) ;
48 
52  virtual ~UtlIntPtr();
53 
55 
56 /* ============================ OPERATORS ============================== */
57 
58  // Declare prefix and postfix increment operators.
59  UtlIntPtr& operator++(); // Prefix increment operator
60  UtlIntPtr operator++(int); // Postfix increment operator
61 
62  // Declare prefix and postfix decrement operators.
63  UtlIntPtr& operator--(); // Prefix decrement operator
64  UtlIntPtr operator--(int); // Postfix decrement operator
65 
66  UtlIntPtr& operator=(const UtlIntPtr& rhs); // assigment operator
67 
68  // Conversion to int
69  operator intptr_t() { return mValue; }
70 
71 /* ============================ MANIPULATORS ============================== */
72 
78  intptr_t setValue(intptr_t iValue) ;
79 
80 /* ============================ ACCESSORS ================================= */
81 
85  intptr_t getValue() const ;
86 
92  virtual unsigned hash() const ;
93 
97  virtual UtlContainableType getContainableType() const;
98 
99 /* ============================ INQUIRY =================================== */
100 
107  virtual int compareTo(UtlContainable const *) const ;
108 
113  virtual UtlBoolean isEqual(UtlContainable const *) const ;
114 
116  virtual UtlBoolean isInstanceOf(const UtlContainableType type) const;
117 
118 /* //////////////////////////// PROTECTED ///////////////////////////////// */
119 protected:
120 
121 /* //////////////////////////// PRIVATE /////////////////////////////////// */
122 private:
123  intptr_t mValue ;
124 
125 } ;
126 
127 /* ============================ INLINE METHODS ============================ */
128 
129 #endif // _UtlIntPtr_h_
UtlIntPtr & operator=(const UtlIntPtr &rhs)
Definition: UtlIntPtr.cpp:81
virtual int compareTo(UtlContainable const *) const
Definition: UtlIntPtr.cpp:123
static const UtlContainableType TYPE
Definition: UtlIntPtr.h:39
Definition: UtlCopyableContainable.h:43
virtual UtlBoolean isEqual(UtlContainable const *) const
Definition: UtlIntPtr.cpp:142
intptr_t getValue() const
Definition: UtlIntPtr.cpp:104
virtual UtlBoolean isInstanceOf(const UtlContainableType type) const
Determine if this object is a derivative of the specified UtlContainableType.
Definition: UtlIntPtr.cpp:147
const char *const UtlContainableType
Definition: UtlDefs.h:70
Definition: UtlContainable.h:37
virtual UtlContainableType getContainableType() const
Definition: UtlIntPtr.cpp:116
UtlIntPtr(intptr_t initialValue=0)
Definition: UtlIntPtr.cpp:33
UtlCopyableContainable * clone() const
Make an off the heap copy of this object.
Definition: UtlIntPtr.cpp:48
virtual unsigned hash() const
Definition: UtlIntPtr.cpp:110
intptr_t setValue(intptr_t iValue)
Definition: UtlIntPtr.cpp:94
int UtlBoolean
Definition: UtlDefs.h:41
UtlIntPtr & operator++()
Definition: UtlIntPtr.cpp:56
_W64 signed int intptr_t
Definition: stdint.h:118
Definition: UtlIntPtr.h:35
virtual ~UtlIntPtr()
Definition: UtlIntPtr.cpp:44
UtlIntPtr & operator--()
Definition: UtlIntPtr.cpp:69