PuzzleSDK
SchedulerUpdate类 参考

#include <SchedulerTest.h>

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

Public 成员函数

 CREATE_FUNC (SchedulerUpdate)
 
virtual void onEnter () override
 
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
void removeUpdates (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.h182 行定义.

成员函数说明

◆ CREATE_FUNC()

SchedulerUpdate::CREATE_FUNC ( SchedulerUpdate  )

◆ onEnter()

void SchedulerUpdate::onEnter ( )
overridevirtual

重载 TestCase .

在文件 SchedulerTest.cpp577 行定义.

578{
580
581 auto d = new (std::nothrow) TestNode();
582 d->initWithString("---", 50);
583 addChild(d);
584 d->release();
585
586 auto b = new (std::nothrow) TestNode();
587 b->initWithString("3rd", 0);
588 addChild(b);
589 b->release();
590
591 auto a = new (std::nothrow) TestNode();
592 a->initWithString("1st", -10);
593 addChild(a);
594 a->release();
595
596 auto c = new (std::nothrow) TestNode();
597 c->initWithString("4th", 10);
598 addChild(c);
599 c->release();
600
601 auto e = new (std::nothrow) TestNode();
602 e->initWithString("5th", 20);
603 addChild(e);
604 e->release();
605
606 auto f = new (std::nothrow) TestNode();
607 f->initWithString("2nd", -5);
608 addChild(f);
609 f->release();
610
611 schedule(CC_SCHEDULE_SELECTOR(SchedulerUpdate::removeUpdates), 4.0f);
612}
void removeUpdates(float dt)
virtual void onEnter() override
Definition: BaseTest.cpp:430
void initWithString(const std::string &str, int priority)

引用了 TestNode::initWithString(), TestCase::onEnter() , 以及 removeUpdates().

+ 函数调用图:

◆ removeUpdates()

void SchedulerUpdate::removeUpdates ( float  dt)

在文件 SchedulerTest.cpp614 行定义.

615{
616 auto& children = getChildren();
617
618 for (auto& c : children)
619 {
620 auto obj = static_cast<Ref*>(c);
621 auto node = static_cast<Node*>(obj);
622
623 if (! node)
624 {
625 break;
626 }
627 node->unscheduleAllCallbacks();
628 }
629}

被这些函数引用 onEnter().

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

◆ subtitle()

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

重载 TestCase .

在文件 SchedulerTest.cpp636 行定义.

637{
638 return "3 scheduled updates. Priority should work. Stops in 4s. See console";
639}

◆ title()

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

重载 TestCase .

在文件 SchedulerTest.cpp631 行定义.

632{
633 return "Schedule update with priority";
634}

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