* @brief Remove row by index. * @param pRowIdx zero-based row index. */
| 1069 | * @param pRowIdx zero-based row index. |
| 1070 | */ |
| 1071 | void RemoveRow(const size_t pRowIdx) |
| 1072 | { |
| 1073 | const size_t dataRowIdx = GetDataRowIndex(pRowIdx); |
| 1074 | if (dataRowIdx < mData.size()) |
| 1075 | { |
| 1076 | mData.erase(mData.begin() + static_cast<std::ptrdiff_t>(dataRowIdx)); |
| 1077 | } |
| 1078 | else |
| 1079 | { |
| 1080 | const std::string errStr = "row out of range: " + |
| 1081 | std::to_string(pRowIdx); |
| 1082 | throw std::out_of_range(errStr); |
| 1083 | } |
| 1084 | |
| 1085 | UpdateRowNames(); |
| 1086 | } |
| 1087 | |
| 1088 | /** |
| 1089 | * @brief Remove row by name. |