#include <entity_handle.hxx>


Public Member Functions | |
| ENTITY * | entity_ptr () |
Returns a pointer to the ENTITY associated with this handle. | |
| const ENTITY * | entity_ptr () const |
Returns a const pointer to the ENTITY associated with this handle. | |
| asm_model * | get_owning_model () const |
Returns a pointer to the asm_model which owns this handle. | |
| logical | is_valid () const |
| Returns a logical indicating whether the entity handle is bound to a live entity. | |
Role: An entity_handle class object serves as a proxy for an ENTITY object in the context of assembly mode. It is used to allow objects outside of the ENTITY's history stream to refer to the ENTITY without running the risk of de-referencing a pointer which has been made invalid by a roll operation on the ENTITY's history stream. An entity handle can be queried for a pointer to its corresponding ENTITY object; if the ENTITY has been lost or destructed the returned pointer value will be NULL, allowing client code to check for valid pointers.
An entity handle is owned by the asm_model object containing the ENTITY corresponding to the handle. Entity handle objects are use-counted by entity_handle_list and entity_handle_holder objects; an entity_handle is destroyed when a cleanup() routine is called on it when its use count is zero.
| const ENTITY* entity_handle::entity_ptr | ( | ) | const |
Returns a const pointer to the ENTITY associated with this handle.
| asm_model* entity_handle::get_owning_model | ( | ) | const |
Returns a pointer to the asm_model which owns this handle.
| logical entity_handle::is_valid | ( | ) | const |
Returns a logical indicating whether the entity handle is bound to a live entity.