Last change
on this file since 744 was
732,
checked in by Maciej Komosinski, 6 years ago
|
Added support for "checkpoints" (intermediate phases of development of the Model when converting between genetic encodings). See Model.checkpoint() and conv_f1.cpp for an example.
|
-
Property svn:eol-style set to
native
|
File size:
960 bytes
|
Rev | Line | |
---|
[286] | 1 | // This file is a part of Framsticks SDK. http://www.framsticks.com/ |
---|
[635] | 2 | // Copyright (C) 1999-2016 Maciej Komosinski and Szymon Ulatowski. |
---|
[286] | 3 | // See LICENSE.txt for details. |
---|
[109] | 4 | |
---|
| 5 | #include "genotypeloader.h" |
---|
| 6 | |
---|
[473] | 7 | |
---|
[732] | 8 | GenotypeMiniLoader::GenotypeMiniLoader() :genotype_param(genotypemini_paramtab, &genotype_object) { init(); } |
---|
| 9 | GenotypeMiniLoader::GenotypeMiniLoader(VirtFILE *f) : MultiParamLoader(f), genotype_param(genotypemini_paramtab, &genotype_object) { init(); } |
---|
| 10 | GenotypeMiniLoader::GenotypeMiniLoader(const char* filename) : MultiParamLoader(filename), genotype_param(genotypemini_paramtab, &genotype_object) { init(); } |
---|
[473] | 11 | |
---|
[732] | 12 | void GenotypeMiniLoader::init() |
---|
[109] | 13 | { |
---|
[635] | 14 | addObject(&genotype_param); |
---|
| 15 | breakOn(MultiParamLoader::OnError + MultiParamLoader::AfterObject); |
---|
[109] | 16 | } |
---|
| 17 | |
---|
[732] | 18 | GenotypeMini* GenotypeMiniLoader::loadNextGenotype() |
---|
[109] | 19 | { |
---|
[635] | 20 | genotype_object.clear(); |
---|
| 21 | if ((go() == AfterObject) && (getObject().matchesInterfaceName(&genotype_param))) |
---|
| 22 | return &genotype_object; |
---|
| 23 | else |
---|
| 24 | return 0; |
---|
[109] | 25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.