quickfix_ruby_ud 2.0.7-x86_64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/ext/quickfix/Acceptor.cpp +257 -0
- data/ext/quickfix/Acceptor.h +127 -0
- data/ext/quickfix/Allocator.h +9 -0
- data/ext/quickfix/Application.h +137 -0
- data/ext/quickfix/DOMDocument.h +70 -0
- data/ext/quickfix/DataDictionary.cpp +679 -0
- data/ext/quickfix/DataDictionary.h +607 -0
- data/ext/quickfix/DataDictionaryProvider.cpp +66 -0
- data/ext/quickfix/DataDictionaryProvider.h +67 -0
- data/ext/quickfix/DatabaseConnectionID.h +98 -0
- data/ext/quickfix/DatabaseConnectionPool.h +84 -0
- data/ext/quickfix/Dictionary.cpp +157 -0
- data/ext/quickfix/Dictionary.h +89 -0
- data/ext/quickfix/Event.h +89 -0
- data/ext/quickfix/Except.h +39 -0
- data/ext/quickfix/Exceptions.h +257 -0
- data/ext/quickfix/Field.h +654 -0
- data/ext/quickfix/FieldConvertors.cpp +86 -0
- data/ext/quickfix/FieldConvertors.h +800 -0
- data/ext/quickfix/FieldMap.cpp +254 -0
- data/ext/quickfix/FieldMap.h +327 -0
- data/ext/quickfix/FieldNumbers.h +44 -0
- data/ext/quickfix/FieldTypes.cpp +62 -0
- data/ext/quickfix/FieldTypes.h +817 -0
- data/ext/quickfix/Fields.h +30 -0
- data/ext/quickfix/FileLog.cpp +176 -0
- data/ext/quickfix/FileLog.h +110 -0
- data/ext/quickfix/FileStore.cpp +369 -0
- data/ext/quickfix/FileStore.h +131 -0
- data/ext/quickfix/FixCommonFields.h +13 -0
- data/ext/quickfix/FixFieldNumbers.h +6132 -0
- data/ext/quickfix/FixFields.h +6133 -0
- data/ext/quickfix/FixValues.h +5790 -0
- data/ext/quickfix/Group.cpp +44 -0
- data/ext/quickfix/Group.h +78 -0
- data/ext/quickfix/HostDetailsProvider.cpp +79 -0
- data/ext/quickfix/HostDetailsProvider.h +44 -0
- data/ext/quickfix/HtmlBuilder.h +178 -0
- data/ext/quickfix/HttpConnection.cpp +914 -0
- data/ext/quickfix/HttpConnection.h +74 -0
- data/ext/quickfix/HttpMessage.cpp +229 -0
- data/ext/quickfix/HttpMessage.h +112 -0
- data/ext/quickfix/HttpParser.cpp +49 -0
- data/ext/quickfix/HttpParser.h +49 -0
- data/ext/quickfix/HttpServer.cpp +152 -0
- data/ext/quickfix/HttpServer.h +76 -0
- data/ext/quickfix/Initiator.cpp +310 -0
- data/ext/quickfix/Initiator.h +151 -0
- data/ext/quickfix/Log.cpp +71 -0
- data/ext/quickfix/Log.h +254 -0
- data/ext/quickfix/Message.cpp +617 -0
- data/ext/quickfix/Message.h +419 -0
- data/ext/quickfix/MessageCracker.h +171 -0
- data/ext/quickfix/MessageSorters.cpp +101 -0
- data/ext/quickfix/MessageSorters.h +185 -0
- data/ext/quickfix/MessageStore.cpp +182 -0
- data/ext/quickfix/MessageStore.h +164 -0
- data/ext/quickfix/Mutex.h +120 -0
- data/ext/quickfix/MySQLConnection.h +187 -0
- data/ext/quickfix/MySQLLog.cpp +262 -0
- data/ext/quickfix/MySQLLog.h +158 -0
- data/ext/quickfix/MySQLStore.cpp +323 -0
- data/ext/quickfix/MySQLStore.h +161 -0
- data/ext/quickfix/MySQLStubs.h +203 -0
- data/ext/quickfix/NullStore.cpp +40 -0
- data/ext/quickfix/NullStore.h +89 -0
- data/ext/quickfix/OdbcConnection.h +241 -0
- data/ext/quickfix/OdbcLog.cpp +230 -0
- data/ext/quickfix/OdbcLog.h +109 -0
- data/ext/quickfix/OdbcStore.cpp +313 -0
- data/ext/quickfix/OdbcStore.h +124 -0
- data/ext/quickfix/PUGIXML_DOMDocument.cpp +112 -0
- data/ext/quickfix/PUGIXML_DOMDocument.h +81 -0
- data/ext/quickfix/Parser.cpp +111 -0
- data/ext/quickfix/Parser.h +50 -0
- data/ext/quickfix/PostgreSQLConnection.h +163 -0
- data/ext/quickfix/PostgreSQLLog.cpp +263 -0
- data/ext/quickfix/PostgreSQLLog.h +157 -0
- data/ext/quickfix/PostgreSQLStore.cpp +327 -0
- data/ext/quickfix/PostgreSQLStore.h +160 -0
- data/ext/quickfix/PostgreSQLStubs.h +203 -0
- data/ext/quickfix/Queue.h +66 -0
- data/ext/quickfix/QuickfixRuby.cpp +131900 -0
- data/ext/quickfix/QuickfixRuby.h +56 -0
- data/ext/quickfix/Responder.h +41 -0
- data/ext/quickfix/SSLSocketAcceptor.cpp +409 -0
- data/ext/quickfix/SSLSocketAcceptor.h +186 -0
- data/ext/quickfix/SSLSocketConnection.cpp +434 -0
- data/ext/quickfix/SSLSocketConnection.h +221 -0
- data/ext/quickfix/SSLSocketInitiator.cpp +558 -0
- data/ext/quickfix/SSLSocketInitiator.h +203 -0
- data/ext/quickfix/SSLStubs.h +129 -0
- data/ext/quickfix/Session.cpp +1437 -0
- data/ext/quickfix/Session.h +343 -0
- data/ext/quickfix/SessionFactory.cpp +314 -0
- data/ext/quickfix/SessionFactory.h +84 -0
- data/ext/quickfix/SessionID.h +136 -0
- data/ext/quickfix/SessionSettings.cpp +165 -0
- data/ext/quickfix/SessionSettings.h +283 -0
- data/ext/quickfix/SessionState.h +260 -0
- data/ext/quickfix/Settings.cpp +160 -0
- data/ext/quickfix/Settings.h +56 -0
- data/ext/quickfix/SharedArray.h +274 -0
- data/ext/quickfix/SocketAcceptor.cpp +216 -0
- data/ext/quickfix/SocketAcceptor.h +77 -0
- data/ext/quickfix/SocketConnection.cpp +256 -0
- data/ext/quickfix/SocketConnection.h +102 -0
- data/ext/quickfix/SocketConnector.cpp +112 -0
- data/ext/quickfix/SocketConnector.h +76 -0
- data/ext/quickfix/SocketInitiator.cpp +241 -0
- data/ext/quickfix/SocketInitiator.h +76 -0
- data/ext/quickfix/SocketMonitor.h +26 -0
- data/ext/quickfix/SocketMonitor_UNIX.cpp +238 -0
- data/ext/quickfix/SocketMonitor_UNIX.h +101 -0
- data/ext/quickfix/SocketMonitor_WIN32.cpp +248 -0
- data/ext/quickfix/SocketMonitor_WIN32.h +99 -0
- data/ext/quickfix/SocketServer.cpp +163 -0
- data/ext/quickfix/SocketServer.h +100 -0
- data/ext/quickfix/ThreadedSSLSocketAcceptor.cpp +436 -0
- data/ext/quickfix/ThreadedSSLSocketAcceptor.h +209 -0
- data/ext/quickfix/ThreadedSSLSocketConnection.cpp +364 -0
- data/ext/quickfix/ThreadedSSLSocketConnection.h +191 -0
- data/ext/quickfix/ThreadedSSLSocketInitiator.cpp +434 -0
- data/ext/quickfix/ThreadedSSLSocketInitiator.h +193 -0
- data/ext/quickfix/ThreadedSocketAcceptor.cpp +242 -0
- data/ext/quickfix/ThreadedSocketAcceptor.h +95 -0
- data/ext/quickfix/ThreadedSocketConnection.cpp +227 -0
- data/ext/quickfix/ThreadedSocketConnection.h +89 -0
- data/ext/quickfix/ThreadedSocketInitiator.cpp +238 -0
- data/ext/quickfix/ThreadedSocketInitiator.h +78 -0
- data/ext/quickfix/TimeRange.cpp +227 -0
- data/ext/quickfix/TimeRange.h +215 -0
- data/ext/quickfix/Utility.cpp +639 -0
- data/ext/quickfix/Utility.h +255 -0
- data/ext/quickfix/UtilitySSL.cpp +1612 -0
- data/ext/quickfix/UtilitySSL.h +274 -0
- data/ext/quickfix/Values.h +63 -0
- data/ext/quickfix/config-all.h +10 -0
- data/ext/quickfix/config.h +10 -0
- data/ext/quickfix/config_unix.h +178 -0
- data/ext/quickfix/config_windows.h +0 -0
- data/ext/quickfix/dirent_windows.h +838 -0
- data/ext/quickfix/double-conversion/bignum-dtoa.cc +641 -0
- data/ext/quickfix/double-conversion/bignum-dtoa.h +84 -0
- data/ext/quickfix/double-conversion/bignum.cc +766 -0
- data/ext/quickfix/double-conversion/bignum.h +144 -0
- data/ext/quickfix/double-conversion/cached-powers.cc +176 -0
- data/ext/quickfix/double-conversion/cached-powers.h +64 -0
- data/ext/quickfix/double-conversion/diy-fp.cc +57 -0
- data/ext/quickfix/double-conversion/diy-fp.h +118 -0
- data/ext/quickfix/double-conversion/double-conversion.cc +994 -0
- data/ext/quickfix/double-conversion/double-conversion.h +543 -0
- data/ext/quickfix/double-conversion/fast-dtoa.cc +665 -0
- data/ext/quickfix/double-conversion/fast-dtoa.h +88 -0
- data/ext/quickfix/double-conversion/fixed-dtoa.cc +404 -0
- data/ext/quickfix/double-conversion/fixed-dtoa.h +56 -0
- data/ext/quickfix/double-conversion/ieee.h +402 -0
- data/ext/quickfix/double-conversion/strtod.cc +557 -0
- data/ext/quickfix/double-conversion/strtod.h +45 -0
- data/ext/quickfix/double-conversion/utils.h +374 -0
- data/ext/quickfix/extconf.rb +76 -0
- data/ext/quickfix/index.h +37 -0
- data/ext/quickfix/pugiconfig.hpp +77 -0
- data/ext/quickfix/pugixml.cpp +13237 -0
- data/ext/quickfix/pugixml.hpp +1516 -0
- data/ext/quickfix/scope_guard.hpp +215 -0
- data/ext/quickfix/stdint_msvc.h +254 -0
- data/ext/quickfix/strptime.h +7 -0
- data/lib/2.4/quickfix.so +0 -0
- data/lib/2.5/quickfix.so +0 -0
- data/lib/2.6/quickfix.so +0 -0
- data/lib/2.7/quickfix.so +0 -0
- data/lib/3.0/quickfix.so +0 -0
- data/lib/3.1/quickfix.so +0 -0
- data/lib/3.2/quickfix.so +0 -0
- data/lib/3.3/quickfix.so +0 -0
- data/lib/3.4/quickfix.so +0 -0
- data/lib/quickfix40.rb +274 -0
- data/lib/quickfix41.rb +351 -0
- data/lib/quickfix42.rb +1184 -0
- data/lib/quickfix43.rb +3504 -0
- data/lib/quickfix44.rb +14040 -0
- data/lib/quickfix50.rb +20051 -0
- data/lib/quickfix50sp1.rb +23596 -0
- data/lib/quickfix50sp2.rb +412444 -0
- data/lib/quickfix_fields.rb +79393 -0
- data/lib/quickfix_ruby.rb +82 -0
- data/lib/quickfixt11.rb +65 -0
- data/spec/FIX40.xml +862 -0
- data/spec/FIX41.xml +1282 -0
- data/spec/FIX42.xml +2743 -0
- data/spec/FIX43.xml +4230 -0
- data/spec/FIX44.xml +6600 -0
- data/spec/FIX50.xml +8142 -0
- data/spec/FIX50SP1.xml +9506 -0
- data/spec/FIX50SP2.xml +26069 -0
- data/spec/FIXT11.xml +252 -0
- data/test/DataDictionaryTestCase.rb +268 -0
- data/test/DictionaryTestCase.rb +112 -0
- data/test/FieldBaseTestCase.rb +24 -0
- data/test/MessageStoreTestCase.rb +19 -0
- data/test/MessageTestCase.rb +368 -0
- data/test/SessionSettingsTestCase.rb +41 -0
- metadata +247 -0
@@ -0,0 +1,374 @@
|
|
1
|
+
// Copyright 2010 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
#ifndef DOUBLE_CONVERSION_UTILS_H_
|
29
|
+
#define DOUBLE_CONVERSION_UTILS_H_
|
30
|
+
|
31
|
+
#include <stdlib.h>
|
32
|
+
#include <string.h>
|
33
|
+
|
34
|
+
#include <assert.h>
|
35
|
+
|
36
|
+
#if defined(__SUNPRO_CC)
|
37
|
+
#ifndef ASSERT
|
38
|
+
#define ASSERT(condition)
|
39
|
+
#endif
|
40
|
+
#endif
|
41
|
+
|
42
|
+
#ifndef ASSERT
|
43
|
+
#define ASSERT(condition) \
|
44
|
+
assert(condition);
|
45
|
+
#endif
|
46
|
+
#ifndef UNIMPLEMENTED
|
47
|
+
#define UNIMPLEMENTED() (abort())
|
48
|
+
#endif
|
49
|
+
#ifndef UNREACHABLE
|
50
|
+
#define UNREACHABLE() (abort())
|
51
|
+
#endif
|
52
|
+
|
53
|
+
// Double operations detection based on target architecture.
|
54
|
+
// Linux uses a 80bit wide floating point stack on x86. This induces double
|
55
|
+
// rounding, which in turn leads to wrong results.
|
56
|
+
// An easy way to test if the floating-point operations are correct is to
|
57
|
+
// evaluate: 89255.0/1e22. If the floating-point stack is 64 bits wide then
|
58
|
+
// the result is equal to 89255e-22.
|
59
|
+
// The best way to test this, is to create a division-function and to compare
|
60
|
+
// the output of the division with the expected result. (Inlining must be
|
61
|
+
// disabled.)
|
62
|
+
// On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
|
63
|
+
#if defined(_M_X64) || defined(__x86_64__) || \
|
64
|
+
defined(__ARMEL__) || defined(__avr32__) || \
|
65
|
+
defined(__hppa__) || defined(__ia64__) || \
|
66
|
+
defined(__loongarch64) || \
|
67
|
+
defined(__mips__) || \
|
68
|
+
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
|
69
|
+
defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
|
70
|
+
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
|
71
|
+
defined(__SH4__) || defined(__alpha__) || \
|
72
|
+
defined(_MIPS_ARCH_MIPS32R2) || \
|
73
|
+
defined(__AARCH64EL__) || defined(__aarch64__) || \
|
74
|
+
defined(_M_ARM64)
|
75
|
+
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
|
76
|
+
#elif defined(__mc68000__)
|
77
|
+
#undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
|
78
|
+
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
|
79
|
+
#if defined(_WIN32)
|
80
|
+
// Windows uses a 64bit wide floating point stack.
|
81
|
+
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
|
82
|
+
#else
|
83
|
+
#undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
|
84
|
+
#endif // _WIN32
|
85
|
+
#else
|
86
|
+
#error Target architecture was not detected as supported by Double-Conversion.
|
87
|
+
#endif
|
88
|
+
|
89
|
+
#if defined(__GNUC__)
|
90
|
+
#define DOUBLE_CONVERSION_UNUSED __attribute__((unused))
|
91
|
+
#else
|
92
|
+
#define DOUBLE_CONVERSION_UNUSED
|
93
|
+
#endif
|
94
|
+
|
95
|
+
#if defined(_WIN32) && !defined(__MINGW32__)
|
96
|
+
|
97
|
+
typedef signed char int8_t;
|
98
|
+
typedef unsigned char uint8_t;
|
99
|
+
typedef short int16_t; // NOLINT
|
100
|
+
typedef unsigned short uint16_t; // NOLINT
|
101
|
+
typedef int int32_t;
|
102
|
+
typedef unsigned int uint32_t;
|
103
|
+
typedef __int64 int64_t;
|
104
|
+
typedef unsigned __int64 uint64_t;
|
105
|
+
// intptr_t and friends are defined in crtdefs.h through stdio.h.
|
106
|
+
|
107
|
+
#else
|
108
|
+
|
109
|
+
#include <stdint.h>
|
110
|
+
|
111
|
+
#endif
|
112
|
+
|
113
|
+
typedef uint16_t uc16;
|
114
|
+
|
115
|
+
// The following macro works on both 32 and 64-bit platforms.
|
116
|
+
// Usage: instead of writing 0x1234567890123456
|
117
|
+
// write UINT64_2PART_C(0x12345678,90123456);
|
118
|
+
#define UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
|
119
|
+
|
120
|
+
|
121
|
+
// The expression ARRAY_SIZE(a) is a compile-time constant of type
|
122
|
+
// size_t which represents the number of elements of the given
|
123
|
+
// array. You should only use ARRAY_SIZE on statically allocated
|
124
|
+
// arrays.
|
125
|
+
#ifndef ARRAY_SIZE
|
126
|
+
#define ARRAY_SIZE(a) \
|
127
|
+
((sizeof(a) / sizeof(*(a))) / \
|
128
|
+
static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
|
129
|
+
#endif
|
130
|
+
|
131
|
+
// A macro to disallow the evil copy constructor and operator= functions
|
132
|
+
// This should be used in the private: declarations for a class
|
133
|
+
#ifndef DISALLOW_COPY_AND_ASSIGN
|
134
|
+
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
135
|
+
TypeName(const TypeName&); \
|
136
|
+
void operator=(const TypeName&)
|
137
|
+
#endif
|
138
|
+
|
139
|
+
// A macro to disallow all the implicit constructors, namely the
|
140
|
+
// default constructor, copy constructor and operator= functions.
|
141
|
+
//
|
142
|
+
// This should be used in the private: declarations for a class
|
143
|
+
// that wants to prevent anyone from instantiating it. This is
|
144
|
+
// especially useful for classes containing only static methods.
|
145
|
+
#ifndef DISALLOW_IMPLICIT_CONSTRUCTORS
|
146
|
+
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
|
147
|
+
TypeName(); \
|
148
|
+
DISALLOW_COPY_AND_ASSIGN(TypeName)
|
149
|
+
#endif
|
150
|
+
|
151
|
+
namespace double_conversion {
|
152
|
+
|
153
|
+
static const int kCharSize = sizeof(char);
|
154
|
+
|
155
|
+
// Returns the maximum of the two parameters.
|
156
|
+
template <typename T>
|
157
|
+
static T Max(T a, T b) {
|
158
|
+
return a < b ? b : a;
|
159
|
+
}
|
160
|
+
|
161
|
+
|
162
|
+
// Returns the minimum of the two parameters.
|
163
|
+
template <typename T>
|
164
|
+
static T Min(T a, T b) {
|
165
|
+
return a < b ? a : b;
|
166
|
+
}
|
167
|
+
|
168
|
+
|
169
|
+
inline int StrLength(const char* string) {
|
170
|
+
size_t length = strlen(string);
|
171
|
+
ASSERT(length == static_cast<size_t>(static_cast<int>(length)));
|
172
|
+
return static_cast<int>(length);
|
173
|
+
}
|
174
|
+
|
175
|
+
// This is a simplified version of V8's Vector class.
|
176
|
+
template <typename T>
|
177
|
+
class Vector {
|
178
|
+
public:
|
179
|
+
Vector() : start_(NULL), length_(0) {}
|
180
|
+
Vector(T* data, int len) : start_(data), length_(len) {
|
181
|
+
ASSERT(len == 0 || (len > 0 && data != NULL));
|
182
|
+
}
|
183
|
+
|
184
|
+
// Returns a vector using the same backing storage as this one,
|
185
|
+
// spanning from and including 'from', to but not including 'to'.
|
186
|
+
Vector<T> SubVector(int from, int to) {
|
187
|
+
ASSERT(to <= length_);
|
188
|
+
ASSERT(from < to);
|
189
|
+
ASSERT(0 <= from);
|
190
|
+
return Vector<T>(start() + from, to - from);
|
191
|
+
}
|
192
|
+
|
193
|
+
// Returns the length of the vector.
|
194
|
+
int length() const { return length_; }
|
195
|
+
|
196
|
+
// Returns whether or not the vector is empty.
|
197
|
+
bool is_empty() const { return length_ == 0; }
|
198
|
+
|
199
|
+
// Returns the pointer to the start of the data in the vector.
|
200
|
+
T* start() const { return start_; }
|
201
|
+
|
202
|
+
// Access individual vector elements - checks bounds in debug mode.
|
203
|
+
T& operator[](int index) const {
|
204
|
+
ASSERT(0 <= index && index < length_);
|
205
|
+
return start_[index];
|
206
|
+
}
|
207
|
+
|
208
|
+
T& first() { return start_[0]; }
|
209
|
+
|
210
|
+
T& last() { return start_[length_ - 1]; }
|
211
|
+
|
212
|
+
private:
|
213
|
+
T* start_;
|
214
|
+
int length_;
|
215
|
+
};
|
216
|
+
|
217
|
+
|
218
|
+
// Helper class for building result strings in a character buffer. The
|
219
|
+
// purpose of the class is to use safe operations that checks the
|
220
|
+
// buffer bounds on all operations in debug mode.
|
221
|
+
class StringBuilder {
|
222
|
+
public:
|
223
|
+
StringBuilder(char* buffer, int buffer_size)
|
224
|
+
: buffer_(buffer, buffer_size), position_(0) { }
|
225
|
+
|
226
|
+
~StringBuilder() { if (!is_finalized()) Finalize(); }
|
227
|
+
|
228
|
+
int size() const { return buffer_.length(); }
|
229
|
+
|
230
|
+
// Get the current position in the builder.
|
231
|
+
int position() const {
|
232
|
+
ASSERT(!is_finalized());
|
233
|
+
return position_;
|
234
|
+
}
|
235
|
+
|
236
|
+
// Reset the position.
|
237
|
+
void Reset() { position_ = 0; }
|
238
|
+
|
239
|
+
// Add a single character to the builder. It is not allowed to add
|
240
|
+
// 0-characters; use the Finalize() method to terminate the string
|
241
|
+
// instead.
|
242
|
+
void AddCharacter(char c) {
|
243
|
+
ASSERT(c != '\0');
|
244
|
+
ASSERT(!is_finalized() && position_ < buffer_.length());
|
245
|
+
buffer_[position_++] = c;
|
246
|
+
}
|
247
|
+
|
248
|
+
// Add an entire string to the builder. Uses strlen() internally to
|
249
|
+
// compute the length of the input string.
|
250
|
+
void AddString(const char* s) {
|
251
|
+
AddSubstring(s, StrLength(s));
|
252
|
+
}
|
253
|
+
|
254
|
+
// Add the first 'n' characters of the given string 's' to the
|
255
|
+
// builder. The input string must have enough characters.
|
256
|
+
void AddSubstring(const char* s, int n) {
|
257
|
+
ASSERT(!is_finalized() && position_ + n < buffer_.length());
|
258
|
+
ASSERT(static_cast<size_t>(n) <= strlen(s));
|
259
|
+
memmove(&buffer_[position_], s, n * kCharSize);
|
260
|
+
position_ += n;
|
261
|
+
}
|
262
|
+
|
263
|
+
|
264
|
+
// Add character padding to the builder. If count is non-positive,
|
265
|
+
// nothing is added to the builder.
|
266
|
+
void AddPadding(char c, int count) {
|
267
|
+
for (int i = 0; i < count; i++) {
|
268
|
+
AddCharacter(c);
|
269
|
+
}
|
270
|
+
}
|
271
|
+
|
272
|
+
// Finalize the string by 0-terminating it and returning the buffer.
|
273
|
+
char* Finalize() {
|
274
|
+
ASSERT(!is_finalized() && position_ < buffer_.length());
|
275
|
+
buffer_[position_] = '\0';
|
276
|
+
// Make sure nobody managed to add a 0-character to the
|
277
|
+
// buffer while building the string.
|
278
|
+
ASSERT(strlen(buffer_.start()) == static_cast<size_t>(position_));
|
279
|
+
position_ = -1;
|
280
|
+
ASSERT(is_finalized());
|
281
|
+
return buffer_.start();
|
282
|
+
}
|
283
|
+
|
284
|
+
// Truncate trailing zeros
|
285
|
+
// truncate 1.23000 to 1.23
|
286
|
+
// truncate 1.23000e15 to 1.23e15
|
287
|
+
// don't truncate 1.23e10 to 1.23e1
|
288
|
+
void TrimTrailingZeros()
|
289
|
+
{
|
290
|
+
ASSERT(!is_finalized() && position_ < buffer_.length());
|
291
|
+
|
292
|
+
for (int dot_pos = 0; dot_pos < position_; ++dot_pos)
|
293
|
+
{
|
294
|
+
if (buffer_[dot_pos] == '.')
|
295
|
+
{
|
296
|
+
int pow_size = 0;
|
297
|
+
int pow_pos = position_;
|
298
|
+
while ( --pow_pos > dot_pos )
|
299
|
+
{
|
300
|
+
if (buffer_[pow_pos] == 'e' ||
|
301
|
+
buffer_[pow_pos] == 'E')
|
302
|
+
{
|
303
|
+
pow_size = position_ - pow_pos;
|
304
|
+
position_ = pow_pos;
|
305
|
+
break;
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
309
|
+
while (position_ > 0 && buffer_[position_ - 1] == '0')
|
310
|
+
--position_;
|
311
|
+
|
312
|
+
if (position_ > 0 && buffer_[position_ - 1] == '.')
|
313
|
+
--position_;
|
314
|
+
|
315
|
+
if (pow_size > 0)
|
316
|
+
AddSubstring( &buffer_[pow_pos], pow_size);
|
317
|
+
}
|
318
|
+
}
|
319
|
+
|
320
|
+
}
|
321
|
+
|
322
|
+
private:
|
323
|
+
Vector<char> buffer_;
|
324
|
+
int position_;
|
325
|
+
|
326
|
+
bool is_finalized() const { return position_ < 0; }
|
327
|
+
|
328
|
+
DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder);
|
329
|
+
};
|
330
|
+
|
331
|
+
// The type-based aliasing rule allows the compiler to assume that pointers of
|
332
|
+
// different types (for some definition of different) never alias each other.
|
333
|
+
// Thus the following code does not work:
|
334
|
+
//
|
335
|
+
// float f = foo();
|
336
|
+
// int fbits = *(int*)(&f);
|
337
|
+
//
|
338
|
+
// The compiler 'knows' that the int pointer can't refer to f since the types
|
339
|
+
// don't match, so the compiler may cache f in a register, leaving random data
|
340
|
+
// in fbits. Using C++ style casts makes no difference, however a pointer to
|
341
|
+
// char data is assumed to alias any other pointer. This is the 'memcpy
|
342
|
+
// exception'.
|
343
|
+
//
|
344
|
+
// Bit_cast uses the memcpy exception to move the bits from a variable of one
|
345
|
+
// type of a variable of another type. Of course the end result is likely to
|
346
|
+
// be implementation dependent. Most compilers (gcc-4.2 and MSVC 2005)
|
347
|
+
// will completely optimize BitCast away.
|
348
|
+
//
|
349
|
+
// There is an additional use for BitCast.
|
350
|
+
// Recent gccs will warn when they see casts that may result in breakage due to
|
351
|
+
// the type-based aliasing rule. If you have checked that there is no breakage
|
352
|
+
// you can use BitCast to cast one pointer type to another. This confuses gcc
|
353
|
+
// enough that it can no longer see that you have cast one pointer type to
|
354
|
+
// another thus avoiding the warning.
|
355
|
+
template <class Dest, class Source>
|
356
|
+
inline Dest BitCast(const Source& source) {
|
357
|
+
// Compile time assertion: sizeof(Dest) == sizeof(Source)
|
358
|
+
// A compile error here means your Dest and Source have different sizes.
|
359
|
+
DOUBLE_CONVERSION_UNUSED
|
360
|
+
typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1];
|
361
|
+
|
362
|
+
Dest dest;
|
363
|
+
memmove(&dest, &source, sizeof(dest));
|
364
|
+
return dest;
|
365
|
+
}
|
366
|
+
|
367
|
+
template <class Dest, class Source>
|
368
|
+
inline Dest BitCast(Source* source) {
|
369
|
+
return BitCast<Dest>(reinterpret_cast<uintptr_t>(source));
|
370
|
+
}
|
371
|
+
|
372
|
+
} // namespace double_conversion
|
373
|
+
|
374
|
+
#endif // DOUBLE_CONVERSION_UTILS_H_
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'mkmf'
|
2
|
+
require 'open3'
|
3
|
+
require 'rake/extensiontask'
|
4
|
+
|
5
|
+
dir_config('quickfix', ['.'], '.')
|
6
|
+
|
7
|
+
# Helpers to fetch config values
|
8
|
+
def fetch_pg_include_dir
|
9
|
+
return ENV['PG_INCLUDE_DIR'] if ENV['PG_INCLUDE_DIR'] && Dir.exist?(ENV['PG_INCLUDE_DIR'])
|
10
|
+
|
11
|
+
stdout, _ = Open3.capture2('pg_config --includedir')
|
12
|
+
stdout.strip
|
13
|
+
end
|
14
|
+
|
15
|
+
def fetch_openssl_dir
|
16
|
+
# Allow environment override
|
17
|
+
return ENV['OPENSSL_DIR'] if ENV['OPENSSL_DIR'] && Dir.exist?(ENV['OPENSSL_DIR'])
|
18
|
+
|
19
|
+
# Try pkg-config
|
20
|
+
begin
|
21
|
+
stdout, status = Open3.capture2('pkg-config', '--variable=prefix', 'openssl')
|
22
|
+
return stdout.strip if status.success? && Dir.exist?(stdout.strip)
|
23
|
+
rescue Errno::ENOENT
|
24
|
+
# pkg-config not available
|
25
|
+
end
|
26
|
+
|
27
|
+
# Try brew on macOS
|
28
|
+
if RbConfig::CONFIG['host_os'] =~ /darwin/ && system('which brew > /dev/null')
|
29
|
+
begin
|
30
|
+
stdout, status = Open3.capture2('brew', '--prefix', 'openssl')
|
31
|
+
return stdout.strip if status.success? && Dir.exist?(stdout.strip)
|
32
|
+
rescue Errno::ENOENT
|
33
|
+
# brew not available
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Fallback to common paths
|
38
|
+
fallback_paths = %w[
|
39
|
+
/usr/local/opt/openssl@3
|
40
|
+
/usr/local/opt/openssl
|
41
|
+
/usr/local/ssl
|
42
|
+
/usr/lib/ssl
|
43
|
+
/opt/homebrew/opt/openssl@3
|
44
|
+
/opt/homebrew/opt/openssl
|
45
|
+
/opt/openssl
|
46
|
+
]
|
47
|
+
|
48
|
+
fallback_paths.each do |path|
|
49
|
+
return path if Dir.exist?(path)
|
50
|
+
end
|
51
|
+
|
52
|
+
raise 'OpenSSL directory not found. Please set OPENSSL_DIR environment variable.'
|
53
|
+
end
|
54
|
+
|
55
|
+
# Set flags
|
56
|
+
cxxflags = '-std=c++2a -DHAVE_SSL=1 -DHAVE_POSTGRESQL=1'
|
57
|
+
pg_include_dir = fetch_pg_include_dir
|
58
|
+
openssl_dir = fetch_openssl_dir
|
59
|
+
|
60
|
+
cppflags = "-I#{openssl_dir}/include -I#{pg_include_dir}"
|
61
|
+
ldflags = "-L#{openssl_dir}/lib"
|
62
|
+
|
63
|
+
puts "Using OpenSSL from: #{openssl_dir}"
|
64
|
+
puts "Using PostgreSQL from: #{pg_include_dir}"
|
65
|
+
puts "CXXFLAGS: #{cxxflags}"
|
66
|
+
puts "CPPFLAGS: #{cppflags}"
|
67
|
+
puts "LDFLAGS: #{ldflags}"
|
68
|
+
|
69
|
+
# Apply the flags
|
70
|
+
$CXXFLAGS += " #{cxxflags}"
|
71
|
+
$CPPFLAGS += " #{cppflags}"
|
72
|
+
$LDFLAGS += " #{ldflags}"
|
73
|
+
|
74
|
+
create_makefile('quickfix')
|
75
|
+
|
76
|
+
Rake::ExtensionTask.new('quickfix')
|
@@ -0,0 +1,37 @@
|
|
1
|
+
/*! \mainpage QuickFIX Documentation
|
2
|
+
* <b>Installation</b>
|
3
|
+
* <ul>
|
4
|
+
* <li><a href="dependencies.html">Dependencies</a></li>
|
5
|
+
* <li><a href="building.html">Building</a></li>
|
6
|
+
* <li><a href="generating_databases.html">Generating Databases</a></li>
|
7
|
+
* <li><a href="testing.html">Testing</a></li>
|
8
|
+
* </ul>
|
9
|
+
* <b>Getting Started</b>
|
10
|
+
* <ul>
|
11
|
+
* <li><a href="project.html">Setting Up Your Project</a></li>
|
12
|
+
* <li><a href="application.html">Creating Your Application</a></li>
|
13
|
+
* <li><a href="configuration.html">Configuration</a></li>
|
14
|
+
* <li><a href="xmlschema.html">Validation</a></li>
|
15
|
+
* </ul>
|
16
|
+
* <b>Working With Messages</b>
|
17
|
+
* <ul>
|
18
|
+
* <li><a href="receiving_messages.html">Receiving Messages</a></li>
|
19
|
+
* <li><a href="sending_messages.html">Sending Messages</a></li>
|
20
|
+
* <li><a href="repeating_groups.html">Repeating Groups</a></li>
|
21
|
+
* <li><a href="user_defined.html">User Defined Fields</a></li>
|
22
|
+
* <li><a href="examples.html">Example Applications</a></li>
|
23
|
+
* </ul>
|
24
|
+
* <b>Testing</b>
|
25
|
+
* <ul>
|
26
|
+
* <li><a href="unit_tests.html">Unit Tests</a></li>
|
27
|
+
* <li><a href="acceptance_tests.html">Acceptance Tests</a></li>
|
28
|
+
* </ul>
|
29
|
+
*
|
30
|
+
*The Financial Information Exchange (<a href="http://www.fixprotocol.org">FIX</a>) Protocol is a message standard developed
|
31
|
+
*to facilitate the electronic exchange of information related to securities transactions.
|
32
|
+
*It is intended for use between trading partners wishing to automate communications.
|
33
|
+
*
|
34
|
+
*<I>QuickFIX is a free and open source implementation of the <a href="http://www.fixprotocol.org">FIX</a> protocol.</I>
|
35
|
+
*
|
36
|
+
* \author Oren Miller oren@quickfixengine.org
|
37
|
+
*/
|
@@ -0,0 +1,77 @@
|
|
1
|
+
/**
|
2
|
+
* pugixml parser - version 1.14
|
3
|
+
* --------------------------------------------------------
|
4
|
+
* Copyright (C) 2006-2024, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
5
|
+
* Report bugs and download new versions at https://pugixml.org/
|
6
|
+
*
|
7
|
+
* This library is distributed under the MIT License. See notice at the end
|
8
|
+
* of this file.
|
9
|
+
*
|
10
|
+
* This work is based on the pugxml parser, which is:
|
11
|
+
* Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
|
12
|
+
*/
|
13
|
+
|
14
|
+
#ifndef HEADER_PUGICONFIG_HPP
|
15
|
+
#define HEADER_PUGICONFIG_HPP
|
16
|
+
|
17
|
+
// Uncomment this to enable wchar_t mode
|
18
|
+
// #define PUGIXML_WCHAR_MODE
|
19
|
+
|
20
|
+
// Uncomment this to enable compact mode
|
21
|
+
// #define PUGIXML_COMPACT
|
22
|
+
|
23
|
+
// Uncomment this to disable XPath
|
24
|
+
// #define PUGIXML_NO_XPATH
|
25
|
+
|
26
|
+
// Uncomment this to disable STL
|
27
|
+
// #define PUGIXML_NO_STL
|
28
|
+
|
29
|
+
// Uncomment this to disable exceptions
|
30
|
+
// #define PUGIXML_NO_EXCEPTIONS
|
31
|
+
|
32
|
+
// Set this to control attributes for public classes/functions, i.e.:
|
33
|
+
// #define PUGIXML_API __declspec(dllexport) // to export all public symbols from DLL
|
34
|
+
// #define PUGIXML_CLASS __declspec(dllimport) // to import all classes from DLL
|
35
|
+
// #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall
|
36
|
+
// In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead
|
37
|
+
|
38
|
+
// Tune these constants to adjust memory-related behavior
|
39
|
+
// #define PUGIXML_MEMORY_PAGE_SIZE 32768
|
40
|
+
// #define PUGIXML_MEMORY_OUTPUT_STACK 10240
|
41
|
+
// #define PUGIXML_MEMORY_XPATH_PAGE_SIZE 4096
|
42
|
+
|
43
|
+
// Tune this constant to adjust max nesting for XPath queries
|
44
|
+
// #define PUGIXML_XPATH_DEPTH_LIMIT 1024
|
45
|
+
|
46
|
+
// Uncomment this to switch to header-only version
|
47
|
+
// #define PUGIXML_HEADER_ONLY
|
48
|
+
|
49
|
+
// Uncomment this to enable long long support
|
50
|
+
// #define PUGIXML_HAS_LONG_LONG
|
51
|
+
|
52
|
+
#endif
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Copyright (c) 2006-2024 Arseny Kapoulkine
|
56
|
+
*
|
57
|
+
* Permission is hereby granted, free of charge, to any person
|
58
|
+
* obtaining a copy of this software and associated documentation
|
59
|
+
* files (the "Software"), to deal in the Software without
|
60
|
+
* restriction, including without limitation the rights to use,
|
61
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
62
|
+
* copies of the Software, and to permit persons to whom the
|
63
|
+
* Software is furnished to do so, subject to the following
|
64
|
+
* conditions:
|
65
|
+
*
|
66
|
+
* The above copyright notice and this permission notice shall be
|
67
|
+
* included in all copies or substantial portions of the Software.
|
68
|
+
*
|
69
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
70
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
71
|
+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
72
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
73
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
74
|
+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
75
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
76
|
+
* OTHER DEALINGS IN THE SOFTWARE.
|
77
|
+
*/
|