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

#include <CCNotificationCenter.h>

Inheritance diagram for NotificationObserver:
Object

Public Member Functions

 NotificationObserver (Object *target, SEL_CallFuncO selector, const char *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 char * 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...
 
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 _reference
 count of references More...
 
var _reference
 count of references More...
 
local _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 
var _autoReleaseCount
 count of autorelease More...
 
local _autoReleaseCount
 count of autorelease More...
 

Constructor & Destructor Documentation

NotificationObserver ( Object target,
SEL_CallFuncO  selector,
const char *  name,
Object sender 
)

NotificationObserver constructor.

Parameters
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. NULL 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 char* 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: