Changeset 145 for cpp/frams/genetics/geno.cpp
- Timestamp:
- 02/26/14 20:21:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/geno.cpp
r121 r145 4 4 5 5 #include "geno.h" 6 #include "genoconv.h" 6 7 #include <frams/model/model.h> 7 8 8 9 SListTempl<GenoValidator*> Geno::validators; 10 GenoConvManager *Geno::converters=NULL; 9 11 10 12 void Geno::init(const SString& genstring,char genformat,const SString& genname,const SString& comment) … … 209 211 SString Geno::getComment(void) const {return txt;} 210 212 211 class ModelGenoValidator: public GenoValidator212 {213 public:214 ModelGenoValidator();215 int testGenoValidity(Geno& g);216 };217 218 ModelGenoValidator::ModelGenoValidator()219 {220 Geno::validators+=this;221 }222 223 213 int ModelGenoValidator::testGenoValidity(Geno& g) 224 214 { … … 234 224 } 235 225 } 236 237 static ModelGenoValidator default_validator;238 226 239 227 void Geno::validate() … … 256 244 if (otherformat==getFormat()) return *this; 257 245 #ifndef NO_GENOCONVMANAGER 258 if ((otherformat=='0')&&(!m)) 259 { 260 if (!f0gen) 261 f0gen=new Geno(GenoConvManager::globalConvert(*this,otherformat)); 262 return *f0gen; 263 } 264 else 265 return GenoConvManager::globalConvert(*this,otherformat,m); 266 #else 246 if (converters) 247 { 248 if ((otherformat=='0')&&(!m)) 249 { 250 if (!f0gen) 251 f0gen=new Geno(converters->convert(*this,otherformat)); 252 return *f0gen; 253 } 254 else 255 return converters->convert(*this,otherformat,m); 256 } 257 #endif 267 258 return (otherformat==getFormat())?*this:Geno(0,0,0,"GenConvManager not available"); 268 #endif269 259 } 270 260
Note: See TracChangeset
for help on using the changeset viewer.