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

#include <CCNotificationCenter.h>

Inheritance diagram for NotificationObserver:

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...
ObjectgetTarget () const
SEL_CallFuncO getSelector () const
const std::string & getName () const
ObjectgetSender () const
int getHandler () const
void setHandler (int handler)
- 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...
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

- 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 _referenceCount
 count of references More...

Constructor & Destructor Documentation

NotificationObserver ( Object target,
SEL_CallFuncO  selector,
const std::string &  name,
Object sender 

NotificationObserver constructor.

targetThe target which wants to observer notification events.
selectorThe callback function which will be invoked when the specified notification event was posted.
nameThe name of this notification.
senderThe 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 destructor function.

Member Function Documentation

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)

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