ADded comments and hook for copy constructor
This commit is contained in:
parent
f64292b777
commit
59fe39da93
1 changed files with 28 additions and 0 deletions
|
|
@ -6,6 +6,21 @@ The above line is usefulin Emacs-like editors
|
||||||
/*
|
/*
|
||||||
Template for creating a new representation in EO
|
Template for creating a new representation in EO
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
|
Mandatory:
|
||||||
|
- a default constructor (constructor without any argument)
|
||||||
|
- the I/O functions (readFrom and printOn)
|
||||||
|
|
||||||
|
However, if you are using dynamic memory, there are 2 places
|
||||||
|
to allocate it: the default constructor (if possible?), or, more in
|
||||||
|
the EO spirit, the eoInit object, that you will need to write anyway
|
||||||
|
(template file init.tmpl).
|
||||||
|
|
||||||
|
But remember that a COPY CONSTRUCTOR will be used in many places in EO,
|
||||||
|
so make sure that the default copy constructor works, or, even better,
|
||||||
|
do write your own if in doubt.
|
||||||
|
And of course write the corresponding destructor!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _eoMyStruct_h
|
#ifndef _eoMyStruct_h
|
||||||
|
|
@ -40,6 +55,19 @@ public:
|
||||||
// END Code of default Ctor of an eoMyStruct object
|
// END Code of default Ctor of an eoMyStruct object
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Copy Ctor: you MUST provide a copy ctor if the default
|
||||||
|
* one is not what you want
|
||||||
|
* If this is the case, uncomment and fill the following
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
eoMyStruct(const eoMyStruct &)
|
||||||
|
{
|
||||||
|
// START Code of copy Ctor of an eoMyStruct object
|
||||||
|
// END Code of copy Ctor of an eoMyStruct object
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
virtual ~eoMyStruct()
|
virtual ~eoMyStruct()
|
||||||
{
|
{
|
||||||
// START Code of Destructor of an eoEASEAGenome object
|
// START Code of Destructor of an eoEASEAGenome object
|
||||||
|
|
|
||||||
Reference in a new issue