Allocation.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #ifndef FIX40_ALLOCATION_H
  2. #define FIX40_ALLOCATION_H
  3. #include "Message.h"
  4. namespace FIX40
  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::Side);
  36. FIELD_SET(*this, FIX::Symbol);
  37. FIELD_SET(*this, FIX::SymbolSfx);
  38. FIELD_SET(*this, FIX::SecurityID);
  39. FIELD_SET(*this, FIX::IDSource);
  40. FIELD_SET(*this, FIX::Issuer);
  41. FIELD_SET(*this, FIX::SecurityDesc);
  42. FIELD_SET(*this, FIX::Shares);
  43. FIELD_SET(*this, FIX::AvgPx);
  44. FIELD_SET(*this, FIX::Currency);
  45. FIELD_SET(*this, FIX::AvgPrxPrecision);
  46. FIELD_SET(*this, FIX::TradeDate);
  47. FIELD_SET(*this, FIX::TransactTime);
  48. FIELD_SET(*this, FIX::SettlmntTyp);
  49. FIELD_SET(*this, FIX::FutSettDate);
  50. FIELD_SET(*this, FIX::NetMoney);
  51. FIELD_SET(*this, FIX::SettlCurrAmt);
  52. FIELD_SET(*this, FIX::SettlCurrency);
  53. FIELD_SET(*this, FIX::OpenClose);
  54. FIELD_SET(*this, FIX::Text);
  55. FIELD_SET(*this, FIX::NoOrders);
  56. class NoOrders: public FIX::Group
  57. {
  58. public:
  59. NoOrders() : FIX::Group(73,11,FIX::message_order(11,37,66,105,0)) {}
  60. FIELD_SET(*this, FIX::ClOrdID);
  61. FIELD_SET(*this, FIX::OrderID);
  62. FIELD_SET(*this, FIX::ListID);
  63. FIELD_SET(*this, FIX::WaveNo);
  64. };
  65. FIELD_SET(*this, FIX::NoExecs);
  66. class NoExecs: public FIX::Group
  67. {
  68. public:
  69. NoExecs() : FIX::Group(124,17,FIX::message_order(17,32,31,30,0)) {}
  70. FIELD_SET(*this, FIX::ExecID);
  71. FIELD_SET(*this, FIX::LastShares);
  72. FIELD_SET(*this, FIX::LastPx);
  73. FIELD_SET(*this, FIX::LastMkt);
  74. };
  75. FIELD_SET(*this, FIX::NoMiscFees);
  76. class NoMiscFees: public FIX::Group
  77. {
  78. public:
  79. NoMiscFees() : FIX::Group(136,137,FIX::message_order(137,138,139,0)) {}
  80. FIELD_SET(*this, FIX::MiscFeeAmt);
  81. FIELD_SET(*this, FIX::MiscFeeCurr);
  82. FIELD_SET(*this, FIX::MiscFeeType);
  83. };
  84. FIELD_SET(*this, FIX::NoAllocs);
  85. class NoAllocs: public FIX::Group
  86. {
  87. public:
  88. NoAllocs() : FIX::Group(78,79,FIX::message_order(79,80,81,76,109,12,13,85,92,86,0)) {}
  89. FIELD_SET(*this, FIX::AllocAccount);
  90. FIELD_SET(*this, FIX::AllocShares);
  91. FIELD_SET(*this, FIX::ProcessCode);
  92. FIELD_SET(*this, FIX::ExecBroker);
  93. FIELD_SET(*this, FIX::ClientID);
  94. FIELD_SET(*this, FIX::Commission);
  95. FIELD_SET(*this, FIX::CommType);
  96. FIELD_SET(*this, FIX::NoDlvyInst);
  97. FIELD_SET(*this, FIX::BrokerOfCredit);
  98. FIELD_SET(*this, FIX::DlvyInst);
  99. };
  100. };
  101. }
  102. #endif