Allocation.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. #ifndef FIX42_ALLOCATION_H
  2. #define FIX42_ALLOCATION_H
  3. #include "Message.h"
  4. namespace FIX42
  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::ContractMultiplier);
  49. FIELD_SET(*this, FIX::CouponRate);
  50. FIELD_SET(*this, FIX::SecurityExchange);
  51. FIELD_SET(*this, FIX::Issuer);
  52. FIELD_SET(*this, FIX::EncodedIssuerLen);
  53. FIELD_SET(*this, FIX::EncodedIssuer);
  54. FIELD_SET(*this, FIX::SecurityDesc);
  55. FIELD_SET(*this, FIX::EncodedSecurityDescLen);
  56. FIELD_SET(*this, FIX::EncodedSecurityDesc);
  57. FIELD_SET(*this, FIX::Shares);
  58. FIELD_SET(*this, FIX::LastMkt);
  59. FIELD_SET(*this, FIX::TradingSessionID);
  60. FIELD_SET(*this, FIX::AvgPx);
  61. FIELD_SET(*this, FIX::Currency);
  62. FIELD_SET(*this, FIX::AvgPrxPrecision);
  63. FIELD_SET(*this, FIX::TradeDate);
  64. FIELD_SET(*this, FIX::TransactTime);
  65. FIELD_SET(*this, FIX::SettlmntTyp);
  66. FIELD_SET(*this, FIX::FutSettDate);
  67. FIELD_SET(*this, FIX::GrossTradeAmt);
  68. FIELD_SET(*this, FIX::NetMoney);
  69. FIELD_SET(*this, FIX::OpenClose);
  70. FIELD_SET(*this, FIX::Text);
  71. FIELD_SET(*this, FIX::EncodedTextLen);
  72. FIELD_SET(*this, FIX::EncodedText);
  73. FIELD_SET(*this, FIX::NumDaysInterest);
  74. FIELD_SET(*this, FIX::AccruedInterestRate);
  75. FIELD_SET(*this, FIX::NoOrders);
  76. class NoOrders: public FIX::Group
  77. {
  78. public:
  79. NoOrders() : FIX::Group(73,11,FIX::message_order(11,37,198,66,105,0)) {}
  80. FIELD_SET(*this, FIX::ClOrdID);
  81. FIELD_SET(*this, FIX::OrderID);
  82. FIELD_SET(*this, FIX::SecondaryOrderID);
  83. FIELD_SET(*this, FIX::ListID);
  84. FIELD_SET(*this, FIX::WaveNo);
  85. };
  86. FIELD_SET(*this, FIX::NoExecs);
  87. class NoExecs: public FIX::Group
  88. {
  89. public:
  90. NoExecs() : FIX::Group(124,32,FIX::message_order(32,17,31,29,0)) {}
  91. FIELD_SET(*this, FIX::LastShares);
  92. FIELD_SET(*this, FIX::ExecID);
  93. FIELD_SET(*this, FIX::LastPx);
  94. FIELD_SET(*this, FIX::LastCapacity);
  95. };
  96. FIELD_SET(*this, FIX::NoAllocs);
  97. class NoAllocs: public FIX::Group
  98. {
  99. public:
  100. NoAllocs() : FIX::Group(78,79,FIX::message_order(79,366,80,81,92,208,209,161,360,361,76,109,12,13,153,154,119,120,155,156,159,160,136,0)) {}
  101. FIELD_SET(*this, FIX::AllocAccount);
  102. FIELD_SET(*this, FIX::AllocPrice);
  103. FIELD_SET(*this, FIX::AllocShares);
  104. FIELD_SET(*this, FIX::ProcessCode);
  105. FIELD_SET(*this, FIX::BrokerOfCredit);
  106. FIELD_SET(*this, FIX::NotifyBrokerOfCredit);
  107. FIELD_SET(*this, FIX::AllocHandlInst);
  108. FIELD_SET(*this, FIX::AllocText);
  109. FIELD_SET(*this, FIX::EncodedAllocTextLen);
  110. FIELD_SET(*this, FIX::EncodedAllocText);
  111. FIELD_SET(*this, FIX::ExecBroker);
  112. FIELD_SET(*this, FIX::ClientID);
  113. FIELD_SET(*this, FIX::Commission);
  114. FIELD_SET(*this, FIX::CommType);
  115. FIELD_SET(*this, FIX::AllocAvgPx);
  116. FIELD_SET(*this, FIX::AllocNetMoney);
  117. FIELD_SET(*this, FIX::SettlCurrAmt);
  118. FIELD_SET(*this, FIX::SettlCurrency);
  119. FIELD_SET(*this, FIX::SettlCurrFxRate);
  120. FIELD_SET(*this, FIX::SettlCurrFxRateCalc);
  121. FIELD_SET(*this, FIX::AccruedInterestAmt);
  122. FIELD_SET(*this, FIX::SettlInstMode);
  123. FIELD_SET(*this, FIX::NoMiscFees);
  124. class NoMiscFees: public FIX::Group
  125. {
  126. public:
  127. NoMiscFees() : FIX::Group(136,137,FIX::message_order(137,138,139,0)) {}
  128. FIELD_SET(*this, FIX::MiscFeeAmt);
  129. FIELD_SET(*this, FIX::MiscFeeCurr);
  130. FIELD_SET(*this, FIX::MiscFeeType);
  131. };
  132. };
  133. };
  134. }
  135. #endif