#include <CCNotificationCenter.h>
|
| | CCNotificationCenter () |
| | ~CCNotificationCenter () |
| | CCNotificationCenter destructor. More...
|
| |
| void | addObserver (CCObject *target, SEL_CallFuncO selector, const char *name, CCObject *obj) |
| | Adds an observer for the specified target. More...
|
| |
| local | addObserver ( local target, local selector, local name, local obj) |
| | Adds an observer for the specified target. More...
|
| |
| void | removeObserver (CCObject *target, const char *name) |
| | Removes the observer by the specified target and name. More...
|
| |
| int | removeAllObservers (CCObject *target) |
| | Removes all notifications registered by this target. More...
|
| |
| void | registerScriptObserver (CCObject *target, int handler, const char *name) |
| | Registers one hander for script binding. More...
|
| |
| local | registerScriptObserver ( local target, local handler, local name) |
| | Registers one hander for script binding. More...
|
| |
| void | unregisterScriptObserver (CCObject *target, const char *name) |
| | Unregisters script observer. More...
|
| |
| void | postNotification (const char *name) |
| | Posts one notification event by name. More...
|
| |
| void | postNotification (const char *name, CCObject *object) |
| | Posts one notification event by name. More...
|
| |
| local | postNotification ( local name, local object) |
| | Posts one notification event by name. More...
|
| |
| int | getScriptHandler () |
| | Gets script handler. More...
|
| |
| int | getObserverHandlerByName (const char *name) |
| | Gets observer script handler. More...
|
| |
| | CCObject (void) |
| virtual | ~CCObject (void) |
| void | release (void) |
| void | retain (void) |
| CCObject * | autorelease (void) |
| CCObject * | copy (void) |
| bool | isSingleReference (void) const |
| unsigned int | retainCount (void) const |
| virtual bool | isEqual (const CCObject *pObject) |
| virtual void | acceptVisitor (CCDataVisitor &visitor) |
| virtual void | update (float dt) |
| virtual CCObject * | copyWithZone (CCZone *pZone) |
Adds an observer for the specified target.
- Parameters
-
| target | The target which wants to observe notification events. |
| selector | The callback function which will be invoked when the specified notification event was posted. |
| name | The name of this notification. |
| obj | The extra parameter which will be passed to the callback function. |
| local addObserver |
( |
local |
target, |
|
|
local |
selector, |
|
|
local |
name, |
|
|
local |
obj |
|
) |
| |
Adds an observer for the specified target.
- Parameters
-
| target | The target which wants to observe notification events. |
| selector | The callback function which will be invoked when the specified notification event was posted. |
| name | The name of this notification. |
| obj | The extra parameter which will be passed to the callback function. |
| int getObserverHandlerByName |
( |
const char * |
name) | |
|
Gets observer script handler.
- Parameters
-
| name | The name of this notification. |
- Returns
- The observer script handle.
| local getObserverHandlerByName |
( |
local |
name) | |
|
Gets observer script handler.
- Parameters
-
| name | The name of this notification. |
- Returns
- The observer script handle.
Gets script handler.
- Note
- Only supports Lua Binding now.
- Returns
- The script handle.
| local getScriptHandler |
( |
) | |
|
|
inline |
Gets script handler.
- Note
- Only supports Lua Binding now.
- Returns
- The script handle.
| void postNotification |
( |
const char * |
name) | |
|
Posts one notification event by name.
- Parameters
-
| name | The name of this notification. |
| local postNotification |
( |
local |
name) | |
|
Posts one notification event by name.
- Parameters
-
| name | The name of this notification. |
| void postNotification |
( |
const char * |
name, |
|
|
CCObject * |
object |
|
) |
| |
Posts one notification event by name.
- Parameters
-
| name | The name of this notification. |
| object | The extra parameter. |
| local postNotification |
( |
local |
name, |
|
|
local |
object |
|
) |
| |
Posts one notification event by name.
- Parameters
-
| name | The name of this notification. |
| object | The extra parameter. |
| static void purgeNotificationCenter |
( |
void |
) | |
|
|
static |
| local purgeNotificationCenter |
( |
|
) | |
|
|
static |
| void registerScriptObserver |
( |
CCObject * |
target, |
|
|
int |
handler, |
|
|
const char * |
name |
|
) |
| |
Registers one hander for script binding.
- Note
- Only supports Lua Binding now.
- Parameters
-
| local registerScriptObserver |
( |
local |
target, |
|
|
local |
handler, |
|
|
local |
name |
|
) |
| |
Registers one hander for script binding.
- Note
- Only supports Lua Binding now.
- Parameters
-
| int removeAllObservers |
( |
CCObject * |
target) | |
|
Removes all notifications registered by this target.
- Parameters
-
| target | The target of this notification. |
- Returns
- the number of observers removed
| local removeAllObservers |
( |
local |
target) | |
|
Removes all notifications registered by this target.
- Parameters
-
| target | The target of this notification. |
- Returns
- the number of observers removed
| void removeObserver |
( |
CCObject * |
target, |
|
|
const char * |
name |
|
) |
| |
Removes the observer by the specified target and name.
- Parameters
-
| target | The target of this notification. |
| name | The name of this notification. |
| local removeObserver |
( |
local |
target, |
|
|
local |
name |
|
) |
| |
Removes the observer by the specified target and name.
- Parameters
-
| target | The target of this notification. |
| name | The name of this notification. |
| local sharedNotificationCenter |
( |
|
) | |
|
|
static |
| void unregisterScriptObserver |
( |
CCObject * |
target, |
|
|
const char * |
name |
|
) |
| |
Unregisters script observer.
| local unregisterScriptObserver |
( |
local |
target, |
|
|
local |
name |
|
) |
| |
Unregisters script observer.
The documentation for this class was generated from the following file: