cocos2d-x  2.2
 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 *filePath, CCObject *target, SEL_SCHEDULE selector)
void addDataAsyncCallBack (float dt)

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 clear ()
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)
 Decode CCArmature Datas from xml export from Dragon CCBone flash tool. More...
 
static CCBoneDatadecodeBone (tinyxml2::XMLElement *boneXML, tinyxml2::XMLElement *parentXML)
static CCDisplayDatadecodeBoneDisplay (tinyxml2::XMLElement *displayXML)
static CCAnimationDatadecodeAnimation (tinyxml2::XMLElement *animationXML)
 Decode CCArmatureAnimation Datas from xml export from Dragon CCBone flash tool. More...
 
static CCMovementDatadecodeMovement (tinyxml2::XMLElement *movementXML, CCArmatureData *armatureData)
static CCMovementBoneDatadecodeMovementBone (tinyxml2::XMLElement *movBoneXml, tinyxml2::XMLElement *parentXml, CCBoneData *boneData)
static CCFrameDatadecodeFrame (tinyxml2::XMLElement *frameXML, tinyxml2::XMLElement *parentFrameXml, CCBoneData *boneData)
static CCTextureDatadecodeTexture (tinyxml2::XMLElement *textureXML)
 Decode Texture Datas from xml export from Dragon CCBone flash tool. More...
 
static CCContourDatadecodeContour (tinyxml2::XMLElement *contourXML)
 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)
static CCBoneDatadecodeBone (cs::CSJsonDictionary &json)
static CCDisplayDatadecodeBoneDisplay (cs::CSJsonDictionary &json)
static CCAnimationDatadecodeAnimation (cs::CSJsonDictionary &json)
static CCMovementDatadecodeMovement (cs::CSJsonDictionary &json)
static CCMovementBoneDatadecodeMovementBone (cs::CSJsonDictionary &json)
static CCFrameDatadecodeFrame (cs::CSJsonDictionary &json)
static CCTextureDatadecodeTexture (cs::CSJsonDictionary &json)
static CCContourDatadecodeContour (cs::CSJsonDictionary &json)
static void decodeNode (CCBaseData *node, cs::CSJsonDictionary &json)

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 *  filePath,
CCObject target,
SEL_SCHEDULE  selector 
)
static void addDataFromJsonCache ( const char *  fileContent,
DataInfo dataInfo = NULL 
)
static
static void clear ( )
static
static CCAnimationData*
decodeAnimation
( tinyxml2::XMLElement animationXML)
static

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

static CCAnimationData*
decodeAnimation
( cs::CSJsonDictionary json)
static
static CCArmatureData*
decodeArmature
( tinyxml2::XMLElement armatureXML)
static

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

static CCArmatureData*
decodeArmature
( cs::CSJsonDictionary json)
static
static CCBoneData* decodeBone ( tinyxml2::XMLElement boneXML,
tinyxml2::XMLElement parentXML 
)
static
static CCBoneData* decodeBone ( cs::CSJsonDictionary json)
static
static CCDisplayData*
decodeBoneDisplay
( tinyxml2::XMLElement displayXML)
static
static CCDisplayData*
decodeBoneDisplay
( cs::CSJsonDictionary json)
static
static CCContourData* decodeContour ( tinyxml2::XMLElement contourXML)
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 
)
static
static CCFrameData* decodeFrame ( cs::CSJsonDictionary json)
static
static CCMovementData*
decodeMovement
( tinyxml2::XMLElement movementXML,
CCArmatureData armatureData 
)
static
static CCMovementData*
decodeMovement
( cs::CSJsonDictionary json)
static
static CCMovementBoneData*
decodeMovementBone
( tinyxml2::XMLElement movBoneXml,
tinyxml2::XMLElement parentXml,
CCBoneData boneData 
)
static
static CCMovementBoneData*
decodeMovementBone
( cs::CSJsonDictionary json)
static
static void decodeNode ( CCBaseData node,
cs::CSJsonDictionary json 
)
static
static CCTextureData* decodeTexture ( tinyxml2::XMLElement textureXML)
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
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: