Changeset 955 for cpp/frams/genetics/genoconv.h
- Timestamp:
- 06/25/20 00:34:29 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/genoconv.h
r783 r955 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-20 18Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2020 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 43 43 public: 44 44 const char *name; //< converter name (short) 45 char in_format, //< input format, eg. '1'46 out_format; //< output format, eg. '0'45 SString in_format, //< input format, eg. "1" 46 out_format; //< output format, eg. "0" 47 47 paInt enabled; //< don't touch this! (used by configuration module) 48 48 paInt mapsupport; //< set to 1 if your converter supports genotype mapping … … 56 56 virtual ~GenoConverter() {} 57 57 /// Don't forget to set public fields in your constructor 58 GenoConverter() :name(""), in_format( -1), out_format('0'), enabled(1), mapsupport(0) {}58 GenoConverter() :name(""), in_format(Geno::UNKNOWN_FORMAT), out_format("0"), enabled(1), mapsupport(0) {} 59 59 }; 60 60 … … 77 77 /// make a genotype in other format. genotype will be invalid 78 78 /// if GenoConvManager cannot convert it. 79 Geno convert(Geno &in, charformat, MultiMap *map = 0, bool using_checkpoints = false, bool *converter_missing = NULL);79 Geno convert(Geno &in, SString format, MultiMap *map = 0, bool using_checkpoints = false, bool *converter_missing = NULL); 80 80 /// register GenoConverter, the added object will be automatically deleted when GenoConvManager is destructed (call removeConverter() if this is not desirable) 81 81 void addConverter(GenoConverter *conv); … … 83 83 void removeConverter(GenoConverter *conv); 84 84 85 char *getPath(char in, char out, char *path, int maxlen, int *mapavailable = 0); 86 char *getFormatPath(char in, char out, char *path, int maxlen, int *mapavailable = 0); 85 GenoConverter **getPath(const SString& in, const SString& out, GenoConverter **path, int maxlen, int *mapavailable = 0); 87 86 /// returns the list of converters meeting the specified criteria 88 87 /// pass result=0 if you only need one result (by return value) 89 88 /// default criteria values mean "don't care", pass anything else to narrow your search 90 GenoConverter *findConverters(SListTempl<GenoConverter*>* result = 0, c har in = -1, char out = -1, int enabled = -1, char* name = 0);89 GenoConverter *findConverters(SListTempl<GenoConverter*>* result = 0, const SString& in = Geno::UNKNOWN_FORMAT, const SString& out = Geno::UNKNOWN_FORMAT, int enabled = -1, char* name = 0); 91 90 }; 92 91
Note: See TracChangeset
for help on using the changeset viewer.