73 const std::string& text)
76 for (
size_t i=0; i<name.length(); i++)
78 for (
size_t i=0; i<text.length(); i++)
84 fName.push_back(name);
85 fText.push_back(text);
107 for (
auto& o:
fValue) o = 0.;
115 size_t masklast,
size_t val)
117 if (val == 0)
return;
118 size_t mask = maskfirst;
119 while (ind <
fValue.size()) {
120 if (val <= mask || mask >= masklast) {
124 mask = (mask<<1) | 0x1;
147 for (
size_t i=0; i<
Size(); i++) {
148 size_t len =
fName[i].length();
149 if (len > maxlen) maxlen = len;
158 int width,
int prec)
const
160 if (format ==
nullptr || format[0]==0) {
167 for (
size_t i=0; i<
Size(); i++) {
170 <<
" : " <<
fText[i] << endl;
182 os << bl << (text?text:
"--") <<
"Rstats @ " <<
this << endl;
185 for (
size_t i=0; i<
Size(); i++) maxlen = max(maxlen,
fName[i].length());
187 for (
size_t i=0; i<
Size(); i++) {
190 <<
" '" <<
fText[i] <<
"'" << endl;
193 os << bl <<
" fValue.size: "
198 os << bl <<
" fFormat,Width,Prec: " <<
fFormat
210 if (&rhs ==
this)
return *
this;
226 "Bad args: assign incompatible stats");
I/O appicator to generate fill characters.
std::vector< std::string > fText
counter text
std::vector< std::string > fName
counter name
void SetFormat(const char *format, int width=0, int prec=0)
FIXME_docs.
size_t Size() const
FIXME_docs.
void IncLogHist(size_t ind, size_t maskfirst, size_t masklast, size_t val)
FIXME_docs.
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
int fPrec
default precision for Print
void Inc(size_t ind, double val=1.)
FIXME_docs.
void Print(std::ostream &os, const char *format=0, int width=0, int prec=0) const
FIXME_docs.
size_t NameMaxLength() const
FIXME_docs.
std::string fFormat
default format for Print
std::vector< double > fValue
counter value
void Define(size_t ind, const std::string &name, const std::string &text)
FIXME_docs.
std::uint32_t fHash
hash value for name+text
Rstats()
Default constructor.
Rstats & operator=(const Rstats &rhs)
FIXME_docs.
int fWidth
default width for Print
RosPrintfS< bool > RosPrintf(bool value, const char *form=0, int width=0, int prec=0)
Creates a print object for the formatted output of a bool value.
Declaration of class ReventLoop.