Re: [Quickfix-developers] Extract all fields from QuickFix Message.
Brought to you by:
orenmnero
|
From: Caleb E. <cal...@gm...> - 2005-09-23 23:34:35
|
On 9/23/05, Martin Tanguay <mta...@ho...> wrote: > > Is there a way to extract all fields within a FIX message in an abstract > way? Is it through the message cracker? In the C++ API, the Message class is derived from FieldMap, which offers public methods begin()/end() and g_begin()/g_end() to get standard iterator= s to the maps of fields and groups. Message also contains two additional FieldMaps which store the Header and Trailer fields. for (FieldMap::iterator i =3D msg.begin (), e =3D msg.end (); i !=3D e; ++i= ) cout << i->first << '=3D' << i->second << ' '; That should print all of the non-group fields in a message in "tag=3Dvalue" format. Navigation of the header fields, trailer and repeating groups is an exercis= e left to the reader :-) -- Caleb Epstein caleb dot epstein at gmail dot com |