//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- QList SimObj::getSlotsInUseAllControllers() const { const char* mname ("SimObj::getSlotsInUseAllControllers"); const int slotCnt = numSlots(); const int proxCnt = numSlotProxies(); static int notVisCnt (0); // diag QSet visitedSlots; QList retSlotList; visitedSlots .reserve (std::max (slotCnt, proxCnt) + 10); retSlotList .reserve (std::max (slotCnt, proxCnt) + 1); // 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]; getSlotsInUseNoCache (currSlotList, ctlType); // Find the union of the currSlotList and the union slot list cwIterator iter; FORALL (iter, currSlotList) { Slot* slotPtr = currSlotList.elem (iter); if ((slotPtr == NULL) || visitedSlots.contains (slotPtr)) continue; //------------------------------------------------------------ if (slotPtr->isVisible()) { visitedSlots.insert (slotPtr); retSlotList.append (slotPtr); } else { // Diagnostics. "In Use" slots with "isVisible" off. ++notVisCnt; // std::cout << mname << " [not vis " << notVisCnt << "] " // << qPrintable (slotPtr->getCompleteName()) // << std::endl; } } } return (retSlotList); }