- Timestamp:
- 05/16/18 21:20:31 (7 years ago)
- Location:
- cpp/frams/genetics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/f4/f4_conv.cpp
r779 r783 42 42 GenoConv_F41_TestOnly::GenoConv_F41_TestOnly() 43 43 { 44 name = " test-only approximate f4 -> f1 converter";44 name = "Only for testing, approximate f4->f1 converter"; //Do not use in production! (adam) 45 45 in_format = '4'; 46 46 out_format = '1'; 47 47 mapsupport = 0; 48 info = "This is for testing. Do not use in production! (adam)";49 48 } 50 49 -
cpp/frams/genetics/genoconv.cpp
r732 r783 50 50 tab[0].name = "gkparam:"; 51 51 gcnames.clear(); 52 gcnames.reserve(gcm->converters.size()); //avoid reallocations in the loop below, since we externally store pointers to objects saved in this vector 52 53 for (i = 0, pe = tab + 1; gk = (GenoConverter *)gcm->converters(i); pe++, i++) 53 54 { … … 57 58 std::string descr = "f"; 58 59 descr += gk->in_format; 59 descr += " - > f";60 descr += " --> f"; 60 61 descr += gk->out_format; 61 descr += " :";62 descr += " : "; 62 63 descr += gk->name; 63 64 gcnames.push_back(descr); 64 pe->name = descr.c_str();65 pe->name = gcnames.back().c_str(); //externally store a pointer to the object just saved in the vector 65 66 pe->type = "d 0 1"; 66 pe->help = gk->info;67 67 } 68 68 pe->id = 0; -
cpp/frams/genetics/genoconv.h
r735 r783 20 20 { 21 21 GenoConvManager *gcm; 22 std::vector<std::string> gcnames; 22 std::vector<std::string> gcnames; //stores names of converters so that these names persist and pointers to these names can be safely used externally 23 23 char tmp_id[20]; 24 24 void freetab(); … … 45 45 char in_format, //< input format, eg. '1' 46 46 out_format; //< output format, eg. '0' 47 const char *info; //< detailed info about converter, format or copyright48 47 paInt enabled; //< don't touch this! (used by configuration module) 49 48 paInt mapsupport; //< set to 1 if your converter supports genotype mapping … … 57 56 virtual ~GenoConverter() {} 58 57 /// Don't forget to set public fields in your constructor 59 GenoConverter() :name(""), in_format(-1), out_format('0'), info(""),enabled(1), mapsupport(0) {}58 GenoConverter() :name(""), in_format(-1), out_format('0'), enabled(1), mapsupport(0) {} 60 59 }; 61 60
Note: See TracChangeset
for help on using the changeset viewer.