Home

entity_handle Class Reference
[Entity Operations]

Assembly modeling proxy for an ENTITY object. More...

#include <entity_handle.hxx>

Inheritance diagram for entity_handle:

Inheritance graph
[legend]
Collaboration diagram for entity_handle:

Collaboration graph
[legend]

List of all members.

Public Member Functions

ENTITYentity_ptr ()
 Returns a pointer to the ENTITY associated with this handle.
const ENTITYentity_ptr () const
 Returns a const pointer to the ENTITY associated with this handle.
asm_modelget_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.


Detailed Description

Assembly modeling proxy for an ENTITY object.

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.

See also:
entity_handle_list, entity_handle_holder

Member Function Documentation

ENTITY* entity_handle::entity_ptr (  ) 

Returns a pointer to the ENTITY associated with this handle.

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.