source: cpp/gdk/genotypeloader.cpp @ 98

Last change on this file since 98 was 66, checked in by Maciej Komosinski, 14 years ago

set 'eol-style' to 'native'

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1// This file is a part of the Framsticks GDK library.
2// Copyright (C) 2002-2011  Szymon Ulatowski.  See LICENSE.txt for details.
3// Refer to http://www.framsticks.com/ for further information.
4
5#include "genotypeloader.h"
6
7#define FIELDSTRUCT MiniGenotype
8ParamEntry minigenotype_paramtab[]=
9 {
10 {"Genotype",1,3,"org",},
11 {"name",0,0,"Name","s 0 40",FIELD(name),},
12 {"genotype",0,0,"Genotype","s 1",FIELD(genotype),},
13 {"info",0,0,"Info","s 1",FIELD(info),},
14 {0,0,0,},
15};
16#undef FIELDSTRUCT
17
18MiniGenotypeLoader::MiniGenotypeLoader():genotype_param(minigenotype_paramtab,&genotype_object) {init();}
19MiniGenotypeLoader::MiniGenotypeLoader(VirtFILE *f):MultiParamLoader(f),genotype_param(minigenotype_paramtab,&genotype_object) {init();}
20MiniGenotypeLoader::MiniGenotypeLoader(const char* filename):MultiParamLoader(filename),genotype_param(minigenotype_paramtab,&genotype_object) {init();}
21
22void MiniGenotypeLoader::init()
23{
24addClass(&genotype_param);
25breakOn(MultiParamLoader::OnError + MultiParamLoader::AfterObject);
26}
27
28MiniGenotype* MiniGenotypeLoader::loadNextGenotype()
29{
30genotype_object.clear();
31if ((go()==AfterObject)&&(getClass()==&genotype_param))
32        return &genotype_object;
33else
34        return 0;
35}
Note: See TracBrowser for help on using the repository browser.