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

#include <animeventserver.h>

Detailed Description

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

Constructor & Destructor Documentation

◆ AnimEventServer()

Animation::AnimEventServer::AnimEventServer ( )

constructor

◆ ~AnimEventServer()

Animation::AnimEventServer::~AnimEventServer ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Animation::AnimEventServer::__DeclareClass ( AnimEventServer )
private

◆ __DeclareSingleton()

Animation::AnimEventServer::__DeclareSingleton ( AnimEventServer )
private

◆ Close()

void Animation::AnimEventServer::Close ( )
virtual

close the server

Reimplemented from Messaging::Handler.

◆ HandleAnimEvents()

bool Animation::AnimEventServer::HandleAnimEvents ( const Util::Array< Animation::AnimEventInfo > & eventz)

delegate this event to a attached handler

◆ HandleMessage()

bool Animation::AnimEventServer::HandleMessage ( const Ptr< Messaging::Message > & msg)
virtual

handle a message, return true if handled

Reimplemented from Messaging::Handler.

◆ IsOpen()

bool Animation::AnimEventServer::IsOpen ( ) const
inline

return true if open

◆ OnFrame()

void Animation::AnimEventServer::OnFrame ( Timing::Time time)

delegate to attached handler

◆ Open()

void Animation::AnimEventServer::Open ( )
virtual

open the server

Reimplemented from Messaging::Handler.

◆ RegisterAnimEventHandler()

void Animation::AnimEventServer::RegisterAnimEventHandler ( const Ptr< AnimEventHandlerBase > & newHandler)

attach an animeventhandler

◆ UnregisterAnimEventHandler() [1/2]

void Animation::AnimEventServer::UnregisterAnimEventHandler ( const Ptr< AnimEventHandlerBase > & handler)

detach an animeventhandler

◆ UnregisterAnimEventHandler() [2/2]

void Animation::AnimEventServer::UnregisterAnimEventHandler ( const Util::StringAtom & categoryName)

detach an animeventhandler

Member Data Documentation

◆ animEventHandler

Util::Dictionary<Util::StringAtom, Ptr<AnimEventHandlerBase> > Animation::AnimEventServer::animEventHandler
private

◆ isOpen

bool Animation::AnimEventServer::isOpen
private

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