peo modified

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@927 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
canape 2008-02-11 12:27:19 +00:00
commit 240685493b
15 changed files with 103 additions and 244 deletions

View file

@ -40,59 +40,6 @@
#include "core/eoVector_mesg.h"
#include "core/messaging.h"
/**************************************************************************************/
/************************** DEFINE A DATA ******************************************/
/**************************************************************************************/
//! @class peoData
//! @brief Abstract class for a data exchanged by migration
//! @version 1.0
//! @date january 2008
class peoData
{
public:
//! @brief Function realizing packages
virtual void pack ()
{}
//! @brief Function reconstituting packages
virtual void unpack ()
{}
};
//! @class peoPop
//! @brief Specific class for a migration of a population
//! @see peoData eoPop
//! @version 1.0
//! @date january 2008
template<class EOT>
class peoPop: public eoPop<EOT>, public peoData
{
public:
//! @brief Function realizing packages
virtual void pack ()
{
::pack ((unsigned) this->size ());
for (unsigned i = 0; i < this->size (); i ++)
::pack ((*this)[i]);
}
//! @brief Function reconstituting packages
virtual void unpack ()
{
unsigned n;
::unpack (n);
this->resize (n);
for (unsigned i = 0; i < n; i ++)
::unpack ((*this)[i]);
}
};
/**************************************************************************************/
/************************** DEFINE A CONTINUATOR ***********************************/
/**************************************************************************************/