# SUBSYSTEM OVERVIEW

Object Stack Manager (OSM) Subsystem

The OSM subsystem is used to maintain stacks of objects. The objects may be a single data type or a structure of many data types. The objects will be stored by the last-in-first-out method. Most of the stack manager routines are macros of list manager functions.

# USAGE

To use the object stack manager you must first create a stack by executing osm_CreateStack. After a stack has been created, objects may be added to the stack with osm_AddObject. Objects may be removed from a stack with osm_RemoveObject or all objects may be removed with osm_RemoveAll. The current object may be retrieved with osm_GetObject. The stack may be cycled using osm_CycleStack to get the object pointers one at a time. The mpm_LastError function should be used after cycling, since an error and the end of a stack both return a NULL pointer. A new stack may be created with osm_CopyStack. The osm_CopyStack function makes a duplicate copy of the specified stack and all its objects. When finished with the stack, osm_DeleteStack should be called to free all memory associated with the stack.