LOSE_DEF
List of: Discussion Topic
Subjects: Entity, Extending ACIS
Contents: Application Development Manual

LOSE_DEF defines the lose method, which is called to tell the system that the ENTITY is no longer part of the active model, but its data should be saved for use in a future roll back operation. It is the user-level destructor for an ENTITY. The actual destructor is declared as protected by UTILITY_DEF, so its use causes a compile time error.

Signature

void MY_ENTITY::lose()

Implementation

This must do whatever is required to lose dependent ENTITYs or otherwise cleanup. LOSE_DEF should always be followed by DTOR_DEF, which supplies a call to PARENT::lose as the last line of the preceding lose function.

The ENTITY could be restored via roll back, so one cannot yet delete non-ENTITY data that may be pointed to, unless it can be easily recalculated. For example, TEXT_ENTITY does not delete its string in the lose function because the information would be permanently lost. ENTITYs with boxes generally do delete the box, which can be recalculated on demand.
PDF/APPDEV/09ENT.PDF
HTM/DATA/ACIS/APPDEV/09ENT/0014.HTM