Last change
on this file since 329 was
286,
checked in by Maciej Komosinski, 10 years ago
|
Updated headers
|
-
Property svn:eol-style set to
native
|
File size:
673 bytes
|
Rev | Line | |
---|
[286] | 1 | // This file is a part of Framsticks SDK. http://www.framsticks.com/ |
---|
| 2 | // Copyright (C) 1999-2015 Maciej Komosinski and Szymon Ulatowski. |
---|
| 3 | // See LICENSE.txt for details. |
---|
[109] | 4 | |
---|
| 5 | #include <frams/virtfile/stdiofile.h> |
---|
| 6 | #include <frams/util/sstringutils.h> |
---|
[145] | 7 | #include <frams/genetics/preconfigured.h> |
---|
[109] | 8 | |
---|
| 9 | /** |
---|
| 10 | @file |
---|
| 11 | Sample code: Testing genotype validity |
---|
| 12 | |
---|
| 13 | \include geno_test.cpp |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | int main(int argc,char*argv[]) |
---|
| 17 | { |
---|
[145] | 18 | PreconfiguredGenetics genetics; |
---|
| 19 | |
---|
[109] | 20 | if (argc<=1) |
---|
| 21 | { |
---|
| 22 | puts("no genotype"); |
---|
| 23 | return 10; |
---|
| 24 | } |
---|
| 25 | SString gen(argv[1]); |
---|
| 26 | if (!strcmp(gen,"-")) |
---|
| 27 | { |
---|
| 28 | gen=0; |
---|
| 29 | StdioFILEDontClose in(stdin); |
---|
| 30 | loadSString(&in,gen); |
---|
| 31 | } |
---|
| 32 | Geno g(gen); |
---|
| 33 | puts(g.isValid()?"valid":"invalid"); |
---|
| 34 | return !g.isValid(); |
---|
| 35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.