libHSPlasma
|
Describes and points to an hsKeyedObject. More...
#include <plKey.hpp>
Classes | |
struct | _ref |
Public Member Functions | |
plKey () | |
plKey (const plKey &init) | |
plKey (plKeyData *init) | |
virtual | ~plKey () |
plKeyData & | operator* () const |
plKeyData * | operator-> () const |
operator plKeyData * () const | |
virtual plKey & | operator= (const plKey &other) |
virtual plKey & | operator= (plKeyData *other) |
bool | operator== (const plKey &other) const |
bool | operator== (const plKeyData *other) const |
bool | operator!= (const plKey &other) const |
bool | operator!= (const plKeyData *other) const |
bool | operator< (const plKey &other) const |
bool | Exists () const |
bool | isLoaded () const |
plKey () | |
~plKey () |
Static Public Member Functions | |
static plKey< kobj_type > | Create () |
Describes and points to an hsKeyedObject.
This is actually just a ref-counted wrapper for plKeyData. However, you should never use plKeyData directly, but rather use plKey to hold references to plKeyData objects. The overloaded operators in plKey allow you to use it as though it were the plKeyData object, so you should generally just think of plKeyData's members as being plKey's members, with the addition of Exists() and isLoaded(), which are direct members of the plKey container.
plKey< kobj_type >::plKey | ( | const plKey< kobj_type > & | init | ) |
Copy constructor
Copy constructor for plKeyData pointers. Usually you won't ever need to use this directly; it's mostly here for internal use by the plResManager.
Removes a reference to the key. When there are no more references to the key data, the plKeyData pointer will be deleted. The object it references, however, will NOT be automatically deleted. Unless the object is stored in the plResManager, you will need to delete the object yourself. However, if the object is registered with the plResManager, you should not delete the object.
|
static |
bool plKey< kobj_type >::Exists | ( | ) | const |
Tests to see if the key refers to an object (not NULL key). This will return false for empty keys, so it should be checked any place where an empty key can be specified.
bool plKey< kobj_type >::isLoaded | ( | ) | const |
Returns whether the object referenced by the key is currently loaded by the plResManager.
NOTE: For empty keys (Exists() == false), this will always return true!
Allows for typecasts to plKeyData* pointers.
bool plKey< kobj_type >::operator!= | ( | const plKey< kobj_type > & | other | ) | const |
Returns true if the keys point to different plKeyData structures
bool plKey< kobj_type >::operator!= | ( | const plKeyData * | other | ) | const |
Returns true if this key's plKeyData is NOT 'other'
Allows for *(plKey) usage as a pointer.
Allows for (plKey)->member usage as a pointer.
bool plKey< kobj_type >::operator< | ( | const plKey< kobj_type > & | other | ) | const |
Provides sorting functionality for STL containers
|
virtual |
Copies and refs the key data in other
|
virtual |
Refs the key data and stores it in this key
bool plKey< kobj_type >::operator== | ( | const plKey< kobj_type > & | other | ) | const |
Returns true if the keys point to the same plKeyData
bool plKey< kobj_type >::operator== | ( | const plKeyData * | other | ) | const |
Returns true if this key's plKeyData is 'other'