Re: [Quickfix-developers] Absence of Symbol in FIX44::NewOrderSingle constructor
Brought to you by:
orenmnero
From: K. F. <kfr...@gm...> - 2013-02-17 22:26:52
|
Hello Grant! Two follow-up questions First, could someone give me a quick explanation about the difference between a "field" and a "component"? Is this something defined in FIX, or is it a distinction specific to QuickFIX? If it's a FIX concept, is it something new to FIX 4.4? My second question appear in line, below: On Fri, Feb 15, 2013 at 5:38 PM, Grant Birchmeier <gbi...@co...> wrote: > I think you nailed it. The difference in the data dictionary is > causing the generator to generate the constructor slightly > differently. It's very interesting to me to hear that you use a code generator, that, I presume, reads the data dictionary. Am I correct that the source bundle I downloaded, quickfix-1.13.3.zip (or the nearly identical linux version, quickfix-1.13.3.tar.gz) contains the output of the code generator, but not the generator itself? > I think your workaround is the correct way to go. (To be honest, it's > probably the only way to go.) It seems very reasonable, if a little imperfect to use the two-step construct / set process. > Of course, if you want to try your hand at extending the generator to > include required component fields in ctors, I'm sure the patch will be > welcome :) I doubt I would have the strength for that, but if I wanted to look into it, where would I find the generator, and information on how to run the upstream build process, i.e., the part that builds and runs the generator, instead of just using its output? > -Grant Thanks for helping explain what's going on. K. Frank > On Fri, Feb 15, 2013 at 4:15 PM, K. Frank <kfr...@gm...> wrote: >> >> Hello List! >> >> The constructor for FIX44::NewOrderSingle: >> >> NewOrderSingle( >> const FIX::ClOrdID& aClOrdID, >> const FIX::Side& aSide, >> const FIX::TransactTime& aTransactTime, >> const FIX::OrdType& aOrdType ) >> >> takes fewer arguments than that for FIX42::NewOrderSingle: >> >> NewOrderSingle( >> const FIX::ClOrdID& aClOrdID, >> const FIX::HandlInst& aHandlInst, >> const FIX::Symbol& aSymbol, >> const FIX::Side& aSide, >> const FIX::TransactTime& aTransactTime, >> const FIX::OrdType& aOrdType ) >> >> in particular, not including the Symbol, even though the instrument to >> be traded is a required field. >> >> I'm guessing this has something to do with the FIX 4.2 required field: >> >> <field name='Symbol' required='Y' /> >> >> being replaced with the FIX 4.4 required component: >> >> <component name='Instrument' required='Y' /> >> >> I have two questions: >> >> First, what is going on here? >> >> Second, what is the "right" way to construct a FIX44::NewOrderSingle? >> >> I have been calling the shorter constructor: >> >> FIX44::NewOrderSingle order (/* doesn't include Symbol */ ); >> order.set (FIX::Symbol (mySymbol)); >> >> This works, but it seems like I am mixing styles, using both a >> constructor and setters. >> >> Is this construct / set approach the cleanest way to go? >> >> (The same issue applies to other messages, but NewOrderSingle >> is a typical example.) >> >> Thanks for any insight. >> >> K. Frank |