#include <CCNotificationCenter.h>
Public Member Functions | |
NotificationObserver (Object *target, SEL_CallFuncO selector, const std::string &name, Object *sender) | |
NotificationObserver constructor. More... | |
~NotificationObserver () | |
NotificationObserver destructor function. More... | |
void | performSelector (Object *sender) |
Invokes the callback function of this observer. More... | |
Object * | getTarget () const |
SEL_CallFuncO | getSelector () const |
const std::string & | getName () const |
Object * | getSender () const |
int | getHandler () const |
void | setHandler (int handler) |
![]() | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
void | release () |
Release the ownership immediately. More... | |
void | retain () |
Retains the ownership. More... | |
Object * | autorelease () |
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... | |
unsigned int | getReferenceCount () const |
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) |
Additional Inherited Members | |
![]() | |
unsigned int | _ID |
object id, ScriptSupport need public _ID More... | |
int | _luaID |
Lua reference id. More... | |
![]() | |
unsigned int | _referenceCount |
count of references More... | |
NotificationObserver | ( | Object * | target, |
SEL_CallFuncO | selector, | ||
const std::string & | name, | ||
Object * | sender | ||
) |
NotificationObserver constructor.
target | The target which wants to observer notification events. |
selector | The callback function which will be invoked when the specified notification event was posted. |
name | The name of this notification. |
sender | The object whose notifications the target wants to receive. Only notifications sent by this sender are delivered to the target. nullptr means that the sender is not used to decide whether to deliver the notification to target. |
~NotificationObserver | ( | ) |
NotificationObserver destructor function.
int getHandler | ( | ) | const |
const std::string& getName | ( | ) | const |
SEL_CallFuncO getSelector | ( | ) | const |
Object* getSender | ( | ) | const |
Object* getTarget | ( | ) | const |
void performSelector | ( | Object * | sender) |
Invokes the callback function of this observer.
void setHandler | ( | int | handler) |