Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

CODEX_Server::MessageParser Class Reference

This class provides an object abstraction for parsing routines. More...

#include <MessageParser.h>

Inheritance diagram for CODEX_Server::MessageParser:

Inheritance graph
[legend]
Collaboration diagram for CODEX_Server::MessageParser:

Collaboration graph
[legend]
List of all members.

Public Methods

 MessageParser ()
 Constructor.

virtual ~MessageParser ()
 Virtual destructor.

virtual void operator() (unsigned char *server, unsigned char *mID, CODEX_Quorum::Message *m)=0
 Parse and dispatch a message.


Detailed Description

This class provides an object abstraction for parsing routines.

All message categories should define a MessageParser, which can then be used to read messages in marshalled form and construct appropriately typed objects from the messages. The resulting object should then be dispatched as an event, and the parser absorbs the acknowledgments.

MessageParser inherits CODEX_Events::Activity as a virtual base class so that a concrete class inheriting multiple abstract type-specific bases will have only one copy of type Activity. This eliminates ambiguity with regards to event counts and object deletion. It also allows us to use a default constructor, since the arguments forwarded to Activity::Activity() will never actually be passed. Instead, the derived class should pass arguments directly to Activity::Activity() in its constructor.

Definition at line 43 of file CODEX_Server/MessageParser.h.


Member Function Documentation

virtual void CODEX_Server::MessageParser::operator() unsigned char *    server,
unsigned char *    mID,
CODEX_Quorum::Message   m
[pure virtual]
 

Parse and dispatch a message.

The memory for all arguments is taken over by the MessageParser.

Parameters:
server  Originating server
mID  Unique ID for the message
m  Marshalled message

Implemented in CODEX_APSS::MessageParser, CODEX_KeyService::ClientMessageParser, and CODEX_KeyService::ClientResponseParser.


The documentation for this class was generated from the following file:
Generated on Wed Jun 2 16:33:20 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18