cocos2d-x  3.4
 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::BoolFrame *flatbuffers)
FrameloadPositionFrameWithFlatBuffers (const flatbuffers::PointFrame *flatbuffers)
FrameloadScaleFrameWithFlatBuffers (const flatbuffers::ScaleFrame *flatbuffers)
FrameloadRotationSkewFrameWithFlatBuffers (const flatbuffers::ScaleFrame *flatbuffers)
FrameloadColorFrameWithFlatBuffers (const flatbuffers::ColorFrame *flatbuffers)
FrameloadTextureFrameWithFlatBuffers (const flatbuffers::TextureFrame *flatbuffers)
FrameloadEventFrameWithFlatBuffers (const flatbuffers::EventFrame *flatbuffers)
FrameloadAlphaFrameWithFlatBuffers (const flatbuffers::IntFrame *flatbuffers)
FrameloadAnchorPointFrameWithFlatBuffers (const flatbuffers::ScaleFrame *flatbuffers)
FrameloadZOrderFrameWithFlatBuffers (const flatbuffers::IntFrame *flatbuffers)
FrameloadInnerActionFrameWithFlatBuffers (const flatbuffers::InnerActionFrame *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*
loadAlphaFrameWithFlatBuffers
( const flatbuffers::IntFrame flatbuffers)
protected
Frame* loadAnchorPointFrame ( const rapidjson::Value &  json)
protected
Frame*
loadAnchorPointFrameWithFlatBuffers
( const flatbuffers::ScaleFrame 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::ColorFrame flatbuffers)
protected
Frame* loadEventFrame ( const rapidjson::Value &  json)
protected
Frame*
loadEventFrameWithFlatBuffers
( const flatbuffers::EventFrame flatbuffers)
protected
Frame* loadInnerActionFrame ( const rapidjson::Value &  json)
protected
Frame*
loadInnerActionFrameWithFlatBuffers
( const flatbuffers::InnerActionFrame flatbuffers)
protected
Frame* loadPositionFrame ( const rapidjson::Value &  json)
protected
Frame*
loadPositionFrameWithFlatBuffers
( const flatbuffers::PointFrame flatbuffers)
protected
Frame* loadRotationFrame ( const rapidjson::Value &  json)
protected
Frame* loadRotationSkewFrame ( const rapidjson::Value &  json)
protected
Frame*
loadRotationSkewFrameWithFlatBuffers
( const flatbuffers::ScaleFrame flatbuffers)
protected
Frame* loadScaleFrame ( const rapidjson::Value &  json)
protected
Frame*
loadScaleFrameWithFlatBuffers
( const flatbuffers::ScaleFrame flatbuffers)
protected
Frame* loadSkewFrame ( const rapidjson::Value &  json)
protected
Frame* loadTextureFrame ( const rapidjson::Value &  json)
protected
Frame*
loadTextureFrameWithFlatBuffers
( const flatbuffers::TextureFrame 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::BoolFrame flatbuffers)
protected
Frame* loadZOrderFrame ( const rapidjson::Value &  json)
protected
Frame*
loadZOrderFrameWithFlatBuffers
( const flatbuffers::IntFrame 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: