diff --git a/eo/tutorial/Templates/eoMyStruct.tmpl b/eo/tutorial/Templates/eoMyStruct.tmpl index d5c972557..ddf4e0089 100644 --- a/eo/tutorial/Templates/eoMyStruct.tmpl +++ b/eo/tutorial/Templates/eoMyStruct.tmpl @@ -6,6 +6,21 @@ The above line is usefulin Emacs-like editors /* 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 @@ -40,6 +55,19 @@ public: // 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() { // START Code of Destructor of an eoEASEAGenome object