Nebula
|
#include <animeventserver.h>
This is the server, which is triggered if a animation event is emitted.
Attach here some handlers to handle special animevents. Handler can be registered via RegisterAnimEventHandler and unregistered through UnregisterAnimEventHandler messages from the GraphicsProtocol!
Animeventhandler are specified by the category name they handle!
(C) 2009 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file
Inherits Messaging::Handler.
Public Member Functions | |
AnimEventServer () | |
constructor | |
virtual | ~AnimEventServer () |
destructor | |
void | Open () |
open the server | |
void | Close () |
close the server | |
bool | IsOpen () const |
return true if open | |
void | OnFrame (Timing::Time time) |
delegate to attached handler | |
void | RegisterAnimEventHandler (const Ptr< AnimEventHandlerBase > &newHandler) |
attach an animeventhandler | |
void | UnregisterAnimEventHandler (const Util::StringAtom &categoryName) |
detach an animeventhandler | |
void | UnregisterAnimEventHandler (const Ptr< AnimEventHandlerBase > &handler) |
detach an animeventhandler | |
bool | HandleAnimEvents (const Util::Array< Animation::AnimEventInfo > &eventz) |
delegate this event to a attached handler | |
virtual bool | HandleMessage (const Ptr< Messaging::Message > &msg) |
handle a message, return true if handled | |
Public Member Functions inherited from Messaging::Handler | |
Handler () | |
constructor | |
virtual | ~Handler () |
destructor | |
bool | IsOpen () const |
return true if open | |
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 (AnimEventServer) | |
__DeclareSingleton (AnimEventServer) | |
Private Attributes | |
bool | isOpen |
Util::Dictionary< Util::StringAtom, Ptr< AnimEventHandlerBase > > | animEventHandler |
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::AnimEventServer::AnimEventServer | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
private |
|
virtual |
close the server
Reimplemented from Messaging::Handler.
bool Animation::AnimEventServer::HandleAnimEvents | ( | const Util::Array< Animation::AnimEventInfo > & | eventz | ) |
delegate this event to a attached handler
|
virtual |
handle a message, return true if handled
Reimplemented from Messaging::Handler.
|
inline |
return true if open
void Animation::AnimEventServer::OnFrame | ( | Timing::Time | time | ) |
delegate to attached handler
|
virtual |
open the server
Reimplemented from Messaging::Handler.
void Animation::AnimEventServer::RegisterAnimEventHandler | ( | const Ptr< AnimEventHandlerBase > & | newHandler | ) |
attach an animeventhandler
void Animation::AnimEventServer::UnregisterAnimEventHandler | ( | const Ptr< AnimEventHandlerBase > & | handler | ) |
detach an animeventhandler
void Animation::AnimEventServer::UnregisterAnimEventHandler | ( | const Util::StringAtom & | categoryName | ) |
detach an animeventhandler
|
private |
|
private |