Re: [Quickfix-developers] Howto specify explicitly order of custom fields?
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2005-07-15 17:14:29
|
Well, if you dig down into the C++ layer, in the FieldMap class, you =20 will notice that a FieldMap constructor takes a message_order =20 object. Now, if you look in MessageSorters.h, you will find the =20 message_order object which has 4 modes. header: Makes sure that the BeginString, BodyLength, and MsgType are =20 the first three fields. Everything else in ascending numerical order. trailer: Makes sure the CheckSum field is last. Everything else in =20 ascending numerical order. normal: Sorted in ascending numerical order, used for message body's group: Sorted in the order based on provided list. Why is it like this? Well sorting things in ascending order is just =20 the simplest fastest way to sort fields and complies with the spec. =20 The group order was introduced because the spec explicitly states =20 that repeating groups must be in a specific order. Basically to accomplish what you need would require some new =20 functionality. I think it would require the implementation of a data =20= dictionary sorting mode. --oren On Jul 15, 2005, at 11:27 AM, Joerg Thoennes wrote: > Hi Oren, > > >> Which fields need to be ordered? The custom tags in the header =20 >> and the trailer? The entire message? >> > > To be more precise: EMX adds extra custom fields to both the header =20= > and trailer, and of course to the body. > > We generated the new QF classes using the XML scripts, but the =20 > order seems to be different from what EMX expects. > > So our questions is: > > How can we control the order of tags in > > (a) header > (b) body > (c) trailer > > My guess is that the DD order controls at least the body order, but =20= > I am not sure about header and trailer. After some digging of the =20 > source code some advise from you would be very helpful. > > Thanks, J=F6rg > > --=20 > Joerg Thoennes > http://macd.com > Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH > Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen > > |