os::MessageFilter Class Reference
[Various utillity classes.]

Description:
More...

List of all members.

Public Member Functions

 MessageFilter ()
 MessageFilter (int32 nFilterCode, Handler *pcNewTarget)
 Constructor.
virtual ~MessageFilter ()
virtual MessageFilterResult Filter (Message *pcMessage, Handler **ppcHandler)
 Message filtering function.
int32 GetFilterCode () const
 Get filter code.
void SetFilterCode (int32 nCode)
 Set filter code.
void SetTarget (Handler *pcTarget)
 Set target for diverted messages.
HandlerGetTarget () const
 Get target for diverted messages.

Friends

class Looper
class Handler

Classes

class  Private


Detailed Description

See also:
Author:
Kurt Skauen ([email protected])


Constructor & Destructor Documentation

MessageFilter::MessageFilter (  ) 

MessageFilter::MessageFilter ( int32  nFilterCode,
Handler pcTarget 
)

Description:
Creates a message filter that reroutes messages with a certain code to a specific Handler object.
Parameters:
nFilterCode The filter code to respond to.
pcTarget New target for messages.
See also:
Looper::AddCommonFilter()
Author:
Henrik Isaksson ([email protected])

MessageFilter::~MessageFilter (  )  [virtual]


Member Function Documentation

MessageFilterResult MessageFilter::Filter ( Message pcMessage,
Handler **  ppcHandler 
) [virtual]

Description:
This method can be overridden in subclasses to attain the desired filtering. By default it diverts messages with a certain code to a different target, set with SetTarget().
Parameters:
pcMessage The message to filter.
ppcHandler The handler to send to. Can be changed in this function.
Returns:
MF_DISPATCH_MESSAGE or MF_DISCARD_MESSAGE.
See also:
SetTarget(), SetFilterCode().
Author:
Henrik Isaksson ([email protected])

int32 MessageFilter::GetFilterCode (  )  const

Description:
See also:
SetFilterCode()
Author:
Henrik Isaksson ([email protected])

void MessageFilter::SetFilterCode ( int32  nCode  ) 

Description:
Messages with a Code field that matches the number specified with this method will be diverted by the Filter() function.
Parameters:
nCode What code to react to.
See also:
GetFilterCode(), Message::GetCode(), Filter()
Author:
Henrik Isaksson ([email protected])

void MessageFilter::SetTarget ( Handler pcTarget  ) 

Description:
Messages matched by Filter() will be diverted to the Handler you specify with this method.
Parameters:
pcTarget Where to send filtered messages.
See also:
GetTarget()
Author:
Henrik Isaksson ([email protected])

Handler * MessageFilter::GetTarget (  )  const

Description:
See also:
SetTarget()
Author:
Henrik Isaksson ([email protected])


Friends And Related Function Documentation

friend class Looper [friend]

friend class Handler [friend]


Generated on Sat May 9 22:51:14 2009 for Syllable higlevel API by  doxygen 1.5.1