1 | /* |
2 | * Legal Notice |
3 | * |
4 | * This document and associated source code (the "Work") is a part of a |
5 | * benchmark specification maintained by the TPC. |
6 | * |
7 | * The TPC reserves all right, title, and interest to the Work as provided |
8 | * under U.S. and international laws, including without limitation all patent |
9 | * and trademark rights therein. |
10 | * |
11 | * No Warranty |
12 | * |
13 | * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION |
14 | * CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE |
15 | * AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER |
16 | * WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, |
17 | * INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, |
18 | * DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR |
19 | * PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF |
20 | * WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE. |
21 | * ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, |
22 | * QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT |
23 | * WITH REGARD TO THE WORK. |
24 | * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO |
25 | * ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE |
26 | * COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS |
27 | * OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, |
28 | * INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, |
29 | * OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT |
30 | * RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD |
31 | * ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. |
32 | * |
33 | * Contributors |
34 | * - Sergey Vasilevskiy |
35 | */ |
36 | |
37 | /* |
38 | * Contains class definitions for all transactions. |
39 | */ |
40 | #ifndef TXN_HARNESS_STRUCTS_H |
41 | #define TXN_HARNESS_STRUCTS_H |
42 | |
43 | #include "utilities/EGenStandardTypes.h" |
44 | #include "utilities/DateTime.h" |
45 | #include "utilities/MiscConsts.h" |
46 | #include "utilities/TableConsts.h" |
47 | #include "MEETradeRequestActions.h" |
48 | #include "CustomerAccountsAndPermissionsTable.h" // for iMaxAccountsPerCustomer |
49 | #include "utilities/BufferFiller.h" |
50 | |
51 | namespace TPCE { |
52 | |
53 | // declare the < operator for timestamps |
54 | bool operator<(const TIMESTAMP_STRUCT &ts1, const TIMESTAMP_STRUCT &ts2); |
55 | |
56 | const INT32 iFinYears = 5; |
57 | const INT32 iFinQtrPerYear = 4; |
58 | const INT32 iMaxDailyHistory = 10; |
59 | const INT32 iMaxNews = 10; |
60 | |
61 | // Broker-Volume |
62 | const INT32 min_broker_list_len = 20; |
63 | const INT32 max_broker_list_len = 40; |
64 | |
65 | // Customer-Position |
66 | const INT32 max_acct_len = iMaxAccountsPerCust; |
67 | const INT32 min_hist_len = 10 * 1; |
68 | const INT32 max_hist_len = 10 * 3; |
69 | |
70 | // Market-Feed |
71 | const INT32 max_feed_len = 20; |
72 | |
73 | // Security-Detail |
74 | const INT32 min_day_len = 5; |
75 | const INT32 max_day_len = 20; |
76 | const INT32 max_fin_len = 20; |
77 | const INT32 max_news_len = 2; |
78 | const INT32 max_comp_len = 3; |
79 | |
80 | // Trade-Status |
81 | const INT32 max_trade_status_len = 50; |
82 | |
83 | // Data-Maintenance |
84 | const INT32 max_table_name = 30; |
85 | |
86 | /* |
87 | * Macros for harness validation |
88 | */ |
89 | |
90 | #define TXN_HARNESS_PROPAGATE_STATUS(code) \ |
91 | if ((pTxnOutput->status >= 0) && ((code) < 0)) { \ |
92 | /* propagate error over existing ok/warn status */ \ |
93 | pTxnOutput->status = (code); \ |
94 | } else if ((pTxnOutput->status == 0) && ((code) > 0)) { \ |
95 | /* propagate warning over existing ok status */ \ |
96 | pTxnOutput->status = (code); \ |
97 | } |
98 | |
99 | #define TXN_HARNESS_SET_STATUS_SUCCESS pTxnOutput->status = CBaseTxnErr::SUCCESS; |
100 | |
101 | #define TXN_HARNESS_EARLY_EXIT_ON_ERROR \ |
102 | if (pTxnOutput->status < 0) { \ |
103 | return; \ |
104 | } |
105 | |
106 | /* |
107 | * Broker-Volume |
108 | */ |
109 | typedef class TBrokerVolumeTxnInput { |
110 | public: |
111 | // Transaction level inputs |
112 | char broker_list[max_broker_list_len][cB_NAME_len + 1]; |
113 | char sector_name[cSC_NAME_len + 1]; |
114 | |
115 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
116 | TBrokerVolumeTxnInput() { |
117 | Clear(); |
118 | } |
119 | #endif |
120 | |
121 | inline void Clear() { |
122 | BufferFiller::Clear(this, sizeof(*this)); |
123 | } |
124 | |
125 | } * PBrokerVolumeTxnInput, |
126 | TBrokerVolumeFrame1Input, // Single-Frame transaction |
127 | *PBrokerVolumeFrame1Input; // Single-Frame transaction |
128 | |
129 | typedef class TBrokerVolumeTxnOutput { |
130 | public: |
131 | // Transaction level outputs |
132 | double volume[max_broker_list_len]; |
133 | INT32 list_len; |
134 | INT32 status; |
135 | |
136 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
137 | TBrokerVolumeTxnOutput() { |
138 | Clear(); |
139 | } |
140 | #endif |
141 | |
142 | inline void Clear() { |
143 | BufferFiller::Clear(this, sizeof(*this)); |
144 | } |
145 | |
146 | } * PBrokerVolumeTxnOutput; |
147 | |
148 | typedef class TBrokerVolumeFrame1Output { |
149 | public: |
150 | // Frame level outputs |
151 | double volume[max_broker_list_len]; |
152 | INT32 list_len; |
153 | char broker_name[max_broker_list_len][cB_NAME_len + 1]; |
154 | |
155 | TBrokerVolumeFrame1Output() { |
156 | Clear(); |
157 | } |
158 | |
159 | inline void Clear() { |
160 | BufferFiller::Clear(this, sizeof(*this)); |
161 | } |
162 | |
163 | } * PBrokerVolumeFrame1Output; |
164 | |
165 | /* |
166 | * Customer-Position |
167 | */ |
168 | typedef class TCustomerPositionTxnInput { |
169 | public: |
170 | TIdent acct_id_idx; |
171 | TIdent cust_id; |
172 | bool get_history; |
173 | char tax_id[cTAX_ID_len + 1]; |
174 | |
175 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
176 | TCustomerPositionTxnInput() { |
177 | Clear(); |
178 | } |
179 | #endif |
180 | |
181 | inline void Clear() { |
182 | BufferFiller::Clear(this, sizeof(*this)); |
183 | } |
184 | |
185 | } * PCustomerPositionTxnInput; |
186 | |
187 | typedef class TCustomerPositionTxnOutput { |
188 | public: |
189 | double asset_total[max_acct_len]; |
190 | double cash_bal[max_acct_len]; |
191 | TIdent acct_id[max_acct_len]; |
192 | TTrade trade_id[max_hist_len]; |
193 | TIdent c_ad_id; |
194 | INT32 qty[max_hist_len]; |
195 | INT32 acct_len; |
196 | INT32 hist_len; |
197 | INT32 status; |
198 | TIMESTAMP_STRUCT hist_dts[max_hist_len]; |
199 | TIMESTAMP_STRUCT c_dob; |
200 | char symbol[max_hist_len][cSYMBOL_len + 1]; |
201 | char trade_status[max_hist_len][cST_NAME_len + 1]; |
202 | char c_area_1[cAREA_len + 1]; |
203 | char c_area_2[cAREA_len + 1]; |
204 | char c_area_3[cAREA_len + 1]; |
205 | char c_ctry_1[cCTRY_len + 1]; |
206 | char c_ctry_2[cCTRY_len + 1]; |
207 | char c_ctry_3[cCTRY_len + 1]; |
208 | char c_email_1[cEMAIL_len + 1]; |
209 | char c_email_2[cEMAIL_len + 1]; |
210 | char c_ext_1[cEXT_len + 1]; |
211 | char c_ext_2[cEXT_len + 1]; |
212 | char c_ext_3[cEXT_len + 1]; |
213 | char c_f_name[cF_NAME_len + 1]; |
214 | char c_gndr[cGNDR_len + 1]; |
215 | char c_l_name[cL_NAME_len + 1]; |
216 | char c_local_1[cLOCAL_len + 1]; |
217 | char c_local_2[cLOCAL_len + 1]; |
218 | char c_local_3[cLOCAL_len + 1]; |
219 | char c_m_name[cM_NAME_len + 1]; |
220 | char c_st_id[cST_ID_len + 1]; |
221 | char c_tier; |
222 | |
223 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
224 | TCustomerPositionTxnOutput() { |
225 | Clear(); |
226 | } |
227 | #endif |
228 | |
229 | inline void Clear() { |
230 | BufferFiller::Clear(this, sizeof(*this)); |
231 | } |
232 | |
233 | } * PCustomerPositionTxnOutput; |
234 | |
235 | typedef class TCustomerPositionFrame1Input { |
236 | public: |
237 | TIdent cust_id; |
238 | char tax_id[cTAX_ID_len + 1]; |
239 | |
240 | TCustomerPositionFrame1Input() { |
241 | Clear(); |
242 | } |
243 | |
244 | inline void Clear() { |
245 | BufferFiller::Clear(this, sizeof(*this)); |
246 | } |
247 | |
248 | } * PCustomerPositionFrame1Input; |
249 | |
250 | typedef class TCustomerPositionFrame1Output { |
251 | public: |
252 | double asset_total[max_acct_len]; |
253 | double cash_bal[max_acct_len]; |
254 | TIdent acct_id[max_acct_len]; |
255 | TIdent c_ad_id; |
256 | TIdent cust_id; |
257 | INT32 acct_len; |
258 | TIMESTAMP_STRUCT c_dob; |
259 | char c_area_1[cAREA_len + 1]; |
260 | char c_area_2[cAREA_len + 1]; |
261 | char c_area_3[cAREA_len + 1]; |
262 | char c_ctry_1[cCTRY_len + 1]; |
263 | char c_ctry_2[cCTRY_len + 1]; |
264 | char c_ctry_3[cCTRY_len + 1]; |
265 | char c_email_1[cEMAIL_len + 1]; |
266 | char c_email_2[cEMAIL_len + 1]; |
267 | char c_ext_1[cEXT_len + 1]; |
268 | char c_ext_2[cEXT_len + 1]; |
269 | char c_ext_3[cEXT_len + 1]; |
270 | char c_f_name[cF_NAME_len + 1]; |
271 | char c_gndr[cGNDR_len + 1]; |
272 | char c_l_name[cL_NAME_len + 1]; |
273 | char c_local_1[cLOCAL_len + 1]; |
274 | char c_local_2[cLOCAL_len + 1]; |
275 | char c_local_3[cLOCAL_len + 1]; |
276 | char c_m_name[cM_NAME_len + 1]; |
277 | char c_st_id[cST_ID_len + 1]; |
278 | char c_tier; |
279 | |
280 | TCustomerPositionFrame1Output() { |
281 | Clear(); |
282 | } |
283 | |
284 | inline void Clear() { |
285 | BufferFiller::Clear(this, sizeof(*this)); |
286 | } |
287 | |
288 | } * PCustomerPositionFrame1Output; |
289 | |
290 | typedef class TCustomerPositionFrame2Input { |
291 | public: |
292 | TIdent acct_id; |
293 | |
294 | TCustomerPositionFrame2Input() { |
295 | Clear(); |
296 | } |
297 | |
298 | inline void Clear() { |
299 | BufferFiller::Clear(this, sizeof(*this)); |
300 | } |
301 | |
302 | } * PCustomerPositionFrame2Input; |
303 | |
304 | typedef class TCustomerPositionFrame2Output { |
305 | public: |
306 | TTrade trade_id[max_hist_len]; |
307 | INT32 qty[max_hist_len]; |
308 | INT32 hist_len; |
309 | TIMESTAMP_STRUCT hist_dts[max_hist_len]; |
310 | char symbol[max_hist_len][cSYMBOL_len + 1]; |
311 | char trade_status[max_hist_len][cST_NAME_len + 1]; |
312 | |
313 | TCustomerPositionFrame2Output() { |
314 | Clear(); |
315 | } |
316 | |
317 | inline void Clear() { |
318 | BufferFiller::Clear(this, sizeof(*this)); |
319 | } |
320 | |
321 | } * PCustomerPositionFrame2Output; |
322 | |
323 | /* |
324 | * Data-Maintenance |
325 | */ |
326 | typedef class TDataMaintenanceTxnInput { |
327 | public: |
328 | TIdent acct_id; |
329 | TIdent c_id; |
330 | TIdent co_id; |
331 | INT32 day_of_month; |
332 | INT32 vol_incr; |
333 | char symbol[cSYMBOL_len + 1]; |
334 | char table_name[max_table_name + 1]; |
335 | char tx_id[cTX_ID_len + 1]; |
336 | |
337 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
338 | TDataMaintenanceTxnInput() { |
339 | Clear(); |
340 | } |
341 | #endif |
342 | |
343 | inline void Clear() { |
344 | BufferFiller::Clear(this, sizeof(*this)); |
345 | } |
346 | |
347 | } * PDataMaintenanceTxnInput, |
348 | TDataMaintenanceFrame1Input, // Single-Frame transaction |
349 | *PDataMaintenanceFrame1Input; // Single-Frame transaction |
350 | |
351 | typedef class TDataMaintenanceTxnOutput { |
352 | public: |
353 | INT32 status; |
354 | |
355 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
356 | TDataMaintenanceTxnOutput() { |
357 | Clear(); |
358 | } |
359 | #endif |
360 | |
361 | inline void Clear() { |
362 | BufferFiller::Clear(this, sizeof(*this)); |
363 | } |
364 | |
365 | } * PDataMaintenanceTxnOutput; |
366 | |
367 | /* |
368 | * Market-Feed |
369 | */ |
370 | // MEE populates this class |
371 | typedef class TStatusAndTradeType { |
372 | public: |
373 | char status_submitted[cST_ID_len + 1]; |
374 | char type_limit_buy[cTT_ID_len + 1]; |
375 | char type_limit_sell[cTT_ID_len + 1]; |
376 | char type_stop_loss[cTT_ID_len + 1]; |
377 | |
378 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
379 | TStatusAndTradeType() { |
380 | Clear(); |
381 | } |
382 | #endif |
383 | |
384 | inline void Clear() { |
385 | BufferFiller::Clear(this, sizeof(*this)); |
386 | } |
387 | |
388 | } * PTStatusAndTradeType; |
389 | |
390 | // Incoming order from SendToMarket interface. |
391 | typedef class TTradeRequest { |
392 | public: |
393 | double price_quote; |
394 | TTrade trade_id; |
395 | INT32 trade_qty; |
396 | eMEETradeRequestAction eAction; |
397 | char symbol[cSYMBOL_len + 1]; |
398 | char trade_type_id[cTT_ID_len + 1]; |
399 | |
400 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
401 | TTradeRequest() { |
402 | Clear(); |
403 | } |
404 | #endif |
405 | |
406 | inline void Clear() { |
407 | BufferFiller::Clear(this, sizeof(*this)); |
408 | } |
409 | |
410 | } * PTradeRequest; |
411 | |
412 | // A single entry on the ticker tape feed. |
413 | typedef class TTickerEntry { |
414 | public: |
415 | double price_quote; |
416 | INT32 trade_qty; |
417 | char symbol[cSYMBOL_len + 1]; |
418 | |
419 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
420 | TTickerEntry() { |
421 | Clear(); |
422 | } |
423 | #endif |
424 | |
425 | inline void Clear() { |
426 | BufferFiller::Clear(this, sizeof(*this)); |
427 | } |
428 | |
429 | } * PTickerEntry; |
430 | |
431 | // Market-Feed data sent from MEE to sponsor provided SUT interface |
432 | typedef class TMarketFeedTxnInput { |
433 | public: |
434 | INT32 unique_symbols; |
435 | char zz_padding1[4]; |
436 | TStatusAndTradeType StatusAndTradeType; |
437 | char zz_padding2[4]; |
438 | TTickerEntry Entries[max_feed_len]; |
439 | |
440 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
441 | TMarketFeedTxnInput() { |
442 | Clear(); |
443 | } |
444 | #endif |
445 | |
446 | inline void Clear() { |
447 | BufferFiller::Clear(this, sizeof(*this)); |
448 | } |
449 | |
450 | } * PMarketFeedTxnInput; |
451 | |
452 | typedef class TMarketFeedTxnOutput { |
453 | public: |
454 | INT32 send_len; |
455 | INT32 status; |
456 | |
457 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
458 | TMarketFeedTxnOutput() { |
459 | Clear(); |
460 | } |
461 | #endif |
462 | |
463 | inline void Clear() { |
464 | BufferFiller::Clear(this, sizeof(*this)); |
465 | } |
466 | |
467 | } * PMarketFeedTxnOutput; |
468 | |
469 | typedef class TMarketFeedFrame1Input { |
470 | public: |
471 | TStatusAndTradeType StatusAndTradeType; |
472 | char zz_padding[4]; |
473 | TTickerEntry Entries[max_feed_len]; |
474 | |
475 | TMarketFeedFrame1Input() { |
476 | Clear(); |
477 | } |
478 | |
479 | inline void Clear() { |
480 | BufferFiller::Clear(this, sizeof(*this)); |
481 | } |
482 | |
483 | } * PMarketFeedFrame1Input; |
484 | |
485 | typedef class TMarketFeedFrame1Output { |
486 | public: |
487 | INT32 num_updated; |
488 | INT32 send_len; |
489 | |
490 | TMarketFeedFrame1Output() { |
491 | Clear(); |
492 | } |
493 | |
494 | inline void Clear() { |
495 | BufferFiller::Clear(this, sizeof(*this)); |
496 | } |
497 | |
498 | } * PMarketFeedFrame1Output; |
499 | |
500 | /* |
501 | * Market-Watch |
502 | */ |
503 | typedef class TMarketWatchTxnInput { |
504 | public: |
505 | TIdent acct_id; |
506 | TIdent c_id; |
507 | TIdent ending_co_id; |
508 | TIdent starting_co_id; |
509 | TIMESTAMP_STRUCT start_day; |
510 | char industry_name[cIN_NAME_len + 1]; |
511 | |
512 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
513 | TMarketWatchTxnInput() { |
514 | Clear(); |
515 | } |
516 | #endif |
517 | |
518 | inline void Clear() { |
519 | BufferFiller::Clear(this, sizeof(*this)); |
520 | } |
521 | |
522 | } * PMarketWatchTxnInput, |
523 | TMarketWatchFrame1Input, // Single-Frame transaction |
524 | *PMarketWatchFrame1Input; // Single-Frame transaction |
525 | |
526 | typedef class TMarketWatchTxnOutput { |
527 | public: |
528 | double pct_change; |
529 | INT32 status; |
530 | |
531 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
532 | TMarketWatchTxnOutput() { |
533 | Clear(); |
534 | } |
535 | #endif |
536 | |
537 | inline void Clear() { |
538 | BufferFiller::Clear(this, sizeof(*this)); |
539 | } |
540 | |
541 | } * PMarketWatchTxnOutput; |
542 | |
543 | typedef class TMarketWatchFrame1Output { |
544 | public: |
545 | double pct_change; |
546 | |
547 | TMarketWatchFrame1Output() { |
548 | Clear(); |
549 | } |
550 | |
551 | inline void Clear() { |
552 | BufferFiller::Clear(this, sizeof(*this)); |
553 | } |
554 | |
555 | } * PMarketWatchFrame1Output; |
556 | |
557 | /* |
558 | * Security-Detail |
559 | */ |
560 | typedef class TFinInfo { |
561 | public: |
562 | double assets; |
563 | double basic_eps; |
564 | double dilut_eps; |
565 | double invent; |
566 | double liab; |
567 | double margin; |
568 | double net_earn; |
569 | INT64 out_basic; |
570 | INT64 out_dilut; |
571 | double rev; |
572 | INT32 qtr; |
573 | INT32 year; |
574 | TIMESTAMP_STRUCT start_date; |
575 | DB_INDICATOR assets_ind; |
576 | DB_INDICATOR basic_eps_ind; |
577 | DB_INDICATOR dilut_eps_ind; |
578 | DB_INDICATOR invent_ind; |
579 | DB_INDICATOR liab_ind; |
580 | DB_INDICATOR margin_ind; |
581 | DB_INDICATOR net_earn_ind; |
582 | DB_INDICATOR out_basic_ind; |
583 | DB_INDICATOR out_dilut_ind; |
584 | DB_INDICATOR qtr_ind; |
585 | DB_INDICATOR rev_ind; |
586 | DB_INDICATOR start_date_ind; |
587 | DB_INDICATOR year_ind; |
588 | |
589 | TFinInfo() { |
590 | Clear(); |
591 | } |
592 | |
593 | inline void Clear() { |
594 | BufferFiller::Clear(this, sizeof(*this)); |
595 | } |
596 | |
597 | } * PFinInfo; |
598 | |
599 | typedef class TDailyHistory { |
600 | public: |
601 | double close; |
602 | double high; |
603 | double low; |
604 | INT64 vol; |
605 | TIMESTAMP_STRUCT date; |
606 | DB_INDICATOR close_ind; |
607 | DB_INDICATOR date_ind; |
608 | DB_INDICATOR high_ind; |
609 | DB_INDICATOR low_ind; |
610 | DB_INDICATOR vol_ind; |
611 | |
612 | TDailyHistory() { |
613 | Clear(); |
614 | } |
615 | |
616 | inline void Clear() { |
617 | BufferFiller::Clear(this, sizeof(*this)); |
618 | } |
619 | |
620 | } * PDailyHistory; |
621 | |
622 | typedef class TNews { |
623 | public: |
624 | TIMESTAMP_STRUCT dts; |
625 | char auth[cNI_AUTHOR_len + 1]; |
626 | char headline[cNI_HEADLINE_len + 1]; |
627 | char item[cNI_ITEM_len + 1]; |
628 | char src[cNI_SOURCE_len + 1]; |
629 | char summary[cNI_SUMMARY_len + 1]; |
630 | DB_INDICATOR auth_ind; |
631 | |
632 | TNews() { |
633 | Clear(); |
634 | } |
635 | |
636 | inline void Clear() { |
637 | BufferFiller::Clear(&dts, sizeof(dts)); |
638 | BufferFiller::Clear(auth, sizeof(auth)); |
639 | BufferFiller::Clear(headline, sizeof(headline)); |
640 | |
641 | // Purposely don't clear item since it is so large. |
642 | // BufferFiller::Clear( item, sizeof( item )); |
643 | |
644 | BufferFiller::Clear(src, sizeof(src)); |
645 | BufferFiller::Clear(summary, sizeof(summary)); |
646 | BufferFiller::Clear(&auth_ind, sizeof(auth_ind)); |
647 | } |
648 | |
649 | } * PNews; |
650 | |
651 | typedef class TSecurityDetailTxnInput { |
652 | public: |
653 | INT32 max_rows_to_return; |
654 | bool access_lob_flag; |
655 | TIMESTAMP_STRUCT start_day; |
656 | char symbol[cSYMBOL_len + 1]; |
657 | |
658 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
659 | TSecurityDetailTxnInput() { |
660 | Clear(); |
661 | } |
662 | #endif |
663 | |
664 | inline void Clear() { |
665 | BufferFiller::Clear(this, sizeof(*this)); |
666 | } |
667 | |
668 | } * PSecurityDetailTxnInput, |
669 | TSecurityDetailFrame1Input, // Single-Frame transaction |
670 | *PSecurityDetailFrame1Input; // Single-Frame transaction |
671 | |
672 | typedef class TSecurityDetailTxnOutput { |
673 | public: |
674 | INT64 last_vol; |
675 | INT32 news_len; |
676 | INT32 status; |
677 | |
678 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
679 | TSecurityDetailTxnOutput() { |
680 | Clear(); |
681 | } |
682 | #endif |
683 | |
684 | inline void Clear() { |
685 | BufferFiller::Clear(this, sizeof(*this)); |
686 | } |
687 | |
688 | } * PSecurityDetailTxnOutput; |
689 | |
690 | typedef class TSecurityDetailFrame1Output { |
691 | public: |
692 | double divid; |
693 | double last_open; |
694 | double last_price; |
695 | double pe_ratio; |
696 | double s52_wk_high; |
697 | double s52_wk_low; |
698 | double yield; |
699 | INT64 last_vol; |
700 | INT64 num_out; |
701 | INT32 day_len; |
702 | INT32 ex_close; |
703 | INT32 ex_num_symb; |
704 | INT32 ex_open; |
705 | INT32 fin_len; |
706 | INT32 news_len; |
707 | TIMESTAMP_STRUCT ex_date; |
708 | TIMESTAMP_STRUCT open_date; |
709 | TIMESTAMP_STRUCT s52_wk_high_date; |
710 | TIMESTAMP_STRUCT s52_wk_low_date; |
711 | TIMESTAMP_STRUCT start_date; |
712 | TDailyHistory day[max_day_len]; |
713 | TFinInfo fin[max_fin_len]; |
714 | TNews news[max_news_len]; |
715 | char cp_co_name[max_comp_len][cCO_NAME_len + 1]; |
716 | char cp_in_name[max_comp_len][cIN_NAME_len + 1]; |
717 | char ceo_name[cCEO_NAME_len + 1]; |
718 | char co_ad_cty[cAD_CTRY_len + 1]; |
719 | char co_ad_div[cAD_DIV_len + 1]; |
720 | char co_ad_line1[cAD_LINE_len + 1]; |
721 | char co_ad_line2[cAD_LINE_len + 1]; |
722 | char co_ad_town[cAD_TOWN_len + 1]; |
723 | char co_ad_zip[cAD_ZIP_len + 1]; |
724 | char co_desc[cCO_DESC_len + 1]; |
725 | char co_name[cCO_NAME_len + 1]; |
726 | char co_st_id[cST_ID_len + 1]; |
727 | char ex_ad_cty[cAD_CTRY_len + 1]; |
728 | char ex_ad_div[cAD_DIV_len + 1]; |
729 | char ex_ad_line1[cAD_LINE_len + 1]; |
730 | char ex_ad_line2[cAD_LINE_len + 1]; |
731 | char ex_ad_town[cAD_TOWN_len + 1]; |
732 | char ex_ad_zip[cAD_ZIP_len + 1]; |
733 | char ex_desc[cEX_DESC_len + 1]; |
734 | char ex_name[cEX_NAME_len + 1]; |
735 | char s_name[cS_NAME_len + 1]; |
736 | char sp_rate[cSP_RATE_len + 1]; |
737 | |
738 | TSecurityDetailFrame1Output() { |
739 | Clear(); |
740 | } |
741 | |
742 | inline void Clear() { |
743 | // Using BufferFiller::Clear( this, sizeof( *this )) would incur |
744 | // the overhead of clearing two LOB items in news array. |
745 | // So instead, clear members individually and call Clear on |
746 | // elements of news array to avoid clearing LOB space. |
747 | BufferFiller::Clear(&divid, sizeof(divid)); |
748 | BufferFiller::Clear(&last_open, sizeof(last_open)); |
749 | BufferFiller::Clear(&last_price, sizeof(last_price)); |
750 | BufferFiller::Clear(&pe_ratio, sizeof(pe_ratio)); |
751 | BufferFiller::Clear(&s52_wk_high, sizeof(s52_wk_high)); |
752 | BufferFiller::Clear(&s52_wk_low, sizeof(s52_wk_low)); |
753 | BufferFiller::Clear(&yield, sizeof(yield)); |
754 | BufferFiller::Clear(&last_vol, sizeof(last_vol)); |
755 | BufferFiller::Clear(&num_out, sizeof(num_out)); |
756 | BufferFiller::Clear(&day_len, sizeof(day_len)); |
757 | BufferFiller::Clear(&ex_close, sizeof(ex_close)); |
758 | BufferFiller::Clear(&ex_num_symb, sizeof(ex_num_symb)); |
759 | BufferFiller::Clear(&ex_open, sizeof(ex_open)); |
760 | BufferFiller::Clear(&fin_len, sizeof(fin_len)); |
761 | BufferFiller::Clear(&news_len, sizeof(news_len)); |
762 | BufferFiller::Clear(&ex_date, sizeof(ex_date)); |
763 | BufferFiller::Clear(&open_date, sizeof(open_date)); |
764 | BufferFiller::Clear(&s52_wk_high_date, sizeof(s52_wk_high_date)); |
765 | BufferFiller::Clear(&s52_wk_low_date, sizeof(s52_wk_low_date)); |
766 | BufferFiller::Clear(&start_date, sizeof(start_date)); |
767 | BufferFiller::Clear(day, sizeof(day)); |
768 | BufferFiller::Clear(fin, sizeof(fin)); |
769 | for (int ii = 0; ii < sizeof(news) / sizeof(news[0]); ++ii) { |
770 | news[ii].Clear(); |
771 | } |
772 | BufferFiller::Clear(cp_co_name, sizeof(cp_co_name)); |
773 | BufferFiller::Clear(cp_in_name, sizeof(cp_in_name)); |
774 | BufferFiller::Clear(ceo_name, sizeof(ceo_name)); |
775 | BufferFiller::Clear(co_ad_cty, sizeof(co_ad_cty)); |
776 | BufferFiller::Clear(co_ad_div, sizeof(co_ad_div)); |
777 | BufferFiller::Clear(co_ad_line1, sizeof(co_ad_line1)); |
778 | BufferFiller::Clear(co_ad_line2, sizeof(co_ad_line2)); |
779 | BufferFiller::Clear(co_ad_town, sizeof(co_ad_town)); |
780 | BufferFiller::Clear(co_ad_zip, sizeof(co_ad_zip)); |
781 | BufferFiller::Clear(co_desc, sizeof(co_desc)); |
782 | BufferFiller::Clear(co_name, sizeof(co_name)); |
783 | BufferFiller::Clear(co_st_id, sizeof(co_st_id)); |
784 | BufferFiller::Clear(ex_ad_cty, sizeof(co_ad_cty)); |
785 | BufferFiller::Clear(ex_ad_div, sizeof(co_ad_div)); |
786 | BufferFiller::Clear(ex_ad_line1, sizeof(co_ad_line1)); |
787 | BufferFiller::Clear(ex_ad_line2, sizeof(co_ad_line2)); |
788 | BufferFiller::Clear(ex_ad_town, sizeof(co_ad_town)); |
789 | BufferFiller::Clear(ex_ad_zip, sizeof(co_ad_zip)); |
790 | BufferFiller::Clear(ex_desc, sizeof(co_desc)); |
791 | BufferFiller::Clear(ex_name, sizeof(co_name)); |
792 | BufferFiller::Clear(s_name, sizeof(s_name)); |
793 | BufferFiller::Clear(sp_rate, sizeof(sp_rate)); |
794 | } |
795 | |
796 | } * PSecurityDetailFrame1Output; |
797 | |
798 | /* |
799 | * Trade-Lookup |
800 | */ |
801 | typedef class TTradeLookupTxnInput { |
802 | public: |
803 | TTrade trade_id[TradeLookupFrame1MaxRows]; |
804 | TIdent acct_id; |
805 | TIdent max_acct_id; |
806 | INT32 frame_to_execute; // which of the frames to execute |
807 | INT32 max_trades; |
808 | TIMESTAMP_STRUCT end_trade_dts; |
809 | TIMESTAMP_STRUCT start_trade_dts; |
810 | char symbol[cSYMBOL_len + 1]; |
811 | |
812 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
813 | TTradeLookupTxnInput() { |
814 | Clear(); |
815 | } |
816 | #endif |
817 | |
818 | inline void Clear() { |
819 | BufferFiller::Clear(this, sizeof(*this)); |
820 | } |
821 | |
822 | } * PTradeLookupTxnInput; |
823 | |
824 | typedef class TTradeLookupTxnOutput { |
825 | public: |
826 | TTrade trade_list[TradeLookupMaxRows]; |
827 | INT32 frame_executed; // confirmation of which frame was executed |
828 | INT32 num_found; |
829 | INT32 status; |
830 | bool is_cash[TradeLookupMaxRows]; |
831 | bool is_market[TradeLookupMaxRows]; |
832 | |
833 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
834 | TTradeLookupTxnOutput() { |
835 | Clear(); |
836 | } |
837 | #endif |
838 | |
839 | inline void Clear() { |
840 | BufferFiller::Clear(this, sizeof(*this)); |
841 | } |
842 | |
843 | } * PTradeLookupTxnOutput; |
844 | |
845 | typedef class TTradeLookupFrame1Input { |
846 | public: |
847 | TTrade trade_id[TradeLookupFrame1MaxRows]; |
848 | INT32 max_trades; |
849 | |
850 | TTradeLookupFrame1Input() { |
851 | Clear(); |
852 | } |
853 | |
854 | inline void Clear() { |
855 | BufferFiller::Clear(this, sizeof(*this)); |
856 | } |
857 | |
858 | } * PTradeLookupFrame1Input; |
859 | |
860 | // Class to hold one trade information row |
861 | // |
862 | typedef class TTradeLookupFrame1TradeInfo { |
863 | public: |
864 | double bid_price; |
865 | double cash_transaction_amount; |
866 | double settlement_amount; |
867 | double trade_price; |
868 | bool is_cash; |
869 | bool is_market; |
870 | TIMESTAMP_STRUCT trade_history_dts[TradeLookupMaxTradeHistoryRowsReturned]; |
871 | TIMESTAMP_STRUCT cash_transaction_dts; |
872 | TIMESTAMP_STRUCT settlement_cash_due_date; |
873 | char trade_history_status_id[TradeLookupMaxTradeHistoryRowsReturned][cTH_ST_ID_len + 1]; |
874 | char cash_transaction_name[cCT_NAME_len + 1]; |
875 | char exec_name[cEXEC_NAME_len + 1]; |
876 | char settlement_cash_type[cSE_CASH_TYPE_len + 1]; |
877 | DB_INDICATOR trade_history_dts_ind[TradeLookupMaxTradeHistoryRowsReturned]; |
878 | DB_INDICATOR |
879 | trade_history_status_id_ind[TradeLookupMaxTradeHistoryRowsReturned]; |
880 | DB_INDICATOR bid_price_ind; |
881 | DB_INDICATOR cash_transaction_amount_ind; |
882 | DB_INDICATOR cash_transaction_dts_ind; |
883 | DB_INDICATOR cash_transaction_name_ind; |
884 | DB_INDICATOR exec_name_ind; |
885 | DB_INDICATOR is_cash_ind; |
886 | DB_INDICATOR is_market_ind; |
887 | DB_INDICATOR settlement_amount_ind; |
888 | DB_INDICATOR settlement_cash_due_date_ind; |
889 | DB_INDICATOR settlement_cash_type_ind; |
890 | DB_INDICATOR trade_price_ind; |
891 | |
892 | TTradeLookupFrame1TradeInfo() { |
893 | Clear(); |
894 | } |
895 | |
896 | inline void Clear() { |
897 | BufferFiller::Clear(this, sizeof(*this)); |
898 | } |
899 | |
900 | } * PTradeLookupFrame1TradeInfo; |
901 | |
902 | typedef class TTradeLookupFrame1Output { |
903 | public: |
904 | INT32 num_found; |
905 | TTradeLookupFrame1TradeInfo trade_info[TradeLookupFrame1MaxRows]; |
906 | |
907 | TTradeLookupFrame1Output() { |
908 | Clear(); |
909 | } |
910 | |
911 | inline void Clear() { |
912 | BufferFiller::Clear(this, sizeof(*this)); |
913 | } |
914 | |
915 | } * PTradeLookupFrame1Output; |
916 | |
917 | typedef class TTradeLookupFrame2Input { |
918 | public: |
919 | TIdent acct_id; |
920 | INT32 max_trades; |
921 | TIMESTAMP_STRUCT end_trade_dts; |
922 | TIMESTAMP_STRUCT start_trade_dts; |
923 | |
924 | TTradeLookupFrame2Input() { |
925 | Clear(); |
926 | } |
927 | |
928 | inline void Clear() { |
929 | BufferFiller::Clear(this, sizeof(*this)); |
930 | } |
931 | |
932 | } * PTradeLookupFrame2Input; |
933 | |
934 | // Class to hold one trade information row |
935 | // |
936 | typedef class TTradeLookupFrame2TradeInfo { |
937 | public: |
938 | double bid_price; |
939 | double cash_transaction_amount; |
940 | double settlement_amount; |
941 | double trade_price; |
942 | TTrade trade_id; |
943 | bool is_cash; |
944 | TIMESTAMP_STRUCT trade_history_dts[TradeLookupMaxTradeHistoryRowsReturned]; |
945 | TIMESTAMP_STRUCT cash_transaction_dts; |
946 | TIMESTAMP_STRUCT settlement_cash_due_date; |
947 | char trade_history_status_id[TradeLookupMaxTradeHistoryRowsReturned][cTH_ST_ID_len + 1]; |
948 | char cash_transaction_name[cCT_NAME_len + 1]; |
949 | char exec_name[cEXEC_NAME_len + 1]; |
950 | char settlement_cash_type[cSE_CASH_TYPE_len + 1]; |
951 | DB_INDICATOR trade_history_dts_ind[TradeLookupMaxTradeHistoryRowsReturned]; |
952 | DB_INDICATOR |
953 | trade_history_status_id_ind[TradeLookupMaxTradeHistoryRowsReturned]; |
954 | DB_INDICATOR bid_price_ind; |
955 | DB_INDICATOR cash_transaction_amount_ind; |
956 | DB_INDICATOR cash_transaction_dts_ind; |
957 | DB_INDICATOR cash_transaction_name_ind; |
958 | DB_INDICATOR exec_name_ind; |
959 | DB_INDICATOR is_cash_ind; |
960 | DB_INDICATOR settlement_amount_ind; |
961 | DB_INDICATOR settlement_cash_due_date_ind; |
962 | DB_INDICATOR settlement_cash_type_ind; |
963 | DB_INDICATOR trade_id_ind; |
964 | DB_INDICATOR trade_price_ind; |
965 | |
966 | TTradeLookupFrame2TradeInfo() { |
967 | Clear(); |
968 | } |
969 | |
970 | inline void Clear() { |
971 | BufferFiller::Clear(this, sizeof(*this)); |
972 | } |
973 | |
974 | } * PTradeLookupFrame2TradeInfo; |
975 | |
976 | typedef class TTradeLookupFrame2Output { |
977 | public: |
978 | INT32 num_found; |
979 | TTradeLookupFrame2TradeInfo trade_info[TradeLookupFrame2MaxRows]; |
980 | |
981 | TTradeLookupFrame2Output() { |
982 | Clear(); |
983 | } |
984 | |
985 | inline void Clear() { |
986 | BufferFiller::Clear(this, sizeof(*this)); |
987 | } |
988 | |
989 | } * PTradeLookupFrame2Output; |
990 | |
991 | typedef class TTradeLookupFrame3Input { |
992 | public: |
993 | TIdent max_acct_id; |
994 | INT32 max_trades; |
995 | TIMESTAMP_STRUCT end_trade_dts; |
996 | TIMESTAMP_STRUCT start_trade_dts; |
997 | char symbol[cSYMBOL_len + 1]; |
998 | |
999 | TTradeLookupFrame3Input() { |
1000 | Clear(); |
1001 | } |
1002 | |
1003 | inline void Clear() { |
1004 | BufferFiller::Clear(this, sizeof(*this)); |
1005 | } |
1006 | |
1007 | } * PTradeLookupFrame3Input; |
1008 | |
1009 | // Class to hold one trade information row |
1010 | // |
1011 | typedef class TTradeLookupFrame3TradeInfo { |
1012 | public: |
1013 | double cash_transaction_amount; |
1014 | double price; |
1015 | double settlement_amount; |
1016 | TIdent acct_id; |
1017 | TTrade trade_id; |
1018 | INT32 quantity; |
1019 | bool is_cash; |
1020 | TIMESTAMP_STRUCT trade_history_dts[TradeLookupMaxTradeHistoryRowsReturned]; |
1021 | TIMESTAMP_STRUCT cash_transaction_dts; |
1022 | TIMESTAMP_STRUCT settlement_cash_due_date; |
1023 | TIMESTAMP_STRUCT trade_dts; |
1024 | char trade_history_status_id[TradeLookupMaxTradeHistoryRowsReturned][cTH_ST_ID_len + 1]; |
1025 | char cash_transaction_name[cCT_NAME_len + 1]; |
1026 | char exec_name[cEXEC_NAME_len + 1]; |
1027 | char settlement_cash_type[cSE_CASH_TYPE_len + 1]; |
1028 | char trade_type[cTT_ID_len + 1]; |
1029 | DB_INDICATOR trade_history_dts_ind[TradeLookupMaxTradeHistoryRowsReturned]; |
1030 | DB_INDICATOR |
1031 | trade_history_status_id_ind[TradeLookupMaxTradeHistoryRowsReturned]; |
1032 | DB_INDICATOR acct_id_ind; |
1033 | DB_INDICATOR cash_transaction_amount_ind; |
1034 | DB_INDICATOR cash_transaction_dts_ind; |
1035 | DB_INDICATOR cash_transaction_name_ind; |
1036 | DB_INDICATOR exec_name_ind; |
1037 | DB_INDICATOR is_cash_ind; |
1038 | DB_INDICATOR price_ind; |
1039 | DB_INDICATOR quantity_ind; |
1040 | DB_INDICATOR settlement_amount_ind; |
1041 | DB_INDICATOR settlement_cash_due_date_ind; |
1042 | DB_INDICATOR settlement_cash_type_ind; |
1043 | DB_INDICATOR trade_dts_ind; |
1044 | DB_INDICATOR trade_id_ind; |
1045 | DB_INDICATOR trade_type_ind; |
1046 | |
1047 | TTradeLookupFrame3TradeInfo() { |
1048 | Clear(); |
1049 | } |
1050 | |
1051 | inline void Clear() { |
1052 | BufferFiller::Clear(this, sizeof(*this)); |
1053 | } |
1054 | |
1055 | } * PTradeLookupFrame3TradeInfo; |
1056 | |
1057 | typedef class TTradeLookupFrame3Output { |
1058 | public: |
1059 | INT32 num_found; |
1060 | TTradeLookupFrame3TradeInfo trade_info[TradeLookupFrame3MaxRows]; |
1061 | |
1062 | TTradeLookupFrame3Output() { |
1063 | Clear(); |
1064 | } |
1065 | |
1066 | inline void Clear() { |
1067 | BufferFiller::Clear(this, sizeof(*this)); |
1068 | } |
1069 | |
1070 | } * PTradeLookupFrame3Output; |
1071 | |
1072 | typedef class TTradeLookupFrame4Input { |
1073 | public: |
1074 | TIdent acct_id; |
1075 | TIMESTAMP_STRUCT trade_dts; |
1076 | |
1077 | TTradeLookupFrame4Input() { |
1078 | Clear(); |
1079 | } |
1080 | |
1081 | inline void Clear() { |
1082 | BufferFiller::Clear(this, sizeof(*this)); |
1083 | } |
1084 | |
1085 | } * PTradeLookupFrame4Input; |
1086 | |
1087 | // Class to hold one trade information row |
1088 | // |
1089 | typedef class TTradeLookupFrame4TradeInfo { |
1090 | public: |
1091 | TTrade holding_history_id; |
1092 | TTrade holding_history_trade_id; |
1093 | INT32 quantity_after; |
1094 | INT32 quantity_before; |
1095 | DB_INDICATOR holding_history_id_ind; |
1096 | DB_INDICATOR holding_history_trade_id_ind; |
1097 | DB_INDICATOR quantity_after_ind; |
1098 | DB_INDICATOR quantity_before_ind; |
1099 | |
1100 | TTradeLookupFrame4TradeInfo() { |
1101 | Clear(); |
1102 | } |
1103 | |
1104 | inline void Clear() { |
1105 | BufferFiller::Clear(this, sizeof(*this)); |
1106 | } |
1107 | |
1108 | } * PTradeLookupFrame4TradeInfo; |
1109 | |
1110 | typedef class TTradeLookupFrame4Output { |
1111 | public: |
1112 | TTrade trade_id; |
1113 | INT32 num_found; |
1114 | INT32 num_trades_found; |
1115 | TTradeLookupFrame4TradeInfo trade_info[TradeLookupFrame4MaxRows]; |
1116 | |
1117 | TTradeLookupFrame4Output() { |
1118 | Clear(); |
1119 | } |
1120 | |
1121 | inline void Clear() { |
1122 | BufferFiller::Clear(this, sizeof(*this)); |
1123 | } |
1124 | |
1125 | } * PTradeLookupFrame4Output; |
1126 | |
1127 | /* |
1128 | * Trade-Order |
1129 | */ |
1130 | typedef class TTradeOrderTxnInput { |
1131 | public: |
1132 | double requested_price; |
1133 | TIdent acct_id; |
1134 | INT32 is_lifo; |
1135 | INT32 roll_it_back; |
1136 | INT32 trade_qty; |
1137 | INT32 type_is_margin; |
1138 | char co_name[cCO_NAME_len + 1]; |
1139 | char exec_f_name[cF_NAME_len + 1]; |
1140 | char exec_l_name[cL_NAME_len + 1]; |
1141 | char exec_tax_id[cTAX_ID_len + 1]; |
1142 | char issue[cS_ISSUE_len + 1]; |
1143 | char st_pending_id[cST_ID_len + 1]; |
1144 | char st_submitted_id[cST_ID_len + 1]; |
1145 | char symbol[cSYMBOL_len + 1]; |
1146 | char trade_type_id[cTT_ID_len + 1]; |
1147 | |
1148 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1149 | TTradeOrderTxnInput() { |
1150 | Clear(); |
1151 | } |
1152 | #endif |
1153 | |
1154 | inline void Clear() { |
1155 | BufferFiller::Clear(this, sizeof(*this)); |
1156 | } |
1157 | |
1158 | } * PTradeOrderTxnInput; |
1159 | |
1160 | typedef class TTradeOrderTxnOutput { |
1161 | public: |
1162 | double buy_value; |
1163 | double sell_value; |
1164 | double tax_amount; |
1165 | TTrade trade_id; |
1166 | INT32 status; |
1167 | |
1168 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1169 | TTradeOrderTxnOutput() { |
1170 | Clear(); |
1171 | } |
1172 | #endif |
1173 | |
1174 | inline void Clear() { |
1175 | BufferFiller::Clear(this, sizeof(*this)); |
1176 | } |
1177 | |
1178 | } * PTradeOrderTxnOutput; |
1179 | |
1180 | typedef class TTradeOrderFrame1Input { |
1181 | public: |
1182 | TIdent acct_id; |
1183 | |
1184 | TTradeOrderFrame1Input() { |
1185 | Clear(); |
1186 | } |
1187 | |
1188 | inline void Clear() { |
1189 | BufferFiller::Clear(this, sizeof(*this)); |
1190 | } |
1191 | |
1192 | } * PTradeOrderFrame1Input; |
1193 | |
1194 | typedef class TTradeOrderFrame1Output { |
1195 | public: |
1196 | TIdent broker_id; |
1197 | TIdent cust_id; |
1198 | INT32 cust_tier; |
1199 | INT32 num_found; |
1200 | INT32 tax_status; |
1201 | char acct_name[cCA_NAME_len + 1]; |
1202 | char broker_name[cB_NAME_len + 1]; |
1203 | char cust_f_name[cF_NAME_len + 1]; |
1204 | char cust_l_name[cL_NAME_len + 1]; |
1205 | char tax_id[cTAX_ID_len + 1]; |
1206 | |
1207 | TTradeOrderFrame1Output() { |
1208 | Clear(); |
1209 | } |
1210 | |
1211 | inline void Clear() { |
1212 | BufferFiller::Clear(this, sizeof(*this)); |
1213 | } |
1214 | |
1215 | } * PTradeOrderFrame1Output; |
1216 | |
1217 | typedef class TTradeOrderFrame2Input { |
1218 | public: |
1219 | TIdent acct_id; |
1220 | char exec_f_name[cF_NAME_len + 1]; |
1221 | char exec_l_name[cL_NAME_len + 1]; |
1222 | char exec_tax_id[cTAX_ID_len + 1]; |
1223 | |
1224 | TTradeOrderFrame2Input() { |
1225 | Clear(); |
1226 | } |
1227 | |
1228 | inline void Clear() { |
1229 | BufferFiller::Clear(this, sizeof(*this)); |
1230 | } |
1231 | |
1232 | } * PTradeOrderFrame2Input; |
1233 | |
1234 | typedef class TTradeOrderFrame2Output { |
1235 | public: |
1236 | char ap_acl[cACL_len + 1]; |
1237 | |
1238 | TTradeOrderFrame2Output() { |
1239 | Clear(); |
1240 | } |
1241 | |
1242 | inline void Clear() { |
1243 | BufferFiller::Clear(this, sizeof(*this)); |
1244 | } |
1245 | |
1246 | } * PTradeOrderFrame2Output; |
1247 | |
1248 | typedef class TTradeOrderFrame3Input { |
1249 | public: |
1250 | double requested_price; // IN-OUT parameter |
1251 | TIdent acct_id; |
1252 | TIdent cust_id; |
1253 | INT32 cust_tier; |
1254 | INT32 is_lifo; |
1255 | INT32 tax_status; |
1256 | INT32 trade_qty; |
1257 | INT32 type_is_margin; |
1258 | char co_name[cCO_NAME_len + 1]; // IN-OUT parameter |
1259 | char issue[cS_ISSUE_len + 1]; |
1260 | char st_pending_id[cST_ID_len + 1]; |
1261 | char st_submitted_id[cST_ID_len + 1]; |
1262 | char symbol[cSYMBOL_len + 1]; // IN-OUT parameter |
1263 | char trade_type_id[cTT_ID_len + 1]; |
1264 | |
1265 | TTradeOrderFrame3Input() { |
1266 | Clear(); |
1267 | } |
1268 | |
1269 | inline void Clear() { |
1270 | BufferFiller::Clear(this, sizeof(*this)); |
1271 | } |
1272 | |
1273 | } * PTradeOrderFrame3Input; |
1274 | |
1275 | typedef class TTradeOrderFrame3Output { |
1276 | public: |
1277 | double acct_assets; |
1278 | double buy_value; |
1279 | double charge_amount; |
1280 | double comm_rate; |
1281 | double market_price; |
1282 | double requested_price; // IN-OUT parameter |
1283 | double sell_value; |
1284 | double tax_amount; |
1285 | INT32 type_is_market; |
1286 | INT32 type_is_sell; |
1287 | char co_name[cCO_NAME_len + 1]; // IN-OUT parameter |
1288 | char s_name[cS_NAME_len + 1]; |
1289 | char status_id[cST_ID_len + 1]; |
1290 | char symbol[cSYMBOL_len + 1]; // IN-OUT parameter |
1291 | |
1292 | TTradeOrderFrame3Output() { |
1293 | Clear(); |
1294 | } |
1295 | |
1296 | inline void Clear() { |
1297 | BufferFiller::Clear(this, sizeof(*this)); |
1298 | } |
1299 | |
1300 | } * PTradeOrderFrame3Output; |
1301 | |
1302 | typedef class TTradeOrderFrame4Input { |
1303 | public: |
1304 | double charge_amount; |
1305 | double comm_amount; |
1306 | double requested_price; |
1307 | TIdent acct_id; |
1308 | TIdent broker_id; |
1309 | INT32 is_cash; |
1310 | INT32 is_lifo; |
1311 | INT32 trade_qty; |
1312 | INT32 type_is_market; |
1313 | char exec_name[cEXEC_NAME_len + 1]; |
1314 | char status_id[cST_ID_len + 1]; |
1315 | char symbol[cSYMBOL_len + 1]; |
1316 | char trade_type_id[cTT_ID_len + 1]; |
1317 | |
1318 | TTradeOrderFrame4Input() { |
1319 | Clear(); |
1320 | } |
1321 | |
1322 | inline void Clear() { |
1323 | BufferFiller::Clear(this, sizeof(*this)); |
1324 | } |
1325 | |
1326 | } * PTradeOrderFrame4Input; |
1327 | |
1328 | typedef class TTradeOrderFrame4Output { |
1329 | public: |
1330 | TTrade trade_id; |
1331 | |
1332 | TTradeOrderFrame4Output() { |
1333 | Clear(); |
1334 | } |
1335 | |
1336 | inline void Clear() { |
1337 | BufferFiller::Clear(this, sizeof(*this)); |
1338 | } |
1339 | |
1340 | } * PTradeOrderFrame4Output; |
1341 | |
1342 | /* |
1343 | * Trade-Result |
1344 | */ |
1345 | // Trade-Result data sent from MEE to sponsor provided SUT interface |
1346 | typedef class TTradeResultTxnInput { |
1347 | public: |
1348 | double trade_price; |
1349 | TTrade trade_id; |
1350 | |
1351 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1352 | TTradeResultTxnInput() { |
1353 | Clear(); |
1354 | } |
1355 | #endif |
1356 | |
1357 | inline void Clear() { |
1358 | BufferFiller::Clear(this, sizeof(*this)); |
1359 | } |
1360 | |
1361 | } * PTradeResultTxnInput; |
1362 | |
1363 | typedef class TTradeResultTxnOutput { |
1364 | public: |
1365 | double acct_bal; |
1366 | TIdent acct_id; |
1367 | INT32 load_unit; |
1368 | INT32 status; |
1369 | |
1370 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1371 | TTradeResultTxnOutput() { |
1372 | Clear(); |
1373 | } |
1374 | #endif |
1375 | |
1376 | inline void Clear() { |
1377 | BufferFiller::Clear(this, sizeof(*this)); |
1378 | } |
1379 | |
1380 | } * PTradeResultTxnOutput; |
1381 | |
1382 | typedef class TTradeResultFrame1Input { |
1383 | public: |
1384 | TTrade trade_id; |
1385 | |
1386 | TTradeResultFrame1Input() { |
1387 | Clear(); |
1388 | } |
1389 | |
1390 | inline void Clear() { |
1391 | BufferFiller::Clear(this, sizeof(*this)); |
1392 | } |
1393 | |
1394 | } * PTradeResultFrame1Input; |
1395 | |
1396 | typedef class TTradeResultFrame1Output { |
1397 | public: |
1398 | double charge; |
1399 | TIdent acct_id; |
1400 | INT32 hs_qty; |
1401 | INT32 is_lifo; |
1402 | INT32 num_found; |
1403 | INT32 trade_is_cash; |
1404 | INT32 trade_qty; |
1405 | INT32 type_is_market; |
1406 | INT32 type_is_sell; |
1407 | char symbol[cSYMBOL_len + 1]; |
1408 | char type_id[cTT_ID_len + 1]; |
1409 | char type_name[cTT_NAME_len + 1]; |
1410 | |
1411 | TTradeResultFrame1Output() { |
1412 | Clear(); |
1413 | } |
1414 | |
1415 | inline void Clear() { |
1416 | BufferFiller::Clear(this, sizeof(*this)); |
1417 | } |
1418 | |
1419 | } * PTradeResultFrame1Output; |
1420 | |
1421 | typedef class TTradeResultFrame2Input { |
1422 | public: |
1423 | double trade_price; |
1424 | TIdent acct_id; |
1425 | TTrade trade_id; |
1426 | INT32 hs_qty; |
1427 | INT32 is_lifo; |
1428 | INT32 trade_qty; |
1429 | INT32 type_is_sell; |
1430 | char symbol[cSYMBOL_len + 1]; |
1431 | |
1432 | TTradeResultFrame2Input() { |
1433 | Clear(); |
1434 | } |
1435 | |
1436 | inline void Clear() { |
1437 | BufferFiller::Clear(this, sizeof(*this)); |
1438 | } |
1439 | |
1440 | } * PTradeResultFrame2Input; |
1441 | |
1442 | typedef class TTradeResultFrame2Output { |
1443 | public: |
1444 | double buy_value; |
1445 | double sell_value; |
1446 | TIdent broker_id; |
1447 | TIdent cust_id; |
1448 | INT32 tax_status; |
1449 | TIMESTAMP_STRUCT trade_dts; |
1450 | |
1451 | TTradeResultFrame2Output() { |
1452 | Clear(); |
1453 | } |
1454 | |
1455 | inline void Clear() { |
1456 | BufferFiller::Clear(this, sizeof(*this)); |
1457 | } |
1458 | |
1459 | } * PTradeResultFrame2Output; |
1460 | |
1461 | typedef class TTradeResultFrame3Input { |
1462 | public: |
1463 | double buy_value; |
1464 | double sell_value; |
1465 | TIdent cust_id; |
1466 | TTrade trade_id; |
1467 | |
1468 | TTradeResultFrame3Input() { |
1469 | Clear(); |
1470 | } |
1471 | |
1472 | inline void Clear() { |
1473 | BufferFiller::Clear(this, sizeof(*this)); |
1474 | } |
1475 | |
1476 | } * PTradeResultFrame3Input; |
1477 | |
1478 | typedef class TTradeResultFrame3Output { |
1479 | public: |
1480 | double tax_amount; |
1481 | |
1482 | TTradeResultFrame3Output() { |
1483 | Clear(); |
1484 | } |
1485 | |
1486 | inline void Clear() { |
1487 | BufferFiller::Clear(this, sizeof(*this)); |
1488 | } |
1489 | |
1490 | } * PTradeResultFrame3Output; |
1491 | |
1492 | typedef class TTradeResultFrame4Input { |
1493 | public: |
1494 | TIdent cust_id; |
1495 | INT32 trade_qty; |
1496 | char symbol[cSYMBOL_len + 1]; |
1497 | char type_id[cTT_ID_len + 1]; |
1498 | |
1499 | TTradeResultFrame4Input() { |
1500 | Clear(); |
1501 | } |
1502 | |
1503 | inline void Clear() { |
1504 | BufferFiller::Clear(this, sizeof(*this)); |
1505 | } |
1506 | |
1507 | } * PTradeResultFrame4Input; |
1508 | |
1509 | typedef class TTradeResultFrame4Output { |
1510 | public: |
1511 | double comm_rate; |
1512 | char s_name[cS_NAME_len + 1]; |
1513 | |
1514 | TTradeResultFrame4Output() { |
1515 | Clear(); |
1516 | } |
1517 | |
1518 | inline void Clear() { |
1519 | BufferFiller::Clear(this, sizeof(*this)); |
1520 | } |
1521 | |
1522 | } * PTradeResultFrame4Output; |
1523 | |
1524 | typedef class TTradeResultFrame5Input { |
1525 | public: |
1526 | double comm_amount; |
1527 | double trade_price; |
1528 | TIdent broker_id; |
1529 | TTrade trade_id; |
1530 | TIMESTAMP_STRUCT trade_dts; |
1531 | char st_completed_id[cST_ID_len + 1]; |
1532 | |
1533 | TTradeResultFrame5Input() { |
1534 | Clear(); |
1535 | } |
1536 | |
1537 | inline void Clear() { |
1538 | BufferFiller::Clear(this, sizeof(*this)); |
1539 | } |
1540 | |
1541 | } * PTradeResultFrame5Input; |
1542 | |
1543 | typedef class TTradeResultFrame6Input { |
1544 | public: |
1545 | double se_amount; |
1546 | TIdent acct_id; |
1547 | TTrade trade_id; |
1548 | INT32 trade_is_cash; |
1549 | INT32 trade_qty; |
1550 | TIMESTAMP_STRUCT due_date; |
1551 | TIMESTAMP_STRUCT trade_dts; |
1552 | char s_name[cS_NAME_len + 1]; |
1553 | char type_name[cTT_NAME_len + 1]; |
1554 | |
1555 | TTradeResultFrame6Input() { |
1556 | Clear(); |
1557 | } |
1558 | |
1559 | inline void Clear() { |
1560 | BufferFiller::Clear(this, sizeof(*this)); |
1561 | } |
1562 | |
1563 | } * PTradeResultFrame6Input; |
1564 | |
1565 | typedef class TTradeResultFrame6Output { |
1566 | public: |
1567 | double acct_bal; |
1568 | |
1569 | TTradeResultFrame6Output() { |
1570 | Clear(); |
1571 | } |
1572 | |
1573 | inline void Clear() { |
1574 | BufferFiller::Clear(this, sizeof(*this)); |
1575 | } |
1576 | |
1577 | } * PTradeResultFrame6Output; |
1578 | |
1579 | /* |
1580 | * Trade-Status |
1581 | */ |
1582 | typedef class TTradeStatusTxnInput { |
1583 | public: |
1584 | TIdent acct_id; |
1585 | |
1586 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1587 | TTradeStatusTxnInput() { |
1588 | Clear(); |
1589 | } |
1590 | #endif |
1591 | |
1592 | inline void Clear() { |
1593 | BufferFiller::Clear(this, sizeof(*this)); |
1594 | } |
1595 | |
1596 | } * PTradeStatusTxnInput, |
1597 | TTradeStatusFrame1Input, // Single-Frame transaction |
1598 | *PTradeStatusFrame1Input; // Single-Frame transaction |
1599 | |
1600 | typedef class TTradeStatusTxnOutput { |
1601 | public: |
1602 | TTrade trade_id[max_trade_status_len]; |
1603 | INT32 status; |
1604 | char status_name[max_trade_status_len][cST_NAME_len + 1]; |
1605 | |
1606 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1607 | TTradeStatusTxnOutput() { |
1608 | Clear(); |
1609 | } |
1610 | #endif |
1611 | |
1612 | inline void Clear() { |
1613 | BufferFiller::Clear(this, sizeof(*this)); |
1614 | } |
1615 | |
1616 | } * PTradeStatusTxnOutput; |
1617 | |
1618 | typedef class TTradeStatusFrame1Output { |
1619 | public: |
1620 | double charge[max_trade_status_len]; |
1621 | TTrade trade_id[max_trade_status_len]; |
1622 | INT32 trade_qty[max_trade_status_len]; |
1623 | INT32 num_found; |
1624 | TIMESTAMP_STRUCT trade_dts[max_trade_status_len]; |
1625 | char ex_name[max_trade_status_len][cEX_NAME_len + 1]; |
1626 | char exec_name[max_trade_status_len][cEXEC_NAME_len + 1]; |
1627 | char s_name[max_trade_status_len][cS_NAME_len + 1]; |
1628 | char status_name[max_trade_status_len][cST_NAME_len + 1]; |
1629 | char symbol[max_trade_status_len][cSYMBOL_len + 1]; |
1630 | char type_name[max_trade_status_len][cTT_NAME_len + 1]; |
1631 | char broker_name[cB_NAME_len + 1]; |
1632 | char cust_f_name[cF_NAME_len + 1]; |
1633 | char cust_l_name[cL_NAME_len + 1]; |
1634 | |
1635 | TTradeStatusFrame1Output() { |
1636 | Clear(); |
1637 | } |
1638 | |
1639 | inline void Clear() { |
1640 | BufferFiller::Clear(this, sizeof(*this)); |
1641 | } |
1642 | |
1643 | } * PTradeStatusFrame1Output; |
1644 | |
1645 | /* |
1646 | * Trade-Update |
1647 | */ |
1648 | typedef class TTradeUpdateTxnInput { |
1649 | public: |
1650 | TTrade trade_id[TradeUpdateFrame1MaxRows]; |
1651 | TIdent acct_id; |
1652 | TIdent max_acct_id; |
1653 | INT32 frame_to_execute; // which of the frames to execute |
1654 | INT32 max_trades; |
1655 | INT32 max_updates; |
1656 | TIMESTAMP_STRUCT end_trade_dts; |
1657 | TIMESTAMP_STRUCT start_trade_dts; |
1658 | char symbol[cSYMBOL_len + 1]; |
1659 | |
1660 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1661 | TTradeUpdateTxnInput() { |
1662 | Clear(); |
1663 | } |
1664 | #endif |
1665 | |
1666 | inline void Clear() { |
1667 | BufferFiller::Clear(this, sizeof(*this)); |
1668 | } |
1669 | |
1670 | } * PTradeUpdateTxnInput; |
1671 | |
1672 | typedef class TTradeUpdateTxnOutput { |
1673 | public: |
1674 | TTrade trade_list[TradeUpdateMaxRows]; |
1675 | INT32 frame_executed; // confirmation of which frame was executed |
1676 | INT32 num_found; |
1677 | INT32 num_updated; |
1678 | INT32 status; |
1679 | bool is_cash[TradeUpdateMaxRows]; |
1680 | bool is_market[TradeUpdateMaxRows]; |
1681 | |
1682 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1683 | TTradeUpdateTxnOutput() { |
1684 | Clear(); |
1685 | } |
1686 | #endif |
1687 | |
1688 | inline void Clear() { |
1689 | BufferFiller::Clear(this, sizeof(*this)); |
1690 | } |
1691 | |
1692 | } * PTradeUpdateTxnOutput; |
1693 | |
1694 | typedef class TTradeUpdateFrame1Input { |
1695 | public: |
1696 | TTrade trade_id[TradeUpdateFrame1MaxRows]; |
1697 | INT32 max_trades; |
1698 | INT32 max_updates; |
1699 | |
1700 | TTradeUpdateFrame1Input() { |
1701 | Clear(); |
1702 | } |
1703 | |
1704 | inline void Clear() { |
1705 | BufferFiller::Clear(this, sizeof(*this)); |
1706 | } |
1707 | |
1708 | } * PTradeUpdateFrame1Input; |
1709 | |
1710 | typedef class TTradeUpdateFrame1TradeInfo { |
1711 | public: |
1712 | double bid_price; |
1713 | double cash_transaction_amount; |
1714 | double settlement_amount; |
1715 | double trade_price; |
1716 | bool is_cash; |
1717 | bool is_market; |
1718 | TIMESTAMP_STRUCT trade_history_dts[TradeUpdateMaxTradeHistoryRowsReturned]; |
1719 | TIMESTAMP_STRUCT cash_transaction_dts; |
1720 | TIMESTAMP_STRUCT settlement_cash_due_date; |
1721 | char trade_history_status_id[TradeUpdateMaxTradeHistoryRowsReturned][cTH_ST_ID_len + 1]; |
1722 | char cash_transaction_name[cCT_NAME_len + 1]; |
1723 | char exec_name[cEXEC_NAME_len + 1]; |
1724 | char settlement_cash_type[cSE_CASH_TYPE_len + 1]; |
1725 | DB_INDICATOR trade_history_dts_ind[TradeUpdateMaxTradeHistoryRowsReturned]; |
1726 | DB_INDICATOR |
1727 | trade_history_status_id_ind[TradeUpdateMaxTradeHistoryRowsReturned]; |
1728 | DB_INDICATOR bid_price_ind; |
1729 | DB_INDICATOR cash_transaction_amount_ind; |
1730 | DB_INDICATOR cash_transaction_dts_ind; |
1731 | DB_INDICATOR cash_transaction_name_ind; |
1732 | DB_INDICATOR exec_name_ind; |
1733 | DB_INDICATOR is_cash_ind; |
1734 | DB_INDICATOR is_market_ind; |
1735 | DB_INDICATOR settlement_amount_ind; |
1736 | DB_INDICATOR settlement_cash_due_date_ind; |
1737 | DB_INDICATOR settlement_cash_type_ind; |
1738 | DB_INDICATOR trade_price_ind; |
1739 | |
1740 | TTradeUpdateFrame1TradeInfo() { |
1741 | Clear(); |
1742 | } |
1743 | |
1744 | inline void Clear() { |
1745 | BufferFiller::Clear(this, sizeof(*this)); |
1746 | } |
1747 | |
1748 | } * PTradeUpdateFrame1TradeInfo; |
1749 | |
1750 | typedef class TTradeUpdateFrame1Output { |
1751 | public: |
1752 | INT32 num_found; |
1753 | INT32 num_updated; |
1754 | TTradeUpdateFrame1TradeInfo trade_info[TradeUpdateFrame1MaxRows]; |
1755 | |
1756 | TTradeUpdateFrame1Output() { |
1757 | Clear(); |
1758 | } |
1759 | |
1760 | inline void Clear() { |
1761 | BufferFiller::Clear(this, sizeof(*this)); |
1762 | } |
1763 | |
1764 | } * PTradeUpdateFrame1Output; |
1765 | |
1766 | typedef class TTradeUpdateFrame2Input { |
1767 | public: |
1768 | TIdent acct_id; |
1769 | INT32 max_trades; |
1770 | INT32 max_updates; |
1771 | TIMESTAMP_STRUCT end_trade_dts; |
1772 | TIMESTAMP_STRUCT start_trade_dts; |
1773 | |
1774 | TTradeUpdateFrame2Input() { |
1775 | Clear(); |
1776 | } |
1777 | |
1778 | inline void Clear() { |
1779 | BufferFiller::Clear(this, sizeof(*this)); |
1780 | } |
1781 | |
1782 | } * PTradeUpdateFrame2Input; |
1783 | |
1784 | typedef class TTradeUpdateFrame2TradeInfo { |
1785 | public: |
1786 | double bid_price; |
1787 | double cash_transaction_amount; |
1788 | double settlement_amount; |
1789 | double trade_price; |
1790 | TTrade trade_id; |
1791 | bool is_cash; |
1792 | TIMESTAMP_STRUCT trade_history_dts[TradeUpdateMaxTradeHistoryRowsReturned]; |
1793 | TIMESTAMP_STRUCT cash_transaction_dts; |
1794 | TIMESTAMP_STRUCT settlement_cash_due_date; |
1795 | char trade_history_status_id[TradeUpdateMaxTradeHistoryRowsReturned][cTH_ST_ID_len + 1]; |
1796 | char cash_transaction_name[cCT_NAME_len + 1]; |
1797 | char exec_name[cEXEC_NAME_len + 1]; |
1798 | char settlement_cash_type[cSE_CASH_TYPE_len + 1]; |
1799 | DB_INDICATOR trade_history_dts_ind[TradeUpdateMaxTradeHistoryRowsReturned]; |
1800 | DB_INDICATOR |
1801 | trade_history_status_id_ind[TradeUpdateMaxTradeHistoryRowsReturned]; |
1802 | DB_INDICATOR bid_price_ind; |
1803 | DB_INDICATOR cash_transaction_amount_ind; |
1804 | DB_INDICATOR cash_transaction_dts_ind; |
1805 | DB_INDICATOR cash_transaction_name_ind; |
1806 | DB_INDICATOR exec_name_ind; |
1807 | DB_INDICATOR is_cash_ind; |
1808 | DB_INDICATOR settlement_amount_ind; |
1809 | DB_INDICATOR settlement_cash_due_date_ind; |
1810 | DB_INDICATOR settlement_cash_type_ind; |
1811 | DB_INDICATOR trade_id_ind; |
1812 | DB_INDICATOR trade_price_ind; |
1813 | |
1814 | TTradeUpdateFrame2TradeInfo() { |
1815 | Clear(); |
1816 | } |
1817 | |
1818 | inline void Clear() { |
1819 | BufferFiller::Clear(this, sizeof(*this)); |
1820 | } |
1821 | |
1822 | } * PTradeUpdateFrame2TradeInfo; |
1823 | |
1824 | typedef class TTradeUpdateFrame2Output { |
1825 | public: |
1826 | INT32 num_found; |
1827 | INT32 num_updated; |
1828 | TTradeUpdateFrame2TradeInfo trade_info[TradeUpdateFrame2MaxRows]; |
1829 | |
1830 | TTradeUpdateFrame2Output() { |
1831 | Clear(); |
1832 | } |
1833 | |
1834 | inline void Clear() { |
1835 | BufferFiller::Clear(this, sizeof(*this)); |
1836 | } |
1837 | |
1838 | } * PTradeUpdateFrame2Output; |
1839 | |
1840 | typedef class TTradeUpdateFrame3Input { |
1841 | public: |
1842 | TIdent max_acct_id; |
1843 | INT32 max_trades; |
1844 | INT32 max_updates; |
1845 | TIMESTAMP_STRUCT end_trade_dts; |
1846 | TIMESTAMP_STRUCT start_trade_dts; |
1847 | char symbol[cSYMBOL_len + 1]; |
1848 | |
1849 | TTradeUpdateFrame3Input() { |
1850 | Clear(); |
1851 | } |
1852 | |
1853 | inline void Clear() { |
1854 | BufferFiller::Clear(this, sizeof(*this)); |
1855 | } |
1856 | |
1857 | } * PTradeUpdateFrame3Input; |
1858 | |
1859 | typedef class TTradeUpdateFrame3TradeInfo { |
1860 | public: |
1861 | double cash_transaction_amount; |
1862 | double price; |
1863 | double settlement_amount; |
1864 | TIdent acct_id; |
1865 | TTrade trade_id; |
1866 | INT32 quantity; |
1867 | bool is_cash; |
1868 | TIMESTAMP_STRUCT trade_history_dts[TradeUpdateMaxTradeHistoryRowsReturned]; |
1869 | TIMESTAMP_STRUCT cash_transaction_dts; |
1870 | TIMESTAMP_STRUCT settlement_cash_due_date; |
1871 | TIMESTAMP_STRUCT trade_dts; |
1872 | char trade_history_status_id[TradeUpdateMaxTradeHistoryRowsReturned][cTH_ST_ID_len + 1]; |
1873 | char cash_transaction_name[cCT_NAME_len + 1]; |
1874 | char exec_name[cEXEC_NAME_len + 1]; |
1875 | char s_name[cS_NAME_len + 1]; |
1876 | char settlement_cash_type[cSE_CASH_TYPE_len + 1]; |
1877 | char trade_type[cTT_ID_len + 1]; |
1878 | char type_name[cTT_NAME_len + 1]; |
1879 | DB_INDICATOR trade_history_dts_ind[TradeUpdateMaxTradeHistoryRowsReturned]; |
1880 | DB_INDICATOR |
1881 | trade_history_status_id_ind[TradeUpdateMaxTradeHistoryRowsReturned]; |
1882 | DB_INDICATOR acct_id_ind; |
1883 | DB_INDICATOR cash_transaction_amount_ind; |
1884 | DB_INDICATOR cash_transaction_dts_ind; |
1885 | DB_INDICATOR cash_transaction_name_ind; |
1886 | DB_INDICATOR exec_name_ind; |
1887 | DB_INDICATOR is_cash_ind; |
1888 | DB_INDICATOR price_ind; |
1889 | DB_INDICATOR quantity_ind; |
1890 | DB_INDICATOR s_name_ind; |
1891 | DB_INDICATOR settlement_amount_ind; |
1892 | DB_INDICATOR settlement_cash_due_date_ind; |
1893 | DB_INDICATOR settlement_cash_type_ind; |
1894 | DB_INDICATOR trade_dts_ind; |
1895 | DB_INDICATOR trade_id_ind; |
1896 | DB_INDICATOR trade_type_ind; |
1897 | DB_INDICATOR type_name_ind; |
1898 | |
1899 | TTradeUpdateFrame3TradeInfo() { |
1900 | Clear(); |
1901 | } |
1902 | |
1903 | inline void Clear() { |
1904 | BufferFiller::Clear(this, sizeof(*this)); |
1905 | } |
1906 | |
1907 | } * PTradeUpdateFrame3TradeInfo; |
1908 | |
1909 | typedef class TTradeUpdateFrame3Output { |
1910 | public: |
1911 | INT32 num_found; |
1912 | INT32 num_updated; |
1913 | TTradeUpdateFrame3TradeInfo trade_info[TradeUpdateFrame3MaxRows]; |
1914 | |
1915 | TTradeUpdateFrame3Output() { |
1916 | Clear(); |
1917 | } |
1918 | |
1919 | inline void Clear() { |
1920 | BufferFiller::Clear(this, sizeof(*this)); |
1921 | } |
1922 | |
1923 | } * PTradeUpdateFrame3Output; |
1924 | |
1925 | /* |
1926 | * Trade-Cleanup |
1927 | */ |
1928 | typedef class TTradeCleanupTxnInput { |
1929 | public: |
1930 | TTrade start_trade_id; |
1931 | char st_canceled_id[cST_ID_len + 1]; |
1932 | char st_pending_id[cST_ID_len + 1]; |
1933 | char st_submitted_id[cST_ID_len + 1]; |
1934 | |
1935 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1936 | TTradeCleanupTxnInput() { |
1937 | Clear(); |
1938 | } |
1939 | #endif |
1940 | |
1941 | inline void Clear() { |
1942 | BufferFiller::Clear(this, sizeof(*this)); |
1943 | } |
1944 | |
1945 | } * PTradeCleanupTxnInput, |
1946 | TTradeCleanupFrame1Input, // Single-Frame transaction |
1947 | *PTradeCleanupFrame1Input; // Single-Frame transaction |
1948 | |
1949 | typedef class TTradeCleanupTxnOutput { |
1950 | public: |
1951 | INT32 status; |
1952 | |
1953 | #ifdef ENABLE_DEFAULT_CONSTRUCTOR_ON_TXN_INPUT_OUTPUT |
1954 | TTradeCleanupTxnOutput() { |
1955 | Clear(); |
1956 | } |
1957 | #endif |
1958 | |
1959 | inline void Clear() { |
1960 | BufferFiller::Clear(this, sizeof(*this)); |
1961 | } |
1962 | |
1963 | } * PTradeCleanupTxnOutput; |
1964 | |
1965 | } // namespace TPCE |
1966 | |
1967 | #endif // #ifndef TXN_HARNESS_STRUCTS_H |
1968 | |