[Quickfix-developers] Modifying messages with MessageCracker
Brought to you by:
orenmnero
From: Mark W. <scr...@go...> - 2011-02-23 14:47:58
|
I'm implementing toAdmin in the Application interface to modify the Logon message to add username and password. I noticed that in the message cracker it provides non-const overloads for modifying messages. However in the void crack( Message& message,const SessionID& sessionID,const BeginString& beginString ) implementation when downcasting the message it casts it to the const version. e.g. at line 122 in version 1.33.3 it says ((FIX44::MessageCracker&)(*this)).crack((const FIX44::Message&) message, sessionID);. So it calls the const overload in the per fix version MessageCracker. Is it possible to change this to a non-const downcast? Is there an alternative method I should be using instead? Thanks, Mark P.S. Apologies if this ends up posted twice. Had my from address set incorrectly (gmail vs googlemail) on the first attempt and think it was dropped. |