cocos2d-x  3.3
 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 NA NA. More...
 
void performSelector (Ref *sender)
 Invokes the callback function of this observer NA NA. More...
 
RefgetTarget () const
 NA NA More...
 
SEL_CallFuncO getSelector () const
 NA NA More...
 
const std::string & getName () const
 NA NA More...
 
RefgetSender () const
 NA NA More...
 
int getHandler () const
 NA NA More...
 
void setHandler (int handler)
 NA NA More...
 
- 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...
 

Additional Inherited Members

- Protected Member Functions inherited from Ref
 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. NA NA

NotificationObserver destructor function NA NA.

Member Function Documentation

int getHandler ( ) const

NA NA

const std::string& getName ( ) const

NA NA

SEL_CallFuncO getSelector ( ) const

NA NA

Ref* getSender ( ) const

NA NA

Ref* getTarget ( ) const

NA NA

void performSelector ( Ref sender)

Invokes the callback function of this observer NA NA.

void setHandler ( int  handler)

NA NA


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