48 if(type.compare(
string(STRING)) == 0) {
49 delete (vector<string> *)data;
51 }
else if(type.compare(
string(FLOAT32)) == 0) {
52 delete (vector<float> *)data;
54 }
else if(type.compare(
string(FLOAT64)) == 0) {
55 delete (vector<double> *)data;
57 }
else if(type.compare(
string(INT16)) == 0) {
58 delete (vector<short> *)data;
60 }
else if(type.compare(
string(INT32)) == 0) {
61 delete (vector<int> *)data;
69 if(type.compare(
"") == 0)
73 if(type.compare(
string(STRING)) == 0) {
74 data =
new vector<string>();
76 }
else if(type.compare(
string(FLOAT32)) == 0) {
77 data =
new vector<float>();
79 }
else if(type.compare(
string(FLOAT64)) == 0) {
80 data =
new vector<double>();
82 }
else if(type.compare(
string(INT16)) == 0) {
83 data =
new vector<short>();
85 }
else if(type.compare(
string(INT32)) == 0) {
86 data =
new vector<int>();
91 if(type.compare(
string(STRING)) == 0) {
92 string str = *
reinterpret_cast<string*
>(value);
93 ((vector<string>*)data)->push_back(str);
94 }
else if(type.compare(
string(FLOAT32)) == 0) {
95 float flt = atof((reinterpret_cast<string*>(value))->c_str());
96 ((vector<float>*)data)->push_back(flt);
97 }
else if(type.compare(
string(FLOAT64)) == 0) {
98 double dbl = atof((reinterpret_cast<string*>(value))->c_str());
99 ((vector<double>*)data)->push_back(dbl);
100 }
else if(type.compare(
string(INT16)) == 0) {
101 short shrt = atoi((reinterpret_cast<string*>(value))->c_str());
102 ((vector<short>*)data)->push_back(shrt);
103 }
else if(type.compare(
string(INT32)) == 0) {
104 int integer = atoi((reinterpret_cast<string*>(value))->c_str());
105 ((vector<int>*)data)->push_back(integer);
void insert(CSV_Field *field, void *value)