MCPcopy Create free account
hub / github.com/IENT/YUView / addStatType

Method addStatType

YUViewLib/src/statistics/StatisticsData.cpp:332–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332void 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
355void StatisticsData::savePlaylist(YUViewDomElement &root) const
356{

Callers 8

readHeaderFromFileMethod · 0.80
readHeaderFromFileMethod · 0.80
fillStatisticListMethod · 0.80
fillStatisticListMethod · 0.80
fillStatisticListMethod · 0.80
fillStatisticListMethod · 0.80

Calls

no outgoing calls

Tested by 2