PuzzleSDK
SchedulerRemoveAllFunctionsToBePerformedInCocosThread类 参考

#include <SchedulerTest.h>

+ 类 SchedulerRemoveAllFunctionsToBePerformedInCocosThread 继承关系图:
+ SchedulerRemoveAllFunctionsToBePerformedInCocosThread 的协作图:

Public 成员函数

 CREATE_FUNC (SchedulerRemoveAllFunctionsToBePerformedInCocosThread)
 
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
void onEnter () override
 
void onExit () override
 
void update (float dt) override
 
- Public 成员函数 继承自 TestCase
 TestCase ()
 
 ~TestCase ()
 
virtual Type getTestType () const
 
virtual float getDuration () const
 
virtual std::string getExpectedOutput () const
 
virtual std::string getActualOutput () const
 
virtual void restartTestCallback (cocos2d::Ref *sender)
 
virtual void nextTestCallback (cocos2d::Ref *sender)
 
virtual void priorTestCallback (cocos2d::Ref *sender)
 
virtual void onBackCallback (cocos2d::Ref *sender)
 
void setTestSuite (TestSuite *testSuite)
 
TestSuitegetTestSuite () const
 
float getRunTime () const
 
void setTestCaseName (const std::string &name)
 
std::string getTestCaseName () const
 
const cocos2d::Label * getSubtitleLable () const
 
const cocos2d::MenuItemImage * getRestartTestItem () const
 

Private 属性

cocos2d::Sprite * _sprite
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 
- Protected 属性 继承自 TestCase
cocos2d::MenuItemImage * _priorTestItem
 
cocos2d::MenuItemImage * _restartTestItem
 
cocos2d::MenuItemImage * _nextTestItem
 
cocos2d::Label * _titleLabel
 
cocos2d::Label * _subtitleLabel
 

详细描述

在文件 SchedulerTest.h363 行定义.

成员函数说明

◆ CREATE_FUNC()

SchedulerRemoveAllFunctionsToBePerformedInCocosThread::CREATE_FUNC ( SchedulerRemoveAllFunctionsToBePerformedInCocosThread  )

◆ onEnter()

void SchedulerRemoveAllFunctionsToBePerformedInCocosThread::onEnter ( )
overridevirtual

重载 TestCase .

在文件 SchedulerTest.cpp1240 行定义.

1241{
1243
1244 _sprite = Sprite::create("Images/grossinis_sister1.png");
1245 _sprite->setPosition(VisibleRect::center());
1246 this->addChild(_sprite);
1247 this->scheduleUpdate();
1248}
virtual void onEnter() override
Definition: BaseTest.cpp:430
static cocos2d::Vec2 center()
Definition: VisibleRect.cpp:69

引用了 _sprite, VisibleRect::center() , 以及 TestCase::onEnter().

+ 函数调用图:

◆ onExit()

void SchedulerRemoveAllFunctionsToBePerformedInCocosThread::onExit ( )
override

在文件 SchedulerTest.cpp1250 行定义.

1251{
1252 SchedulerTestLayer::onExit();
1253 this->unscheduleUpdate();
1254}

◆ subtitle()

std::string SchedulerRemoveAllFunctionsToBePerformedInCocosThread::subtitle ( ) const
overridevirtual

重载 TestCase .

在文件 SchedulerTest.cpp1281 行定义.

1282{
1283 return "Sprite should be visible";
1284}

◆ title()

std::string SchedulerRemoveAllFunctionsToBePerformedInCocosThread::title ( ) const
overridevirtual

重载 TestCase .

在文件 SchedulerTest.cpp1276 行定义.

1277{
1278 return "Removing pending main thread tasks";
1279}

◆ update()

void SchedulerRemoveAllFunctionsToBePerformedInCocosThread::update ( float  dt)
override

在文件 SchedulerTest.cpp1256 行定义.

1256 {
1257 Director::getInstance()->getScheduler()->performFunctionInCocosThread([this] () {
1258 _sprite->setVisible(false);
1259 });
1260 Director::getInstance()->getScheduler()->performFunctionInCocosThread([this] () {
1261 _sprite->setVisible(false);
1262 });
1263 Director::getInstance()->getScheduler()->performFunctionInCocosThread([this] () {
1264 _sprite->setVisible(false);
1265 });
1266 Director::getInstance()->getScheduler()->performFunctionInCocosThread([this] () {
1267 _sprite->setVisible(false);
1268 });
1269 Director::getInstance()->getScheduler()->performFunctionInCocosThread([this] () {
1270 _sprite->setVisible(false);
1271 });
1272 if(!TestController::getInstance()->isAutoTestRunning())
1273 Director::getInstance()->getScheduler()->removeAllFunctionsToBePerformedInCocosThread();
1274}
static TestController * getInstance()
Definition: controller.cpp:458

引用了 _sprite , 以及 TestController::getInstance().

+ 函数调用图:

类成员变量说明

◆ _sprite

cocos2d::Sprite* SchedulerRemoveAllFunctionsToBePerformedInCocosThread::_sprite
private

在文件 SchedulerTest.h375 行定义.

被这些函数引用 onEnter() , 以及 update().


该类的文档由以下文件生成: