10 #ifndef _STRUS_ANALYZER_PATTERN_MATCHER_STATISTICS_HPP_INCLUDED
11 #define _STRUS_ANALYZER_PATTERN_MATCHER_STATISTICS_HPP_INCLUDED
26 const char*
name()
const {
return m_name;}
28 double value()
const {
return m_value;}
31 Item(
const char* name_,
double value_)
32 :m_name(name_),m_value(value_){}
35 :m_name(o.m_name),m_value(o.m_value){}
38 void setValue(
double value_) {m_value = value_;}
46 #if __cplusplus >= 201103L
59 void define(
const char* name,
double value)
61 m_items.push_back(
Item( name, value));
66 const std::vector<Item>&
items()
const {
return m_items;}
69 std::vector<Item> m_items;
Item(const char *name_, double value_)
Constructor.
Definition: patternMatcherStatistics.hpp:31
Object descriping the statistics of a token pattern match run for runtime analysis.
Definition: patternMatcherStatistics.hpp:18
PatternMatcherStatistics(const PatternMatcherStatistics &o)
Copy constructor.
Definition: patternMatcherStatistics.hpp:52
Item(const Item &o)
Copy constructor.
Definition: patternMatcherStatistics.hpp:34
const std::vector< Item > & items() const
Get all statistics items defined.
Definition: patternMatcherStatistics.hpp:66
const char * name() const
Name of the item.
Definition: patternMatcherStatistics.hpp:26
double value() const
Value of the item.
Definition: patternMatcherStatistics.hpp:28
Statistics item.
Definition: patternMatcherStatistics.hpp:22
PatternMatcherStatistics()
Constructor.
Definition: patternMatcherStatistics.hpp:44
void define(const char *name, double value)
Define statistics item.
Definition: patternMatcherStatistics.hpp:59
void setValue(double value_)
Update the statistics value.
Definition: patternMatcherStatistics.hpp:38