|
Nebula
|
#include <message.h>
Messages are packets of data which can be sent to a message port.
This implements a universal communication mechanism within the same thread, different threads, or even different machines.
Messages are implemented as normal C++ objects which can encode and decode themselves from and to a stream.
Inherits Core::RefCounted.
Inherited by Http::AttachRequestHandler, Http::HttpRequest, Http::RemoveRequestHandler, and Messaging::BatchMessage.
Public Member Functions | |
| Message () | |
| constructor | |
| bool | CheckId (const Messaging::Id &id) const |
| return true if message is of the given id | |
| virtual void | Encode (const Ptr< IO::BinaryWriter > &writer) |
| encode message into a stream | |
| virtual void | Decode (const Ptr< IO::BinaryReader > &reader) |
| decode message from a stream | |
| void | SetHandled (bool b) |
| set the handled flag | |
| bool | Handled () const |
| return true if the message has been handled | |
| void | SetDeferred (bool b) |
| set deferred flag | |
| bool | IsDeferred () const |
| get deferred flag | |
| void | SetDeferredHandled (bool b) |
| set the deferred handled flag | |
| bool | DeferredHandled () const |
| get the deferred handled flag | |
| bool | GetDistribute () const |
| should this message be distributed over the network | |
| void | SetDistribute (bool b) |
| enable distribution over network | |
| 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::String & | GetClassName () const |
| get the class name | |
| Util::FourCC | GetClassFourCC () const |
| get the class FourCC code | |
Protected Attributes | |
| volatile int | handled |
| bool | deferred |
| bool | deferredHandled |
| bool | distribute |
Private Member Functions | |
| __DeclareClass (Message) | |
Private Attributes | |
| __DeclareMsgId | |
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) | |
| Messaging::Message::Message | ( | ) |
constructor
|
private |
|
inline |
return true if message is of the given id
|
virtual |
decode message from a stream
|
inline |
get the deferred handled flag
|
virtual |
encode message into a stream
|
inline |
should this message be distributed over the network
|
inline |
return true if the message has been handled
|
inline |
get deferred flag
|
inline |
set deferred flag
|
inline |
set the deferred handled flag
|
inline |
enable distribution over network
|
inline |
set the handled flag
|
private |
|
protected |
|
protected |
|
protected |
|
protected |