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

#include <CCNotificationCenter.h>

Inheritance diagram for NotificationObserver:
Ref

Public Member Functions

 NotificationObserver (Ref *target, SEL_CallFuncO selector, const std::string &name, Ref *sender)
 NotificationObserver constructor. More...
 
 ~NotificationObserver ()
 NotificationObserver destructor function. More...
 
void performSelector (Ref *sender)
 Invokes the callback function of this observer. More...
 
RefgetTarget () const
SEL_CallFuncO getSelector () const
const std::string & getName () const
RefgetSender () const
int getHandler () const
void setHandler (int handler)
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Release the ownership immediately. More...
 
local release ()
 Release the ownership immediately. More...
 
Refautorelease ()
 Release the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Additional Inherited Members

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

Constructor & Destructor Documentation

NotificationObserver ( Ref target,
SEL_CallFuncO  selector,
const std::string &  name,
Ref 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. 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
Ref* getSender ( ) const
Ref* getTarget ( ) const
void performSelector ( Ref sender)

Invokes the callback function of this observer.

void setHandler ( int  handler)

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