Re: [Quickfix-developers] Enumerating all repeating groups in a FIX message
Brought to you by:
orenmnero
From: Alex M. <ale...@ya...> - 2009-04-30 15:42:25
|
Dale, Thanks - though I still have a couple of questions... In your [begin group entry] block, it seems to me there's some missing code - "groupMap" is not assigned any value before you recursively call decodeFieldMap. Also, in C# (which is what I'm using right now), the compiler complains that it can't convert QuickFix.Group to QuickFix.FieldMap - and I can't see any methods that would allow me to retrieve the FieldMap from a Group. How do I achieve this bit? Thanks again. Alexandros ----- Original Message ---- From: Dale Wilson <wi...@oc...> To: Alex Marangos <ale...@ya...> Cc: qui...@li... Sent: Wednesday, 29 April, 2009 20:11:54 Subject: Re: [Quickfix-developers] Enumerating all repeating groups in a FIX message Alex Marangos wrote: > Alternatively, is there a way to enumerate through *all* fields of the message, regardless of whether they are in a group or not? > > void decodeFieldMap (const FIX::FieldMap & fieldMap) { FIX::FieldMap::Fields::const_iterator mapEnd = fieldMap.end(); for (FIX::FieldMap::Fields::const_iterator mapPos = fieldMap.begin(); mapPos != mapEnd; ++mapPos) { const FIX::FieldBase & field = (*mapPos).second; [do something with the field] int fieldTag = (*mapPos).first; int nGroups = fieldMap.groupCount(fieldTag); if(nGroups != 0) { [do start of group processing] for (int ng = 0; ng < nGroups; ++ng) { [begin group entry] FIX::FieldMap groupMap; decodeFieldMap (groupMap); } [do end of group processing] } } } Dale |