Email.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef FIX42_EMAIL_H
  2. #define FIX42_EMAIL_H
  3. #include "Message.h"
  4. namespace FIX42
  5. {
  6. class Email : public Message
  7. {
  8. public:
  9. Email() : Message(MsgType()) {}
  10. Email(const FIX::Message& m) : Message(m) {}
  11. Email(const Message& m) : Message(m) {}
  12. Email(const Email& m) : Message(m) {}
  13. static FIX::MsgType MsgType() { return FIX::MsgType("C"); }
  14. Email(
  15. const FIX::EmailThreadID& aEmailThreadID,
  16. const FIX::EmailType& aEmailType,
  17. const FIX::Subject& aSubject )
  18. : Message(MsgType())
  19. {
  20. set(aEmailThreadID);
  21. set(aEmailType);
  22. set(aSubject);
  23. }
  24. FIELD_SET(*this, FIX::EmailThreadID);
  25. FIELD_SET(*this, FIX::EmailType);
  26. FIELD_SET(*this, FIX::OrigTime);
  27. FIELD_SET(*this, FIX::Subject);
  28. FIELD_SET(*this, FIX::EncodedSubjectLen);
  29. FIELD_SET(*this, FIX::EncodedSubject);
  30. FIELD_SET(*this, FIX::OrderID);
  31. FIELD_SET(*this, FIX::ClOrdID);
  32. FIELD_SET(*this, FIX::RawDataLength);
  33. FIELD_SET(*this, FIX::RawData);
  34. FIELD_SET(*this, FIX::NoRoutingIDs);
  35. class NoRoutingIDs: public FIX::Group
  36. {
  37. public:
  38. NoRoutingIDs() : FIX::Group(215,216,FIX::message_order(216,217,0)) {}
  39. FIELD_SET(*this, FIX::RoutingType);
  40. FIELD_SET(*this, FIX::RoutingID);
  41. };
  42. FIELD_SET(*this, FIX::NoRelatedSym);
  43. class NoRelatedSym: public FIX::Group
  44. {
  45. public:
  46. NoRelatedSym() : FIX::Group(146,46,FIX::message_order(46,65,48,22,167,200,205,201,202,206,231,223,207,106,348,349,107,350,351,0)) {}
  47. FIELD_SET(*this, FIX::RelatdSym);
  48. FIELD_SET(*this, FIX::SymbolSfx);
  49. FIELD_SET(*this, FIX::SecurityID);
  50. FIELD_SET(*this, FIX::IDSource);
  51. FIELD_SET(*this, FIX::SecurityType);
  52. FIELD_SET(*this, FIX::MaturityMonthYear);
  53. FIELD_SET(*this, FIX::MaturityDay);
  54. FIELD_SET(*this, FIX::PutOrCall);
  55. FIELD_SET(*this, FIX::StrikePrice);
  56. FIELD_SET(*this, FIX::OptAttribute);
  57. FIELD_SET(*this, FIX::ContractMultiplier);
  58. FIELD_SET(*this, FIX::CouponRate);
  59. FIELD_SET(*this, FIX::SecurityExchange);
  60. FIELD_SET(*this, FIX::Issuer);
  61. FIELD_SET(*this, FIX::EncodedIssuerLen);
  62. FIELD_SET(*this, FIX::EncodedIssuer);
  63. FIELD_SET(*this, FIX::SecurityDesc);
  64. FIELD_SET(*this, FIX::EncodedSecurityDescLen);
  65. FIELD_SET(*this, FIX::EncodedSecurityDesc);
  66. };
  67. FIELD_SET(*this, FIX::LinesOfText);
  68. class LinesOfText: public FIX::Group
  69. {
  70. public:
  71. LinesOfText() : FIX::Group(33,58,FIX::message_order(58,354,355,0)) {}
  72. FIELD_SET(*this, FIX::Text);
  73. FIELD_SET(*this, FIX::EncodedTextLen);
  74. FIELD_SET(*this, FIX::EncodedText);
  75. };
  76. };
  77. }
  78. #endif