Last change
on this file since 739 was
732,
checked in by Maciej Komosinski, 7 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
|
Line | |
---|
1 | // This file is a part of Framsticks SDK. http://www.framsticks.com/ |
---|
2 | // Copyright (C) 1999-2016 Maciej Komosinski and Szymon Ulatowski. |
---|
3 | // See LICENSE.txt for details. |
---|
4 | |
---|
5 | #include "genotypeloader.h" |
---|
6 | |
---|
7 | |
---|
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(); } |
---|
11 | |
---|
12 | void GenotypeMiniLoader::init() |
---|
13 | { |
---|
14 | addObject(&genotype_param); |
---|
15 | breakOn(MultiParamLoader::OnError + MultiParamLoader::AfterObject); |
---|
16 | } |
---|
17 | |
---|
18 | GenotypeMini* GenotypeMiniLoader::loadNextGenotype() |
---|
19 | { |
---|
20 | genotype_object.clear(); |
---|
21 | if ((go() == AfterObject) && (getObject().matchesInterfaceName(&genotype_param))) |
---|
22 | return &genotype_object; |
---|
23 | else |
---|
24 | return 0; |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.