Exemplo n.º 1
0
//------------------------------------------------------------------------------
// updateTC() -- Update time critical stuff here
//------------------------------------------------------------------------------
void Component::updateTC(const double dt)
{
    // Update all my children
    PairStream* subcomponents = getComponents();
    if (subcomponents != nullptr) {
        if (selection != nullptr) {
            // When we've selected only one
            if (selected != nullptr) selected->tcFrame(dt);
        }
        else {
            // When we should update them all
            List::Item* item = subcomponents->getFirstItem();
            while (item != nullptr) {
                const auto pair = static_cast<Pair*>(item->getValue());
                const auto obj = static_cast<Component*>( pair->object() );
                obj->tcFrame(dt);
                item = item->getNext();
            }
        }
        subcomponents->unref();
        subcomponents = nullptr;
    }
}
Exemplo n.º 2
0
//------------------------------------------------------------------------------
// processTimeCriticalTasks() -- Process T/C tasks
//------------------------------------------------------------------------------
void Station::processTimeCriticalTasks(const LCreal dt)
{
   for (unsigned int jj = 0; jj < getFastForwardRate(); jj++) {
      tcFrame( dt );
   }
}