Phil [10-2-2013]: Typical iteration over controllers for the purpose of calling SimObj::getSlotsInUse (cwDlist& slotsInUse, RunType). //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Show slots for all of these controllers RunType allControllers[] = { RT_SIMULATION, RT_OPT, RT_RULEBASED, RT_ACCOUNTING, RT_SIM_ACCOUNTING, RT_RULE_ACCOUNTING }; const int ctrlCnt (sizeof(allControllers) / sizeof(allControllers[0])); for (int inx = 0; inx < ctrlCnt; ++inx) { cwDlist currSlotList; const RunType ctlType = allControllers [inx]; refObj->getSlotsInUse (currSlotList, ctlType); ... } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- Note that the above doesn't include RT_MRM. (That may be OK, but how does a programmer know that?). typedef enum { RT_UNKNOWN=-1, RT_SIMULATION=0, RT_OLD_OPT=1, RT_RULEBASED=2, RT_MRM=3, RT_ACCOUNTING=4, RT_SIM_ACCOUNTING=5, RT_RULE_ACCOUNTING=6, RT_OPT=7 } RunType; //----------------------------------------------------------------------------- //-----------------------------------------------------------------------------