utils/CCDataReaderHelper
来源:互联网 发布:os x 安装软件 编辑:程序博客网 时间:2024/05/29 08:09
#ifndef __CCDATAREADERHELPER_H__
#define __CCDATAREADERHELPER_H__
#include "CCArmatureDefine.h"
#include "../datas/CCDatas.h"
#include "../utils/CCConstValue.h"
#include "../CCArmature.h"
#include "../external_tool/Json/CSContentJsonDictionary.h"
namespace tinyxml2 { class XMLElement; }
NS_CC_EXT_BEGIN
class CCDataReaderHelper
{
public:
/**
* Scale the position data, used for multiresolution adapter
* It won't effect the data already read.
*/
static void setPositionReadScale(float scale);
static float getPositionReadScale();
static void addDataFromFile(const char *filePath);
static void clear();
public:
/**
* 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.
*
* @param xmlPath Path of xml file
*/
static void addDataFromXML(const char *xmlPath);
/**
* 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.
*
* @param xmlPath Path of pak file
*/
static void addDataFromXMLPak(const char *xmlPakPath);
/**
* 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.
*
* @param xmlPath The cache of the xml
*/
static void addDataFromCache(const char *pFileContent);
/**
* Decode CCArmature Datas from xml export from Dragon CCBone flash tool
*/
static CCArmatureData *decodeArmature(tinyxml2::XMLElement *armatureXML);
static CCBoneData *decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2::XMLElement *parentXML);
static CCDisplayData *decodeBoneDisplay(tinyxml2::XMLElement *displayXML);
/**
* Decode CCArmatureAnimation Datas from xml export from Dragon CCBone flash tool
*/
static CCAnimationData *decodeAnimation(tinyxml2::XMLElement *animationXML);
static CCMovementData *decodeMovement(tinyxml2::XMLElement *movementXML, CCArmatureData *armatureData);
static CCMovementBoneData *decodeMovementBone(tinyxml2::XMLElement *movBoneXml, tinyxml2::XMLElement *parentXml, CCBoneData *boneData);
static CCFrameData *decodeFrame(tinyxml2::XMLElement *frameXML, tinyxml2::XMLElement *parentFrameXml, CCBoneData *boneData);
/**
* Decode Texture Datas from xml export from Dragon CCBone flash tool
*/
static CCTextureData *decodeTexture(tinyxml2::XMLElement *textureXML);
/**
* Decode Contour Datas from xml export from Dragon CCBone flash tool
*/
static CCContourData *decodeContour(tinyxml2::XMLElement *contourXML);
public:
static void addDataFromJson(const char *filePath);
static void addDataFromJsonCache(const char *fileContent);
static CCArmatureData *decodeArmature(cs::CSJsonDictionary &json);
static CCBoneData *decodeBone(cs::CSJsonDictionary &json);
static CCDisplayData *decodeBoneDisplay(cs::CSJsonDictionary &json);
static CCAnimationData *decodeAnimation(cs::CSJsonDictionary &json);
static CCMovementData *decodeMovement(cs::CSJsonDictionary &json);
static CCMovementBoneData *decodeMovementBone(cs::CSJsonDictionary &json);
static CCFrameData *decodeFrame(cs::CSJsonDictionary &json);
static CCTextureData *decodeTexture(cs::CSJsonDictionary &json);
static CCContourData *decodeContour(cs::CSJsonDictionary &json);
static void decodeNode(CCBaseData *node, cs::CSJsonDictionary &json);
};
NS_CC_EXT_END
#endif /*__CCDATAREADERHELPER_H__*/
- utils/CCDataReaderHelper
- UTILS
- Utils
- utils
- utils
- Utils
- Utils
- Utils
- utils
- Utils
- Utils
- Utils
- UTILS
- Utils
- Utils
- Utils
- Utils
- utils
- IE6下的怪异解析知识点补充
- easyUI Tab href,content区别
- Makefile 中的 $@, $^, $< , $? 符号
- vSphere,ESXi,vCenter之间的关系
- Hadoop 自定义InputFormat实现自定义Split
- utils/CCDataReaderHelper
- 苹果浏览器应用实战(四)
- PHP导入Excel到MySQL的方法 详细出处参考:http://www.jb51.net/article/26921.htm
- utils/CCConstValue
- mysql 在cmd命令行下操作遇到的转义字符
- 初步了解hessian
- LibRTMP源代码分析8:发送消息(Send RTMPPacket)
- OLAP多维分析之Mondrian Schema详解
- Unity 发射小球