QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::MessageType Struct Reference
[Messaging]

The type of messages. More...

#include <Q/gamedev.h>

Inheritance diagram for Q::MessageType:

Com::Unknown List of all members.

Public Types

typedef Com::Ptr< MessageTypePTR

Public Member Functions

virtual Text name () const=0
virtual unsigned int category () const=0
virtual Utils::Result setCategory (unsigned int)=0
bool equals (MessageType *) const

Static Public Member Functions

PTR create (unsigned int category=0)
PTR create (const char *)

Static Public Attributes

Com::UUID IID
Com::UUID CLSID

Detailed Description

The type of messages.

A MessageType uniquely defines a message type. Those types may be automatically created from strings using the MessageManager and there is at most one message type per string. Types may be grouped by category so that MessagePeer objects can filter messages by type of categories.

See also:
Message


Member Typedef Documentation

typedef Com::Ptr<MessageType> Q::MessageType::PTR
 

A COM pointer to an object of this class


Member Function Documentation

virtual unsigned int Q::MessageType::category  )  const [pure virtual]
 

Return the category. The category is a user-defined value used for filtering. If a peer is connected to another peer with filtering (see MessageManager::add(MessagePeer*, MessagePeer*, unsigned int)), only incoming messages with a message type whose category matches the filter bit mask of the receiver are accepted. Categories and filters allows the user to lighten up the message broacasting overload. Read the messaging tutorial for further details. Samples messagingt and messaging2t illustrate filtering.

MessageType::PTR Q::MessageType::create const char *   )  [inline, static]
 

Returns a MessageType representing the specified name

MessageType::PTR Q::MessageType::create unsigned int  category = 0  )  [inline, static]
 

Create a message type.

Parameters:
category The category is a user-defined value used for filtering. If a peer is connected to another peer with filtering (see MessageManager::add(MessagePeer*, MessagePeer*, unsigned int)), only incoming messages with a message type whose category matches the filter bit mask of the receiver are accepted. Categories and filters allows the user to lighten up the message broacasting overload. Read the messaging tutorial for further details. Samples messagingt and messaging2t illustrate filtering.

bool Q::MessageType::equals MessageType  )  const [inline]
 

Equality. The method tests if the pointer to this MessageType and the specified MessageType pointer are equal. This method is legacy and the user is advised to use pointer equality == directly.

Deprecated:
This method is deprecated. Use pointer equality == directly.

virtual Text Q::MessageType::name  )  const [pure virtual]
 

Return the name associated with the type if it exists

virtual Utils::Result Q::MessageType::setCategory unsigned  int  )  [pure virtual]
 

Set the category. The category is a user-defined value used for filtering. If a peer is connected to another peer with filtering (see MessageManager::add(MessagePeer*, MessagePeer*, unsigned int)), only incoming messages with a message type whose category matches the filter bit mask of the receiver are accepted. Categories and filters allows the user to lighten up the message broacasting overload. Read the messaging tutorial for further details. Samples messagingt and messaging2t illustrate filtering.


Member Data Documentation

Com::UUID Q::MessageType::CLSID [static]
 

COM CLSID fb396621-7f44-4cbb-b4be-4633d4ca7611

Com::UUID Q::MessageType::IID [static]
 

COM IID 5ebe3824-b7e5-4d3f-86a5-1d1b05803e75

Reimplemented from Com::Unknown.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004