Modified the eoCtrlCContinue - had to create the eoCtrlCContinue.cpp
to make t-eoGA work (you should NOT have separate functions in .h files!) I also included everything related to Ctrl C handling in #ifndef _MSC_VER until someone tells me how to do it in MSVC
This commit is contained in:
parent
bfca8ca433
commit
3d757e3243
4 changed files with 72 additions and 31 deletions
|
|
@ -234,6 +234,22 @@ class eoPop: public vector<EOT>, public eoObject, public eoPersistent
|
|||
std::swap(static_cast<vector<EOT>& >(*this), static_cast<vector<EOT>& >(other));
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints sorted pop but does NOT modify it!
|
||||
*
|
||||
* @param _os A ostream.
|
||||
*/
|
||||
virtual void sortedPrintOn(ostream& _os) const
|
||||
{
|
||||
vector<const EOT*> result;
|
||||
sort(result);
|
||||
_os << size() << '\n';
|
||||
for (unsigned i = 0; i < size(); ++i)
|
||||
{
|
||||
_os << *result[i] << endl;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write object. It's called printOn since it prints the object _on_ a stream.
|
||||
* @param _os A ostream.
|
||||
|
|
@ -242,7 +258,7 @@ class eoPop: public vector<EOT>, public eoObject, public eoPersistent
|
|||
{
|
||||
_os << size() << '\n';
|
||||
copy( begin(), end(), ostream_iterator<EOT>( _os, "\n") );
|
||||
};
|
||||
}
|
||||
|
||||
/** @name Methods from eoObject */
|
||||
//@{
|
||||
|
|
|
|||
Reference in a new issue