Nebula
Loading...
Searching...
No Matches
animeventhandlerbase.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
20#include "messaging/handler.h"
21#include "util/stringatom.h"
23
24//------------------------------------------------------------------------------
25namespace Animation
26{
28{
30public:
34 virtual ~AnimEventHandlerBase();
35
37 virtual bool HandleEvent(const Animation::AnimEventInfo& event);
38
40 virtual void OnFrame(Timing::Time time);
41
43 void SetCategoryName(const Util::StringAtom& catName);
45 const Util::StringAtom& GetCategoryName() const;
46
47 private:
48 bool isOpen;
50};
51
52//------------------------------------------------------------------------------
55inline void
57{
58 this->categoryName = catName;
59}
60
61//------------------------------------------------------------------------------
64inline const Util::StringAtom&
66{
67 return this->categoryName;
68}
69
70
71} // namespace Debug
72//------------------------------------------------------------------------------
This is the base class for handling animation events.
Definition animeventhandlerbase.h:28
void SetCategoryName(const Util::StringAtom &catName)
set the category name
Definition animeventhandlerbase.h:56
virtual void OnFrame(Timing::Time time)
optional on frame method
Definition animeventhandlerbase.cc:46
Util::StringAtom categoryName
Definition animeventhandlerbase.h:49
__DeclareClass(AnimEventHandlerBase)
bool isOpen
Definition animeventhandlerbase.h:48
virtual ~AnimEventHandlerBase()
destructor
Definition animeventhandlerbase.cc:25
AnimEventHandlerBase()
constructor
Definition animeventhandlerbase.cc:16
const Util::StringAtom & GetCategoryName() const
get the category name
Definition animeventhandlerbase.h:65
virtual bool HandleEvent(const Animation::AnimEventInfo &event)
handle a event
Definition animeventhandlerbase.cc:34
The AnimEventInfo has extra information of the animevent, like the animjob from which it is initiated...
Definition animeventinfo.h:21
Message handlers are used to process a message.
Definition handler.h:20
A StringAtom.
Definition stringatom.h:22
Definition animeventhandlerbase.cc:10
double Time
the time datatype
Definition time.h:18