Logon.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef FIX44_LOGON_H
  2. #define FIX44_LOGON_H
  3. #include "Message.h"
  4. namespace FIX44
  5. {
  6. class Logon : public Message
  7. {
  8. public:
  9. Logon() : Message(MsgType()) {}
  10. Logon(const FIX::Message& m) : Message(m) {}
  11. Logon(const Message& m) : Message(m) {}
  12. Logon(const Logon& m) : Message(m) {}
  13. static FIX::MsgType MsgType() { return FIX::MsgType("A"); }
  14. Logon(
  15. const FIX::EncryptMethod& aEncryptMethod,
  16. const FIX::HeartBtInt& aHeartBtInt )
  17. : Message(MsgType())
  18. {
  19. set(aEncryptMethod);
  20. set(aHeartBtInt);
  21. }
  22. FIELD_SET(*this, FIX::EncryptMethod);
  23. FIELD_SET(*this, FIX::HeartBtInt);
  24. FIELD_SET(*this, FIX::RawDataLength);
  25. FIELD_SET(*this, FIX::RawData);
  26. FIELD_SET(*this, FIX::ResetSeqNumFlag);
  27. FIELD_SET(*this, FIX::NextExpectedMsgSeqNum);
  28. FIELD_SET(*this, FIX::MaxMessageSize);
  29. FIELD_SET(*this, FIX::TestMessageIndicator);
  30. FIELD_SET(*this, FIX::Username);
  31. FIELD_SET(*this, FIX::Password);
  32. FIELD_SET(*this, FIX::NoMsgTypes);
  33. class NoMsgTypes: public FIX::Group
  34. {
  35. public:
  36. NoMsgTypes() : FIX::Group(384,372,FIX::message_order(372,385,0)) {}
  37. FIELD_SET(*this, FIX::RefMsgType);
  38. FIELD_SET(*this, FIX::MsgDirection);
  39. };
  40. };
  41. }
  42. #endif