cocos2d-x 3.0
- 首页 - 相关页面 - 模块 - 命名空间 - - 文件 -
Public 成员函数 - 图1 Public 成员函数 - 图2)
- 类列表 - 类索引 - 类继承关系 - 类成员

全部)) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义)))

Public 成员函数 | 静态 Public 成员函数 | Protected 类型 | Protected 成员函数 | Protected 属性 | 静态 Protected 属性 | 所有成员列表

DataReaderHelper类 参考

NA NA 更多…

#include

类 DataReaderHelper 继承关系图:

Public 成员函数 - 图3 Ref

## Public 成员函数
DataReaderHelper ()
ctor 更多…
~DataReaderHelper ()
NA NA 更多…
void addDataFromFile (const std::string &filePath)
void addDataFromFileAsync (const std::string &imagePath, const std::string &plistPath, const std::string &filePath, cocos2d::Ref *target, cocos2d::SEL_SCHEDULE selector)
void addDataAsyncCallBack (float dt)
void removeConfigFile (const std::string &configFile)
## 静态 Public 成员函数
static CC_DEPRECATED_ATTRIBUTE DataReaderHelper sharedDataReaderHelper ()
static DataReaderHelper getInstance ()
static void setPositionReadScale (float scale)
Scale the position data, used for multiresolution adapter It won't effect the data already read. 更多…
static float getPositionReadScale ()
static void purge ()
static void addDataFromCache (const std::string &pFileContent, DataInfo dataInfo=nullptr)
Translate XML export from Dragon Bone flash tool to datas, and save them. 更多…
static ArmatureData decodeArmature (tinyxml2::XMLElement armatureXML, DataInfo dataInfo)
Decode Armature Datas from xml export from Dragon Bone flash tool. 更多…
static BoneData decodeBone (tinyxml2::XMLElement boneXML, tinyxml2::XMLElement parentXML, DataInfo dataInfo)
static DisplayData decodeBoneDisplay (tinyxml2::XMLElement displayXML, DataInfo dataInfo)
static AnimationData decodeAnimation (tinyxml2::XMLElement animationXML, DataInfo dataInfo)
Decode ArmatureAnimation Datas from xml export from Dragon Bone flash tool. 更多…
static MovementData decodeMovement (tinyxml2::XMLElement movementXML, ArmatureData armatureData, DataInfo dataInfo)
static MovementBoneData decodeMovementBone (tinyxml2::XMLElement movBoneXml, tinyxml2::XMLElement parentXml, BoneData boneData, DataInfo dataInfo)
static FrameData decodeFrame (tinyxml2::XMLElement frameXML, tinyxml2::XMLElement parentFrameXml, BoneData boneData, DataInfo dataInfo)
static TextureData decodeTexture (tinyxml2::XMLElement textureXML, DataInfo dataInfo)
Decode Texture Datas from xml export from Dragon Bone flash tool. 更多…
static ContourData decodeContour (tinyxml2::XMLElement contourXML, DataInfo dataInfo)
Decode Contour Datas from xml export from Dragon Bone flash tool. 更多…
static void addDataFromJsonCache (const std::string &fileContent, DataInfo dataInfo=nullptr)
static ArmatureData decodeArmature (const rapidjson::Value &json, DataInfo dataInfo)
static BoneData decodeBone (const rapidjson::Value &json, DataInfo dataInfo)
static DisplayData decodeBoneDisplay (const rapidjson::Value &json, DataInfo dataInfo)
static AnimationData decodeAnimation (const rapidjson::Value &json, DataInfo dataInfo)
static MovementData decodeMovement (const rapidjson::Value &json, DataInfo dataInfo)
static MovementBoneData decodeMovementBone (const rapidjson::Value &json, DataInfo dataInfo)
static FrameData decodeFrame (const rapidjson::Value &json, DataInfo dataInfo)
static TextureData decodeTexture (const rapidjson::Value &json)
static ContourData decodeContour (const rapidjson::Value &json)
static void decodeNode (BaseData node, const rapidjson::Value &json, DataInfo *dataInfo)
## Protected 类型
enum ConfigType { DragonBone_XML, CocoStudio_JSON }
## Protected 成员函数
void loadData ()
## Protected 属性
std::condition_variable _sleepCondition
std::thread _loadingThread
std::mutex _sleepMutex
std::mutex _asyncStructQueueMutex
std::mutex _dataInfoMutex
std::mutex _addDataMutex
std::mutex _getFileMutex
unsigned long _asyncRefCount
unsigned long _asyncRefTotalCount
bool need_quit
std::queue< AsyncStruct > _asyncStructQueue
std::queue< DataInfo > * _dataQueue
## 静态 Protected 属性
static std::vector< std::string > _configFileList
static DataReaderHelper * _dataReaderHelper

详细描述

NA NA

成员枚举类型说明

enum ConfigType

protected

枚举值
DragonBone_XML
CocoStudio_JSON

构造及析构函数说明

DataReaderHelper ( )

ctor

~DataReaderHelper ( )

NA NA

成员函数说明

void addDataAsyncCallBack ( float dt)

static void addDataFromCache ( const std::string & pFileContent,
DataInfo * dataInfo = nullptr
)

static

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

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

  • 参数
  • xmlPathThe cache of the xml

void addDataFromFile ( const std::string & filePath)

void addDataFromFileAsync ( const std::string & imagePath,
const std::string & plistPath,
const std::string & filePath,
cocos2d::Ref * target,
cocos2d::SEL_SCHEDULE selector
)

static void addDataFromJsonCache ( const std::string & fileContent,
DataInfo * dataInfo = nullptr
)

static

static AnimationData decodeAnimation ( tinyxml2::XMLElement animationXML,
DataInfo * dataInfo
)

static

Decode ArmatureAnimation Datas from xml export from Dragon Bone flash tool.

static AnimationData decodeAnimation ( const rapidjson::Value & json,
DataInfo dataInfo
)

static

static ArmatureData decodeArmature ( tinyxml2::XMLElement armatureXML,
DataInfo * dataInfo
)

static

Decode Armature Datas from xml export from Dragon Bone flash tool.

static ArmatureData decodeArmature ( const rapidjson::Value & json,
DataInfo dataInfo
)

static

static BoneData decodeBone ( tinyxml2::XMLElement boneXML,
tinyxml2::XMLElement parentXML,
DataInfo dataInfo
)

static

static BoneData decodeBone ( const rapidjson::Value & json,
DataInfo dataInfo
)

static

static DisplayData decodeBoneDisplay ( tinyxml2::XMLElement displayXML,
DataInfo * dataInfo
)

static

static DisplayData decodeBoneDisplay ( const rapidjson::Value & json,
DataInfo dataInfo
)

static

static ContourData decodeContour ( tinyxml2::XMLElement contourXML,
DataInfo * dataInfo
)

static

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

static ContourData* decodeContour ( const rapidjson::Value & json)

static

static FrameData decodeFrame ( tinyxml2::XMLElement frameXML,
tinyxml2::XMLElement parentFrameXml,
BoneData boneData,
DataInfo * dataInfo
)

static

static FrameData decodeFrame ( const rapidjson::Value & json,
DataInfo dataInfo
)

static

static MovementData decodeMovement ( tinyxml2::XMLElement movementXML,
ArmatureData armatureData,
DataInfo dataInfo
)

static

static MovementData decodeMovement ( const rapidjson::Value & json,
DataInfo dataInfo
)

static

static MovementBoneData decodeMovementBone ( tinyxml2::XMLElement movBoneXml,
tinyxml2::XMLElement parentXml,
BoneData boneData,
DataInfo * dataInfo
)

static

static MovementBoneData decodeMovementBone ( const rapidjson::Value & json,
DataInfo dataInfo
)

static

static void decodeNode ( BaseData node,
const rapidjson::Value & json,
DataInfo dataInfo
)

static

static TextureData decodeTexture ( tinyxml2::XMLElement textureXML,
DataInfo * dataInfo
)

static

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

static TextureData* decodeTexture ( const rapidjson::Value & json)

static

static DataReaderHelper* getInstance ( )

static

static float getPositionReadScale ( )

static

void loadData ( )

protected

static void purge ( )

static

void removeConfigFile ( const std::string & configFile)

static void setPositionReadScale ( float scale)

static

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

static CC_DEPRECATED_ATTRIBUTE DataReaderHelper* sharedDataReaderHelper ( )

inlinestatic

类成员变量说明

std::mutex _addDataMutex

protected

unsigned long _asyncRefCount

protected

unsigned long _asyncRefTotalCount

protected

std::queue<AsyncStruct > _asyncStructQueue

protected

std::mutex _asyncStructQueueMutex

protected

std::vector<std::string> _configFileList

staticprotected

std::mutex _dataInfoMutex

protected

std::queue<DataInfo > _dataQueue

protected

DataReaderHelper* _dataReaderHelper

staticprotected

std::mutex _getFileMutex

protected

std::thread* _loadingThread

protected

std::condition_variable _sleepCondition

protected

std::mutex _sleepMutex

protected

bool need_quit

protected


该类的文档由以下文件生成: