Synopsis

PDX_MSGT mda_CycleEntityList(MDA_ENTITY_LIST *list, int thread, MDA_PTR *db_ptr)

Purpose

Obtain the next entity in an entity list.

Description

Each successive call will return the next entity in the specified entity list. The list can be reset to its top by calling mda_ResetEntityList. If an entity is added or deleted between calls to mda_CycleEntityList, the thread will be automatically reset. When there are no more entities in the list, db_ptr will be set to MDA_NULL_PTR. Multiple lists and threads within a list can be cycled at the same time (i.e. calls to mda_CycleEntityList can be nested).

Input

list

The entity list to be cycled

thread

The thread to be cycled

Output

db_ptr

Next pointer in list or MDA_NULL_PTR if end of list

Return

MDA error code, MDA_END_OF_LIST will be returned when at the end of the entity list.