1 %module(directors="1") quickfix
2 
3 %exceptionclass FIX::Exception;
4 
5 %include typemaps.i
6 %include std_string.i
7 %include exception.i
8 %include carrays.i
9 %include std_unique_ptr.i
10 
11 %feature("director") FIX::Application;
12 %feature("classic") FIX::Exception;
13 
14 %array_class(int, IntArray);
15 
16 %ignore _REENTRANT;
17 %rename(SocketInitiatorBase) FIX::SocketInitiator;
18 %rename(SocketAcceptorBase) FIX::SocketAcceptor;
19 
20 %{
21 #include <config.h>
22 #include <Exceptions.h>
23 #include <Field.h>
24 #include <Message.h>
25 #include <Group.h>
26 #include <Fields.h>
27 #include <Values.h>
28 #include <SessionID.h>
29 #include <Dictionary.h>
30 #include <SessionSettings.h>
31 #include <Session.h>
32 #include <SessionID.h>
33 #include <Log.h>
34 #include <FileLog.h>
35 #include <MessageStore.h>
36 #include <FileStore.h>
37 #include <Application.h>
38 #include <Initiator.h>
39 #include <SocketInitiator.h>
40 #include <Acceptor.h>
41 #include <SocketAcceptor.h>
42 #include <DataDictionary.h>
43 typedef FIX::UtcTimeStamp UtcTimeStamp;
44 typedef FIX::UtcDate UtcDate;
45 typedef FIX::UtcTimeOnly UtcTimeOnly;
46 typedef FIX::message_order message_order;
47 typedef FIX::Group Group;
48 typedef FIX::DataDictionary DataDictionary;
49 typedef FIX::DataDictionaryProvider DataDictionaryProvider;
50 typedef FIX::MsgType MsgType;
51 typedef FIX::BeginString BeginString;
52 typedef FIX::ApplVerID ApplVerID;
53 typedef FIX::SessionID SessionID;
54 typedef FIX::Session Session;
55 typedef FIX::Application Application;
56 typedef FIX::DateTime DateTime;
57 typedef FIX::TimeRange TimeRange;
58 typedef FIX::Responder Responder;
59 typedef FIX::Log Log;
60 typedef FIX::LogFactory LogFactory;
61 typedef FIX::MessageStore MessageStore;
62 typedef FIX::MessageStoreFactory MessageStoreFactory;
63 typedef FIX::Mutex Mutex;
64 typedef FIX::DOMDocumentPtr DOMDocumentPtr;
65 %}
66 
67 %typedef DoubleField PriceField;
68 %typedef DoubleField AmtField;
69 %typedef DoubleField QtyField;
70 %typedef StringField CurrencyField;
71 %typedef StringField MultipleValueStringField;
72 %typedef StringField MultipleStringValueField;
73 %typedef StringField MultipleCharValueField;
74 %typedef StringField ExchangeField;
75 %typedef StringField LocalMktDateField;
76 %typedef StringField DataField;
77 %typedef DoubleField FloatField;
78 %typedef DoubleField PriceOffsetField;
79 %typedef StringField MonthField;
80 %typedef StringField MonthYearField;
81 %typedef StringField DayOfMonthField;
82 %typedef UtcDateField UtcDateOnlyField;
83 %typedef IntField LengthField;
84 %typedef IntField NumInGroupField;
85 %typedef IntField SeqNumField;
86 %typedef DoubleField PercentageField;
87 %typedef StringField CountryField;
88 %typedef StringField TzTimeOnlyField;
89 %typedef StringField TzTimeStampField;
90 
91 %typedef std::string FIX::STRING;
92 %typedef char FIX::CHAR;
93 %typedef double FIX::PRICE;
94 %typedef int FIX::INT;
95 %typedef double FIX::AMT;
96 %typedef double FIX::QTY;
97 %typedef std::string FIX::CURRENCY;
98 %typedef std::string FIX::MULTIPLEVALUESTRING;
99 %typedef std::string FIX::MULTIPLESTRINGVALUE;
100 %typedef std::string FIX::MULTIPLECHARVALUE;
101 %typedef std::string FIX::EXCHANGE;
102 %typedef UtcTimeStamp FIX::UTCTIMESTAMP;
103 %typedef bool FIX::BOOLEAN;
104 %typedef std::string FIX::LOCALMKTDATE;
105 %typedef std::string FIX::DATA;
106 %typedef double FIX::FLOAT;
107 %typedef double FIX::PRICEOFFSET;
108 %typedef std::string FIX::MONTHYEAR;
109 %typedef std::string FIX::DAYOFMONTH;
110 %typedef UtcDate FIX::UTCDATE;
111 %typedef UtcDateOnly FIX::UTCDATEONLY;
112 %typedef UtcTimeOnly FIX::UTCTIMEONLY;
113 %typedef int FIX::NUMINGROUP;
114 %typedef double FIX::PERCENTAGE;
115 %typedef int FIX::SEQNUM;
116 %typedef int FIX::LENGTH;
117 %typedef std::string FIX::COUNTRY;
118 %typedef std::string FIX::TZTIMEONLY;
119 %typedef std::string FIX::TZTIMESTAMP;
120 
121 %extend FIX::Exception {
__str__()122   std::string __str__() {
123     return self->what();
124   }
125 }
126 
127 %extend FIX::Message {
__str__()128   std::string __str__() {
129     return self->toString();
130   }
131 }
132 
133 %extend FIX::SessionID {
__str__()134   std::string __str__() {
135     return self->toString();
136   }
137 }
138 
139 %extend FIX::FieldBase {
__str__()140   std::string __str__() {
141     return self->getFixString();
142   }
143 }
144 
145 %include "../C++/Exceptions.h"
146 %include "../C++/Field.h"
147 %include "../C++/FieldMap.h"
148 %include "../C++/Message.h"
149 %include "../C++/Group.h"
150 %include "../C++/Fields.h"
151 %include "../C++/FixFields.h"
152 %include "../C++/Values.h"
153 %include "../C++/FixValues.h"
154 %include "../C++/SessionID.h"
155 %include "../C++/Dictionary.h"
156 %include "../C++/SessionSettings.h"
157 %include "../C++/Session.h"
158 %include "../C++/SessionID.h"
159 %include "../C++/Log.h"
160 %include "../C++/FileLog.h"
161 %include "../C++/MessageStore.h"
162 %include "../C++/FileStore.h"
163 %include "../C++/Application.h"
164 %include "../C++/Initiator.h"
165 %include "../C++/SocketInitiator.h"
166 %include "../C++/Acceptor.h"
167 %include "../C++/SocketAcceptor.h"
168 %include "../C++/DataDictionary.h"
169