JUCE
|
The base class for objects that can be sent to a MessageListener. More...
Public Types | |
typedef ReferenceCountedObjectPtr< Message > | Ptr |
![]() | |
typedef ReferenceCountedObjectPtr< MessageBase > | Ptr |
Public Member Functions | |
Message () noexcept | |
Creates an uninitialised message. More... | |
~Message () | |
![]() | |
MessageBase () noexcept | |
virtual | ~MessageBase () |
bool | post () |
![]() | |
void | incReferenceCount () noexcept |
Increments the object's reference count. More... | |
void | decReferenceCount () noexcept |
Decreases the object's reference count. More... | |
bool | decReferenceCountWithoutDeleting () noexcept |
Decreases the object's reference count. More... | |
int | getReferenceCount () const noexcept |
Returns the object's current reference count. More... | |
Additional Inherited Members | |
![]() | |
ReferenceCountedObject () | |
Creates the reference-counted object (with an initial ref count of zero). More... | |
virtual | ~ReferenceCountedObject () |
Destructor. More... | |
void | resetReferenceCount () noexcept |
Resets the reference count to zero without deleting the object. More... | |
The base class for objects that can be sent to a MessageListener.
If you want to send a message that carries some kind of custom data, just create a subclass of Message with some appropriate member variables to hold your data.
Always create a new instance of a Message object on the heap, as it will be deleted automatically after the message has been delivered.
typedef ReferenceCountedObjectPtr<Message> Message::Ptr |
|
noexcept |
Creates an uninitialised message.
Message::~Message | ( | ) |