cocos2d-x  3.3
 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:
Ref

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 }
 
typedef cocos2d::Map
< cocos2d::Node
*, CCBAnimationManager * > 
CCBAnimationManagerMap
 
typedef std::shared_ptr
< CCBAnimationManagerMap
CCBAnimationManagerMapPtr
 

Public Member Functions

 CCBReader (NodeLoaderLibrary *pNodeLoaderLibrary, CCBMemberVariableAssigner *pCCBMemberVariableAssigner=NULL, CCBSelectorResolver *pCCBSelectorResolver=NULL, NodeLoaderListener *pNodeLoaderListener=NULL)
 NA NA More...
 
 CCBReader (CCBReader *ccbReader)
 NA NA More...
 
virtual ~CCBReader ()
 NA NA More...
 
 CCBReader ()
 NA NA More...
 
void setCCBRootPath (const char *ccbRootPath)
 
const std::string & getCCBRootPath () const
 
cocos2d::NodereadNodeGraphFromFile (const char *pCCBFileName)
 
cocos2d::NodereadNodeGraphFromFile (const char *pCCBFileName, cocos2d::Ref *pOwner)
 
cocos2d::NodereadNodeGraphFromFile (const char *pCCBFileName, cocos2d::Ref *pOwner, const cocos2d::Size &parentSize)
 
cocos2d::NodereadNodeGraphFromData (std::shared_ptr< cocos2d::Data > data, cocos2d::Ref *pOwner, const cocos2d::Size &parentSize)
 NA NA More...
 
cocos2d::ScenecreateSceneWithNodeGraphFromFile (const char *pCCBFileName)
 NA More...
 
cocos2d::ScenecreateSceneWithNodeGraphFromFile (const char *pCCBFileName, cocos2d::Ref *pOwner)
 NA More...
 
cocos2d::ScenecreateSceneWithNodeGraphFromFile (const char *pCCBFileName, cocos2d::Ref *pOwner, const cocos2d::Size &parentSize)
 NA More...
 
CCBMemberVariableAssignergetCCBMemberVariableAssigner ()
 NA NA More...
 
CCBSelectorResolvergetCCBSelectorResolver ()
 NA NA More...
 
CCBAnimationManagergetAnimationManager ()
 getActionManager getActionManager More...
 
void setAnimationManager (CCBAnimationManager *pAnimationManager)
 setActionManager setActionManager More...
 
std::set< std::string > * getAnimatedProperties ()
 Used in NodeLoader::parseProperties() NA NA. More...
 
std::set< std::string > & getLoadedSpriteSheet ()
 NA NA More...
 
cocos2d::RefgetOwner ()
 NA NA More...
 
int readInt (bool pSigned)
 
unsigned char readByte ()
 NA NA More...
 
bool readBool ()
 NA NA More...
 
std::string readUTF8 ()
 
float readFloat ()
 NA NA More...
 
std::string readCachedString ()
 NA NA More...
 
bool isJSControlled ()
 NA NA More...
 
bool readCallbackKeyframesForSeq (CCBSequence *seq)
 
bool readSoundKeyframesForSeq (CCBSequence *seq)
 
cocos2d::ValueVector getOwnerCallbackNames ()
 
cocos2d::Vector< cocos2d::Node * > & getOwnerCallbackNodes ()
 
cocos2d::ValueVectorgetOwnerCallbackControlEvents ()
 
cocos2d::ValueVector getOwnerOutletNames ()
 
cocos2d::Vector< cocos2d::Node * > & getOwnerOutletNodes ()
 
cocos2d::Vector< cocos2d::Node * > & getNodesWithAnimationManagers ()
 
cocos2d::Vector
< CCBAnimationManager * > & 
getAnimationManagersForNodes ()
 
CCBAnimationManagerMapPtr getAnimationManagers ()
 NA NA More...
 
void setAnimationManagers (CCBAnimationManagerMapPtr x)
 NA NA More...
 
void addOwnerCallbackName (const std::string &name)
 NA NA More...
 
void addOwnerCallbackNode (cocos2d::Node *node)
 NA NA More...
 
void addOwnerCallbackControlEvents (cocos2d::extension::Control::EventType type)
 
void addDocumentCallbackName (const std::string &name)
 NA NA More...
 
void addDocumentCallbackNode (cocos2d::Node *node)
 NA NA More...
 
void addDocumentCallbackControlEvents (cocos2d::extension::Control::EventType eventType)
 
cocos2d::NodereadFileWithCleanUp (bool bCleanUp, CCBAnimationManagerMapPtr am)
 NA NA More...
 
void addOwnerOutletName (std::string name)
 
void addOwnerOutletNode (cocos2d::Node *node)
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 NA NA More...
 

Static Public Member Functions

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

Friends

class NodeLoader
 

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Detailed Description

Parse CCBI file which is generated by CocosBuilder.

Member Typedef Documentation

Member Enumeration Documentation

enum FloatType
strong
Enumerator
_0 
_1 
MINUS1 
_05 
INTEGER 
FULL 
enum 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 
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 
enum ScaleType
strong
Enumerator
ABSOLUTE 
MULTIPLY_RESOLUTION 
enum SizeType
strong
Enumerator
ABSOLUTE 
PERCENT 
RELATIVE_CONTAINER 
HORIZONTAL_PERCENT 
VERTICAL_PERCENT 
MULTIPLY_RESOLUTION 
enum TargetType
strong
Enumerator
NONE 
DOCUMENT_ROOT 
OWNER 

Constructor & Destructor Documentation

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

Member Function Documentation

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 ( )
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

Friends And Related Function Documentation

friend class NodeLoader
friend

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