previous chapter contents page top page next chapter


HasMoving

March 15, 1996

mixes in with Viewable;

Class Description

Magic Cap sometimes moves objects in memory in order to maximize the amount of contiguous free space available for objects. References to objects made with object IDs are automatically kept valid, but some rare kinds of objects need to perform some action before being moved in memory. Magic Cap defines mixin class HasMoving for objects that must be notified before being moved.

Programming information

Instantiate: never
Subclass: rarely
Call its methods: never

You might mixin class HasMoving if your objects need to be notified before moving in memory. Classes that require this kind of notification are rare.

Methods defined by class HasMoving

Class HasMoving defines the following methods:

Method Description
Moving Called by Magic Cap when the object is about to be moved.

Fields defined by class HasMoving

Class HasMoving defines no fields.

Method Descriptions

Moving

operation Moving(deltaPtr: Signed)
Call: rarely
Override: always

Magic Cap calls Moving when the object is about to be moved in memory. You should override Moving to perform whatever action you desire before the object is moved.