Class DataCollection::ItemUseCollector
ClassList > DataCollection > ItemUseCollector
A data collector class for usage amount of game items. More...
#include <ItemUseCollector.hpp>
Public Functions
Type | Name |
---|---|
std::string | GetLeastFrequent () |
std::string | GetMostFrequent () |
int | GetNumberOfItems () |
const std::unordered_map< std::string, int > & | GetUsageData () |
void | IncrementItemUsage (const std::string & itemName) |
ItemUseCollector () = default Damage storage map of item name to amount of uses. |
|
void | WriteToItemUseFile (std::string path) |
Detailed Description
Useful for setting up graphs for analysis of item balancing.
Public Functions Documentation
function GetLeastFrequent
inline std::string DataCollection::ItemUseCollector::GetLeastFrequent ()
Get the least frequently used item in the game.
Returns:
Name of the least item as a string, empty string if no data
function GetMostFrequent
inline std::string DataCollection::ItemUseCollector::GetMostFrequent ()
Get the most frequently used item in the game.
Returns:
Name of the most frequent item as a string, empty string if no data
function GetNumberOfItems
inline int DataCollection::ItemUseCollector::GetNumberOfItems ()
Get the amount of unique items that are collected
Returns:
int amount of unique items
function GetUsageData
inline const std::unordered_map< std::string, int > & DataCollection::ItemUseCollector::GetUsageData ()
Getter for item usage data
Returns:
Const reference to the usage data storage.
function IncrementItemUsage
inline void DataCollection::ItemUseCollector::IncrementItemUsage (
const std::string & itemName
)
Increment usage amount for a certain item.
Parameters:
itemName
Item name to record new usage of
function ItemUseCollector
Damage storage map of item name to amount of uses.
DataCollection::ItemUseCollector::ItemUseCollector () = default
Default constructor for ItemUseCollector
function WriteToItemUseFile
inline void DataCollection::ItemUseCollector::WriteToItemUseFile (
std::string path
)
The documentation for this class was generated from the following file source/DataCollection/ItemUseCollector.hpp