Re: [Quickfix-developers] Version neutral message cracker?
Brought to you by:
orenmnero
From: Oren M. <ore...@ya...> - 2004-01-13 15:26:17
|
If you intend on writing a significant amount of code, then the message cracker may not be the best choice. Instead you can just check the MsgType yourself and work without the type system. Or you may want to use the cracker delegate the non version specific code. For instance: onNewOrderSingle( const Message&, const SessionID& ) { // common code between versions } onMessage( const FIX41::NewOrderSingle&, const SessionID& ) { onNewOrderSingle( ... ); // version specific code } onMessage( const FIX42::NewOrderSingle&, const SessionID& ) { onNewOrderSingle( ... ); // version specific code } The problem with a version neutral cracker is there really is no relationship between the same messages in different versions, so there isn't really in inheritence structure. In fact I believe, though not sure, some messages may have even changed names between versions which makes things a little tricky. Otherwise such a cracker would be possible to generate, but the use of the type system would not be an option. An example of version neutral code in QuickFIX can be found in Session.cpp. Versions are only checked when there is different behavior. This file may give you some ideas on how to handle this. John Muehlhausen <jg...@jg...> wrote: Forgive me if this should be obvious: Is there a message cracker that is version neutral? It seems that this would be handy when the message handling is almost the same across versions, which is usually the case. ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers --------------------------------- Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes |