Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
handler.h
Go to the documentation of this file.
1
#pragma once
2
//-----------------------------------------------------------------------------
13
#include "
core/refcounted.h
"
14
#include "messaging/message.h"
15
16
//-----------------------------------------------------------------------------
17
namespace
Messaging
18
{
19
class
Handler
:
public
Core::RefCounted
20
{
21
__DeclareClass
(
Handler
);
22
public
:
24
Handler
();
26
virtual
~Handler
();
28
virtual
void
Open
();
30
virtual
void
Close
();
32
bool
IsOpen
()
const
;
34
virtual
bool
HandleMessage
(
const
Ptr<Message>
& msg);
36
virtual
void
DoWork
();
37
protected
:
38
bool
isOpen
;
39
};
40
41
//-----------------------------------------------------------------------------
44
inline
bool
45
Handler::IsOpen
()
const
46
{
47
return
this->
isOpen
;
48
}
49
50
}
// namespace Messaging
51
//-----------------------------------------------------------------------------
52
53
Core::RefCounted
The common base class of Nebula.
Definition
refcounted.h:38
Messaging::Handler::__DeclareClass
__DeclareClass(Handler)
Messaging::Handler::Close
virtual void Close()
called once before shutdown
Definition
handler.cc:48
Messaging::Handler::DoWork
virtual void DoWork()
optional "per-frame" DoWork method for continuous handlers
Definition
handler.cc:74
Messaging::Handler::~Handler
virtual ~Handler()
destructor
Definition
handler.cc:25
Messaging::Handler::HandleMessage
virtual bool HandleMessage(const Ptr< Message > &msg)
handle a message, return true if handled
Definition
handler.cc:60
Messaging::Handler::Handler
Handler()
constructor
Definition
handler.cc:16
Messaging::Handler::isOpen
bool isOpen
Definition
handler.h:38
Messaging::Handler::Open
virtual void Open()
called once on startup
Definition
handler.cc:36
Messaging::Handler::IsOpen
bool IsOpen() const
return true if open
Definition
handler.h:45
Ptr
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition
ptr.h:38
Messaging
Definition
asyncport.cc:10
refcounted.h
code
foundation
messaging
handler.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.