This reference page is linked to from the following overview topics: About SmartHandle, About RenderItem.
#include <SmartHandle.h>
This is the base wrapper class for all graphics primitive classes in max viewport: worlds, nodes, render items, materials, etc.
It contains internal graphics object pointer and holds a reference to that pointer. It will release its reference to graphics object in its destructor.
Note this is not for generic smart handle use.
Public Member Functions |
|
| virtual GraphicsDriverAPI | ~SmartHandle () |
| destructor |
|
| GraphicsDriverAPI bool | IsValid () const |
| Check if this handle is valid. |
|
| GraphicsDriverAPI void | Release () |
| Release the underlying graphics objects.
|
|
| GraphicsDriverAPI Identifier | GetObjectID () const |
| Get the underlying graphics object id.
|
|
| GraphicsDriverAPI void | SetPointer (void *pObject) |
| GraphicsDriverAPI void * | GetPointer () const |
| Get the underlying graphics object pointer.
|
|
| bool | operator== (const SmartHandle &rhs) const |
| bool | operator!= (const SmartHandle &rhs) const |
| bool | operator< (const SmartHandle &rhs) const |
| bool | operator<= (const SmartHandle &rhs) const |
| bool | operator> (const SmartHandle &rhs) const |
| bool | operator>= (const SmartHandle &rhs) const |
Protected Member Functions |
|
| GraphicsDriverAPI | SmartHandle () |
Protected Attributes |
|
| void * | mpObject |
| virtual GraphicsDriverAPI ~SmartHandle | ( | ) | [virtual] |
destructor
| GraphicsDriverAPI SmartHandle | ( | ) | [protected] |
| GraphicsDriverAPI bool IsValid | ( | ) | const |
Check if this handle is valid.
User should never call member functions of an invalid handle.
| GraphicsDriverAPI void Release | ( | ) |
Release the underlying graphics objects.
After calling this function, any function of the same SmartHandle instance should not be used.
| GraphicsDriverAPI Identifier GetObjectID | ( | ) | const |
Get the underlying graphics object id.
This function is internally used only.
| GraphicsDriverAPI void SetPointer | ( | void * | pObject | ) |
| GraphicsDriverAPI void* GetPointer | ( | ) | const |
Get the underlying graphics object pointer.
This function is internally used only.
| bool operator== | ( | const SmartHandle & | rhs | ) | const [inline] |
{
return mpObject == rhs.mpObject;
}
| bool operator!= | ( | const SmartHandle & | rhs | ) | const [inline] |
{
return mpObject != rhs.mpObject;
}
| bool operator< | ( | const SmartHandle & | rhs | ) | const [inline] |
{
return mpObject < rhs.mpObject;
}
| bool operator<= | ( | const SmartHandle & | rhs | ) | const [inline] |
{
return mpObject <= rhs.mpObject;
}
| bool operator> | ( | const SmartHandle & | rhs | ) | const [inline] |
{
return mpObject > rhs.mpObject;
}
| bool operator>= | ( | const SmartHandle & | rhs | ) | const [inline] |
{
return mpObject >= rhs.mpObject;
}
void*
mpObject [protected] |