cocos2d-x  2.2.1
 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 (cs::CSJsonDictionary &json, DataInfo *dataInfo)
static CCBoneDatadecodeBone (cs::CSJsonDictionary &json, DataInfo *dataInfo)
static CCDisplayDatadecodeBoneDisplay (cs::CSJsonDictionary &json, DataInfo *dataInfo)
static CCAnimationDatadecodeAnimation (cs::CSJsonDictionary &json, DataInfo *dataInfo)
static CCMovementDatadecodeMovement (cs::CSJsonDictionary &json, DataInfo *dataInfo)
static CCMovementBoneDatadecodeMovementBone (cs::CSJsonDictionary &json, DataInfo *dataInfo)
static CCFrameDatadecodeFrame (cs::CSJsonDictionary &json, DataInfo *dataInfo)
static CCTextureDatadecodeTexture (cs::CSJsonDictionary &json)
static CCContourDatadecodeContour (cs::CSJsonDictionary &json)
static void decodeNode (CCBaseData *node, cs::CSJsonDictionary &json, DataInfo *dataInfo)

Additional Inherited Members

- Private Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (void)
bool isSingleReference (void) const
unsigned int retainCount (void) const
virtual bool isEqual (const CCObject *pObject)
virtual void acceptVisitor (CCDataVisitor &visitor)
virtual void update (float dt)
- Private Attributes inherited from CCObject
unsigned int m_uID
int m_nLuaID
unsigned int m_uReference
unsigned int m_uAutoReleaseCount

Constructor & Destructor Documentation

Member Function Documentation

void addDataAsyncCallBack ( float  dt)
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
( cs::CSJsonDictionary json,
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
( cs::CSJsonDictionary json,
DataInfo dataInfo 
)
static
static CCBoneData* decodeBone ( tinyxml2::XMLElement boneXML,
tinyxml2::XMLElement parentXML,
DataInfo dataInfo 
)
static
static CCBoneData* decodeBone ( cs::CSJsonDictionary json,
DataInfo dataInfo 
)
static
static CCDisplayData*
decodeBoneDisplay
( tinyxml2::XMLElement displayXML,
DataInfo dataInfo 
)
static
static CCDisplayData*
decodeBoneDisplay
( cs::CSJsonDictionary json,
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 ( cs::CSJsonDictionary json)
static
static CCFrameData* decodeFrame ( tinyxml2::XMLElement frameXML,
tinyxml2::XMLElement parentFrameXml,
CCBoneData boneData,
DataInfo dataInfo 
)
static
static CCFrameData* decodeFrame ( cs::CSJsonDictionary json,
DataInfo dataInfo 
)
static
static CCMovementData*
decodeMovement
( tinyxml2::XMLElement movementXML,
CCArmatureData armatureData,
DataInfo dataInfo 
)
static
static CCMovementData*
decodeMovement
( cs::CSJsonDictionary json,
DataInfo dataInfo 
)
static
static CCMovementBoneData*
decodeMovementBone
( tinyxml2::XMLElement movBoneXml,
tinyxml2::XMLElement parentXml,
CCBoneData boneData,
DataInfo dataInfo 
)
static
static CCMovementBoneData*
decodeMovementBone
( cs::CSJsonDictionary json,
DataInfo dataInfo 
)
static
static void decodeNode ( CCBaseData node,
cs::CSJsonDictionary json,
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 ( cs::CSJsonDictionary json)
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: