cocos2d-x  3.3rc0
 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 ()
var purge ()
local 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...
 
local createActionFromJson ( local 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)
local loadAnimationActionWithContent ( local fileName, local content)
ActionTimelinecreateActionFromProtocolBuffers (const std::string &fileName)
ActionTimelineloadAnimationActionWithFileFromProtocolBuffers (const std::string &fileName)
var loadAnimationActionWithFileFromProtocolBuffers ( var fileName)
local loadAnimationActionWithFileFromProtocolBuffers ( local fileName)
ActionTimelinecreateActionFromXML (const std::string &fileName)
var createActionFromXML ( var fileName)
local createActionFromXML ( local fileName)
ActionTimelineloadAnimationActionWithFileFromXML (const std::string &fileName)
var loadAnimationActionWithFileFromXML ( var fileName)
local loadAnimationActionWithFileFromXML ( local fileName)
ActionTimelineloadActionTimelineFromXML (const tinyxml2::XMLElement *animationElement)
var loadActionTimelineFromXML ( var animationElement)
local loadActionTimelineFromXML ( local animationElement)

Static Public Member Functions

static ActionTimelineCachegetInstance ()
 Gets the singleton. More...
 
local getInstance ()
 Gets the singleton. More...
 
static void destroyInstance ()
 Destroys the singleton. More...
 
static ActionTimelinecreateAction (const std::string &fileName)
local createAction ( local 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)
var loadPositionFrame ( var json)
local loadPositionFrame ( local json)
FrameloadScaleFrame (const rapidjson::Value &json)
var loadScaleFrame ( var json)
local loadScaleFrame ( local json)
FrameloadSkewFrame (const rapidjson::Value &json)
var loadSkewFrame ( var json)
local loadSkewFrame ( local json)
FrameloadRotationSkewFrame (const rapidjson::Value &json)
FrameloadRotationFrame (const rapidjson::Value &json)
var loadRotationFrame ( var json)
local loadRotationFrame ( local json)
FrameloadAnchorPointFrame (const rapidjson::Value &json)
var loadAnchorPointFrame ( var json)
local loadAnchorPointFrame ( local json)
FrameloadInnerActionFrame (const rapidjson::Value &json)
var loadInnerActionFrame ( var json)
local loadInnerActionFrame ( local json)
FrameloadColorFrame (const rapidjson::Value &json)
var loadColorFrame ( var json)
local loadColorFrame ( local json)
FrameloadTextureFrame (const rapidjson::Value &json)
FrameloadEventFrame (const rapidjson::Value &json)
var loadEventFrame ( var json)
local loadEventFrame ( local json)
FrameloadZOrderFrame (const rapidjson::Value &json)
var loadZOrderFrame ( var json)
local loadZOrderFrame ( local json)
TimelineloadTimelineFromProtocolBuffers (const protocolbuffers::TimeLine &timelineProtobuf)
FrameloadVisibleFrameFromProtocolBuffers (const protocolbuffers::TimeLineBoolFrame &frameProtobuf)
FrameloadPositionFrameFromProtocolBuffers (const protocolbuffers::TimeLinePointFrame &frameProtobuf)
var loadPositionFrameFromProtocolBuffers ( var frameProtobuf)
local loadPositionFrameFromProtocolBuffers ( local frameProtobuf)
FrameloadScaleFrameFromProtocolBuffers (const protocolbuffers::TimeLinePointFrame &frameProtobuf)
FrameloadRotationSkewFrameFromProtocolBuffers (const protocolbuffers::TimeLinePointFrame &frameProtobuf)
FrameloadAnchorPointFrameFromProtocolBuffers (const protocolbuffers::TimeLinePointFrame &frameProtobuf)
FrameloadColorFrameFromProtocolBuffers (const protocolbuffers::TimeLineColorFrame &frameProtobuf)
FrameloadTextureFrameFromProtocolBuffers (const protocolbuffers::TimeLineTextureFrame &frameProtobuf)
FrameloadEventFrameFromProtocolBuffers (const protocolbuffers::TimeLineStringFrame &frameProtobuf)
FrameloadZOrderFrameFromProtocolBuffers (const protocolbuffers::TimeLineIntFrame &frameProtobuf)
TimelineloadTimelineFromXML (const tinyxml2::XMLElement *timelineElement)
FrameloadVisibleFrameFromXML (const tinyxml2::XMLElement *frameElement)
FrameloadPositionFrameFromXML (const tinyxml2::XMLElement *frameElement)
var loadPositionFrameFromXML ( var frameElement)
local loadPositionFrameFromXML ( local frameElement)
FrameloadScaleFrameFromXML (const tinyxml2::XMLElement *frameElement)
FrameloadRotationSkewFrameFromXML (const tinyxml2::XMLElement *frameElement)
var loadRotationSkewFrameFromXML ( var frameElement)
local loadRotationSkewFrameFromXML ( local frameElement)
FrameloadAnchorPointFrameFromXML (const tinyxml2::XMLElement *frameElement)
FrameloadColorFrameFromXML (const tinyxml2::XMLElement *frameElement)
FrameloadTextureFrameFromXML (const tinyxml2::XMLElement *frameElement)
var loadTextureFrameFromXML ( var frameElement)
local loadTextureFrameFromXML ( local frameElement)
FrameloadEventFrameFromXML (const tinyxml2::XMLElement *frameElement)
var loadEventFrameFromXML ( var frameElement)
local loadEventFrameFromXML ( local frameElement)
FrameloadZOrderFrameFromXML (const tinyxml2::XMLElement *frameElement)

Protected Attributes

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

Member Typedef Documentation

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

Member Function Documentation

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

Clone a action with the specified name from the container.

var createActionFromJson ( var  fileName)

Clone a action with the specified name from the container.

local createActionFromJson ( local  fileName)

Clone a action with the specified name from the container.

ActionTimeline*
createActionFromProtocolBuffers
( const std::string &  fileName)
var createActionFromProtocolBuffers ( var  fileName)
local
createActionFromProtocolBuffers
( local  fileName)
ActionTimeline* createActionFromXML ( const std::string &  fileName)
var createActionFromXML ( var  fileName)
local createActionFromXML ( local  fileName)
static void destroyInstance ( )
static

Destroys the singleton.

var destroyInstance ( )
static

Destroys the singleton.

local destroyInstance ( )
static

Destroys the singleton.

static ActionTimelineCache*
getInstance
( )
static

Gets the singleton.

var getInstance ( )
static

Gets the singleton.

local getInstance ( )
static

Gets the singleton.

void init ( )
var init ( )
local init ( )
ActionTimeline*
loadActionTimelineFromXML
( const tinyxml2::XMLElement *  animationElement)
var loadActionTimelineFromXML ( var  animationElement)
local loadActionTimelineFromXML ( local  animationElement)
Frame* loadAnchorPointFrame ( const rapidjson::Value &  json)
protected
var loadAnchorPointFrame ( var  json)
protected
local loadAnchorPointFrame ( local  json)
protected
Frame*
loadAnchorPointFrameFromProtocolBuffers
( const protocolbuffers::TimeLinePointFrame frameProtobuf)
protected
var
loadAnchorPointFrameFromProtocolBuffers
( var  frameProtobuf)
protected
local
loadAnchorPointFrameFromProtocolBuffers
( local  frameProtobuf)
protected
Frame* loadAnchorPointFrameFromXML ( const tinyxml2::XMLElement *  frameElement)
protected
var loadAnchorPointFrameFromXML ( var  frameElement)
protected
local loadAnchorPointFrameFromXML ( local  frameElement)
protected
ActionTimeline*
loadAnimationActionWithContent
( const std::string &  fileName,
const std::string &  content 
)
var loadAnimationActionWithContent ( var  fileName,
var  content 
)
local
loadAnimationActionWithContent
( local  fileName,
local  content 
)
ActionTimeline*
loadAnimationActionWithFile
( const std::string &  fileName)
var loadAnimationActionWithFile ( var  fileName)
local loadAnimationActionWithFile ( local  fileName)
ActionTimeline*
loadAnimationActionWithFileFromProtocolBuffers
( const std::string &  fileName)
var
loadAnimationActionWithFileFromProtocolBuffers
( var  fileName)
local
loadAnimationActionWithFileFromProtocolBuffers
( local  fileName)
ActionTimeline*
loadAnimationActionWithFileFromXML
( const std::string &  fileName)
var
loadAnimationActionWithFileFromXML
( var  fileName)
local
loadAnimationActionWithFileFromXML
( local  fileName)
Frame* loadColorFrame ( const rapidjson::Value &  json)
protected
var loadColorFrame ( var  json)
protected
local loadColorFrame ( local  json)
protected
Frame*
loadColorFrameFromProtocolBuffers
( const protocolbuffers::TimeLineColorFrame frameProtobuf)
protected
var
loadColorFrameFromProtocolBuffers
( var  frameProtobuf)
protected
local
loadColorFrameFromProtocolBuffers
( local  frameProtobuf)
protected
Frame* loadColorFrameFromXML ( const tinyxml2::XMLElement *  frameElement)
protected
var loadColorFrameFromXML ( var  frameElement)
protected
local loadColorFrameFromXML ( local  frameElement)
protected
Frame* loadEventFrame ( const rapidjson::Value &  json)
protected
var loadEventFrame ( var  json)
protected
local loadEventFrame ( local  json)
protected
Frame*
loadEventFrameFromProtocolBuffers
( const protocolbuffers::TimeLineStringFrame frameProtobuf)
protected
var
loadEventFrameFromProtocolBuffers
( var  frameProtobuf)
protected
local
loadEventFrameFromProtocolBuffers
( local  frameProtobuf)
protected
Frame* loadEventFrameFromXML ( const tinyxml2::XMLElement *  frameElement)
protected
var loadEventFrameFromXML ( var  frameElement)
protected
local loadEventFrameFromXML ( local  frameElement)
protected
Frame* loadInnerActionFrame ( const rapidjson::Value &  json)
protected
var loadInnerActionFrame ( var  json)
protected
local loadInnerActionFrame ( local  json)
protected
Frame* loadPositionFrame ( const rapidjson::Value &  json)
protected
var loadPositionFrame ( var  json)
protected
local loadPositionFrame ( local  json)
protected
Frame*
loadPositionFrameFromProtocolBuffers
( const protocolbuffers::TimeLinePointFrame frameProtobuf)
protected
var
loadPositionFrameFromProtocolBuffers
( var  frameProtobuf)
protected
local
loadPositionFrameFromProtocolBuffers
( local  frameProtobuf)
protected
Frame* loadPositionFrameFromXML ( const tinyxml2::XMLElement *  frameElement)
protected
var loadPositionFrameFromXML ( var  frameElement)
protected
local loadPositionFrameFromXML ( local  frameElement)
protected
Frame* loadRotationFrame ( const rapidjson::Value &  json)
protected
var loadRotationFrame ( var  json)
protected
local loadRotationFrame ( local  json)
protected
Frame* loadRotationSkewFrame ( const rapidjson::Value &  json)
protected
var loadRotationSkewFrame ( var  json)
protected
local loadRotationSkewFrame ( local  json)
protected
Frame*
loadRotationSkewFrameFromProtocolBuffers
( const protocolbuffers::TimeLinePointFrame frameProtobuf)
protected
var
loadRotationSkewFrameFromProtocolBuffers
( var  frameProtobuf)
protected
local
loadRotationSkewFrameFromProtocolBuffers
( local  frameProtobuf)
protected
Frame* loadRotationSkewFrameFromXML ( const tinyxml2::XMLElement *  frameElement)
protected
var loadRotationSkewFrameFromXML ( var  frameElement)
protected
local loadRotationSkewFrameFromXML ( local  frameElement)
protected
Frame* loadScaleFrame ( const rapidjson::Value &  json)
protected
var loadScaleFrame ( var  json)
protected
local loadScaleFrame ( local  json)
protected
Frame*
loadScaleFrameFromProtocolBuffers
( const protocolbuffers::TimeLinePointFrame frameProtobuf)
protected
var
loadScaleFrameFromProtocolBuffers
( var  frameProtobuf)
protected
local
loadScaleFrameFromProtocolBuffers
( local  frameProtobuf)
protected
Frame* loadScaleFrameFromXML ( const tinyxml2::XMLElement *  frameElement)
protected
var loadScaleFrameFromXML ( var  frameElement)
protected
local loadScaleFrameFromXML ( local  frameElement)
protected
Frame* loadSkewFrame ( const rapidjson::Value &  json)
protected
var loadSkewFrame ( var  json)
protected
local loadSkewFrame ( local  json)
protected
Frame* loadTextureFrame ( const rapidjson::Value &  json)
protected
var loadTextureFrame ( var  json)
protected
local loadTextureFrame ( local  json)
protected
Frame*
loadTextureFrameFromProtocolBuffers
( const protocolbuffers::TimeLineTextureFrame frameProtobuf)
protected
var
loadTextureFrameFromProtocolBuffers
( var  frameProtobuf)
protected
local
loadTextureFrameFromProtocolBuffers
( local  frameProtobuf)
protected
Frame* loadTextureFrameFromXML ( const tinyxml2::XMLElement *  frameElement)
protected
var loadTextureFrameFromXML ( var  frameElement)
protected
local loadTextureFrameFromXML ( local  frameElement)
protected
Timeline* loadTimeline ( const rapidjson::Value &  json)
protected
var loadTimeline ( var  json)
protected
local loadTimeline ( local  json)
protected
Timeline*
loadTimelineFromProtocolBuffers
( const protocolbuffers::TimeLine timelineProtobuf)
protected
var loadTimelineFromProtocolBuffers ( var  timelineProtobuf)
protected
local
loadTimelineFromProtocolBuffers
( local  timelineProtobuf)
protected
Timeline* loadTimelineFromXML ( const tinyxml2::XMLElement *  timelineElement)
protected
var loadTimelineFromXML ( var  timelineElement)
protected
local loadTimelineFromXML ( local  timelineElement)
protected
Frame* loadVisibleFrame ( const rapidjson::Value &  json)
protected
var loadVisibleFrame ( var  json)
protected
local loadVisibleFrame ( local  json)
protected
Frame*
loadVisibleFrameFromProtocolBuffers
( const protocolbuffers::TimeLineBoolFrame frameProtobuf)
protected
var
loadVisibleFrameFromProtocolBuffers
( var  frameProtobuf)
protected
local
loadVisibleFrameFromProtocolBuffers
( local  frameProtobuf)
protected
Frame* loadVisibleFrameFromXML ( const tinyxml2::XMLElement *  frameElement)
protected
var loadVisibleFrameFromXML ( var  frameElement)
protected
local loadVisibleFrameFromXML ( local  frameElement)
protected
Frame* loadZOrderFrame ( const rapidjson::Value &  json)
protected
var loadZOrderFrame ( var  json)
protected
local loadZOrderFrame ( local  json)
protected
Frame*
loadZOrderFrameFromProtocolBuffers
( const protocolbuffers::TimeLineIntFrame frameProtobuf)
protected
var
loadZOrderFrameFromProtocolBuffers
( var  frameProtobuf)
protected
local
loadZOrderFrameFromProtocolBuffers
( local  frameProtobuf)
protected
Frame* loadZOrderFrameFromXML ( const tinyxml2::XMLElement *  frameElement)
protected
var loadZOrderFrameFromXML ( var  frameElement)
protected
local loadZOrderFrameFromXML ( local  frameElement)
protected
void purge ( )
var purge ( )
local purge ( )
void removeAction ( const std::string &  fileName)

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

var removeAction ( var  fileName)

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

local removeAction ( local  fileName)

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

Member Data Documentation

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

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