cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ComAttribute Class Reference

#include <CCComAttribute.h>

Inheritance diagram for ComAttribute:
Component Ref

Public Member Functions

 ComAttribute (void)
 ctor More...
 
virtual ~ComAttribute (void)
 NA NA More...
 
virtual bool init () override
 
virtual bool serialize (void *r) override
 
void setInt (const std::string &key, int value)
 
void setFloat (const std::string &key, float value)
 
void setBool (const std::string &key, bool value)
 
void setString (const std::string &key, const std::string &value)
 
int getInt (const std::string &key, int def=0) const
 
float getFloat (const std::string &key, float def=0.0f) const
 
bool getBool (const std::string &key, bool def=false) const
 
std::string getString (const std::string &key, const std::string &def="") const
 
bool parse (const std::string &jsonFile)
 
- Public Member Functions inherited from Component
virtual ~Component (void)
 NA NA More...
 
virtual void onEnter ()
 
virtual void onExit ()
 
virtual void update (float delta)
 
virtual bool isEnabled () const
 
virtual void setEnabled (bool b)
 
const std::string & getName () const
 
void setName (const std::string &name)
 
void setOwner (Node *pOwner)
 
NodegetOwner () const
 
- 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 ComAttributecreate (void)
 
- Static Public Member Functions inherited from Component
static Componentcreate (void)
 

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
- Protected Attributes inherited from Component
Node_owner
 
std::string _name
 
bool _enabled
 
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Constructor & Destructor Documentation

ComAttribute ( void  )

ctor

virtual ~ComAttribute ( void  )
virtual

NA NA

Member Function Documentation

static ComAttribute* create ( void  )
static
bool getBool ( const std::string &  key,
bool  def = false 
) const
float getFloat ( const std::string &  key,
float  def = 0.0f 
) const
int getInt ( const std::string &  key,
int  def = 0 
) const
std::string getString ( const std::string &  key,
const std::string &  def = "" 
) const
virtual bool init ( )
overridevirtual

Reimplemented from Component.

bool parse ( const std::string &  jsonFile)
virtual bool serialize ( void *  r)
overridevirtual

Reimplemented from Component.

void setBool ( const std::string &  key,
bool  value 
)
void setFloat ( const std::string &  key,
float  value 
)
void setInt ( const std::string &  key,
int  value 
)
void setString ( const std::string &  key,
const std::string &  value 
)

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