GMI parser parses.

This commit is contained in:
Pedro Pinto committed 2019-08-02 11:14:15 -04:00
1 parent 497884fe00
commit e7a20252a0
5 files changed
+66 -47

No files matched your search

+27 -7
View File
@@ -10,20 +10,40 @@
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <iostream>
#include <boost/algorithm/string.hpp>
namespace bts {
namespace cmd {
using namespace bts::orderman;
int QuickTest::execute(std::vector<std::string> const &) {
for (int h = 0; h < 24; h++)
for (int m = 0; m < 60; m++) {
std::cout << h << ":" << m << "->"
<< sod::get_sod_for(
datetime::make_ptime(2019, 8, 2, h, m, 0, 0))
<< "\n";
}
auto src =
"P,A,,ACC A,F1,.A020044019L, ,201912, ,F,C, ,4.4,20191122, "
" , ,20190701,0.2125,2, , , ,9G01 CNH70,200, , "
" , , , , , , ,US,C, ,12345, , ,TEST ACCOUNT "
" , , , , , , , , ,0,1, "
"1-,0,0,0,0,0,0,0,1,CALL DEC 19 CORN 440, "
" , ,0, "
" , , "
",-1581.25,0,5000,20190701,1,0,0,0,0,0.552,20191122, "
",US,1,2,O, , , ,1A,0, .21 1/4,0,0.31625,20190708, .31 "
"5/8,4.4375, ,0.315,0,440,212,2,8,USD,US, , J, , , , "
",H,FA,O, , F1,0,9J5L ,99HMC, , , , , ,124Q, "
" , ,C,C,4, , ,115701, , , ,2, , "
" , , , , ,0,-518.75,0,0, , , ,M, , , , , , , , "
",-2,0,-1.95,-0.02,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,F1,F1,F1,F1,F1,F1,F1,"
"F1,F1,F1,F1,F1,F1,F1,F1,F1,F1,F1,M,C,E,N,X,Z, , , , , "
",B,T,Y,F,D,W,K,C,C,C,M,M,M,M,M,M, "
",C,M,M,M,M,M,M,1,0,0,0,-2,0,0,0,ATO,BAU,911,162054300,&,19, , , , "
",1,31,TESTACCT ,ATESDGMIMC,115616,B, ,0,0,1, ,0, ,0,A,A,A,USD,USD,US";
std::vector<std::string> values;
boost::algorithm::split(values, src ,boost::algorithm::is_any_of(","));
for (auto v : values)
std::cout << v << "\n";
return 0;
}