Index: cpp/frams/model/modelparts.cpp
===================================================================
--- cpp/frams/model/modelparts.cpp	(revision 896)
+++ cpp/frams/model/modelparts.cpp	(revision 899)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2017  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2019  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -74,20 +74,20 @@
 }
 
-void PartBase::setInfo(const SString& name, const SString& value)
+void PartBase::setInfo(const SString &name, const SString &value)
 {
 	strSetField(info, name, value);
 }
 
-void PartBase::setInfo(const SString& name, int value)
+void PartBase::setInfo(const SString &name, int value)
 {
 	setInfo(name, SString::valueOf(value));
 }
 
-void PartBase::setInfo(const SString& name, double value)
+void PartBase::setInfo(const SString &name, double value)
 {
 	setInfo(name, SString::valueOf(value));
 }
 
-SString PartBase::getInfo(const SString& name)
+SString PartBase::getInfo(const SString &name)
 {
 	return strGetField(info, name);
@@ -134,9 +134,9 @@
 }
 
-void NeuroClass::setGenActive(const char* genactive_classes[])
-{
-	for (const char** n = genactive_classes; *n; n++)
-	{
-		NeuroClass* cls = Neuro::getClass(*n);
+void NeuroClass::setGenActive(const char *genactive_classes[])
+{
+	for (const char **n = genactive_classes; *n; n++)
+	{
+		NeuroClass *cls = Neuro::getClass(*n);
 		if (cls) cls->genactive = 1;
 	}
@@ -223,5 +223,5 @@
 }
 
-SString** Neuro::inputInfo(int i)
+SString **Neuro::inputInfo(int i)
 {
 	if (i >= getInputCount()) return 0;
@@ -229,5 +229,5 @@
 }
 
-void Neuro::setInputInfo(int i, const SString& name, const SString &value)
+void Neuro::setInputInfo(int i, const SString &name, const SString &value)
 {
 	SString **s = inputInfo(i);
@@ -237,10 +237,10 @@
 }
 
-void Neuro::setInputInfo(int i, const SString& name, int value)
+void Neuro::setInputInfo(int i, const SString &name, int value)
 {
 	setInputInfo(i, name, SString::valueOf(value));
 }
 
-void Neuro::setInputInfo(int i, const SString& name, double value)
+void Neuro::setInputInfo(int i, const SString &name, double value)
 {
 	setInputInfo(i, name, SString::valueOf(value));
@@ -255,5 +255,5 @@
 }
 
-SString Neuro::getInputInfo(int i, const SString& name)
+SString Neuro::getInputInfo(int i, const SString &name)
 {
 	SString **s = inputInfo(i);
@@ -263,5 +263,5 @@
 }
 
-void Neuro::operator=(const Neuro& src)
+void Neuro::operator=(const Neuro &src)
 {
 	refno = src.refno;
@@ -294,20 +294,20 @@
 }
 
-NeuroClass* Neuro::getClass(int classindex)
+NeuroClass *Neuro::getClass(int classindex)
 {
 	return NeuroLibrary::staticlibrary.getClass(classindex);
 }
 
-NeuroClass* Neuro::getClass(const SString& classname)
+NeuroClass *Neuro::getClass(const SString &classname)
 {
 	return NeuroLibrary::staticlibrary.findClass(classname);
 }
 
-int Neuro::getClassIndex(const NeuroClass*nc)
-{
-	return NeuroLibrary::staticlibrary.classes.find((void*)nc);
-}
-
-NeuroClass* Neuro::getClass()
+int Neuro::getClassIndex(const NeuroClass *nc)
+{
+	return NeuroLibrary::staticlibrary.classes.find((void *)nc);
+}
+
+NeuroClass *Neuro::getClass()
 {
 	checkClass();
@@ -315,5 +315,5 @@
 }
 
-void Neuro::setClass(NeuroClass* cl)
+void Neuro::setClass(NeuroClass *cl)
 {
 	myclass = cl;
@@ -328,5 +328,5 @@
 }
 
-void Neuro::setDetails(const SString& details)
+void Neuro::setDetails(const SString &details)
 {
 	int colon = details.indexOf(':');
@@ -362,5 +362,5 @@
 }
 
-void Neuro::setClassName(const SString& clazz)
+void Neuro::setClassName(const SString &clazz)
 {
 	myclassname = clazz;
@@ -368,5 +368,5 @@
 }
 
-int Neuro::addInput(Neuro* child, double weight, const SString *info)
+int Neuro::addInput(Neuro *child, double weight, const SString *info)
 {
 	inputs += NInput(child, weight, (info && (info->len())) ? new SString(*info) : 0);
@@ -376,5 +376,5 @@
 }
 
-int Neuro::findInput(Neuro* child) const
+int Neuro::findInput(Neuro *child) const
 {
 	for (int i = 0; i < inputs.size(); i++)
@@ -383,5 +383,5 @@
 }
 
-Neuro* Neuro::getInput(int i, double &weight) const
+Neuro *Neuro::getInput(int i, double &weight) const
 {
 	if (i >= getInputCount()) return 0;
@@ -401,5 +401,5 @@
 }
 
-void Neuro::setInput(int i, Neuro* n)
+void Neuro::setInput(int i, Neuro *n)
 {
 	NInput &inp = inputs(i);
@@ -407,5 +407,5 @@
 }
 
-void Neuro::setInput(int i, Neuro* n, double w)
+void Neuro::setInput(int i, Neuro *n, double w)
 {
 	NInput &inp = inputs(i);
@@ -424,5 +424,5 @@
 }
 
-int Neuro::removeInput(Neuro* child)
+int Neuro::removeInput(Neuro *child)
 {
 	int i = findInput(child);
@@ -463,5 +463,5 @@
 }
 
-int Neuro::findInputs(SList& result, const char* classname, const Part* part, const Joint* joint) const
+int Neuro::findInputs(SList &result, const char *classname, const Part *part, const Joint *joint) const
 {
 	Neuro *nu;
@@ -476,10 +476,10 @@
 		if (classname)
 			if (nu->getClassName() != cn) continue;
-		result += (void*)nu;
+		result += (void *)nu;
 	}
 	return result.size() - n0;
 }
 
-int Neuro::findOutputs(SList& result, const char* classname, const Part* part, const Joint* joint) const
+int Neuro::findOutputs(SList &result, const char *classname, const Part *part, const Joint *joint) const
 { // not very efficient...
 	Neuro *nu, *inp;
@@ -498,6 +498,6 @@
 			if (inp == this)
 			{
-			result += (void*)nu;
-			break;
+				result += (void *)nu;
+				break;
 			}
 	}
@@ -576,5 +576,5 @@
 }
 
-void Part::operator=(const Part& src)
+void Part::operator=(const Part &src)
 {
 	p = src.p; o = src.o;
@@ -612,9 +612,9 @@
 	Pt3D x = p2 - p1;
 	Pt3D dir(x.y, x.z, x.x);
-	p = p1 + x*0.5;
+	p = p1 + x * 0.5;
 	rot.getAngles(x, dir);
 }
 
-Param& Part::getStaticParam()
+Param &Part::getStaticParam()
 {
 	static Param p(f0_part_paramtab, 0, "Part");
@@ -637,5 +637,5 @@
 }
 
-void Joint::operator=(const Joint& src)
+void Joint::operator=(const Joint &src)
 {
 	rot = src.rot;
@@ -652,5 +652,5 @@
 }
 
-void Joint::attachToParts(Part* p1, Part* p2)
+void Joint::attachToParts(Part *p1, Part *p2)
 {
 	part1 = p1;
@@ -695,5 +695,5 @@
 }
 
-Param& Joint::getStaticParam()
+Param &Joint::getStaticParam()
 {
 	static Param p(f0_joint_paramtab, 0, "Joint");
@@ -760,5 +760,5 @@
 };
 
-Param& Neuro::getStaticParam()
+Param &Neuro::getStaticParam()
 {
 	static Param p(f0_neuro_paramtab, 0, "NeuroDef");
Index: cpp/frams/model/modelparts.h
===================================================================
--- cpp/frams/model/modelparts.h	(revision 896)
+++ cpp/frams/model/modelparts.h	(revision 899)
@@ -24,5 +24,5 @@
 class MultiRange;
 
-typedef UserTags<Model, void*, 5> ModelUserTags;
+typedef UserTags<Model, void *, 5> ModelUserTags;
 
 /** Common base for model elements. */
@@ -31,7 +31,7 @@
 public:
 	SString vis_style;
-	PartBase(const SString& s) :vis_style(s), mapped(0) {}
+	PartBase(const SString &s) :vis_style(s), mapped(0) {}
 	~PartBase();
-	static SString getDefaultStyle(){ return SString("none"); }
+	static SString getDefaultStyle() { return SString("none"); }
 	MultiRange *mapped;
 	enum PartBaseFlags { Selected = 1 };
@@ -48,5 +48,5 @@
 
 	void clearMapping();
-	MultiRange* getMapping() { return mapped; }
+	MultiRange *getMapping() { return mapped; }
 	void setMapping(const IRange &mr);
 	void addMapping(const IRange &mr);
@@ -54,8 +54,8 @@
 	void addMapping(const MultiRange &mr);
 
-	void setInfo(const SString& name, const SString& value);
-	void setInfo(const SString& name, int value);
-	void setInfo(const SString& name, double value);
-	SString getInfo(const SString& name);
+	void setInfo(const SString &name, const SString &value);
+	void setInfo(const SString &name, int value);
+	void setInfo(const SString &name, double value);
+	SString getInfo(const SString &name);
 };
 
@@ -94,6 +94,6 @@
 
 	Part(enum Shape s = SHAPE_BALL_AND_STICK);
-	Part(const Part& src) :PartBase(getDefaultStyle()) { operator=(src); }
-	void operator=(const Part& src);
+	Part(const Part &src) :PartBase(getDefaultStyle()) { operator=(src); }
+	void operator=(const Part &src);
 
 	void setPositionAndRotationFromAxis(const Pt3D &p1, const Pt3D &p2);
@@ -101,5 +101,5 @@
 	void setRot(const Pt3D &r);///< set part.rot (rotation angles) and calculate part.o
 
-	static Param& getStaticParam();
+	static Param &getStaticParam();
 };
 
@@ -128,6 +128,6 @@
 
 	Joint();
-	Joint(const Joint& src) :PartBase(getDefaultStyle()) { operator=(src); }
-	void operator=(const Joint& src);
+	Joint(const Joint &src) :PartBase(getDefaultStyle()) { operator=(src); }
+	void operator=(const Joint &src);
 
 	/** connect two parts with this joint.
@@ -135,5 +135,5 @@
 		@see isDelta()
 		*/
-	void attachToParts(Part* p1, Part* p2);
+	void attachToParts(Part *p1, Part *p2);
 	/// @see attachToParts(Part*,Part*)
 	void attachToParts(int p1, int p2);
@@ -168,14 +168,16 @@
 	Pt3D vcolor;
 
-	static Param& getStaticParam();
+	static Param &getStaticParam();
 };
 
 #define JOINT_DELTA_MARKER 99999.0
 
-////////////////// NN /////////////////
+
+
+////////////////// Neural Network /////////////////
 
 class NeuroClass;
 
-typedef UserTags<NeuroClass, void*, 5> NeuroClassUserTags;
+typedef UserTags<NeuroClass, void *, 5> NeuroClassUserTags;
 
 /** Information about neuron class.
@@ -184,5 +186,5 @@
 {
 	bool ownedvectordata;
-	void operator=(const NeuroClass& nosuchthich){}
+	void operator=(const NeuroClass &nosuchthich) {}
 public:
 	SString name, longname, description;
@@ -207,10 +209,10 @@
 	/** class name for use in Neuro::setClassName(), Neuro::setDetails() (former 'moredata' field),
 		eg. "N","-",G" */
-	const SString& getName() { return name; }
+	const SString &getName() { return name; }
 	/** human friendly name, eg. "Neuron","Link","Gyroscope"  */
-	const SString& getLongName() { return longname; }
+	const SString &getLongName() { return longname; }
 	/** long description */
-	const SString& getDescription() { return description; }
-	ParamEntry* getParamTab() { return props; }
+	const SString &getDescription() { return description; }
+	ParamEntry *getParamTab() { return props; }
 
 	/** NeuroClass specific properties, recognized by all neurons of this class */
@@ -240,5 +242,5 @@
 		}
 		*/
-	int* getSymbolGlyph()
+	int *getSymbolGlyph()
 	{
 		return vectordata;
@@ -246,5 +248,5 @@
 	void setSymbolGlyph(int *data, bool owned = 1)
 	{
-		if (vectordata&&ownedvectordata) delete[]vectordata;
+		if (vectordata && ownedvectordata) delete[]vectordata;
 		vectordata = data; ownedvectordata = owned;
 	}
@@ -282,10 +284,13 @@
 
 	static void resetActive(); ///< set default values of active and genactive for all classes
-	static void setGenActive(const char* classes[]); ///< set genactive for specified classes
-};
-
-class Neuro;
-
-/** Single processing unit in Framsticks NN.  */
+	static void setGenActive(const char *classes[]); ///< set genactive for specified classes
+};
+
+
+
+
+
+
+/** Single processing unit in Framsticks neural network.  */
 class Neuro : public PartBase
 {
@@ -305,5 +310,5 @@
 	/** set myclass and make knownclass=true */
 	void checkClass();
-	SString** inputInfo(int i);
+	SString **inputInfo(int i);
 	void defassign();
 
@@ -313,18 +318,18 @@
 	Param extraProperties();
 
-	void setInputInfo(int i, const SString& name, const SString &value);
-	void setInputInfo(int i, const SString& name, int value);
-	void setInputInfo(int i, const SString& name, double value);
+	void setInputInfo(int i, const SString &name, const SString &value);
+	void setInputInfo(int i, const SString &name, int value);
+	void setInputInfo(int i, const SString &name, double value);
 	SString getInputInfo(int i);
-	SString getInputInfo(int i, const SString& name);
-
-	NeuroClass* getClass();
-	void setClass(NeuroClass*);
+	SString getInputInfo(int i, const SString &name);
+
+	NeuroClass *getClass();
+	void setClass(NeuroClass *);
 
 	SString getClassParams() { return myclassparams; }
-	void setClassParams(const SString& cp) { myclassparams = cp; }
+	void setClassParams(const SString &cp) { myclassparams = cp; }
 
 	SString getClassName();
-	void setClassName(const SString& clazz);
+	void setClassName(const SString &clazz);
 
 	/** return neuro unit details encoded as <CLASS> ":" <PROPERTIES>
@@ -351,5 +356,5 @@
 		@see getDetails()
 		*/
-	void setDetails(const SString&);
+	void setDetails(const SString &);
 
 #define STATRICKCLASS Neuro
@@ -377,9 +382,9 @@
 	Neuro();
 	Neuro(double _state, double _inertia, double _force, double _sigmo);
-	Neuro(const Neuro& src) :PartBase(getDefaultStyle()) { operator=(src); }
+	Neuro(const Neuro &src) :PartBase(getDefaultStyle()) { operator=(src); }
 
 	~Neuro();
 
-	void operator=(const Neuro& src);
+	void operator=(const Neuro &src);
 
 	/** Attach this Neuro to the specified Part or detach it from the body if p==NULL.
@@ -387,5 +392,5 @@
 		@see getPart()
 		*/
-	void attachToPart(Part* p) { part = p; joint = 0; }
+	void attachToPart(Part *p) { part = p; joint = 0; }
 
 	/** Attach this Neuro to the specified Joint or detach it from the body if p==NULL.
@@ -393,5 +398,5 @@
 		@see getJoint()
 		*/
-	void attachToJoint(Joint* j) { joint = j; part = 0; }
+	void attachToJoint(Joint *j) { joint = j; part = 0; }
 
 	void attachToPart(int i);
@@ -422,9 +427,9 @@
 
 	/** @return the Neuro connected as i-th input */
-	Neuro* getInput(int i) const { return (i >= inputs.size()) ? 0 : inputs(i).n; }
+	Neuro *getInput(int i) const { return (i >= inputs.size()) ? 0 : inputs(i).n; }
 	/** @return the Neuro connected as i-th input.
 		@param weight
 		*/
-	Neuro* getInput(int i, double &weight) const;
+	Neuro *getInput(int i, double &weight) const;
 	/** @return connectin weight for i-th input */
 	double getInputWeight(int i) const;
@@ -432,18 +437,18 @@
 	void setInputWeight(int i, double weight);
 	/** connect i-th input with another neuron */
-	void setInput(int i, Neuro*n);
+	void setInput(int i, Neuro *n);
 	/** connect i-th input with another neuron */
-	void setInput(int i, Neuro*n, double weight);
+	void setInput(int i, Neuro *n, double weight);
 	/** add new input. @return its reference number */
-	int addInput(Neuro* child, double weight = 1.0, const SString* info = 0);
+	int addInput(Neuro *child, double weight = 1.0, const SString *info = 0);
 	/** @return reference number [0..InputCount-1] of the input
 	   or -1 if 'child' is not connected with this Neuro.*/
-	int findInput(Neuro* child) const;
+	int findInput(Neuro *child) const;
 	void removeInput(paInt refno);
 	/**    @return reference number of the child connection, like findInput() */
-	int removeInput(Neuro* child);
-
-	int findInputs(SList& result, const char* classname = 0, const Part* part = 0, const Joint* joint = 0) const;
-	int findOutputs(SList& result, const char* classname = 0, const Part* part = 0, const Joint* joint = 0) const;
+	int removeInput(Neuro *child);
+
+	int findInputs(SList &result, const char *classname = 0, const Part *part = 0, const Joint *joint = 0) const;
+	int findOutputs(SList &result, const char *classname = 0, const Part *part = 0, const Joint *joint = 0) const;
 
 	/* class database retrieval */
@@ -453,7 +458,7 @@
 		*/
 	static SString getClassName(int classindex);
-	static NeuroClass* getClass(int classindex);
-	static NeuroClass* getClass(const SString& classname);
-	static int getClassIndex(const NeuroClass*nc);
+	static NeuroClass *getClass(int classindex);
+	static NeuroClass *getClass(const SString &classname);
+	static int getClassIndex(const NeuroClass *nc);
 
 	// not really private, but you should not access those directly
@@ -468,5 +473,5 @@
 	Orient o;	///< rotation matrix calculated from "rot"
 	static ParamEntry emptyParamTab[];
-	static Param& getStaticParam();
+	static Param &getStaticParam();
 };
 
