cocos2d-x  3.0alpha1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCBReader Class Reference

Parse CCBI file which is generated by CocosBuilder. More...

#include <CCBReader.h>

Inheritance diagram for CCBReader:
Object

Public Types

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 }
 

Public Member Functions

 CCBReader (NodeLoaderLibrary *pNodeLoaderLibrary, CCBMemberVariableAssigner *pCCBMemberVariableAssigner=NULL, CCBSelectorResolver *pCCBSelectorResolver=NULL, NodeLoaderListener *pNodeLoaderListener=NULL)
 CCBReader (CCBReader *ccbReader)
virtual ~CCBReader ()
 CCBReader ()
void setCCBRootPath (const char *ccbRootPath)
const std::string & getCCBRootPath () const
var getCCBRootPath ()
local getCCBRootPath ()
cocos2d::NodereadNodeGraphFromFile (const char *pCCBFileName)
local readNodeGraphFromFile ( local pCCBFileName)
cocos2d::NodereadNodeGraphFromFile (const char *pCCBFileName, cocos2d::Object *pOwner)
local readNodeGraphFromFile ( local pCCBFileName, local pOwner)
cocos2d::NodereadNodeGraphFromFile (const char *pCCBFileName, cocos2d::Object *pOwner, const cocos2d::Size &parentSize)
local readNodeGraphFromFile ( local pCCBFileName, local pOwner, local parentSize)
cocos2d::NodereadNodeGraphFromData (cocos2d::Data *pData, cocos2d::Object *pOwner, const cocos2d::Size &parentSize)
cocos2d::ScenecreateSceneWithNodeGraphFromFile (const char *pCCBFileName)
cocos2d::ScenecreateSceneWithNodeGraphFromFile (const char *pCCBFileName, cocos2d::Object *pOwner)
cocos2d::ScenecreateSceneWithNodeGraphFromFile (const char *pCCBFileName, cocos2d::Object *pOwner, const cocos2d::Size &parentSize)
CCBMemberVariableAssignergetCCBMemberVariableAssigner ()
CCBSelectorResolvergetCCBSelectorResolver ()
CCBAnimationManagergetAnimationManager ()
var getActionManager ()
local getActionManager ()
void setAnimationManager (CCBAnimationManager *pAnimationManager)
std::set< std::string > * getAnimatedProperties ()
 Used in NodeLoader::parseProperties() More...
 
std::set< std::string > & getLoadedSpriteSheet ()
cocos2d::ObjectgetOwner ()
int readInt (bool pSigned)
unsigned char readByte ()
bool readBool ()
std::string readUTF8 ()
local readUTF8 ()
float readFloat ()
std::string readCachedString ()
bool isJSControlled ()
bool readCallbackKeyframesForSeq (CCBSequence *seq)
bool readSoundKeyframesForSeq (CCBSequence *seq)
cocos2d::ArraygetOwnerCallbackNames ()
cocos2d::ArraygetOwnerCallbackNodes ()
cocos2d::ArraygetOwnerCallbackControlEvents ()
cocos2d::ArraygetOwnerOutletNames ()
cocos2d::ArraygetOwnerOutletNodes ()
cocos2d::ArraygetNodesWithAnimationManagers ()
cocos2d::ArraygetAnimationManagersForNodes ()
cocos2d::DictionarygetAnimationManagers ()
void setAnimationManagers (cocos2d::Dictionary *x)
void addOwnerCallbackName (const std::string &name)
void addOwnerCallbackNode (cocos2d::Node *node)
void addOwnerCallbackControlEvents (cocos2d::extension::Control::EventType type)
void addDocumentCallbackName (const std::string &name)
void addDocumentCallbackNode (cocos2d::Node *node)
void addDocumentCallbackControlEvents (cocos2d::extension::Control::EventType eventType)
cocos2d::NodereadFileWithCleanUp (bool bCleanUp, cocos2d::Dictionary *am)
void addOwnerOutletName (std::string name)
void addOwnerOutletNode (cocos2d::Node *node)
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)

Static Public Member Functions

static std::string lastPathComponent (const char *pString)
static std::string deletePathExtension (const char *pString)
static std::string toLowerCase (const char *pString)
static bool endsWith (const char *pString, const char *pEnding)
static float getResolutionScale ()
static void setResolutionScale (float scale)
local setResolutionScale ( local scale)

Friends

class NodeLoader

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 

Detailed Description

Parse CCBI file which is generated by CocosBuilder.

Member Enumeration Documentation

enum FloatType
strong
Enumerator
_0 
_1 
MINUS1 
_05 
INTEGER 
FULL 
var FloatType
strong
Enumerator
_0 
_1 
MINUS1 
_05 
INTEGER 
FULL 
local FloatType
strong
Enumerator
_0 
_1 
MINUS1 
_05 
INTEGER 
FULL 
enum PlatformType
strong
Enumerator
ALL 
IOS 
MAC 
var PlatformType
strong
Enumerator
ALL 
IOS 
MAC 
local PlatformType
strong
Enumerator
ALL 
IOS 
MAC 
enum PositionType
strong
Enumerator
RELATIVE_BOTTOM_LEFT 
RELATIVE_TOP_LEFT 
RELATIVE_TOP_RIGHT 
RELATIVE_BOTTOM_RIGHT 
PERCENT 
MULTIPLY_RESOLUTION 
var PositionType
strong
Enumerator
RELATIVE_BOTTOM_LEFT 
RELATIVE_TOP_LEFT 
RELATIVE_TOP_RIGHT 
RELATIVE_BOTTOM_RIGHT 
PERCENT 
MULTIPLY_RESOLUTION 
local PositionType
strong
Enumerator
RELATIVE_BOTTOM_LEFT 
RELATIVE_TOP_LEFT 
RELATIVE_TOP_RIGHT 
RELATIVE_BOTTOM_RIGHT 
PERCENT 
MULTIPLY_RESOLUTION 
enum PropertyType
strong
Enumerator
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 
var PropertyType
strong
Enumerator
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 
local PropertyType
strong
Enumerator
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
Enumerator
ABSOLUTE 
MULTIPLY_RESOLUTION 
var ScaleType
strong
Enumerator
ABSOLUTE 
MULTIPLY_RESOLUTION 
local ScaleType
strong
Enumerator
ABSOLUTE 
MULTIPLY_RESOLUTION 
enum SizeType
strong
Enumerator
ABSOLUTE 
PERCENT 
RELATIVE_CONTAINER 
HORIZONTAL_PERCENT 
VERTICAL_PERCENT 
MULTIPLY_RESOLUTION 
var SizeType
strong
Enumerator
ABSOLUTE 
PERCENT 
RELATIVE_CONTAINER 
HORIZONTAL_PERCENT 
VERTICAL_PERCENT 
MULTIPLY_RESOLUTION 
local SizeType
strong
Enumerator
ABSOLUTE 
PERCENT 
RELATIVE_CONTAINER 
HORIZONTAL_PERCENT 
VERTICAL_PERCENT 
MULTIPLY_RESOLUTION 
enum TargetType
strong
Enumerator
NONE 
DOCUMENT_ROOT 
OWNER 
var TargetType
strong
Enumerator
NONE 
DOCUMENT_ROOT 
OWNER 
local TargetType
strong
Enumerator
NONE 
DOCUMENT_ROOT 
OWNER 

Constructor & Destructor Documentation

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

Member Function Documentation

void
addDocumentCallbackControlEvents
( cocos2d::extension::Control::EventType  eventType)
var
addDocumentCallbackControlEvents
( var  eventType)
local
addDocumentCallbackControlEvents
( local  eventType)
void addDocumentCallbackName ( const std::string &  name)
void addDocumentCallbackNode ( cocos2d::Node node)
void addOwnerCallbackControlEvents ( cocos2d::extension::Control::EventType  type)
var addOwnerCallbackControlEvents ( var  type)
local addOwnerCallbackControlEvents ( local  type)
void addOwnerCallbackName ( const std::string &  name)
void addOwnerCallbackNode ( cocos2d::Node node)
void addOwnerOutletName ( std::string  name)
var addOwnerOutletName ( var  name)
local addOwnerOutletName ( local  name)
void addOwnerOutletNode ( cocos2d::Node node)
var addOwnerOutletNode ( var  node)
local addOwnerOutletNode ( local  node)
cocos2d::Scene*
createSceneWithNodeGraphFromFile
( const char *  pCCBFileName)
var
createSceneWithNodeGraphFromFile
( var  pCCBFileName)
cocos2d::Scene*
createSceneWithNodeGraphFromFile
( const char *  pCCBFileName,
cocos2d::Object pOwner 
)
var
createSceneWithNodeGraphFromFile
( var  pCCBFileName,
var  pOwner 
)
cocos2d::Scene*
createSceneWithNodeGraphFromFile
( const char *  pCCBFileName,
cocos2d::Object pOwner,
const cocos2d::Size parentSize 
)
var
createSceneWithNodeGraphFromFile
( var  pCCBFileName,
var  pOwner,
var  parentSize 
)
static std::string
deletePathExtension
( const char *  pString)
static
static bool endsWith ( const char *  pString,
const char *  pEnding 
)
static
std::set<std::string>
* getAnimatedProperties
( )
CCBAnimationManager*
getAnimationManager
( )
var getActionManager ( )
local getActionManager ( )
cocos2d::Dictionary*
getAnimationManagers
( )
cocos2d::Array*
getAnimationManagersForNodes
( )
var getAnimationManagersForNodes ( )
local getAnimationManagersForNodes ( )
CCBMemberVariableAssigner*
getCCBMemberVariableAssigner
( )
const std::string& getCCBRootPath ( ) const
var getCCBRootPath ( )
local getCCBRootPath ( )
CCBSelectorResolver*
getCCBSelectorResolver
( )
std::set<std::string>
& getLoadedSpriteSheet
( )
cocos2d::Array*
getNodesWithAnimationManagers
( )
var getNodesWithAnimationManagers ( )
local getNodesWithAnimationManagers ( )
cocos2d::Object* getOwner ( )
cocos2d::Array*
getOwnerCallbackControlEvents
( )
var getOwnerCallbackControlEvents ( )
local getOwnerCallbackControlEvents ( )
cocos2d::Array*
getOwnerCallbackNames
( )
var getOwnerCallbackNames ( )
local getOwnerCallbackNames ( )
cocos2d::Array*
getOwnerCallbackNodes
( )
var getOwnerCallbackNodes ( )
local getOwnerCallbackNodes ( )
cocos2d::Array* getOwnerOutletNames ( )
var getOwnerOutletNames ( )
local getOwnerOutletNames ( )
cocos2d::Array* getOwnerOutletNodes ( )
var getOwnerOutletNodes ( )
local getOwnerOutletNodes ( )
static float getResolutionScale ( )
static
bool isJSControlled ( )
static std::string
lastPathComponent
( const char *  pString)
static
var lastPathComponent ( var  pString)
static
local lastPathComponent ( local  pString)
static
bool readBool ( )
unsigned char readByte ( )
std::string readCachedString ( )
bool readCallbackKeyframesForSeq ( CCBSequence seq)
var readCallbackKeyframesForSeq ( var  seq)
local readCallbackKeyframesForSeq ( local  seq)
cocos2d::Node* readFileWithCleanUp ( bool  bCleanUp,
cocos2d::Dictionary am 
)
float readFloat ( )
int readInt ( bool  pSigned)
var readInt ( var  pSigned)
local readInt ( local  pSigned)
cocos2d::Node*
readNodeGraphFromData
( cocos2d::Data pData,
cocos2d::Object pOwner,
const cocos2d::Size parentSize 
)
cocos2d::Node*
readNodeGraphFromFile
( const char *  pCCBFileName)
var readNodeGraphFromFile ( var  pCCBFileName)
local readNodeGraphFromFile ( local  pCCBFileName)
cocos2d::Node*
readNodeGraphFromFile
( const char *  pCCBFileName,
cocos2d::Object pOwner 
)
var readNodeGraphFromFile ( var  pCCBFileName,
var  pOwner 
)
local readNodeGraphFromFile ( local  pCCBFileName,
local  pOwner 
)
cocos2d::Node*
readNodeGraphFromFile
( const char *  pCCBFileName,
cocos2d::Object pOwner,
const cocos2d::Size parentSize 
)
var readNodeGraphFromFile ( var  pCCBFileName,
var  pOwner,
var  parentSize 
)
local readNodeGraphFromFile ( local  pCCBFileName,
local  pOwner,
local  parentSize 
)
bool readSoundKeyframesForSeq ( CCBSequence seq)
var readSoundKeyframesForSeq ( var  seq)
local readSoundKeyframesForSeq ( local  seq)
std::string readUTF8 ( )
var readUTF8 ( )
local readUTF8 ( )
void setAnimationManager ( CCBAnimationManager pAnimationManager)
var setActionManager ( var  pAnimationManager)
local setActionManager ( local  pAnimationManager)
void setAnimationManagers ( cocos2d::Dictionary x)
void setCCBRootPath ( const char *  ccbRootPath)
var setCCBRootPath ( var  ccbRootPath)
local setCCBRootPath ( local  ccbRootPath)
static void setResolutionScale ( float  scale)
static
var setResolutionScale ( var  scale)
static
local setResolutionScale ( local  scale)
static
static std::string toLowerCase ( const char *  pString)
static

Friends And Related Function Documentation

friend class NodeLoader
friend

The documentation for this class was generated from the following file: