sipxportlib
Version 3.3
|
#include <UtlCopyableContainable.h>
Public Member Functions | |
virtual UtlCopyableContainable * | clone () const =0 |
Make an off the heap copy of this object. More... | |
UtlCopyableContainable () | |
virtual | ~UtlCopyableContainable () |
virtual UtlContainableType | getContainableType () 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 UtlContainable | |
virtual | ~UtlContainable () |
virtual unsigned | hash () const =0 |
Calculate a hash code for this object. More... | |
unsigned | directHash () const |
Provides a hash function that uses the object pointer as the hash value. More... | |
virtual int | compareTo (UtlContainable const *) const =0 |
Compare this object to another object. More... | |
virtual UtlBoolean | isEqual (UtlContainable const *) const |
Test this object to another object for equality. More... | |
Static Public Attributes | |
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... | |
UtlCopyableContainable is a containable that must implement a clone method, that is used by UtlCopyableSList in order to assign/copy list elements on list copy.
Derived classes should also implement a copy constructor and an equals operator.
Sample clone implementation: SampleClass* clone() const { return new SampleClass(*this); }
|
virtual |
|
pure virtual |
|
virtual |
Get the ContainableType for a UtlContainable-derived class.
Implements UtlContainable.
|
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) { ... }
Reimplemented from UtlContainable.
|
static |