Simplify configuration.

Remove support for (outdated) <strstream>, require <sstream>.
Require uint32_t for now, defined in stdint.h according to C99.
Some general cleanup and more documentation.
This commit is contained in:
kuepper 2005-09-28 21:49:26 +00:00
commit cf2a57dd88
46 changed files with 482 additions and 886 deletions

View file

@ -35,10 +35,6 @@ that can be used to dump to the screen
#ifndef _eoPopStat_h
#define _eoPopStat_h
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <utils/eoStat.h>
@ -69,7 +65,6 @@ public:
Adds a \n before so it does not get mixed up with the rest of the stats
that are written by the monitor it is probably used from.
*/
#ifdef HAVE_SSTREAM
void operator()(const eoPop<EOT>& _pop)
{
value() = "\n# ====== pop dump =====\n";
@ -83,24 +78,6 @@ void operator()(const eoPop<EOT>& _pop)
value() += os.str();
}
}
#else
void operator()(const eoPop<EOT>& _pop)
{
char buffer[1023]; // about one k of space per member
value() = "\n# ====== pop dump =====\n";
unsigned howmany=combien?combien:_pop.size();
value() += "\n"; // otherwise, possible mix-up with other stats
for (unsigned i = 0; i < howmany; ++i)
{
std::ostrstream os(buffer, 1022); // leave space for emergency terminate
os << _pop[i] << std::endl << std::ends;
// paranoid:
buffer[1022] = '\0';
value() += buffer;
}
}
#endif
private:
unsigned combien;
@ -136,7 +113,6 @@ public:
the rest of the stats that are written by the monitor it is
probably used from.
*/
#ifdef HAVE_SSTREAM
void operator()(const std::vector<const EOT*>& _pop)
{
value() = ""; // empty
@ -150,23 +126,6 @@ public:
value() += os.str();
}
}
#else
void operator()(const std::vector<const EOT*>& _pop)
{
char buffer[1023]; // about one K of space per member
value() = ""; // empty
unsigned howMany=combien?combien:_pop.size();
for (unsigned i = 0; i < howMany; ++i)
{
std::ostrstream os(buffer, 1022); // leave space for emergency terminate
os << *_pop[i] << std::endl << std::ends;
// paranoid:
buffer[1022] = '\0';
value() += buffer;
}
}
#endif
private:
unsigned combien;
};