Nebula
Loading...
Searching...
No Matches
Animation::AnimEventHandlerBase Class Reference

#include <animeventhandlerbase.h>

Detailed Description

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::StringAtomGetCategoryName () 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::StringGetClassName () 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
 

Constructor & Destructor Documentation

◆ AnimEventHandlerBase()

Animation::AnimEventHandlerBase::AnimEventHandlerBase ( )

constructor

◆ ~AnimEventHandlerBase()

Animation::AnimEventHandlerBase::~AnimEventHandlerBase ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Animation::AnimEventHandlerBase::__DeclareClass ( AnimEventHandlerBase )
private

◆ GetCategoryName()

const Util::StringAtom & Animation::AnimEventHandlerBase::GetCategoryName ( ) const
inline

get the category name

◆ HandleEvent()

bool Animation::AnimEventHandlerBase::HandleEvent ( const Animation::AnimEventInfo & event)
virtual

handle a event

◆ OnFrame()

void Animation::AnimEventHandlerBase::OnFrame ( Timing::Time time)
virtual

optional on frame method

◆ SetCategoryName()

void Animation::AnimEventHandlerBase::SetCategoryName ( const Util::StringAtom & catName)
inline

set the category name

Member Data Documentation

◆ categoryName

Util::StringAtom Animation::AnimEventHandlerBase::categoryName
private

◆ isOpen

bool Animation::AnimEventHandlerBase::isOpen
private

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