Index: cpp/frams/genetics/geno.h
===================================================================
--- cpp/frams/genetics/geno.h	(revision 145)
+++ cpp/frams/genetics/geno.h	(revision 150)
@@ -15,11 +15,11 @@
 class GenoValidator
 {
-  public:
-virtual int testGenoValidity(Geno& g)=0;/// -1=no information  0=invalid  1=valid
+public:
+	virtual int testGenoValidity(Geno& g) = 0;/// -1=no information  0=invalid  1=valid
 };
 
-/// basic GenoValidator that works by building a Model from any Geno (by converting to f0)
-/// validation fails when the model can't be built or the genotype can't be converted
-class ModelGenoValidator: public GenoValidator
+/// Basic GenoValidator that works by building a Model from any Geno (by converting to f0).
+/// Validation fails when the model can't be built or the genotype can't be converted.
+class ModelGenoValidator : public GenoValidator
 {
 public:
@@ -28,98 +28,99 @@
 
 /// basic information about a single genotype.
-class Geno: public DestrBase
+class Geno : public DestrBase
 {
-friend class Simulator;//needs to access validators directly
-SString gen;
-SString name;
-char format;
-SString txt;
-int isvalid; ///< <0 -> unknown   >=0 -> value for "isValid"
+	friend class Simulator;//needs to access validators directly
+	SString gen;
+	SString name;
+	char format;
+	SString txt;
+	int isvalid; ///< <0 -> unknown   >=0 -> value for "isValid"
 
-Geno *f0gen;
+	Geno *f0gen;
 
-int mapinshift; /// # of characters in the initial comment
-int mapoutshift; /// # of characters in the output comment
-int multiline;
+	int mapinshift; /// number of characters in the initial comment
+	int mapoutshift; /// number of characters in the output comment
+	int multiline;
 
-void init(const SString& genstring,char genformat,const SString& genname,const SString& comment);
-void validate(void);
+	void init(const SString& genstring, char genformat, const SString& genname, const SString& comment);
+	void validate(void);
 
-void freeF0();
+	void freeF0();
 
-bool isInvalid() {return isvalid==0;}
+	bool isInvalid() { return isvalid == 0; }
 
-friend class Model;
-friend class GenoConvManager;
-	
+	friend class Model;
+	friend class GenoConvManager;
+
 public:
-/// create a genotype object from primitives
-/// @param genstring pure genotype, without any comments
-/// @param genformat genotype format
-/// @param comment information about genotype (for genetic operators and "history")
-Geno(const char *genstring=0,char genformat=-1,const char *genname=0,const char *comment=0);
+	/// create a genotype object from primitives
+	/// @param genstring pure genotype, without any comments
+	/// @param genformat genotype format
+	/// @param comment information about genotype (for genetic operators and "history")
+	Geno(const char *genstring = 0, char genformat = -1, const char *genname = 0, const char *comment = 0);
 
-/// create a genotype object from primitives
-/// @param genstring pure genotype, wihtout any comments
-/// @param genformat genotype format
-/// @param name genotype name, new name will generated if needed
-/// @param comment information about genotype (for genetic operators and "history")
-Geno(const SString& genstring,char genformat,const SString& genname,const SString& comment);
+	/// create a genotype object from primitives
+	/// @param genstring pure genotype, wihtout any comments
+	/// @param genformat genotype format
+	/// @param name genotype name, new name will generated if needed
+	/// @param comment information about genotype (for genetic operators and "history")
+	Geno(const SString& genstring, char genformat, const SString& genname, const SString& comment);
 
-/// create object from full string, containing optional format and comment information
-Geno(const SString & fullstring);
+	/// create object from full string, containing optional format and comment information
+	Geno(const SString & fullstring);
 
-/// clone
-Geno(const Geno& src);
+	/// clone
+	Geno(const Geno& src);
 
-void operator=(const Geno& src);
+	void operator=(const Geno& src);
 
-~Geno();
+	~Geno();
 
-void setValid(int v) {isvalid=v;}
-int getValid() {return isvalid;}
+	void setValid(int v) { isvalid = v; }
+	int getValid() { return isvalid; }
 
-/// return string representation, with format comment at the beginning
-SString toString(void) const;
-SString shortString(void) const;
+	/// return string representation, with format comment at the beginning
+	SString toString(void) const;
+	SString shortString(void) const;
 
-void setString(const SString& genewithcomments);
+	void setString(const SString& genewithcomments);
 
-/** @param newformat=-1 -> don't change */
-void setGene(const SString& g, char newformat=-1);
-SString getGene(void) const;
+	/** @param newformat=-1 -> don't change */
+	void setGene(const SString& g, char newformat = -1);
+	SString getGene(void) const;
 
-SString getName(void) const;
-void setName(const SString&);
-char getFormat(void) const;
+	SString getName(void) const;
+	void setName(const SString&);
+	char getFormat(void) const;
 
-SString getComment(void) const;
-void setComment(const SString&);
+	SString getComment(void) const;
+	void setComment(const SString&);
 
-/// invalid genotype cannot be used to build a creature
-bool isValid(void);
+	/// invalid genotype cannot be used to build a creature
+	bool isValid(void);
 
-/// make converted version of the genotype.
-Geno getConverted(char otherformat,MultiMap *m=0);
+	/// make converted version of the genotype.
+	/// @param converter_missing optional output parameter (ignored when NULL). Receives true if the conversion fails because of the lack of appropriate converter(s) (the returned Geno is always invalid in this case). Receives false if the genotype was converted by a converter or a converter chain (the returned Geno can be valid or invalid, depending on the converter's decision).
+	Geno getConverted(char otherformat, MultiMap *m = 0, bool *converter_missing = NULL);
 
-/// @return -1 = before first char in the string
-/// @return -2 = after last char in the string
-int mapGenToString(int genpos) const;
-/// @return -1 = before first char in the genotype
-/// @return -2 = after last char in the genotype
-int mapStringToGen(int stringpos) const;
+	/// @return -1 = before first char in the string
+	/// @return -2 = after last char in the string
+	int mapGenToString(int genpos) const;
+	/// @return -1 = before first char in the genotype
+	/// @return -2 = after last char in the genotype
+	int mapStringToGen(int stringpos) const;
 
-int operator==(const Geno &g) {return (format==g.format)&&(gen==g.gen);}
+	int operator==(const Geno &g) { return (format == g.format) && (gen == g.gen); }
 
-void* owner;
+	void* owner;
 
-// managing global Geno-related objects (used for validation and conversion)
-static void addValidator(GenoValidator* gv) {validators+=gv;}
-static void removeValidator(GenoValidator* gv) {validators-=gv;}
-static void useConverters(GenoConvManager& gcm) {converters=&gcm;}
-static GenoConvManager &getConverters() {return *converters;}
-  protected:
-static GenoConvManager *converters;
-static SListTempl<GenoValidator*> validators;
+	// managing global Geno-related objects (used for validation and conversion)
+	static void addValidator(GenoValidator* gv) { validators += gv; }
+	static void removeValidator(GenoValidator* gv) { validators -= gv; }
+	static void useConverters(GenoConvManager& gcm) { converters = &gcm; }
+	static GenoConvManager &getConverters() { return *converters; }
+protected:
+	static GenoConvManager *converters;
+	static SListTempl<GenoValidator*> validators;
 };
 
