StatisticSource (interface)¶
Interface allowing for recording an object’s statistics. See 統計(Statistics) for more details. It is recommended use the StatisticsAutoRegisterMember helper object as it simplifies the StatisticSource interface support. See 統計(Statistics) for an example of usage.
Functions¶
StatisticRecord[] | getStatistics ? () |
Size | getStatisticsKey ? () |
setStatisticsKey ! ( in Size key ) |
Functions in detail¶
StatisticRecord[] StatisticSource.getStatistics? ()
Returns all the statistics or information related to the StatisticSource (including the Name). The Type will be generated automatically if not provided.
Size StatisticSource.getStatisticsKey? ()
Retrieves the statistic key, for private usage from the FabricStatistic extension. This key should have the same value as the last StatisticSource.setStatisticsKey call.
注釈
See StatisticsAutoRegisterMember for simplifying the support for this interface.
StatisticSource.setStatisticsKey! ( in Size key )
Sets a statistic key, for private usage from the FabricStatistic extension. This key should be stored and the same key should be returned by the StatisticSource.getStatisticsKey function.
注釈
See StatisticsAutoRegisterMember for simplifying the support for this interface.