Changeset 34
- Timestamp:
- 10/31/09 01:45:08 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/f8-to-f1/geno_f8.cpp
r33 r34 97 97 } 98 98 99 100 char* Geno_f8::getSimplest() { 101 const char* geno = "1\n---\nP0\nP0():X\n"; 102 char* retGeno = (char*)malloc(strlen(geno) + 1); 103 strcpy(retGeno, geno); 104 return retGeno; 105 } 106 99 107 int Geno_f8::checkValidity(const char * geno) { 100 108 SString ssgeno = SString(geno); … … 164 172 strcpy(validatedTmp, validated); //the rest is originalg = mutated; 165 173 geno = validatedTmp; 166 174 167 175 return GENOPER_OK; 168 176 } 177 178 unsigned long Geno_f8::style(const char *g, int pos) 179 { 180 char ch=g[pos]; 181 unsigned long style=GENSTYLE_CS(0,GENSTYLE_NONE); //default, should be changed below 182 if (strchr("^[]X",ch)) style=GENSTYLE_RGBS(0,0,0,GENSTYLE_BOLD); else 183 if (strchr(":",ch)) style=GENSTYLE_RGBS(220,0,0,GENSTYLE_BOLD); else 184 if (strchr("|",ch)) style=GENSTYLE_RGBS(220,0,0,GENSTYLE_NONE); 185 return style; 186 } 187 169 188 170 189 int Geno_f8::getProductionsCount(const SString &in) { … … 1324 1343 } 1325 1344 1326 unsigned long Geno_f8::style(const char *g, int pos) {1327 return GENSTYLE_RGBS(0, 0, 0, GENSTYLE_NONE);1328 }1329 1330 char* Geno_f8::getSimplest() {1331 const char* geno = "1\n---\nP0\nP0():X\n";1332 char* retGeno = (char*)malloc(strlen(geno) + 1);1333 strcpy(retGeno, geno);1334 return retGeno;1335 }1336 1345 1337 1346 bool Geno_f8::checkProdNameExist(vector<ProductionInfo> info, SString name) const {
Note: See TracChangeset
for help on using the changeset viewer.