Changeset 375 for cpp/frams/_demos
- Timestamp:
- 04/26/15 00:59:09 (10 years ago)
- Location:
- cpp/frams/_demos
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/f0_variants_test.cpp
r372 r375 10 10 #include <frams/genetics/defgenoconv.h> 11 11 #include <frams/model/model.h> 12 #include <frams/ mhandlers/stdouthandler.h>12 #include <frams/loggers/loggertostdout.h> 13 13 14 14 void save_as_f0(SString &gen,Model &m,bool omit_default_values) … … 74 74 int main(int argc,char*argv[]) 75 75 { 76 MessageHandlerToStdout messages_to_stdout(MessageHandlerBase::Enable);76 LoggerToStdout messages_to_stdout(LoggerBase::Enable); 77 77 78 78 //without converters the application would only handle "format 0" genotypes -
cpp/frams/_demos/full_props.cpp
r372 r375 9 9 10 10 #include <frams/model/model.h> 11 #include <frams/ mhandlers/stdouthandler.h>11 #include <frams/loggers/loggertostdout.h> 12 12 #include <frams/genetics/preconfigured.h> 13 13 … … 50 50 { 51 51 StdioFILE::setStdio();//setup VirtFILE::Vstdin/out/err 52 MessageHandlerToStdout messages_to_stderr(MessageHandlerBase::Enable | MessageHandlerBase::DontBlock,VirtFILE::Vstderr); //errors -> stderr, don't interfere with stdout52 LoggerToStdout messages_to_stderr(LoggerBase::Enable | LoggerBase::DontBlock,VirtFILE::Vstderr); //errors -> stderr, don't interfere with stdout 53 53 54 54 PreconfiguredGenetics genetics; … … 79 79 if (!m.isValid()) 80 80 { 81 Hprintf("","full_props",HMLV_ERROR,"Cannot build Model from the supplied genotype\n");81 logPrintf("","full_props",LOG_ERROR,"Cannot build Model from the supplied genotype\n"); 82 82 return 2; 83 83 } -
cpp/frams/_demos/geno_test.cpp
r372 r375 6 6 #include <frams/util/sstringutils.h> 7 7 #include <frams/genetics/preconfigured.h> 8 #include <frams/ mhandlers/stdouthandler.h>8 #include <frams/loggers/loggertostdout.h> 9 9 10 10 /** … … 18 18 { 19 19 PreconfiguredGenetics genetics; 20 MessageHandlerToStdout messages_to_stdout(MessageHandlerBase::Enable); //comment this object out to mute error/warning messages20 LoggerToStdout messages_to_stdout(LoggerBase::Enable); //comment this object out to mute error/warning messages 21 21 22 22 if (argc <= 1) -
cpp/frams/_demos/genoconv_test.cpp
r372 r375 9 9 10 10 #include "printconvmap.h" 11 #include <frams/ mhandlers/stdouthandler.h>11 #include <frams/loggers/loggertostdout.h> 12 12 13 13 /** … … 117 117 int main(int argc,char *argv[]) 118 118 { 119 MessageHandlerToStdout messages_to_stdout(MessageHandlerBase::Enable);119 LoggerToStdout messages_to_stdout(LoggerBase::Enable); 120 120 121 121 DefaultGenoConvManager gcm; -
cpp/frams/_demos/genomanipulation.cpp
r372 r375 10 10 #include <frams/model/model.h> 11 11 #include <frams/genetics/preconfigured.h> 12 #include <frams/ mhandlers/stdouthandler.h>12 #include <frams/loggers/loggertostdout.h> 13 13 14 14 /** … … 266 266 int main(int argc,char*argv[]) 267 267 { 268 MessageHandlerToStdout messages_to_stdout(MessageHandlerBase::Enable); //redirect model-related errors to stdout268 LoggerToStdout messages_to_stdout(LoggerBase::Enable); //redirect model-related errors to stdout 269 269 270 270 srand(time(0)); -
cpp/frams/_demos/genooper_test.cpp
r372 r375 3 3 // See LICENSE.txt for details. 4 4 5 #include <frams/ mhandlers/stdouthandler.h>5 #include <frams/loggers/loggertostdout.h> 6 6 #include <frams/genetics/preconfigured.h> 7 7 … … 21 21 int main(int argc, char *argv[]) 22 22 { 23 MessageHandlerToStdout messages_to_stdout(MessageHandlerBase::Enable);23 LoggerToStdout messages_to_stdout(LoggerBase::Enable); 24 24 PreconfiguredGenetics genetics; 25 25 -
cpp/frams/_demos/loader_test_param.cpp
r372 r375 5 5 #include <frams/param/multiparamload.h> 6 6 #include <frams/virtfile/stdiofile.h> 7 #include <frams/ mhandlers/stdouthandler.h>7 #include <frams/loggers/loggertostdout.h> 8 8 9 9 /** … … 66 66 StdioFILEDontClose virt_stderr(stderr); 67 67 StdioFILEDontClose virt_stdout(stdout); 68 MessageHandlerToStdout messages_to_stderr(MessageHandlerBase::Enable, &virt_stderr);68 LoggerToStdout messages_to_stderr(LoggerBase::Enable, &virt_stderr); 69 69 StdioFileSystem_autoselect stdiofilesys; 70 70 MultiParamLoader loader(argv[1]); -
cpp/frams/_demos/multiline_f0_test.cpp
r372 r375 10 10 #include <frams/genetics/preconfigured.h> 11 11 #include <frams/model/model.h> 12 #include <frams/ mhandlers/stdouthandler.h>12 #include <frams/loggers/loggertostdout.h> 13 13 #include <frams/virtfile/stringfile.h> 14 14 15 15 int main(int argc,char*argv[]) 16 16 { 17 MessageHandlerToStdout messages_to_stdout(MessageHandlerBase::Enable);17 LoggerToStdout messages_to_stdout(LoggerBase::Enable); 18 18 PreconfiguredGenetics genetics; 19 19 -
cpp/frams/_demos/neuro_layout_test.cpp
r372 r375 7 7 #include <frams/genetics/preconfigured.h> 8 8 #include <frams/model/model.h> 9 #include <frams/ mhandlers/stdouthandler.h>9 #include <frams/loggers/loggertostdout.h> 10 10 #include <frams/canvas/nn_layout_model.h> 11 11 … … 83 83 int main(int argc,char*argv[]) 84 84 { 85 MessageHandlerToStdout messages_to_stdout(MessageHandlerBase::Enable);85 LoggerToStdout messages_to_stdout(LoggerBase::Enable); 86 86 PreconfiguredGenetics genetics; 87 87 -
cpp/frams/_demos/neuro_test.cpp
r372 r375 9 9 #include <frams/neuro/neuroimpl.h> 10 10 #include <frams/neuro/neurofactory.h> 11 #include <frams/ mhandlers/stdouthandler.h>11 #include <frams/loggers/loggertostdout.h> 12 12 13 13 /** … … 60 60 int main(int argc,char*argv[]) 61 61 { 62 MessageHandlerToStdout messages_to_stdout(MessageHandlerBase::Enable);62 LoggerToStdout messages_to_stdout(LoggerBase::Enable); 63 63 PreconfiguredGenetics genetics; 64 64 -
cpp/frams/_demos/shapeconvert.cpp
r372 r375 9 9 10 10 #include <frams/model/model.h> 11 #include <frams/ mhandlers/stdouthandler.h>11 #include <frams/loggers/loggertostdout.h> 12 12 #include <frams/genetics/preconfigured.h> 13 13 … … 34 34 { 35 35 StdioFILE::setStdio();//setup VirtFILE::Vstdin/out/err 36 MessageHandlerToStdout messages_to_stderr(MessageHandlerBase::Enable | MessageHandlerBase::DontBlock, VirtFILE::Vstderr); //errors -> stderr, don't interfere with stdout36 LoggerToStdout messages_to_stderr(LoggerBase::Enable | LoggerBase::DontBlock, VirtFILE::Vstderr); //errors -> stderr, don't interfere with stdout 37 37 38 38 PreconfiguredGenetics genetics; … … 50 50 if ((shape != Part::SHAPE_ELLIPSOID) && (shape != Part::SHAPE_CUBOID) && (shape != Part::SHAPE_CYLINDER)) 51 51 { 52 Hprintf("", "shapeconvert", HMLV_ERROR, "Invalid shape");52 logPrintf("", "shapeconvert", LOG_ERROR, "Invalid shape"); 53 53 return 4; 54 54 } … … 71 71 if (!m.isValid()) 72 72 { 73 Hprintf("", "shapeconvert", HMLV_ERROR, "Cannot build Model from the supplied genotype");73 logPrintf("", "shapeconvert", LOG_ERROR, "Cannot build Model from the supplied genotype"); 74 74 return 2; 75 75 } … … 77 77 if (m.getShape() != Model::SHAPE_OLD) 78 78 { 79 Hprintf("", "shapeconvert", HMLV_ERROR, "Only old style shapes can be converted");79 logPrintf("", "shapeconvert", LOG_ERROR, "Only old style shapes can be converted"); 80 80 return 3; 81 81 } -
cpp/frams/_demos/simil_test.cpp
r372 r375 5 5 6 6 #include <vector> 7 #include "frams/ mhandlers/stdouthandler.h"7 #include "frams/loggers/loggertostdout.h" 8 8 #include "frams/_demos/genotypeloader.h" 9 9 #include "frams/genetics/preconfigured.h" … … 39 39 int main(int argc, char *argv[]) 40 40 { 41 MessageHandlerToStdout messages_to_stdout(MessageHandlerBase::Enable);41 LoggerToStdout messages_to_stdout(LoggerBase::Enable); 42 42 typedef double *pDouble; 43 43 int iCurrParam = 0; // index of the currently processed parameter
Note: See TracChangeset
for help on using the changeset viewer.