Re: [Quickfix-developers] Custom FIX Message Types
Brought to you by:
orenmnero
From: Andrei G. <an...@gm...> - 2008-10-09 00:39:58
|
On Wed, Oct 8, 2008 at 9:15 PM, Malinka Rellikwodahs <ael...@gm...> wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > Data Dictionary is updated with values and correct I receive the message properly but when I try to cast them to the new type it fails As far as I know, what you are trying to do is not possible in C#. You cannot cast a reference to a base type into an derived type. In C++, this can be done since you can cast everything into anything (you might end up with a mess, but it is possible). As specialized message classes in QuickFIX (e.g. QuickFIX44::NewOrderSingle) are just wrappers around the same methods in the QuickFIX::Message class, this works perfectly in C++, but does not in C#. However, there is still hope: if you rather have your custom messages as specialized message classes in QuickFIX, the following post explains how you can generate a customized QuickFIX version, which will allow exactly what you want to achieve: http://sourceforge.net/mailarchive/message.php?msg_id=320836.47930.qm%40web31010.mail.mud.yahoo.com |