| 359 | void XMLSerializationNode::setValueBool(bool b) { node.text().set(b); } |
| 360 | |
| 361 | std::vector<bool> XMLSerializationNode::getValueBoolVector() |
| 362 | { |
| 363 | std::vector<bool> vec; |
| 364 | auto string = this->getValue(); |
| 365 | |
| 366 | vec.resize(string.length()); |
| 367 | for (size_t i = 0; i < string.length(); i++) |
| 368 | { |
| 369 | auto c = string[i]; |
| 370 | if (c == '1') |
| 371 | vec[i] = true; |
| 372 | else if (c == '0') |
| 373 | vec[i] = false; |
| 374 | else |
| 375 | throw SerializationException(format("Unknown char '%c' in bool vector", c), this); |
| 376 | } |
| 377 | return vec; |
| 378 | } |
| 379 | |
| 380 | void XMLSerializationNode::setValueBoolVector(const std::vector<bool> &vec) |
| 381 | { |
no test coverage detected