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

#include <CCDataReaderHelper.h>

Inheritance diagram for CCDataReaderHelper:
CCObject

Public Member Functions

 ~CCDataReaderHelper ()
void addDataFromFile (const char *filePath)
void addDataFromFileAsync (const char *imagePath, const char *plistPath, const char *filePath, CCObject *target, SEL_SCHEDULE selector)
void addDataAsyncCallBack (float dt)
void removeConfigFile (const char *configFile)

Static Public Member Functions

static CCDataReaderHelpersharedDataReaderHelper ()
static void setPositionReadScale (float scale)
 Scale the position data, used for multiresolution adapter It won't effect the data already read. More...
 
static float getPositionReadScale ()
static void purge ()
static void addDataFromCache (const char *pFileContent, DataInfo *dataInfo=NULL)
 Translate XML export from Dragon CCBone flash tool to datas, and save them. More...
 
static CCArmatureDatadecodeArmature (tinyxml2::XMLElement *armatureXML, DataInfo *dataInfo)
 Decode CCArmature Datas from xml export from Dragon CCBone flash tool. More...
 
static CCBoneDatadecodeBone (tinyxml2::XMLElement *boneXML, tinyxml2::XMLElement *parentXML, DataInfo *dataInfo)
static CCDisplayDatadecodeBoneDisplay (tinyxml2::XMLElement *displayXML, DataInfo *dataInfo)
static CCAnimationDatadecodeAnimation (tinyxml2::XMLElement *animationXML, DataInfo *dataInfo)
 Decode CCArmatureAnimation Datas from xml export from Dragon CCBone flash tool. More...
 
static CCMovementDatadecodeMovement (tinyxml2::XMLElement *movementXML, CCArmatureData *armatureData, DataInfo *dataInfo)
static CCMovementBoneDatadecodeMovementBone (tinyxml2::XMLElement *movBoneXml, tinyxml2::XMLElement *parentXml, CCBoneData *boneData, DataInfo *dataInfo)
static CCFrameDatadecodeFrame (tinyxml2::XMLElement *frameXML, tinyxml2::XMLElement *parentFrameXml, CCBoneData *boneData, DataInfo *dataInfo)
static CCTextureDatadecodeTexture (tinyxml2::XMLElement *textureXML, DataInfo *dataInfo)
 Decode Texture Datas from xml export from Dragon CCBone flash tool. More...
 
static CCContourDatadecodeContour (tinyxml2::XMLElement *contourXML, DataInfo *dataInfo)
 Decode Contour Datas from xml export from Dragon CCBone flash tool. More...
 
static void addDataFromJsonCache (const char *fileContent, DataInfo *dataInfo=NULL)
static CCArmatureDatadecodeArmature (const rapidjson::Value &json, DataInfo *dataInfo)
static CCBoneDatadecodeBone (const rapidjson::Value &json, DataInfo *dataInfo)
static CCDisplayDatadecodeBoneDisplay (const rapidjson::Value &json, DataInfo *dataInfo)
static CCAnimationDatadecodeAnimation (const rapidjson::Value &json, DataInfo *dataInfo)
static CCMovementDatadecodeMovement (const rapidjson::Value &json, DataInfo *dataInfo)
static CCMovementBoneDatadecodeMovementBone (const rapidjson::Value &json, DataInfo *dataInfo)
static CCFrameDatadecodeFrame (const rapidjson::Value &json, DataInfo *dataInfo)
static CCTextureDatadecodeTexture (const rapidjson::Value &json)
static CCContourDatadecodeContour (const rapidjson::Value &json)
static void decodeNode (CCBaseData *node, const rapidjson::Value &json, DataInfo *dataInfo)
static void addDataFromBinaryCache (const char *fileContent, DataInfo *dataInfo=NULL)
static CCArmatureDatadecodeArmature (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo)
static CCBoneDatadecodeBone (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo)
static CCDisplayDatadecodeBoneDisplay (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo)
static CCAnimationDatadecodeAnimation (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo)
static CCMovementDatadecodeMovement (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo)
static CCMovementBoneDatadecodeMovementBone (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo)
static CCFrameDatadecodeFrame (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo)
static CCTextureDatadecodeTexture (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode)
static CCContourDatadecodeContour (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode)
static void decodeNode (CCBaseData *node, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo)

Constructor & Destructor Documentation

Member Function Documentation

void addDataAsyncCallBack ( float  dt)
static void addDataFromBinaryCache ( const char *  fileContent,
DataInfo dataInfo = NULL 
)
static
static void addDataFromCache ( const char *  pFileContent,
DataInfo dataInfo = NULL 
)
static

Translate XML export from Dragon CCBone flash tool to datas, and save them.

When you add a new xml, the data already saved will be keeped.

Parameters
xmlPathThe cache of the xml
void addDataFromFile ( const char *  filePath)
void addDataFromFileAsync ( const char *  imagePath,
const char *  plistPath,
const char *  filePath,
CCObject target,
SEL_SCHEDULE  selector 
)
static void addDataFromJsonCache ( const char *  fileContent,
DataInfo dataInfo = NULL 
)
static
static CCAnimationData*
decodeAnimation
( tinyxml2::XMLElement animationXML,
DataInfo dataInfo 
)
static

Decode CCArmatureAnimation Datas from xml export from Dragon CCBone flash tool.

static CCAnimationData*
decodeAnimation
( const rapidjson::Value json,
DataInfo dataInfo 
)
static
static CCAnimationData*
decodeAnimation
( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode,
DataInfo dataInfo 
)
static
static CCArmatureData*
decodeArmature
( tinyxml2::XMLElement armatureXML,
DataInfo dataInfo 
)
static

Decode CCArmature Datas from xml export from Dragon CCBone flash tool.

static CCArmatureData*
decodeArmature
( const rapidjson::Value json,
DataInfo dataInfo 
)
static
static CCArmatureData*
decodeArmature
( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode,
DataInfo dataInfo 
)
static
static CCBoneData* decodeBone ( tinyxml2::XMLElement boneXML,
tinyxml2::XMLElement parentXML,
DataInfo dataInfo 
)
static
static CCBoneData* decodeBone ( const rapidjson::Value json,
DataInfo dataInfo 
)
static
static CCBoneData* decodeBone ( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode,
DataInfo dataInfo 
)
static
static CCDisplayData*
decodeBoneDisplay
( tinyxml2::XMLElement displayXML,
DataInfo dataInfo 
)
static
static CCDisplayData*
decodeBoneDisplay
( const rapidjson::Value json,
DataInfo dataInfo 
)
static
static CCDisplayData*
decodeBoneDisplay
( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode,
DataInfo dataInfo 
)
static
static CCContourData* decodeContour ( tinyxml2::XMLElement contourXML,
DataInfo dataInfo 
)
static

Decode Contour Datas from xml export from Dragon CCBone flash tool.

static CCContourData* decodeContour ( const rapidjson::Value json)
static
static CCContourData* decodeContour ( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode 
)
static
static CCFrameData* decodeFrame ( tinyxml2::XMLElement frameXML,
tinyxml2::XMLElement parentFrameXml,
CCBoneData boneData,
DataInfo dataInfo 
)
static
static CCFrameData* decodeFrame ( const rapidjson::Value json,
DataInfo dataInfo 
)
static
static CCFrameData* decodeFrame ( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode,
DataInfo dataInfo 
)
static
static CCMovementData*
decodeMovement
( tinyxml2::XMLElement movementXML,
CCArmatureData armatureData,
DataInfo dataInfo 
)
static
static CCMovementData*
decodeMovement
( const rapidjson::Value json,
DataInfo dataInfo 
)
static
static CCMovementData*
decodeMovement
( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode,
DataInfo dataInfo 
)
static
static CCMovementBoneData*
decodeMovementBone
( tinyxml2::XMLElement movBoneXml,
tinyxml2::XMLElement parentXml,
CCBoneData boneData,
DataInfo dataInfo 
)
static
static CCMovementBoneData*
decodeMovementBone
( const rapidjson::Value json,
DataInfo dataInfo 
)
static
static CCMovementBoneData*
decodeMovementBone
( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode,
DataInfo dataInfo 
)
static
static void decodeNode ( CCBaseData node,
const rapidjson::Value json,
DataInfo dataInfo 
)
static
static void decodeNode ( CCBaseData node,
CocoLoader pCocoLoader,
stExpCocoNode pCocoNode,
DataInfo dataInfo 
)
static
static CCTextureData* decodeTexture ( tinyxml2::XMLElement textureXML,
DataInfo dataInfo 
)
static

Decode Texture Datas from xml export from Dragon CCBone flash tool.

static CCTextureData* decodeTexture ( const rapidjson::Value json)
static
static CCTextureData* decodeTexture ( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode 
)
static
static float getPositionReadScale ( )
static
static void purge ( )
static
void removeConfigFile ( const char *  configFile)
static void setPositionReadScale ( float  scale)
static

Scale the position data, used for multiresolution adapter It won't effect the data already read.

static CCDataReaderHelper*
sharedDataReaderHelper
( )
static

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