RC
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2710 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
6f384f4a59
commit
e3a610506b
1731 changed files with 105122 additions and 63920 deletions
57
branches/rc2.0/eo/tutorial/Templates/init.tmpl
Normal file
57
branches/rc2.0/eo/tutorial/Templates/init.tmpl
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
The above line is usefulin Emacs-like editors
|
||||
*/
|
||||
|
||||
/*
|
||||
Template for EO objects initialization in EO
|
||||
============================================
|
||||
*/
|
||||
|
||||
#ifndef _eoMyStructInit_h
|
||||
#define _eoMyStructInit_h
|
||||
|
||||
// include the base definition of eoInit
|
||||
#include <eoInit.h>
|
||||
|
||||
/**
|
||||
* Always write a comment in this format before class definition
|
||||
* if you want the class to be documented by Doxygen
|
||||
*
|
||||
* There is NO ASSUMPTION on the class GenoypeT.
|
||||
* In particular, it does not need to derive from EO (e.g. to initialize
|
||||
* atoms of an eoVector you will need an eoInit<AtomType>)
|
||||
*/
|
||||
template <class GenotypeT>
|
||||
class eoMyStructInit: public eoInit<GenotypeT> {
|
||||
public:
|
||||
/// Ctor - no requirement
|
||||
// START eventually add or modify the anyVariable argument
|
||||
eoMyStructInit()
|
||||
// eoMyStructInit( varType _anyVariable) : anyVariable(_anyVariable)
|
||||
// END eventually add or modify the anyVariable argument
|
||||
{
|
||||
// START Code of Ctor of an eoMyStructInit object
|
||||
// END Code of Ctor of an eoMyStructInit object
|
||||
}
|
||||
|
||||
|
||||
/** initialize a genotype
|
||||
*
|
||||
* @param _genotype generally a genotype that has been default-constructed
|
||||
* whatever it contains will be lost
|
||||
*/
|
||||
void operator()(GenotypeT & _genotype)
|
||||
{
|
||||
// START Code of random initialization of an eoMyStruct object
|
||||
// END Code of random initialization of an eoMyStruct object
|
||||
_genotype.invalidate(); // IMPORTANT in case the _genotype is old
|
||||
}
|
||||
|
||||
private:
|
||||
// START Private data of an eoMyStructInit object
|
||||
// varType anyVariable; // for example ...
|
||||
// END Private data of an eoMyStructInit object
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue