[Quickfix-developers] Custom Repeating Group Rejects when DataDict=N (C++)
Brought to you by:
orenmnero
From: gtsafas <gt...@rb...> - 2010-04-09 03:45:03
|
I searched through the forums to figure out how to add a custom group. I am mainly using my engine to catch Execution Reports. As I do not want to reject any (I.E. Bad Values) I have opted to disable my DataDictionary. This seems to be working fine for everything, except for a custom repeating group. I modified my fix42/ExecutionReport.h to add the new group, In the ExecutionReport.h I first defined my custom tags using the FIX namespace. ---Modified ExectionReport.h--- namespace FIX{ USER_DEFINE_INT(NumCharges,8125); USER_DEFINE_STRING(ChargeName,8126); USER_DEFINE_STRING(ChargeType,8127); USER_DEFINE_STRING(ChargeRate,8128); USER_DEFINE_STRING(ChargeAmount,8129); } Then inside FIX42 Namespace I added this after NoContraBrokers class GroupCharges: public FIX::Group{ public: GroupCharges() : FIX::Group(8125,8126,FIX::message_order(8126,8127,8128,8129,0)) {} FIELD_SET(*this, FIX::ChargeName); FIELD_SET(*this, FIX::ChargeType); FIELD_SET(*this, FIX::ChargeRate); FIELD_SET(*this, FIX::ChargeAmount); }; ---End ExecutionReport.h--- Now inside my application I am attempting the following. ---Application.cpp--- //This is inside void Application::onMessage( const FIX42::ExecutionReport& message, const FIX::SessionID& ) FIX::NumCharges fNumCharges; if (message.isSetField(fNumCharges)){ message.getField(fNumCharges); FIX42::ExecutionReport::GroupCharges group; FIX::ChargeName fChargeName; FIX::ChargeType fChargeType; FIX::ChargeRate fChargeRate; FIX::ChargeAmount fChargeAmount; for (int i=0; i<fNumCharges.getValue();i++){ message.getGroup(i+1,group); group.get(fChargeName); group.get(fChargeType); group.get(fChargeRate); group.get(fChargeAmount); } } ---End Application.cpp--- End result is, This rejects due to repeating tag in message. Can someone point out what is wrong with my logic? Appreciate it Very Much. Thank You -George -- View this message in context: http://old.nabble.com/Custom-Repeating-Group-Rejects-when-DataDict%3DN-%28C%2B%2B%29-tp28187295p28187295.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. |