Re: [Quickfix-developers] Field name to number conversion - more info
Brought to you by:
orenmnero
From: George H. <ge...@so...> - 2008-08-15 16:28:25
|
Hello again everyone, Here is some more info on what I am trying to do: Let's say I have a file called: fixfields.cfg In the file I have: OrderQty Symbol Price ClOrdID Side Currently, from: "Application::onMessage" function, I do: FIX::Symbol symbol; FIX::Side side; FIX::OrderQty orderQty; FIX::Price price; FIX::ClOrdID clOrdID; ... ... message.get( symbol ); message.get( side ); message.get( orderQty ); message.get( price ); message.get( clOrdID ); I am sure you recognize this as the sample executor application. What I want to do is: message.get( "symbol_1_from_file" ); message.get( "symbol_2_from_file" ); message.get( "symbol_3_from_file" ); ... ... You see, what I want to do is "message.get" for the fields I read in from the config file. This way the fields are not hard coded in the app. The question is, is there a way to get the field, as a string, and then find the appropriate enum? I hope this makes more sense. Also, and this is a big one, I am a "C" programmer. I am relatively new to "C++". So, please bear with me. -George On Aug 14, 2008, at 5:34 PM, George Hrysanthopoulos wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hello everyone, > > During runtime I want to read a file, with field names, and when a > deal comes in, just print to screen > the fields I am interested in (for starters). > > However, I see that the field names are enum'ed from file: > FieldNumbers.h > > How do I generate a field number from a string? Is there a built-in > way of doing this > or do I have to (somehow) keep a copy of "FieldNumbers.h" in my > executable? > > Or, worst case, keep the fields I am interested in as numbers in the > setup file? > This is not at all user friendly and I would like to avoid that. > > -G > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |