Nebula
|
#include <animeventhandlerbase.h>
This is the base class for handling animation events.
Create this in the main application and register it via RegisterAnimEventHandler to the AnimEventServer. This will call the Handler to handle the AnimEvents.
Finally throw away the pointer on the application side and unregister the handler via name (which equals the category name)!
Use in subclasses just graphics code stuff, cause this handler will work at the render thread side once they are attached!!!
(C) 2009 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file
Inherits Messaging::Handler.
Public Member Functions | |
AnimEventHandlerBase () | |
constructor | |
virtual | ~AnimEventHandlerBase () |
destructor | |
virtual bool | HandleEvent (const Animation::AnimEventInfo &event) |
handle a event | |
virtual void | OnFrame (Timing::Time time) |
optional on frame method | |
void | SetCategoryName (const Util::StringAtom &catName) |
set the category name | |
const Util::StringAtom & | GetCategoryName () const |
get the category name | |
Public Member Functions inherited from Messaging::Handler | |
Handler () | |
constructor | |
virtual | ~Handler () |
destructor | |
virtual void | Open () |
called once on startup | |
virtual void | Close () |
called once before shutdown | |
bool | IsOpen () const |
return true if open | |
virtual bool | HandleMessage (const Ptr< Message > &msg) |
handle a message, return true if handled | |
virtual void | DoWork () |
optional "per-frame" DoWork method for continuous handlers | |
Public Member Functions inherited from Core::RefCounted | |
RefCounted () | |
constructor | |
int | GetRefCount () const |
get the current refcount | |
void | AddRef () |
increment refcount by one | |
void | Release () |
decrement refcount and destroy object if refcount is zero | |
bool | IsInstanceOf (const Rtti &rtti) const |
return true if this object is instance of given class | |
bool | IsInstanceOf (const Util::String &className) const |
return true if this object is instance of given class by string | |
bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
return true if this object is instance of given class by fourcc | |
bool | IsA (const Rtti &rtti) const |
return true if this object is instance of given class, or a derived class | |
bool | IsA (const Util::String &rttiName) const |
return true if this object is instance of given class, or a derived class, by string | |
bool | IsA (const Util::FourCC &rttiFourCC) const |
return true if this object is instance of given class, or a derived class, by fourcc | |
const Util::String & | GetClassName () const |
get the class name | |
Util::FourCC | GetClassFourCC () const |
get the class FourCC code | |
Private Member Functions | |
__DeclareClass (AnimEventHandlerBase) | |
Private Attributes | |
bool | isOpen |
Util::StringAtom | categoryName |
Additional Inherited Members | |
Static Public Member Functions inherited from Core::RefCounted | |
static void | DumpRefCountingLeaks () |
dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!) | |
Protected Member Functions inherited from Core::RefCounted | |
virtual | ~RefCounted () |
destructor (called when refcount reaches zero) | |
Protected Attributes inherited from Messaging::Handler | |
bool | isOpen |
Animation::AnimEventHandlerBase::AnimEventHandlerBase | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
inline |
get the category name
|
virtual |
handle a event
|
virtual |
optional on frame method
|
inline |
set the category name
|
private |
|
private |