TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iMessageQueue Struct Referenceabstract
Inheritance diagram for iMessageQueue:
iUnknown

Detailed Description

Message queue interface.

Public Member Functions

virtual tU64 GetThreadID () const =0
 Get the message queue's owner thread. {Property}. More...
 
virtual tU32 GetSize () const =0
 Get the number of message currently in the queue. {Property}. More...
 
virtual tBool IsEmpty () const =0
 Check whether any message is in the queue. More...
 
virtual tBool Add (iMessageHandler *apHandler, tU32 anMsg, const Var &avarA, const Var &avarB)=0
 Queue a message. More...
 
virtual tBool Peek (sMessageDesc *apMessageDesc)=0
 Retrieves, but does not remove, the head of this queue, or returns eFalse if this queue is empty or if called from another thread than the owner thread. {NoAutomation}. More...
 
virtual Ptr< iMessageDescPeekDesc ()=0
 Same as. More...
 
virtual tBool Poll (sMessageDesc *apMessageDesc)=0
 Retrieves and removes the head of this queue, or returns eFalse if this queue is empty or if called from another thread than the owner thread. {NoAutomation}. More...
 
virtual Ptr< iMessageDescPollDesc ()=0
 Same as. More...
 
virtual tBool PollAndDispatch ()=0
 Retrieves, removes and call the message handler of the head of this queue, or returns eFalse if this queue is empty or if called from another thread than the owner thread. More...
 
virtual tBool WaitForMessage (tU32 anTimeOut)=0
 Wait for a message to be in the queue. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual tU64 GetThreadID ( ) const
pure virtual

Get the message queue's owner thread. {Property}.

virtual tU32 GetSize ( ) const
pure virtual

Get the number of message currently in the queue. {Property}.

virtual tBool IsEmpty ( ) const
pure virtual

Check whether any message is in the queue.

virtual tBool Add ( iMessageHandler apHandler,
tU32  anMsg,
const Var avarA,
const Var avarB 
)
pure virtual

Queue a message.

Returns
eFalse if the queue is full or if the message handler's thread is not the same as the message queue's thread, else eTrue.
virtual tBool Peek ( sMessageDesc apMessageDesc)
pure virtual

Retrieves, but does not remove, the head of this queue, or returns eFalse if this queue is empty or if called from another thread than the owner thread. {NoAutomation}.

virtual Ptr<iMessageDesc> PeekDesc ( )
pure virtual

Same as.

See also
Peek but returns a new iMessageDesc object.
virtual tBool Poll ( sMessageDesc apMessageDesc)
pure virtual

Retrieves and removes the head of this queue, or returns eFalse if this queue is empty or if called from another thread than the owner thread. {NoAutomation}.

virtual Ptr<iMessageDesc> PollDesc ( )
pure virtual

Same as.

See also
Poll but returns a new iMessageDesc object.
virtual tBool PollAndDispatch ( )
pure virtual

Retrieves, removes and call the message handler of the head of this queue, or returns eFalse if this queue is empty or if called from another thread than the owner thread.

virtual tBool WaitForMessage ( tU32  anTimeOut)
pure virtual

Wait for a message to be in the queue.

Returns
eFalse if the called from another thread than the other thread.