|
Parsing a messageThe parseMessage method of the application Engine should be invoked to parse a message. If it successfully recognizes and parses a message, it will invoke one of the onMessage events. If not, it will throw a ChameleonException. The following code shows an example of how this API can be invoked:
This diagram gives the call sequence which is invoked, assuming that the user has chosen to name the application Engine class 'ServerEngine', click on each section for descriptions: ![]() Parsing Call Sequence
The following code fragment gives an idea of what a typical on<message name>Message virtual method would look like when a override has been performed by the user in the ServerEngine class:
Example engine onXYZMessage virtual function Overriding the parseMessage MethodThere are many times that it's helpful to override the parseMessage method in an application. Some good reasons are:
The following code fragment shows an example of how you might go about overriding the parseMessage method in an application engine object:
Overriding parseMessage |