sipxportlib
Version 3.3
|
#include <UtlContainableAtomic.h>
Public Member Functions | |
virtual unsigned | hash () const |
Calculate a hash code for this object. More... | |
virtual int | compareTo (UtlContainable const *) const |
Compare this object to another object. More... | |
Public Member Functions inherited from UtlContainable | |
virtual | ~UtlContainable () |
virtual UtlContainableType | getContainableType () const =0 |
unsigned | directHash () const |
Provides a hash function that uses the object pointer as the hash value. More... | |
virtual UtlBoolean | isEqual (UtlContainable const *) const |
Test this object to another object for equality. More... | |
virtual UtlBoolean | isInstanceOf (const UtlContainableType type) const |
Determine if this object is a derivative of the specified UtlContainableType. More... | |
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... | |
Static Public Attributes inherited from UtlContainable | |
static const UtlContainableType | TYPE = "UtlContainable" |
UtlContainableAtomic is a virtual subclass of UtlContainable that is suitable as a base class for objects that need to be containable, but are not otherwise "data items" that can be compared. A notable feature is that any two UtlContainableAtomic objects are considered equal only if they are the same (their pointers are equal). Comparison between objects in UtlContainableAtomic and its subclasses provides a consistent (albeit arbitrary) linear ordering.
A subclass of UtlContainableAtomic only needs to define subclass::getContainableType() and subclass::TYPE, the remaining necessary methods can be inherited from UtlContainableAtomic.
|
virtual |
Calculate a hash code for this object.
Get hash of object.
Returns a hash of the pointer to the object.
Implements UtlContainable.
|
virtual |
Compare this object to another object.
For all members of subclasses of UtlContainableAtomic, compareTo provides a consistent linear ordering. A copy of an object is never equal to the original.
Implements UtlContainable.