|
Zero
0.1.0
|
A single statistic punning structure. More...
#include <w_stat.h>
Public Member Functions | |
| w_stat_t () | |
| Initialize to zero. More... | |
| w_stat_t (int i) | |
| Initialize to integer i. More... | |
| operator int () const | |
| w_stat_t (w_base_t::base_float_t i) | |
| Initialize to floating point i. More... | |
| operator w_base_t::base_float_t () const | |
| Interpret as a floating point. More... | |
Protected Attributes | |
| union { | |
| w_base_t::base_stat_t i | |
| w_base_t::base_float_t f | |
| } | _u |
Friends | |
| class | w_statistics_t |
| class | w_stat_module_t |
| ostream & | operator<< (ostream &out, const w_statistics_t &s) |
| bool | operator== (const w_stat_t &, const w_stat_t &) |
| bool | operator!= (const w_stat_t &, const w_stat_t &) |
A single statistic punning structure.
This structure holds a single generic statistic, be it an integer or a floating-point number. These are the statistics that are described in inputs to a Perl script, and whose handling-code is generated by that script. See Sets of Statistics.
This struct doesn't do much; it's a union of the two numeric types w_base_t::base_stat_t and w_base_t::base_float_t. With this class you output the contents to an output stream, and compare two stats (equal, not-equal).
|
inline |
Initialize to zero.
|
inline |
Initialize to integer i.
|
inline |
Initialize to floating point i.
|
inline |
|
inline |
Interpret as a floating point.
|
friend |
|
friend |
|
friend |
| union { ... } w_stat_t::_u |
| w_base_t::base_float_t w_stat_t::f |
| w_base_t::base_stat_t w_stat_t::i |
1.8.12