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

Method GetCellString

DataViewer/OGRTable.cpp:1201–1220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1199}
1200
1201wxString OGRTable::GetCellString(int row, int col, int time, bool use_disp_decimal)
1202{
1203 // NOTE: if called from wxGrid, must use row_order[row] to permute
1204 if (row < 0 || row >= rows) return wxEmptyString;
1205 GdaConst::FieldType cur_type = GetColType(col,time);
1206 if (cur_type == GdaConst::placeholder_type ||
1207 cur_type == GdaConst::unknown_type) {
1208 return wxEmptyString;
1209 }
1210
1211 // mapping col+time to underneath OGR col
1212 OGRColumn* ogr_col = FindOGRColumn(col, time);
1213 if (ogr_col == NULL) {
1214 return "";
1215 }
1216 // get display number of decimals
1217 int col_dec = GetColDecimals(col, time);
1218 if (use_disp_decimal) col_dec = GetColDispDecimals(col);
1219 return ogr_col->GetValueAt(row, col_dec, m_wx_encoding);
1220}
1221
1222
1223// Note: Aditionally, must check that all numbers

Callers 2

OnOkClickMethod · 0.80
GetValueMethod · 0.80

Calls 1

GetValueAtMethod · 0.45

Tested by

no test coverage detected