void LayerTest::nextCallback(Object* sender) { auto s = new LayerTestScene(); s->addChild( nextAction() ); Director::getInstance()->replaceScene(s); s->release(); }
void NetworkTestScene::runThisTest() { sceneIdx = -1; addChild(nextAction()); CCDirector::sharedDirector()->replaceScene(this); }
void ShaderTestDemo::nextCallback(CCObject* pSender) { CCScene* s = new ShaderTestScene();//CCScene::create(); s->addChild( nextAction() ); CCDirector::sharedDirector()->replaceScene(s); s->release(); }
Action SMDPAgent::step(double reward, const State &state, std::ostream &output) { giveReward(reward, output); Action action = nextAction(state, output); applyAction(action, output); return action; }
Action SMDPAgent::startEpisode(const State &state, std::ostream &output) { initialize(output); Action action = nextAction(state, output); applyAction(action, output); return action; }
void SpriteDemo::nextCallback(CCObject* pSender) { CCScene* s = new ProgressActionsTestScene(); s->addChild( nextAction() ); CCDirector::sharedDirector()->replaceScene(s); s->release(); }
void ConfigurationTestScene::runThisTest() { sceneIdx = -1; addChild(nextAction()); Director::sharedDirector()->replaceScene(this); }
void BaseClippingNodeTest::nextCallback(CCObject* sender) { CCScene *s = new ClippingNodeTestScene(); s->addChild(nextAction()); CCDirector::sharedDirector()->replaceScene(s); s->release(); }
void UnitTestDemo::nextCallback(Ref* sender) { auto s = new UnitTestScene(); s->addChild( nextAction() ); Director::getInstance()->replaceScene(s); s->release(); }
void BaseClippingNodeTest::nextCallback(Ref* sender) { Scene *s = new ClippingNodeTestScene(); s->addChild(nextAction()); Director::getInstance()->replaceScene(s); s->release(); }
void ShaderTestDemo::nextCallback(Ref* sender) { auto s = new (std::nothrow) ShaderTestScene();//CCScene::create(); s->addChild( nextAction() ); Director::getInstance()->replaceScene(s); s->release(); }
///--------------------------------------- // // ShaderTestScene // ///--------------------------------------- void ShaderTestScene::runThisTest() { sceneIdx = -1; addChild(nextAction()); Director::getInstance()->replaceScene(this); }
void NetworkDemo::nextCallback(CCObject* pSender) { CCScene* s = new NetworkTestScene(); s->addChild( nextAction() ); CCDirector::sharedDirector()->replaceScene(s); s->release(); }
void ConfigurationBase::nextCallback(Object* pSender) { Scene* s = new ConfigurationTestScene(); s->addChild( nextAction() ); Director::sharedDirector()->replaceScene(s); s->release(); }
void ConfigurationBase::nextCallback(Object* sender) { auto s = new ConfigurationTestScene(); s->addChild( nextAction() ); Director::getInstance()->replaceScene(s); s->release(); }
void FileUtilsTestScene::runThisTest() { CCLayer* pLayer = nextAction(); addChild(pLayer); CCDirector::sharedDirector()->replaceScene(this); }
void FileUtilsDemo::nextCallback(CCObject* pSender) { CCScene* pScene = new FileUtilsTestScene(); CCLayer* pLayer = nextAction(); pScene->addChild(pLayer); CCDirector::sharedDirector()->replaceScene(pScene); pScene->release(); }
void XxxForm::createActions(void) { connect(statusTimer, SIGNAL(timeout()), this, SLOT(timerStatusAction())); connect(nextPushButton, SIGNAL(released()), this, SLOT(nextAction())); connect(previousPushButton, SIGNAL(released()), this, SLOT(previousAction())); connect(savePushButton, SIGNAL(released()), this, SLOT(saveAction())); connect(saveAndContinueSavingPushButton, SIGNAL(released()), this, SLOT( saveAndContinueSavingAction())); connect(removePushButton, SIGNAL(released()), this, SLOT(removeAction())); connect(cancelPushButton, SIGNAL(released()), this, SLOT(cancelAction())); }
void FontTest::nextCallback(CCObject* pSender) { showFont(nextAction()); }
void FontTest::nextCallback(Ref* sender) { showFont(nextAction()); }
void CupsAddSmb::slotReceived(TDEProcess*, char *buf, int buflen) { TQString line; int index(0); bool partial(false); static bool incomplete(false); kdDebug(500) << "slotReceived()" << endl; while (1) { // read a line line = TQString::fromLatin1(""); partial = true; while (index < buflen) { TQChar c(buf[index++]); if (c == '\n') { partial = false; break; } else if (c.isPrint()) line += c; } if (line.isEmpty()) { kdDebug(500) << "NOTHING TO READ" << endl; return; } kdDebug(500) << "ANSWER = " << line << " (END = " << line.length() << ")" << endl; if (!partial) { if (incomplete && m_buffer.count() > 0) m_buffer[m_buffer.size()-1].append(line); else m_buffer << line; incomplete = false; kdDebug(500) << "COMPLETE LINE READ (" << m_buffer.count() << ")" << endl; } else { if (line.startsWith("smb:") || line.startsWith("rpcclient $")) { kdDebug(500) << "END OF ACTION" << endl; checkActionStatus(); if (m_status) nextAction(); else { // quit program kdDebug(500) << "EXITING PROGRAM..." << endl; m_proc.writeStdin("quit\n", 5); kdDebug(500) << "SENT" << endl; } return; } else { if (incomplete && m_buffer.count() > 0) m_buffer[m_buffer.size()-1].append(line); else m_buffer << line; incomplete = true; kdDebug(500) << "INCOMPLETE LINE READ (" << m_buffer.count() << ")" << endl; } } } }
void CCScheduler::processScheduledActions() { // Early out so we don't spam TRACE_EVENTS with useless processScheduledActions. if (nextAction() == CCSchedulerStateMachine::ACTION_NONE) { m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); return; } // This function can re-enter itself. For example, draw may call // setNeedsCommit. Proceeed with caution. CCSchedulerStateMachine::Action action; do { action = nextAction(); m_stateMachine.updateState(action); TRACE_EVENT1("cc", "CCScheduler::processScheduledActions()", "action", action); switch (action) { case CCSchedulerStateMachine::ACTION_NONE: break; case CCSchedulerStateMachine::ACTION_BEGIN_FRAME: m_client->scheduledActionBeginFrame(); break; case CCSchedulerStateMachine::ACTION_BEGIN_UPDATE_MORE_RESOURCES: m_client->scheduledActionUpdateMoreResources(); if (!m_client->hasMoreResourceUpdates()) { // If we were just told to update resources, but there are no // more pending, then tell the state machine that the // beginUpdateMoreResources completed. If more are pending, // then we will ack the update at the next draw. m_updateMoreResourcesPending = false; m_stateMachine.beginUpdateMoreResourcesComplete(false); } else m_updateMoreResourcesPending = true; break; case CCSchedulerStateMachine::ACTION_COMMIT: m_client->scheduledActionCommit(); break; case CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE: { CCScheduledActionDrawAndSwapResult result = m_client->scheduledActionDrawAndSwapIfPossible(); m_stateMachine.didDrawIfPossibleCompleted(result.didDraw); if (result.didSwap) m_frameRateController->didBeginFrame(); break; } case CCSchedulerStateMachine::ACTION_DRAW_FORCED: { CCScheduledActionDrawAndSwapResult result = m_client->scheduledActionDrawAndSwapForced(); if (result.didSwap) m_frameRateController->didBeginFrame(); break; } case CCSchedulerStateMachine::ACTION_BEGIN_CONTEXT_RECREATION: m_client->scheduledActionBeginContextRecreation(); break; case CCSchedulerStateMachine::ACTION_ACQUIRE_LAYER_TEXTURES_FOR_MAIN_THREAD: m_client->scheduledActionAcquireLayerTexturesForMainThread(); break; } } while (action != CCSchedulerStateMachine::ACTION_NONE); // Activate or deactivate the frame rate controller. m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); }
void ProgressActionsTestScene::runThisTest() { addChild(nextAction()); CCDirector::sharedDirector()->replaceScene(this); }
void UITestScene::runThisTest() { auto layer = nextAction(); addChild(layer); Director::getInstance()->replaceScene(this); }