Logon.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef FIX42_LOGON_H
  2. #define FIX42_LOGON_H
  3. #include "Message.h"
  4. namespace FIX42
  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::MaxMessageSize);
  28. FIELD_SET(*this, FIX::NoMsgTypes);
  29. class NoMsgTypes: public FIX::Group
  30. {
  31. public:
  32. NoMsgTypes() : FIX::Group(384,372,FIX::message_order(372,385,0)) {}
  33. FIELD_SET(*this, FIX::RefMsgType);
  34. FIELD_SET(*this, FIX::MsgDirection);
  35. };
  36. };
  37. }
  38. #endif