Changeset 145 for cpp/frams/_demos/f0_variants_test.cpp
- Timestamp:
- 02/26/14 20:21:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified cpp/frams/_demos/f0_variants_test.cpp ¶
r121 r145 8 8 #include <frams/virtfile/stdiofile.h> 9 9 10 #include <frams/genetics/defgenoconv.h> 10 11 #include <frams/model/model.h> 11 #include <frams/genetics/defgenoconv.h>12 12 #include <frams/errmgr/stdouterr.h> 13 14 StdoutErrorHandler err; //redirect model-related errors to stdout15 DefaultGenoConvManager gcm; //without this object the application would only handle "format 0" genotypes16 13 17 14 void save_as_f0(SString &gen,Model &m,bool omit_default_values) … … 77 74 int main(int argc,char*argv[]) 78 75 { 76 StdoutErrorHandler err;//the default ErrorHandler constructor automatically registers this object to receive framsg messages (and in this case, redirect them to standard output) 77 78 //without converters the application would only handle "format 0" genotypes 79 DefaultGenoConvManager gcm; 80 gcm.addDefaultConverters(); 81 Geno::useConverters(gcm); 82 83 ModelGenoValidator model_validator; 84 Geno::addValidator(&model_validator); //This simple validator handles all cases where a converter for a particular format is available but there is no genetic operator. Converters may be less strict in detecting invalid genotypes but it is better than nothing 85 79 86 SString gen(argc>1?argv[1]:"X[|G:1.23]"); 80 87 if (!strcmp(gen,"-"))
Note: See TracChangeset
for help on using the changeset viewer.