Removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary.

This commit is contained in:
okoenig 2003-02-27 19:28:07 +00:00
commit 86fa476c67
263 changed files with 2009 additions and 1976 deletions

View file

@ -28,7 +28,7 @@
eoPopString and eoSortedPopString
that transform the population into a string
that transform the population into a std::string
that can be used to dump to the screen
*/
@ -38,9 +38,9 @@ that can be used to dump to the screen
#include <utils/eoStat.h>
/** Thanks to MS/VC++, eoParam mechanism is unable to handle vectors of stats.
/** Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats.
This snippet is a workaround:
This class will "print" a whole population into a string - that you can later
This class will "print" a whole population into a std::string - that you can later
send to any stream
This is the plain version - see eoPopString for the Sorted version
@ -48,15 +48,15 @@ Note: this Stat should probably be used only within eoStdOutMonitor, and not
inside an eoFileMonitor, as the eoState construct will work much better there.
*/
template <class EOT>
class eoPopStat : public eoStat<EOT, string>
class eoPopStat : public eoStat<EOT, std::string>
{
public :
/** default Ctor, void string by default, as it appears
/** default Ctor, void std::string by default, as it appears
on the description line once at beginning of evolution. and
is meaningless there. _howMany defaults to 0, that is, the whole
population*/
eoPopStat(unsigned _howMany = 0, string _desc ="")
: eoStat<EOT, string>("", _desc), combien( _howMany) {}
eoPopStat(unsigned _howMany = 0, std::string _desc ="")
: eoStat<EOT, std::string>("", _desc), combien( _howMany) {}
/** Fills the value() of the eoParam with the dump of the population.
Adds a \n before so it does not get mixed up with the rest of the stats
@ -70,7 +70,7 @@ void operator()(const eoPop<EOT>& _pop)
for (unsigned i = 0; i < howMany; ++i)
{
std::ostrstream os(buffer, 1022); // leave space for emergency terminate
os << _pop[i] << endl << ends;
os << _pop[i] << std::endl << std::ends;
// paranoid:
buffer[1022] = '\0';
@ -81,9 +81,9 @@ private:
unsigned combien;
};
/** Thanks to MS/VC++, eoParam mechanism is unable to handle vectors of stats.
/** Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats.
This snippet is a workaround:
This class will "print" a whole population into a string - that you can later
This class will "print" a whole population into a std::string - that you can later
send to any stream
This is the Sorted version - see eoPopString for the plain version
@ -91,22 +91,22 @@ Note: this Stat should probably be used only within eoStdOutMonitor, and not
inside an eoFileMonitor, as the eoState construct will work much better there.
*/
template <class EOT>
class eoSortedPopStat : public eoSortedStat<EOT, string>
class eoSortedPopStat : public eoSortedStat<EOT, std::string>
{
public :
/** default Ctor, void string by default, as it appears
/** default Ctor, void std::string by default, as it appears
* on the description line once at beginning of evolution. and
* is meaningless there _howMany defaults to 0, that is, the whole
* population
*/
eoSortedPopStat(unsigned _howMany = 0, string _desc ="") :
eoSortedStat<EOT, string>("", _desc) , combien( _howMany) {}
eoSortedPopStat(unsigned _howMany = 0, std::string _desc ="") :
eoSortedStat<EOT, std::string>("", _desc) , combien( _howMany) {}
/** Fills the value() of the eoParam with the dump of the population.
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.
*/
void operator()(const vector<const EOT*>& _pop)
void operator()(const std::vector<const EOT*>& _pop)
{
char buffer[1023]; // about one K of space per member
value() = ""; // empty
@ -114,7 +114,7 @@ public :
for (unsigned i = 0; i < howMany; ++i)
{
std::ostrstream os(buffer, 1022); // leave space for emergency terminate
os << *_pop[i] << endl << ends;
os << *_pop[i] << std::endl << std::ends;
// paranoid:
buffer[1022] = '\0';