| 330 | } |
| 331 | |
| 332 | void StatisticsData::addStatType(const StatisticsType &type) |
| 333 | { |
| 334 | if (type.typeID == -1) |
| 335 | { |
| 336 | // stat source does not have type ids. need to auto assign an id for this type |
| 337 | // check if type not already in list |
| 338 | int maxTypeID = 0; |
| 339 | for (auto it = this->statsTypes.begin(); it != this->statsTypes.end(); it++) |
| 340 | { |
| 341 | if (it->typeName == type.typeName) |
| 342 | return; |
| 343 | if (it->typeID > maxTypeID) |
| 344 | maxTypeID = it->typeID; |
| 345 | } |
| 346 | |
| 347 | auto newType = type; |
| 348 | newType.typeID = maxTypeID + 1; |
| 349 | this->statsTypes.push_back(newType); |
| 350 | } |
| 351 | else |
| 352 | this->statsTypes.push_back(type); |
| 353 | } |
| 354 | |
| 355 | void StatisticsData::savePlaylist(YUViewDomElement &root) const |
| 356 | { |
no outgoing calls