Logon.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef FIXT11_LOGON_H
  2. #define FIXT11_LOGON_H
  3. #include "Message.h"
  4. namespace FIXT11
  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. const FIX::DefaultApplVerID& aDefaultApplVerID )
  18. : Message(MsgType())
  19. {
  20. set(aEncryptMethod);
  21. set(aHeartBtInt);
  22. set(aDefaultApplVerID);
  23. }
  24. FIELD_SET(*this, FIX::EncryptMethod);
  25. FIELD_SET(*this, FIX::HeartBtInt);
  26. FIELD_SET(*this, FIX::RawDataLength);
  27. FIELD_SET(*this, FIX::RawData);
  28. FIELD_SET(*this, FIX::ResetSeqNumFlag);
  29. FIELD_SET(*this, FIX::NextExpectedMsgSeqNum);
  30. FIELD_SET(*this, FIX::MaxMessageSize);
  31. FIELD_SET(*this, FIX::TestMessageIndicator);
  32. FIELD_SET(*this, FIX::Username);
  33. FIELD_SET(*this, FIX::Password);
  34. FIELD_SET(*this, FIX::DefaultApplVerID);
  35. FIELD_SET(*this, FIX::NoMsgTypes);
  36. class NoMsgTypes: public FIX::Group
  37. {
  38. public:
  39. NoMsgTypes() : FIX::Group(384,372,FIX::message_order(372,385,1130,1131,0)) {}
  40. FIELD_SET(*this, FIX::RefMsgType);
  41. FIELD_SET(*this, FIX::MsgDirection);
  42. FIELD_SET(*this, FIX::RefApplVerID);
  43. FIELD_SET(*this, FIX::RefCstmApplVerID);
  44. };
  45. };
  46. }
  47. #endif