Allocation.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #ifndef FIX41_ALLOCATION_H
  2. #define FIX41_ALLOCATION_H
  3. #include "Message.h"
  4. namespace FIX41
  5. {
  6. class Allocation : public Message
  7. {
  8. public:
  9. Allocation() : Message(MsgType()) {}
  10. Allocation(const FIX::Message& m) : Message(m) {}
  11. Allocation(const Message& m) : Message(m) {}
  12. Allocation(const Allocation& m) : Message(m) {}
  13. static FIX::MsgType MsgType() { return FIX::MsgType("J"); }
  14. Allocation(
  15. const FIX::AllocID& aAllocID,
  16. const FIX::AllocTransType& aAllocTransType,
  17. const FIX::Side& aSide,
  18. const FIX::Symbol& aSymbol,
  19. const FIX::Shares& aShares,
  20. const FIX::AvgPx& aAvgPx,
  21. const FIX::TradeDate& aTradeDate )
  22. : Message(MsgType())
  23. {
  24. set(aAllocID);
  25. set(aAllocTransType);
  26. set(aSide);
  27. set(aSymbol);
  28. set(aShares);
  29. set(aAvgPx);
  30. set(aTradeDate);
  31. }
  32. FIELD_SET(*this, FIX::AllocID);
  33. FIELD_SET(*this, FIX::AllocTransType);
  34. FIELD_SET(*this, FIX::RefAllocID);
  35. FIELD_SET(*this, FIX::AllocLinkID);
  36. FIELD_SET(*this, FIX::AllocLinkType);
  37. FIELD_SET(*this, FIX::Side);
  38. FIELD_SET(*this, FIX::Symbol);
  39. FIELD_SET(*this, FIX::SymbolSfx);
  40. FIELD_SET(*this, FIX::SecurityID);
  41. FIELD_SET(*this, FIX::IDSource);
  42. FIELD_SET(*this, FIX::SecurityType);
  43. FIELD_SET(*this, FIX::MaturityMonthYear);
  44. FIELD_SET(*this, FIX::MaturityDay);
  45. FIELD_SET(*this, FIX::PutOrCall);
  46. FIELD_SET(*this, FIX::StrikePrice);
  47. FIELD_SET(*this, FIX::OptAttribute);
  48. FIELD_SET(*this, FIX::SecurityExchange);
  49. FIELD_SET(*this, FIX::Issuer);
  50. FIELD_SET(*this, FIX::SecurityDesc);
  51. FIELD_SET(*this, FIX::Shares);
  52. FIELD_SET(*this, FIX::LastMkt);
  53. FIELD_SET(*this, FIX::AvgPx);
  54. FIELD_SET(*this, FIX::Currency);
  55. FIELD_SET(*this, FIX::AvgPrxPrecision);
  56. FIELD_SET(*this, FIX::TradeDate);
  57. FIELD_SET(*this, FIX::TransactTime);
  58. FIELD_SET(*this, FIX::SettlmntTyp);
  59. FIELD_SET(*this, FIX::FutSettDate);
  60. FIELD_SET(*this, FIX::NetMoney);
  61. FIELD_SET(*this, FIX::OpenClose);
  62. FIELD_SET(*this, FIX::Text);
  63. FIELD_SET(*this, FIX::NumDaysInterest);
  64. FIELD_SET(*this, FIX::AccruedInterestRate);
  65. FIELD_SET(*this, FIX::NoOrders);
  66. class NoOrders: public FIX::Group
  67. {
  68. public:
  69. NoOrders() : FIX::Group(73,11,FIX::message_order(11,37,198,66,105,0)) {}
  70. FIELD_SET(*this, FIX::ClOrdID);
  71. FIELD_SET(*this, FIX::OrderID);
  72. FIELD_SET(*this, FIX::SecondaryOrderID);
  73. FIELD_SET(*this, FIX::ListID);
  74. FIELD_SET(*this, FIX::WaveNo);
  75. };
  76. FIELD_SET(*this, FIX::NoExecs);
  77. class NoExecs: public FIX::Group
  78. {
  79. public:
  80. NoExecs() : FIX::Group(124,32,FIX::message_order(32,17,31,29,0)) {}
  81. FIELD_SET(*this, FIX::LastShares);
  82. FIELD_SET(*this, FIX::ExecID);
  83. FIELD_SET(*this, FIX::LastPx);
  84. FIELD_SET(*this, FIX::LastCapacity);
  85. };
  86. FIELD_SET(*this, FIX::NoAllocs);
  87. class NoAllocs: public FIX::Group
  88. {
  89. public:
  90. NoAllocs() : FIX::Group(78,79,FIX::message_order(79,80,81,92,208,209,161,76,109,12,13,153,154,119,120,155,156,159,160,136,0)) {}
  91. FIELD_SET(*this, FIX::AllocAccount);
  92. FIELD_SET(*this, FIX::AllocShares);
  93. FIELD_SET(*this, FIX::ProcessCode);
  94. FIELD_SET(*this, FIX::BrokerOfCredit);
  95. FIELD_SET(*this, FIX::NotifyBrokerOfCredit);
  96. FIELD_SET(*this, FIX::AllocHandlInst);
  97. FIELD_SET(*this, FIX::AllocText);
  98. FIELD_SET(*this, FIX::ExecBroker);
  99. FIELD_SET(*this, FIX::ClientID);
  100. FIELD_SET(*this, FIX::Commission);
  101. FIELD_SET(*this, FIX::CommType);
  102. FIELD_SET(*this, FIX::AllocAvgPx);
  103. FIELD_SET(*this, FIX::AllocNetMoney);
  104. FIELD_SET(*this, FIX::SettlCurrAmt);
  105. FIELD_SET(*this, FIX::SettlCurrency);
  106. FIELD_SET(*this, FIX::SettlCurrFxRate);
  107. FIELD_SET(*this, FIX::SettlCurrFxRateCalc);
  108. FIELD_SET(*this, FIX::AccruedInterestAmt);
  109. FIELD_SET(*this, FIX::SettlInstMode);
  110. FIELD_SET(*this, FIX::NoMiscFees);
  111. class NoMiscFees: public FIX::Group
  112. {
  113. public:
  114. NoMiscFees() : FIX::Group(136,137,FIX::message_order(137,138,139,0)) {}
  115. FIELD_SET(*this, FIX::MiscFeeAmt);
  116. FIELD_SET(*this, FIX::MiscFeeCurr);
  117. FIELD_SET(*this, FIX::MiscFeeType);
  118. };
  119. };
  120. };
  121. }
  122. #endif