The message base class. More...

#include "murl_util_message.h"

Inherited by Murl::Core::Engine::InvokeMethodCallMessage, Murl::Core::Engine::LicenseTerminatedMessage, Murl::Core::Engine::LoaderTerminatedMessage, Murl::Core::Engine::LogicConfigChangedMessage, Murl::Core::Engine::LogicFinishedMessage, Murl::Core::Engine::LogicTerminatedMessage, Murl::Core::Engine::RenderingFinishedMessage, Murl::Core::Engine::TasksTerminatedMessage, Murl::Net::SocketClient::AddressMessage, Murl::Net::SocketSender::DataMessage, Murl::Net::SocketServer::AddressMessage, Murl::Net::SocketServer::ClientIdMessage, Murl::Platform::Foundation::Av::MovieVideoStream::WorkerThread::CreateOutputMessage, Murl::Platform::Foundation::Av::MovieVideoStream::WorkerThread::DestroyOutputMessage, Murl::Platform::Foundation::Av::MovieVideoStream::WorkerThread::GetFrameMessage, Murl::Platform::Foundation::Av::MovieVideoStream::WorkerThread::StartOutputMessage, and Murl::Platform::Foundation::Av::MovieVideoStream::WorkerThread::StopOutputMessage.

Public Types

enum  Id : UInt32 { ID_USER , ID_TIMEOUT , ID_QUIT , ID_ANY }
 Enumeration of the message identifiers. More...
 
using AutoPtr = AutoPointer< Message >
 Definition of the Message class auto pointer.
 

Public Member Functions

 Message (UInt32 messageId)
 The constructor. More...
 
virtual ~Message ()
 The destructor. More...
 
virtual UInt32 GetId () const
 Get the message identifier. More...
 
Bool SetSignal (System::Semaphore *sync)
 Set the sync-message semaphore. More...
 
Bool Signal ()
 Signal the sync-message semaphore, which means the processing of the message is finished. More...
 

Protected Attributes

UInt32 mMessageId
 The message identifier.
 

Detailed Description

The message base class.

The Message class is used to send messages by the MessageQueue class. The Message class can be sub-classed to add used defined members, see MessageThread.

To synchonize message delivery so called sync-messages are available:
The message sender waits until the message is delivered and processed. The processing of a message ends when calling the Signal() method, which is typically called by the message destructor.

Member Enumeration Documentation

◆ Id

Enumeration of the message identifiers.

Enumerator
ID_USER 

The used defined message identifier base.

ID_TIMEOUT 

The timeout message identifier.

ID_QUIT 

The quit message identifier.

ID_ANY 

The any message identifier.

Constructor & Destructor Documentation

◆ Message()

Murl::Util::Message::Message ( UInt32  messageId)

The constructor.

Parameters
messageIdThe message identifier.

◆ ~Message()

virtual Murl::Util::Message::~Message ( )
virtual

The destructor.

Calls Signal().

Member Function Documentation

◆ GetId()

virtual UInt32 Murl::Util::Message::GetId ( ) const
virtual

Get the message identifier.

Returns
The message identifier.

◆ SetSignal()

Bool Murl::Util::Message::SetSignal ( System::Semaphore sync)

Set the sync-message semaphore.

For sending sync-messages a semaphore is used to wait until the message is processed.

Parameters
syncPointer to the semaphore.
Returns
true if successful.

◆ Signal()

Bool Murl::Util::Message::Signal ( )

Signal the sync-message semaphore, which means the processing of the message is finished.

This is typically done at Message object destruction.

Returns
true if successful.

The documentation for this class was generated from the following file:
  • murl_util_message.h


Copyright © 2011-2024 Spraylight GmbH.