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

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

Public 类型 | Public 成员函数 | 静态 Public 成员函数 | 友元 | 所有成员列表

CCBReader类 参考 CocosBuilder Support

解析由CocosBuilder生成的CCBI文件 更多…

#include

类 CCBReader 继承关系图:

Public 类型 - 图3 Ref

## Public 类型
enum PropertyType { POSITION = 0, SIZE, POINT, POINT_LOCK, SCALE_LOCK, DEGREES, INTEGER, FLOAT, FLOAT_VAR, CHECK, SPRITEFRAME, TEXTURE, BYTE, COLOR3, COLOR4F_VAR, FLIP, BLEND_MODE, FNT_FILE, TEXT, FONT_TTF, INTEGER_LABELED, BLOCK, ANIMATION, CCB_FILE, STRING, BLOCK_CONTROL, FLOAT_SCALE, FLOAT_XY }
enum FloatType { _0 = 0, _1, MINUS1, _05, INTEGER, FULL }
enum PlatformType { ALL = 0, IOS, MAC }
enum TargetType { NONE = 0, DOCUMENT_ROOT = 1, OWNER = 2 }
enum PositionType { RELATIVE_BOTTOM_LEFT, RELATIVE_TOP_LEFT, RELATIVE_TOP_RIGHT, RELATIVE_BOTTOM_RIGHT, PERCENT, MULTIPLY_RESOLUTION }
enum SizeType { ABSOLUTE, PERCENT, RELATIVE_CONTAINER, HORIZONTAL_PERCENT, VERTICAL_PERCENT, MULTIPLY_RESOLUTION }
enum ScaleType { ABSOLUTE, MULTIPLY_RESOLUTION }
typedef cocos2d::Map < cocos2d::Node , CCBAnimationManager > CCBAnimationManagerMap
typedef std::shared_ptr < CCBAnimationManagerMap > CCBAnimationManagerMapPtr
## Public 成员函数
CCBReader (NodeLoaderLibrary pNodeLoaderLibrary, CCBMemberVariableAssigner pCCBMemberVariableAssigner=NULL, CCBSelectorResolver pCCBSelectorResolver=NULL, NodeLoaderListener pNodeLoaderListener=NULL)
NA NA 更多…
CCBReader (CCBReader ccbReader)
NA NA 更多…
virtual ~CCBReader ()
NA NA 更多…
CCBReader ()
NA NA 更多…
void setCCBRootPath (const char ccbRootPath)
const std::string & getCCBRootPath () const
cocos2d::Node readNodeGraphFromFile (const char pCCBFileName)
cocos2d::Node readNodeGraphFromFile (const char pCCBFileName, cocos2d::Ref pOwner)
cocos2d::Node readNodeGraphFromFile (const char pCCBFileName, cocos2d::Ref pOwner, const cocos2d::Size &parentSize)
cocos2d::Node readNodeGraphFromData (std::shared_ptr< cocos2d::Data > data, cocos2d::Ref pOwner, const cocos2d::Size &parentSize)
NA NA 更多…
cocos2d::Scene createSceneWithNodeGraphFromFile (const char pCCBFileName)
NA 更多…
cocos2d::Scene createSceneWithNodeGraphFromFile (const char pCCBFileName, cocos2d::Ref pOwner)
NA 更多…
cocos2d::Scene createSceneWithNodeGraphFromFile (const char pCCBFileName, cocos2d::Ref pOwner, const cocos2d::Size &parentSize)
NA 更多…
CCBMemberVariableAssigner getCCBMemberVariableAssigner ()
NA NA 更多…
CCBSelectorResolver getCCBSelectorResolver ()
NA NA 更多…
CCBAnimationManager getAnimationManager ()
getActionManager getActionManager 更多…
void setAnimationManager (CCBAnimationManager pAnimationManager)
setActionManager setActionManager 更多…
std::set< std::string > getAnimatedProperties ()
在NodeLoader::parseProperties()中使用 NA NA 更多…
std::set< std::string > & getLoadedSpriteSheet ()
NA NA 更多…
cocos2d::Ref getOwner ()
NA NA 更多…
int readInt (bool pSigned)
unsigned char readByte ()
NA NA 更多…
bool readBool ()
NA NA 更多…
std::string readUTF8 ()
float readFloat ()
NA NA 更多…
std::string readCachedString ()
NA NA 更多…
bool isJSControlled ()
NA NA 更多…
bool readCallbackKeyframesForSeq (CCBSequence seq)
bool readSoundKeyframesForSeq (CCBSequence seq)
cocos2d::ValueVector getOwnerCallbackNames ()
cocos2d::Vector< cocos2d::Node > & getOwnerCallbackNodes ()
cocos2d::ValueVector & getOwnerCallbackControlEvents ()
cocos2d::ValueVector getOwnerOutletNames ()
cocos2d::Vector< cocos2d::Node > & getOwnerOutletNodes ()
cocos2d::Vector< cocos2d::Node > & getNodesWithAnimationManagers ()
cocos2d::Vector < CCBAnimationManager > & getAnimationManagersForNodes ()
CCBAnimationManagerMapPtr getAnimationManagers ()
NA NA 更多…
void setAnimationManagers (CCBAnimationManagerMapPtr x)
NA NA 更多…
void addOwnerCallbackName (const std::string &name)
NA NA 更多…
void addOwnerCallbackNode (cocos2d::Node node)
NA NA 更多…
void addOwnerCallbackControlEvents (cocos2d::extension::Control::EventType type)
void addDocumentCallbackName (const std::string &name)
NA NA 更多…
void addDocumentCallbackNode (cocos2d::Node node)
NA NA 更多…
void addDocumentCallbackControlEvents (cocos2d::extension::Control::EventType eventType)
cocos2d::Node readFileWithCleanUp (bool bCleanUp, CCBAnimationManagerMapPtr am)
NA NA 更多…
void addOwnerOutletName (std::string name)
void addOwnerOutletNode (cocos2d::Node node)
- Public 成员函数 继承自 Ref
void retain ()
保留所有权. 更多…
void release ()
立即释放所有权. 更多…
Ref * autorelease ()
自动释放所有权在不久的将来. 更多…
unsigned int getReferenceCount () const
返回Ref对象当前的引用计数. 更多…
virtual ~Ref ()
NA NA 更多…
## 静态 Public 成员函数
static std::string lastPathComponent (const char pString)
static std::string deletePathExtension (const char pString)
NA NA 更多…
static std::string toLowerCase (const char pString)
NA NA 更多…
static bool endsWith (const char pString, const char *pEnding)
NA NA 更多…
static float getResolutionScale ()
NA NA 更多…
static void setResolutionScale (float scale)
## 友元
class NodeLoader
## 额外继承的成员函数
- Protected 成员函数 继承自 Ref
Ref ()
构造函数 更多…
- Protected 属性 继承自 Ref
unsigned int _referenceCount
引用计数 更多…

详细描述

解析由CocosBuilder生成的CCBI文件

成员类型定义说明

typedef cocos2d::Map<cocos2d::Node, CCBAnimationManager> CCBAnimationManagerMap

typedef std::shared_ptr<CCBAnimationManagerMap> CCBAnimationManagerMapPtr

成员枚举类型说明

enum FloatType

strong

枚举值
_0
_1
MINUS1
_05
INTEGER
FULL

enum PlatformType

strong

枚举值
ALL
IOS
MAC

enum PositionType

strong

枚举值
RELATIVE_BOTTOM_LEFT
RELATIVE_TOP_LEFT
RELATIVE_TOP_RIGHT
RELATIVE_BOTTOM_RIGHT
PERCENT
MULTIPLY_RESOLUTION

enum PropertyType

strong

枚举值
POSITION
SIZE
POINT
POINT_LOCK
SCALE_LOCK
DEGREES
INTEGER
FLOAT
FLOAT_VAR
CHECK
SPRITEFRAME
TEXTURE
BYTE
COLOR3
COLOR4F_VAR
FLIP
BLEND_MODE
FNT_FILE
TEXT
FONT_TTF
INTEGER_LABELED
BLOCK
ANIMATION
CCB_FILE
STRING
BLOCK_CONTROL
FLOAT_SCALE
FLOAT_XY

enum ScaleType

strong

枚举值
ABSOLUTE
MULTIPLY_RESOLUTION

enum SizeType

strong

枚举值
ABSOLUTE
PERCENT
RELATIVE_CONTAINER
HORIZONTAL_PERCENT
VERTICAL_PERCENT
MULTIPLY_RESOLUTION

enum TargetType

strong

枚举值
NONE
DOCUMENT_ROOT
OWNER

构造及析构函数说明

CCBReader ( NodeLoaderLibrary pNodeLoaderLibrary,
CCBMemberVariableAssigner pCCBMemberVariableAssigner = NULL,
CCBSelectorResolver pCCBSelectorResolver = NULL,
NodeLoaderListener pNodeLoaderListener = NULL
)

NA NA

CCBReader ( CCBReader * ccbReader)

NA NA

virtual ~CCBReader ( )

virtual

NA NA

CCBReader ( )

NA NA

成员函数说明

void addDocumentCallbackControlEvents ( cocos2d::extension::Control::EventType eventType)

void addDocumentCallbackName ( const std::string & name)

NA NA

void addDocumentCallbackNode ( cocos2d::Node * node)

NA NA

void addOwnerCallbackControlEvents ( cocos2d::extension::Control::EventType type)

void addOwnerCallbackName ( const std::string & name)

NA NA

void addOwnerCallbackNode ( cocos2d::Node * node)

NA NA

void addOwnerOutletName ( std::string name)

void addOwnerOutletNode ( cocos2d::Node * node)

cocos2d::Scene createSceneWithNodeGraphFromFile ( const char pCCBFileName)

NA

cocos2d::Scene createSceneWithNodeGraphFromFile ( const char pCCBFileName,
cocos2d::Ref * pOwner
)

NA

cocos2d::Scene createSceneWithNodeGraphFromFile ( const char pCCBFileName,
cocos2d::Ref * pOwner,
const cocos2d::Size & parentSize
)

NA

static std::string deletePathExtension ( const char * pString)

static

NA NA

static bool endsWith ( const char pString,
const char pEnding
)

static

NA NA

std::set<std::string>* getAnimatedProperties ( )

在NodeLoader::parseProperties()中使用 NA NA

CCBAnimationManager* getAnimationManager ( )

getActionManager getActionManager

CCBAnimationManagerMapPtr getAnimationManagers ( )

NA NA

cocos2d::Vector<CCBAnimationManager*>& getAnimationManagersForNodes ( )

CCBMemberVariableAssigner* getCCBMemberVariableAssigner ( )

NA NA

const std::string& getCCBRootPath ( ) const

CCBSelectorResolver* getCCBSelectorResolver ( )

NA NA

std::set<std::string>& getLoadedSpriteSheet ( )

NA NA

cocos2d::Vector<cocos2d::Node*>& getNodesWithAnimationManagers ( )

cocos2d::Ref* getOwner ( )

NA NA

cocos2d::ValueVector& getOwnerCallbackControlEvents ( )

cocos2d::ValueVector getOwnerCallbackNames ( )

cocos2d::Vector<cocos2d::Node*>& getOwnerCallbackNodes ( )

cocos2d::ValueVector getOwnerOutletNames ( )

cocos2d::Vector<cocos2d::Node*>& getOwnerOutletNodes ( )

static float getResolutionScale ( )

static

NA NA

bool isJSControlled ( )

NA NA

static std::string lastPathComponent ( const char * pString)

static

bool readBool ( )

NA NA

unsigned char readByte ( )

NA NA

std::string readCachedString ( )

NA NA

bool readCallbackKeyframesForSeq ( CCBSequence * seq)

cocos2d::Node* readFileWithCleanUp ( bool bCleanUp,
CCBAnimationManagerMapPtr am
)

NA NA

float readFloat ( )

NA NA

int readInt ( bool pSigned)

cocos2d::Node readNodeGraphFromData ( std::shared_ptr< cocos2d::Data > data,
cocos2d::Ref pOwner,
const cocos2d::Size & parentSize
)

NA NA

cocos2d::Node readNodeGraphFromFile ( const char pCCBFileName)

cocos2d::Node readNodeGraphFromFile ( const char pCCBFileName,
cocos2d::Ref * pOwner
)

cocos2d::Node readNodeGraphFromFile ( const char pCCBFileName,
cocos2d::Ref * pOwner,
const cocos2d::Size & parentSize
)

bool readSoundKeyframesForSeq ( CCBSequence * seq)

std::string readUTF8 ( )

void setAnimationManager ( CCBAnimationManager * pAnimationManager)

setActionManager setActionManager

void setAnimationManagers ( CCBAnimationManagerMapPtr x)

NA NA

void setCCBRootPath ( const char * ccbRootPath)

static void setResolutionScale ( float scale)

static

static std::string toLowerCase ( const char * pString)

static

NA NA

友元及相关函数文档

friend class NodeLoader

friend


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

  • /Users/zeroyang/Documents/github/cocos2d-x/cocos/editor-support/cocosbuilder/CCBReader.h