OnixS C++ SGX Titan OUCH Trading Handler  1.2.0
API documentation
CancelOrder.h
Go to the documentation of this file.
1 /*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19 
20 #pragma once
21 
23 
24 
26 
27  /// Cancel Order message.
28  struct ONIXS_SGXTITAN_OUCH_API CancelOrder : public OutgoingMessage
29  {
30  /// Should be the Order Token from the original Enter
31  /// Order, not from any intermediate replaces.
33  ONIXS_SGX_OUCH_NOTHROW
34  {
35  return fixedStr<14>(1);
36  }
37 
38  /// Should be the Order Token from the original Enter
39  /// Order, not from any intermediate replaces.
40  void orderToken(StrRef value)
41  ONIXS_SGX_OUCH_NOTHROW
42  {
43  setFixedStr<14>(1, value);
44  }
45 
46  void orderToken(const char* value)
47  ONIXS_SGX_OUCH_NOTHROW
48  {
49  orderToken(StrRef(value, strnlen(value, 14)));
50  }
51 
52  /// Total message size.
53  static ONIXS_SGX_OUCH_CONST_OR_CONSTEXPR MessageSize messageSize_ = 15;
54 
55  /// Initializes empty instance
57  ONIXS_SGX_OUCH_NOTHROW
58  : OutgoingMessage(&type_, messageSize_)
60  , data_()
61  {
62  }
63 
64  private:
65 #pragma pack(push, 1)
66  Binary1 type_;
67  ONIXS_SGXTITAN_OUCH_UNUSED_FIELD Binary1 data_[messageSize_ - 1];
68 #pragma pack(pop)
69  };
70 
71  /// Serializes object into string.
72  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, const CancelOrder&);
73 
74  /// Serializes object into string.
75  inline std::string toStr(const CancelOrder& msg)
76  {
77  std::string str;
78  toStr(str, msg);
79  return str;
80  }
81 
82  ///
83  inline std::ostream& operator<<(std::ostream& stream, const CancelOrder& msg)
84  {
85  stream << toStr(msg);
86  return stream;
87  }
88 
CancelOrder()
Initializes empty instance.
Definition: CancelOrder.h:56
Binary2 MessageSize
Aliases message length type.
Definition: Defines.h:47
#define ONIXS_SGXTITAN_OUCH_UNUSED_FIELD
Definition: ABI.h:40
ONIXS_SGXTITAN_OUCH_API std::ostream & operator<<(std::ostream &stream, HandlerState::Enum value)
Provides efficient way of accessing text-based FIX field values.
Definition: String.h:41
#define ONIXS_SGXTITAN_OUCH_NAMESPACE_END
Definition: Bootstrap.h:31
#define ONIXS_SGXTITAN_OUCH_NAMESPACE_BEGIN
Definition: Bootstrap.h:27
ONIXS_SGXTITAN_OUCH_API void toStr(std::string &, OutboundMessageTypes::Enum)
Appends string presentation of object.