Message.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef FIX41_MESSAGES_H
  2. #define FIX41_MESSAGES_H
  3. #include "../Message.h"
  4. #include "../Group.h"
  5. namespace FIX41
  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. };
  33. class Trailer : public FIX::Trailer
  34. {
  35. public:
  36. FIELD_SET(*this, FIX::SignatureLength);
  37. FIELD_SET(*this, FIX::Signature);
  38. FIELD_SET(*this, FIX::CheckSum);
  39. };
  40. class Message : public FIX::Message
  41. {
  42. public:
  43. Message( const FIX::MsgType& msgtype )
  44. : FIX::Message(
  45. FIX::BeginString("FIX.4.1"), msgtype )
  46. {}
  47. Message(const FIX::Message& m) : FIX::Message(m) {}
  48. Message(const Message& m) : FIX::Message(m) {}
  49. Header& getHeader() { return (Header&)m_header; }
  50. const Header& getHeader() const { return (Header&)m_header; }
  51. Trailer& getTrailer() { return (Trailer&)m_trailer; }
  52. const Trailer& getTrailer() const { return (Trailer&)m_trailer; }
  53. };
  54. }
  55. #endif