MCPcopy Create free account
hub / github.com/KDE/labplot / hasValueAt

Method hasValueAt

src/backend/core/column/Column.cpp:858–883  ·  view source on GitHub ↗

! * return \c true if the column has a valid value in the row \row. */

Source from the content-addressed store, hash-verified

856 * return \c true if the column has a valid value in the row \row.
857 */
858bool Column::hasValueAt(int row) const {
859 bool foundValue = false;
860 switch (columnMode()) {
861 case ColumnMode::Double: {
862 foundValue = !std::isnan(doubleAt(row));
863 break;
864 }
865 case ColumnMode::Text: {
866 foundValue = !textAt(row).isEmpty();
867 break;
868 }
869 case ColumnMode::Integer:
870 case ColumnMode::BigInt:
871 // integer values are always valid
872 foundValue = true;
873 break;
874 case ColumnMode::DateTime:
875 case ColumnMode::Month:
876 case ColumnMode::Day: {
877 foundValue = dateTimeAt(row).isValid();
878 break;
879 }
880 }
881
882 return foundValue;
883}
884
885/*
886 * set item at i to col[j] for same columnMode()

Callers 1

eventFilterMethod · 0.80

Calls 2

isEmptyMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected