cocos2d-x  2.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 *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 CCDataReaderHelper * sharedDataReaderHelper ()
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 CCArmatureData * decodeArmature (tinyxml2::XMLElement *armatureXML, DataInfo *dataInfo)
 Decode CCArmature Datas from xml export from Dragon CCBone flash tool. More...
 
static CCBoneData * decodeBone (tinyxml2::XMLElement *boneXML, tinyxml2::XMLElement *parentXML, DataInfo *dataInfo)
static CCDisplayData * decodeBoneDisplay (tinyxml2::XMLElement *displayXML, DataInfo *dataInfo)
static CCAnimationData * decodeAnimation (tinyxml2::XMLElement *animationXML, DataInfo *dataInfo)
 Decode CCArmatureAnimation Datas from xml export from Dragon CCBone flash tool. More...
 
static CCMovementData * decodeMovement (tinyxml2::XMLElement *movementXML, CCArmatureData *armatureData, DataInfo *dataInfo)
static CCMovementBoneData * decodeMovementBone (tinyxml2::XMLElement *movBoneXml, tinyxml2::XMLElement *parentXml, CCBoneData *boneData, DataInfo *dataInfo)
static CCFrameData * decodeFrame (tinyxml2::XMLElement *frameXML, tinyxml2::XMLElement *parentFrameXml, CCBoneData *boneData, DataInfo *dataInfo)
static CCTextureData * decodeTexture (tinyxml2::XMLElement *textureXML, DataInfo *dataInfo)
 Decode Texture Datas from xml export from Dragon CCBone flash tool. More...
 
static CCContourData * decodeContour (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 CCArmatureData * decodeArmature (const rapidjson::Value &json, DataInfo *dataInfo)
static CCBoneData * decodeBone (const rapidjson::Value &json, DataInfo *dataInfo)
static CCDisplayData * decodeBoneDisplay (const rapidjson::Value &json, DataInfo *dataInfo)
static CCAnimationData * decodeAnimation (const rapidjson::Value &json, DataInfo *dataInfo)
static CCMovementData * decodeMovement (const rapidjson::Value &json, DataInfo *dataInfo)
static CCMovementBoneData * decodeMovementBone (const rapidjson::Value &json, DataInfo *dataInfo)
static CCFrameData * decodeFrame (const rapidjson::Value &json, DataInfo *dataInfo)
static CCTextureData * decodeTexture (const rapidjson::Value &json)
static CCContourData * decodeContour (const rapidjson::Value &json)
static void decodeNode (CCBaseData *node, const rapidjson::Value &json, DataInfo *dataInfo)

Additional Inherited Members

- Private Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObject * autorelease (void)
CCObject * copy (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
( const rapidjson::Value &  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
( const rapidjson::Value &  json,
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 CCDisplayData*
decodeBoneDisplay
( tinyxml2::XMLElement *  displayXML,
DataInfo *  dataInfo 
)
static
static CCDisplayData*
decodeBoneDisplay
( const rapidjson::Value &  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 ( const rapidjson::Value &  json)
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 CCMovementData*
decodeMovement
( tinyxml2::XMLElement *  movementXML,
CCArmatureData *  armatureData,
DataInfo *  dataInfo 
)
static
static CCMovementData*
decodeMovement
( const rapidjson::Value &  json,
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 void decodeNode ( CCBaseData *  node,
const rapidjson::Value &  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 ( const rapidjson::Value &  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: