cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ActionTimelineCache Class Reference

#include <CCActionTimelineCache.h>

Public Member Functions

void purge ()
 
void init ()
 
void removeAction (const std::string &fileName)
 Remove action with filename, and also remove other resource relate with this file. More...
 
ActionTimelinecreateActionFromJson (const std::string &fileName)
 Clone a action with the specified name from the container. More...
 
ActionTimelineloadAnimationActionWithFile (const std::string &fileName)
 
ActionTimelineloadAnimationActionWithContent (const std::string &fileName, const std::string &content)
 
ActionTimelinecreateActionWithFlatBuffersFile (const std::string &fileName)
 
ActionTimelineloadAnimationActionWithFlatBuffersFile (const std::string &fileName)
 
ActionTimelinecreateActionWithFlatBuffersForSimulator (const std::string &fileName)
 

Static Public Member Functions

static ActionTimelineCachegetInstance ()
 Gets the singleton. More...
 
static void destroyInstance ()
 Destroys the singleton. More...
 
static ActionTimelinecreateAction (const std::string &fileName)
 

Protected Types

typedef std::function< Frame
*(const rapidjson::Value &json)> 
FrameCreateFunc
 
typedef std::pair< std::string,
FrameCreateFunc
Pair
 

Protected Member Functions

TimelineloadTimeline (const rapidjson::Value &json)
 
FrameloadVisibleFrame (const rapidjson::Value &json)
 
FrameloadPositionFrame (const rapidjson::Value &json)
 
FrameloadScaleFrame (const rapidjson::Value &json)
 
FrameloadSkewFrame (const rapidjson::Value &json)
 
FrameloadRotationSkewFrame (const rapidjson::Value &json)
 
FrameloadRotationFrame (const rapidjson::Value &json)
 
FrameloadAnchorPointFrame (const rapidjson::Value &json)
 
FrameloadInnerActionFrame (const rapidjson::Value &json)
 
FrameloadColorFrame (const rapidjson::Value &json)
 
FrameloadTextureFrame (const rapidjson::Value &json)
 
FrameloadEventFrame (const rapidjson::Value &json)
 
FrameloadZOrderFrame (const rapidjson::Value &json)
 
TimelineloadTimelineWithFlatBuffers (const flatbuffers::TimeLine *flatbuffers)
 
FrameloadVisibleFrameWithFlatBuffers (const flatbuffers::TimeLineBoolFrame *flatbuffers)
 
FrameloadZOrderFrameWithFlatBuffers (const flatbuffers::TimeLineIntFrame *flatbuffers)
 
FrameloadRotationSkewFrameWithFlatBuffers (const flatbuffers::TimeLinePointFrame *flatbuffers)
 
FrameloadEventFrameWithFlatBuffers (const flatbuffers::TimeLineStringFrame *flatbuffers)
 
FrameloadAnchorPointFrameWithFlatBuffers (const flatbuffers::TimeLinePointFrame *flatbuffers)
 
FrameloadPositionFrameWithFlatBuffers (const flatbuffers::TimeLinePointFrame *flatbuffers)
 
FrameloadScaleFrameWithFlatBuffers (const flatbuffers::TimeLinePointFrame *flatbuffers)
 
FrameloadColorFrameWithFlatBuffers (const flatbuffers::TimeLineColorFrame *flatbuffers)
 
FrameloadTextureFrameWithFlatBuffers (const flatbuffers::TimeLineTextureFrame *flatbuffers)
 

Protected Attributes

std::unordered_map
< std::string, FrameCreateFunc
_funcs
 
cocos2d::Map< std::string,
ActionTimeline * > 
_animationActions
 

Member Typedef Documentation

typedef std::function<Frame*(const rapidjson::Value& json)> FrameCreateFunc
protected
typedef std::pair<std::string, FrameCreateFunc> Pair
protected

Member Function Documentation

static ActionTimeline* createAction ( const std::string &  fileName)
static
ActionTimeline* createActionFromJson ( const std::string &  fileName)

Clone a action with the specified name from the container.

ActionTimeline* createActionWithFlatBuffersFile ( const std::string &  fileName)
ActionTimeline* createActionWithFlatBuffersForSimulator ( const std::string &  fileName)
static void destroyInstance ( )
static

Destroys the singleton.

static ActionTimelineCache* getInstance ( )
static

Gets the singleton.

void init ( )
Frame* loadAnchorPointFrame ( const rapidjson::Value &  json)
protected
Frame* loadAnchorPointFrameWithFlatBuffers ( const flatbuffers::TimeLinePointFrame flatbuffers)
protected
ActionTimeline* loadAnimationActionWithContent ( const std::string &  fileName,
const std::string &  content 
)
ActionTimeline* loadAnimationActionWithFile ( const std::string &  fileName)
ActionTimeline* loadAnimationActionWithFlatBuffersFile ( const std::string &  fileName)
Frame* loadColorFrame ( const rapidjson::Value &  json)
protected
Frame* loadColorFrameWithFlatBuffers ( const flatbuffers::TimeLineColorFrame flatbuffers)
protected
Frame* loadEventFrame ( const rapidjson::Value &  json)
protected
Frame* loadEventFrameWithFlatBuffers ( const flatbuffers::TimeLineStringFrame flatbuffers)
protected
Frame* loadInnerActionFrame ( const rapidjson::Value &  json)
protected
Frame* loadPositionFrame ( const rapidjson::Value &  json)
protected
Frame* loadPositionFrameWithFlatBuffers ( const flatbuffers::TimeLinePointFrame flatbuffers)
protected
Frame* loadRotationFrame ( const rapidjson::Value &  json)
protected
Frame* loadRotationSkewFrame ( const rapidjson::Value &  json)
protected
Frame* loadRotationSkewFrameWithFlatBuffers ( const flatbuffers::TimeLinePointFrame flatbuffers)
protected
Frame* loadScaleFrame ( const rapidjson::Value &  json)
protected
Frame* loadScaleFrameWithFlatBuffers ( const flatbuffers::TimeLinePointFrame flatbuffers)
protected
Frame* loadSkewFrame ( const rapidjson::Value &  json)
protected
Frame* loadTextureFrame ( const rapidjson::Value &  json)
protected
Frame* loadTextureFrameWithFlatBuffers ( const flatbuffers::TimeLineTextureFrame flatbuffers)
protected
Timeline* loadTimeline ( const rapidjson::Value &  json)
protected
Timeline* loadTimelineWithFlatBuffers ( const flatbuffers::TimeLine flatbuffers)
protected
Frame* loadVisibleFrame ( const rapidjson::Value &  json)
protected
Frame* loadVisibleFrameWithFlatBuffers ( const flatbuffers::TimeLineBoolFrame flatbuffers)
protected
Frame* loadZOrderFrame ( const rapidjson::Value &  json)
protected
Frame* loadZOrderFrameWithFlatBuffers ( const flatbuffers::TimeLineIntFrame flatbuffers)
protected
void purge ( )
void removeAction ( const std::string &  fileName)

Remove action with filename, and also remove other resource relate with this file.

Member Data Documentation

cocos2d::Map<std::string, ActionTimeline*> _animationActions
protected
std::unordered_map<std::string, FrameCreateFunc> _funcs
protected

The documentation for this class was generated from the following file: