Message.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef FIX43_MESSAGES_H
  2. #define FIX43_MESSAGES_H
  3. #include "../Message.h"
  4. #include "../Group.h"
  5. namespace FIX43
  6. {
  7. class Header : public FIX::Header
  8. {
  9. public:
  10. FIELD_SET(*this, FIX::BeginString);
  11. FIELD_SET(*this, FIX::BodyLength);
  12. FIELD_SET(*this, FIX::MsgType);
  13. FIELD_SET(*this, FIX::SenderCompID);
  14. FIELD_SET(*this, FIX::TargetCompID);
  15. FIELD_SET(*this, FIX::OnBehalfOfCompID);
  16. FIELD_SET(*this, FIX::DeliverToCompID);
  17. FIELD_SET(*this, FIX::SecureDataLen);
  18. FIELD_SET(*this, FIX::SecureData);
  19. FIELD_SET(*this, FIX::MsgSeqNum);
  20. FIELD_SET(*this, FIX::SenderSubID);
  21. FIELD_SET(*this, FIX::SenderLocationID);
  22. FIELD_SET(*this, FIX::TargetSubID);
  23. FIELD_SET(*this, FIX::TargetLocationID);
  24. FIELD_SET(*this, FIX::OnBehalfOfSubID);
  25. FIELD_SET(*this, FIX::OnBehalfOfLocationID);
  26. FIELD_SET(*this, FIX::DeliverToSubID);
  27. FIELD_SET(*this, FIX::DeliverToLocationID);
  28. FIELD_SET(*this, FIX::PossDupFlag);
  29. FIELD_SET(*this, FIX::PossResend);
  30. FIELD_SET(*this, FIX::SendingTime);
  31. FIELD_SET(*this, FIX::OrigSendingTime);
  32. FIELD_SET(*this, FIX::XmlDataLen);
  33. FIELD_SET(*this, FIX::XmlData);
  34. FIELD_SET(*this, FIX::MessageEncoding);
  35. FIELD_SET(*this, FIX::LastMsgSeqNumProcessed);
  36. FIELD_SET(*this, FIX::OnBehalfOfSendingTime);
  37. FIELD_SET(*this, FIX::NoHops);
  38. class NoHops: public FIX::Group
  39. {
  40. public:
  41. NoHops() : FIX::Group(627,628,FIX::message_order(628,629,630,0)) {}
  42. FIELD_SET(*this, FIX::HopCompID);
  43. FIELD_SET(*this, FIX::HopSendingTime);
  44. FIELD_SET(*this, FIX::HopRefID);
  45. };
  46. };
  47. class Trailer : public FIX::Trailer
  48. {
  49. public:
  50. FIELD_SET(*this, FIX::SignatureLength);
  51. FIELD_SET(*this, FIX::Signature);
  52. FIELD_SET(*this, FIX::CheckSum);
  53. };
  54. class Message : public FIX::Message
  55. {
  56. public:
  57. Message( const FIX::MsgType& msgtype )
  58. : FIX::Message(
  59. FIX::BeginString("FIX.4.3"), msgtype )
  60. {}
  61. Message(const FIX::Message& m) : FIX::Message(m) {}
  62. Message(const Message& m) : FIX::Message(m) {}
  63. Header& getHeader() { return (Header&)m_header; }
  64. const Header& getHeader() const { return (Header&)m_header; }
  65. Trailer& getTrailer() { return (Trailer&)m_trailer; }
  66. const Trailer& getTrailer() const { return (Trailer&)m_trailer; }
  67. };
  68. }
  69. #endif