OnixS C++ SGX Titan OUCH Trading Handler  1.2.0
API documentation
ProtocolFormatting.cpp
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 #include <boost/assert.hpp>
20 
21 #include <util/TextBuilder.h>
22 
25 
26 
27 using namespace OnixS::SgxTitan::Trading::Ouch;
28 
29 
30 namespace OnixS {
31 namespace Util {
32 
33 TextBuilder& operator<<(TextBuilder& tb, const ConnectionRetries& value)
34 {
35  return tb << "ConnectionRetries [number=" << value.number
36  << ", intervalSec=" << value.intervalSec
37  << "]";
38 }
39 
40 TextBuilder& operator<<(TextBuilder& tb, const HandlerSettings& value)
41 {
42  tb << "HandlerSettings [licenseDirectory=" << value.licenseDirectory
43  << ", logDirectory=" << value.logDirectory
44  << ", logFileNamePrefix=" << value.logFileNamePrefix
45  << ", logLevel=" << enumToString (value.logLevel)
46  << ", receiveTimeoutMs=" << value.receiveTimeoutMs
47  << ", sendTimeoutMs=" << value.sendTimeoutMs
48  << ", receivingThreadAffinity={ ";
49 
50  for (CpuIndexes::const_iterator it = value.receivingThreadAffinity.begin(), end = value.receivingThreadAffinity.end(); it != end; ++it)
51  tb << *it << ' ';
52 
53  tb << "}, sendingThreadAffinity={ ";
54 
55  for (CpuIndexes::const_iterator it = value.sendingThreadAffinity.begin(), end = value.sendingThreadAffinity.end(); it != end; ++it)
56  tb << *it << ' ';
57 
58  tb << "}, connectionRetries=" << value.connectionRetries
59  << ", auditTrailDirectory=" << value.auditTrailDirectory
60  << ", auditTrailFile=" << value.auditTrailFile
61  << "]";
62 
63  return tb;
64 }
65 
66 
67 TextBuilder& operator<<(TextBuilder& tb, const LogonSettings& value)
68 {
69  tb << "LogonSettings [sessionSubId=" << value.session
70  << ", userName=" << value.userName
71  << ", password=" << value.password;
72 
73  tb << "]";
74 
75  return tb;
76 }
77 
78 }
79 }
80 
81 
std::string session
Requested Session.
ONIXS_SGXTITAN_OUCH_API std::ostream & operator<<(std::ostream &stream, HandlerState::Enum value)
ONIXS_SGXTITAN_OUCH_API std::string enumToString(HandlerState::Enum)
Returns string representation of HandlerState value.