25#include "messaging/message.h"
The common base class of Nebula.
Definition refcounted.h:38
A message identifier.
Definition id.h:19
A message port is a receiving point for messages.
Definition port.h:32
virtual void SetupAcceptedMessages()
override to register accepted messages
Definition port.cc:19
void RemoveHandler(const Ptr< Handler > &h)
remove a message handler from the port
Definition port.cc:42
void RemoveAllHandlers()
remove all message handler from the port
Definition port.cc:87
SizeT GetNumHandlers() const
return number of handlers attached to the port
Definition port.h:70
virtual void HandleMessage(const Ptr< Messaging::Message > &msg)
handle a single accepted message
Definition port.cc:78
const Ptr< Handler > & GetHandlerAtIndex(IndexT i) const
get a message handler by index
Definition port.h:105
virtual void Send(const Ptr< Message > &msg)
send a message to the port
Definition port.cc:57
void AttachHandler(const Ptr< Handler > &h)
attach a message handler to the port
Definition port.cc:29
Util::Array< Ptr< Handler > > handlers
Definition port.h:61
bool AcceptsMessage(const Id &msgId) const
return true if port accepts this msg
Definition port.h:115
void RegisterMessage(const Id &msgId)
register a single accepted message
Definition port.h:80
const Util::Array< const Id * > & GetAcceptedMessages() const
get the array of accepted messages (sorted)
Definition port.h:95
Util::Array< const Id * > acceptedMessageIds
Definition port.h:62
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Nebula's dynamic array class.
Definition array.h:60
Definition asyncport.cc:10
static const int InvalidIndex
Definition types.h:54
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48