sipxportlib  Version 3.3
Public Member Functions | Static Public Attributes | List of all members
UtlIntPtr Class Reference

#include <UtlIntPtr.h>

Inheritance diagram for UtlIntPtr:
Inheritance graph
[legend]
Collaboration diagram for UtlIntPtr:
Collaboration graph
[legend]

Public Member Functions

 UtlIntPtr (intptr_t initialValue=0)
 
 UtlIntPtr (const UtlIntPtr &rhs)
 
virtual ~UtlIntPtr ()
 
UtlCopyableContainableclone () const
 Make an off the heap copy of this object. More...
 
UtlIntPtroperator++ ()
 
UtlIntPtr operator++ (int)
 
UtlIntPtroperator-- ()
 
UtlIntPtr operator-- (int)
 
UtlIntPtroperator= (const UtlIntPtr &rhs)
 
 operator intptr_t ()
 
intptr_t setValue (intptr_t iValue)
 
intptr_t getValue () const
 
virtual unsigned hash () const
 
virtual UtlContainableType getContainableType () const
 
virtual int compareTo (UtlContainable const *) const
 
virtual UtlBoolean isEqual (UtlContainable const *) const
 
virtual UtlBoolean isInstanceOf (const UtlContainableType type) const
 Determine if this object is a derivative of the specified UtlContainableType. More...
 
- Public Member Functions inherited from UtlCopyableContainable
 UtlCopyableContainable ()
 
virtual ~UtlCopyableContainable ()
 
- Public Member Functions inherited from UtlContainable
virtual ~UtlContainable ()
 
unsigned directHash () const
 Provides a hash function that uses the object pointer as the hash value. More...
 

Static Public Attributes

static const UtlContainableType TYPE = "UtlIntPtr"
 
- Static Public Attributes inherited from UtlCopyableContainable
static const UtlContainableType TYPE = "UtlCopyableContainable"
 
- Static Public Attributes inherited from UtlContainable
static const UtlContainableType TYPE = "UtlContainable"
 

Additional Inherited Members

- Static Public Member Functions inherited from UtlContainable
static unsigned stringHash (char const *value)
 Provides a hash function appropriate for null-terminated string values. More...
 
static UtlBoolean areSameTypes (const UtlContainableType type1, const UtlContainableType type2)
 Are UtlContainable types the same. More...
 

Detailed Description

UtlIntPtr is a UtlContainable wrapper for an intptr_t.

Constructor & Destructor Documentation

UtlIntPtr ( intptr_t  initialValue = 0)

< Class type used for runtime checking Constructor accepting an optional default value.

UtlIntPtr ( const UtlIntPtr rhs)
~UtlIntPtr ( )
virtual

Destructor

Member Function Documentation

UtlCopyableContainable * clone ( ) const
virtual

Make an off the heap copy of this object.

< Class type used for runtime checking

Implements UtlCopyableContainable.

UtlIntPtr & operator++ ( )
UtlIntPtr operator++ ( int  )
UtlIntPtr & operator-- ( )
UtlIntPtr operator-- ( int  )
UtlIntPtr & operator= ( const UtlIntPtr rhs)
operator intptr_t ( )
inline
intptr_t setValue ( intptr_t  iValue)

Set a new int value for this object.

Returns
the old value
intptr_t getValue ( ) const

Get the int wrapped by this object.

unsigned hash ( ) const
virtual

Calculate a unique hash code for this object. If the equals operator returns true for another object, then both of those objects must return the same hashcode.

Implements UtlContainable.

UtlContainableType getContainableType ( ) const
virtual

Get the ContainableType for a UtlContainable derived class.

Reimplemented from UtlCopyableContainable.

int compareTo ( UtlContainable const *  inVal) const
virtual

Compare this object to another like-object. Results for comparing to a non-like object are undefined.

Returns
0 if equal, < 0 if less then and >0 if greater.

Implements UtlContainable.

UtlBoolean isEqual ( UtlContainable const *  inVal) const
virtual

Test this object to another like-object for equality. This method returns false if unlike-objects are specified.

Reimplemented from UtlContainable.

UtlBoolean isInstanceOf ( const UtlContainableType  type) const
virtual

Determine if this object is a derivative of the specified UtlContainableType.

Determine if this object is an instance of the designated runtime class identifer or one of its derivatives. For example:

if (pMyObject->isInstanceOf(UtlInt::TYPE))
{
    ...
}

If you want to determine if this object is exactly the same type as the given type (i.e. not a deriviative) use the following:

if(myObject->getContainableType() == UtlInt::TYPE)
{
    ...
}
Returns
TRUE/FALSE if this object is of the given type or a derivative of the given type.

Reimplemented from UtlCopyableContainable.

Member Data Documentation

UtlContainableType TYPE = "UtlIntPtr"
static