PuzzleSDK
ScheduleCallbackTest类 参考

#include <SchedulerTest.h>

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

Public 成员函数

 CREATE_FUNC (ScheduleCallbackTest)
 
 ~ScheduleCallbackTest ()
 
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
void onEnter () override
 
void callback (float dt)
 
- 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
 

额外继承的成员函数

- 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.h321 行定义.

构造及析构函数说明

◆ ~ScheduleCallbackTest()

ScheduleCallbackTest::~ScheduleCallbackTest ( )

在文件 SchedulerTest.cpp1130 行定义.

1131{
1132
1133}

成员函数说明

◆ callback()

void ScheduleCallbackTest::callback ( float  dt)

在文件 SchedulerTest.cpp1167 行定义.

1168{
1169 log("In the callback of schedule(CC_CALLBACK_1(XXX::member_function), this), this, ...), dt = %f", dt);
1170}

被这些函数引用 onEnter().

+ 这是这个函数的调用关系图:

◆ CREATE_FUNC()

ScheduleCallbackTest::CREATE_FUNC ( ScheduleCallbackTest  )

◆ onEnter()

void ScheduleCallbackTest::onEnter ( )
overridevirtual

重载 TestCase .

在文件 SchedulerTest.cpp1154 行定义.

1155{
1157
1158 _scheduler->schedule([](float dt){
1159 log("In the callback of schedule(lambda, ...), dt = %f", dt);
1160 }, this, 1.0f, false, "lambda");
1161
1162 _scheduler->schedule(CC_CALLBACK_1(ScheduleCallbackTest::callback, this), this, 1.0f, false, "member_function");
1163
1164 _scheduler->schedule(ScheduleCallbackTest_global_callback, this, 1.0f, false, "global_function");
1165}
static void ScheduleCallbackTest_global_callback(float dt)
void callback(float dt)
virtual void onEnter() override
Definition: BaseTest.cpp:430

引用了 callback(), TestCase::onEnter() , 以及 ScheduleCallbackTest_global_callback().

+ 函数调用图:

◆ subtitle()

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

重载 TestCase .

在文件 SchedulerTest.cpp1140 行定义.

1141{
1142 return "\n\n\n\nPlease see console.\n\
1143schedule(lambda, ...)\n\
1144schedule(CC_CALLBACK_1(XXX::member_function), this), this, ...)\n\
1145schedule(global_function, ...)\n\
1146";
1147}

◆ title()

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

重载 TestCase .

在文件 SchedulerTest.cpp1135 行定义.

1136{
1137 return "ScheduleCallbackTest";
1138}

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