MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / FillDateTimeColIdMap

Method FillDateTimeColIdMap

DataViewer/OGRTable.cpp:437–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437void OGRTable::FillDateTimeColIdMap(std::vector<int>& col_map)
438{
439 std::vector<int> t;
440 FillColIdMap(t);
441 int numeric_cnt = 0;
442 for (int i=0, iend=t.size(); i<iend; i++) {
443 if (GetColType(t[i]) == GdaConst::date_type ||
444 GetColType(t[i]) == GdaConst::datetime_type) {
445 numeric_cnt++;
446 }
447 }
448 col_map.resize(numeric_cnt);
449 int cnt=0;
450 for (int i=0, iend=t.size(); i<iend; i++) {
451 if (GetColType(t[i]) == GdaConst::date_type ||
452 GetColType(t[i]) == GdaConst::datetime_type) {
453 col_map[cnt++] = t[i];
454 }
455 }
456}
457
458/** Similar to FillColIdMap except this is a map of long64 type columns
459 only. The size of the resulting corresponds to the number of numeric

Callers 1

InitFieldChoicesMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected