[med-svn] [ball] 01/06: patch backported: modify RTTI function isKindOf

Danny Edel dannyedel-guest at moszumanska.debian.org
Fri Nov 11 11:35:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

dannyedel-guest pushed a commit to branch master
in repository ball.

commit 1e970fd7d3b3950e9c2c88aa1346b9ceae50adaf
Author: Danny Edel <mail at danny-edel.de>
Date:   Thu Nov 10 16:03:49 2016 +0100

    patch backported: modify RTTI function isKindOf
    
    Backported from upstream commit 2822068fdea8ef01f79e59a90f17903dea0b766d
---
 .../modify-rtti-isKindOf-to-take-pointer.patch     | 3396 ++++++++++++++++++++
 debian/patches/series                              |    1 +
 2 files changed, 3397 insertions(+)

diff --git a/debian/patches/modify-rtti-isKindOf-to-take-pointer.patch b/debian/patches/modify-rtti-isKindOf-to-take-pointer.patch
new file mode 100644
index 0000000..28dde90
--- /dev/null
+++ b/debian/patches/modify-rtti-isKindOf-to-take-pointer.patch
@@ -0,0 +1,3396 @@
+From 2822068fdea8ef01f79e59a90f17903dea0b766d Mon Sep 17 00:00:00 2001
+From: Builder <builder at abibuilder2.Informatik.Uni-Tuebingen.De>
+Date: Mon, 9 Nov 2015 14:23:17 +0100
+Subject: [PATCH] Modified RTTI function isKindOf to take a pointer argument.
+
+On OSX 10.10 and later tests failed because a reference to
+a deleted object was handed over to isKindOf. Taking the pointer
+of that object led to a segmentation fault.
+To prevent passing references to deleted objects, the reference
+argument to be checked is replaced by the pointer of that object directly.
+---
+ include/BALL/COMMON/rtti.h                        |  4 +-
+ include/BALL/CONCEPT/composite.h                  |  4 +-
+ include/BALL/CONCEPT/object.iC                    |  4 +-
+ include/BALL/KERNEL/predicate.h                   |  2 +-
+ include/BALL/VIEW/MODELS/standardColorProcessor.h |  4 +-
+ source/APPLICATIONS/BALLVIEW/demoTutorialDialog.C | 10 ++--
+ source/APPLICATIONS/BALLVIEW/mainframe.C          |  2 +-
+ source/CONCEPT/client.C                           |  2 +-
+ source/CONCEPT/molecularInformation.C             | 20 ++++----
+ source/CONCEPT/moleculeObjectCreator.C            |  6 +--
+ source/FORMAT/MOL2File.C                          |  8 ++--
+ source/FORMAT/NMRStarFile.C                       |  8 ++--
+ source/KERNEL/PDBAtom.C                           |  6 +--
+ source/KERNEL/atomContainer.C                     |  2 +-
+ source/KERNEL/chain.C                             |  2 +-
+ source/KERNEL/molecule.C                          |  2 +-
+ source/KERNEL/residue.C                           |  6 +--
+ source/KERNEL/secondaryStructure.C                |  4 +-
+ source/KERNEL/selector.C                          |  2 +-
+ source/KERNEL/standardPredicates.C                |  2 +-
+ source/MOLMEC/AMBER/GAFFTypeProcessor.C           |  2 +-
+ source/NMR/EFShiftProcessor.C                     |  4 +-
+ source/NMR/HBondShiftProcessor.C                  |  4 +-
+ source/NMR/anisotropyShiftProcessor.C             |  2 +-
+ source/NMR/empiricalHSShiftProcessor.C            |  4 +-
+ source/NMR/haighMallionShiftProcessor.C           |  2 +-
+ source/NMR/johnsonBoveyShiftProcessor.C           |  4 +-
+ source/NMR/randomCoilShiftProcessor.C             |  2 +-
+ source/NMR/shiftModel1D.C                         |  4 +-
+ source/NMR/shiftModel2D.C                         |  4 +-
+ source/PYTHON/EXTENSIONS/BALLPyMacros.h           |  4 +-
+ source/STRUCTURE/HBondProcessor.C                 |  6 +--
+ source/STRUCTURE/assignBondOrderProcessor.C       |  6 +--
+ source/STRUCTURE/bindingPocketProcessor.C         |  6 +--
+ source/STRUCTURE/defaultProcessors.C              |  4 +-
+ source/STRUCTURE/disulfidBondProcessor.C          |  8 ++--
+ source/STRUCTURE/geometricProperties.C            |  2 +-
+ source/STRUCTURE/reconstructFragmentProcessor.C   |  2 +-
+ source/STRUCTURE/secondaryStructureProcessor.C    |  4 +-
+ source/STRUCTURE/sideChainPlacementProcessor.C    | 12 ++---
+ source/STRUCTURE/structureMapper.C                |  4 +-
+ source/TEST/AddCartoonModel_test.C                |  4 +-
+ source/TEST/AtomContainer_test.C                  |  2 +-
+ source/TEST/Atom_test.C                           |  4 +-
+ source/TEST/Bond_test.C                           |  2 +-
+ source/TEST/Chain_test.C                          |  2 +-
+ source/TEST/Composite_test4.C                     |  4 +-
+ source/TEST/Fragment_test.C                       |  2 +-
+ source/TEST/Molecule_test.C                       |  2 +-
+ source/TEST/NamedProperty_test.C                  | 20 ++++----
+ source/TEST/NucleicAcid_test.C                    |  2 +-
+ source/TEST/Nucleotide_test.C                     |  2 +-
+ source/TEST/PDBAtom_test.C                        |  4 +-
+ source/TEST/PersistenceManager_test.C             |  2 +-
+ source/TEST/Protein_test.C                        |  2 +-
+ source/TEST/RTTI_test.C                           | 52 ++++++++++----------
+ source/TEST/Residue_test.C                        |  2 +-
+ source/TEST/SecondaryStructure_test.C             |  2 +-
+ source/TEST/System_test.C                         |  2 +-
+ source/TEST/TextPersistenceManager_test.C         |  2 +-
+ source/TEST/Vector2_test.C                        |  4 +-
+ source/TEST/XDRPersistenceManager_test.C          | 12 ++---
+ source/TUTORIAL/bounding_box.C                    |  4 +-
+ source/VIEW/DIALOGS/atomOverview.C                |  4 +-
+ source/VIEW/DIALOGS/bondProperties.C              |  8 ++--
+ source/VIEW/DIALOGS/coloringSettingsDialog.C      | 52 ++++++++++----------
+ source/VIEW/DIALOGS/compositeProperties.C         | 14 +++---
+ source/VIEW/DIALOGS/displayProperties.C           | 12 ++---
+ source/VIEW/DIALOGS/exportGeometryDialog.C        | 12 ++---
+ source/VIEW/DIALOGS/labelDialog.C                 |  2 +-
+ source/VIEW/DIALOGS/lightSettings.C               |  2 +-
+ source/VIEW/DIALOGS/modelSettingsDialog.C         | 30 ++++++------
+ source/VIEW/DIALOGS/modifyRepresentationDialog.C  | 14 +++---
+ source/VIEW/DIALOGS/molecularFileDialog.C         |  4 +-
+ source/VIEW/DIALOGS/preferences.C                 |  2 +-
+ source/VIEW/KERNEL/MODES/editMode.C               | 10 ++--
+ source/VIEW/KERNEL/mainControl.C                  | 20 ++++----
+ source/VIEW/KERNEL/modularWidget.C                |  4 +-
+ source/VIEW/KERNEL/preferencesEntry.C             | 58 +++++++++++------------
+ source/VIEW/KERNEL/representation.C               | 10 ++--
+ source/VIEW/MODELS/HBondModel.C                   |  2 +-
+ source/VIEW/MODELS/colorProcessor.C               |  8 ++--
+ source/VIEW/MODELS/labelModel.C                   |  6 +--
+ source/VIEW/MODELS/lineModel.C                    |  2 +-
+ source/VIEW/MODELS/standardColorProcessor.C       | 34 ++++++-------
+ source/VIEW/MODELS/surfaceModel.C                 |  4 +-
+ source/VIEW/MODELS/vanDerWaalsModel.C             |  2 +-
+ source/VIEW/RENDERING/RENDERERS/POVRenderer.C     | 10 ++--
+ source/VIEW/RENDERING/RENDERERS/XML3DRenderer.C   |  8 ++--
+ source/VIEW/RENDERING/RENDERERS/renderer.C        | 28 +++++------
+ source/VIEW/RENDERING/RENDERERS/rtfactRenderer.C  | 16 +++----
+ source/VIEW/RENDERING/RENDERERS/tilingRenderer.C  |  2 +-
+ source/VIEW/RENDERING/renderSetup.C               | 26 +++++-----
+ source/VIEW/WIDGETS/datasetControl.C              |  2 +-
+ source/VIEW/WIDGETS/dockingController.C           |  4 +-
+ source/VIEW/WIDGETS/genericControl.C              |  2 +-
+ source/VIEW/WIDGETS/geometricControl.C            | 10 ++--
+ source/VIEW/WIDGETS/helpViewer.C                  |  6 +--
+ source/VIEW/WIDGETS/molecularControl.C            | 50 +++++++++----------
+ source/VIEW/WIDGETS/molecularStructure.C          | 18 +++----
+ source/VIEW/WIDGETS/scene.C                       | 30 ++++++------
+ source/VIEW/WIDGETS/testFramework.C               | 10 ++--
+ 102 files changed, 431 insertions(+), 431 deletions(-)
+
+--- a/include/BALL/COMMON/rtti.h
++++ b/include/BALL/COMMON/rtti.h
+@@ -189,9 +189,9 @@
+ 				\endcode
+ 		*/
+ 		template <typename T, typename U>
+-		bool isKindOf(const U&  u)
++        bool isKindOf(const U *u)
+ 		{
+-			return (0 != dynamic_cast<const T*>(&u));
++            return (0 != dynamic_cast<const T*>(u));
+ 		}
+ 
+ 		/**	Cast an object to a specialized class.
+--- a/include/BALL/CONCEPT/composite.h
++++ b/include/BALL/CONCEPT/composite.h
+@@ -2115,7 +2115,7 @@
+ 			{
+ 				--it;
+ 			} 
+-			while (+it && !RTTI::isKindOf<T>(*it));
++            while (+it && !RTTI::isKindOf<T>(&*it));
+ 		}
+ 
+ 		// return a NULL pointer if nothing was found
+@@ -2156,7 +2156,7 @@
+ 		{
+ 			it++;
+ 		} 
+-		while (it.isValid() && !RTTI::isKindOf<T>(*it));
++        while (it.isValid() && !RTTI::isKindOf<T>(&*it));
+ 
+ 
+ 		// return a NULL pointer if nothing was found
+--- a/include/BALL/CONCEPT/object.iC
++++ b/include/BALL/CONCEPT/object.iC
+@@ -34,7 +34,7 @@
+ bool Object::operator == (const Object &object) const
+ 	
+ {
+-  return (RTTI::isKindOf<Object>(object) && (handle_ == object.handle_));
++  return (RTTI::isKindOf<Object>(&object) && (handle_ == object.handle_));
+ }
+ 
+ BALL_INLINE 
+@@ -48,7 +48,7 @@
+ bool Object::operator < (const Object &object) const
+ 	
+ {
+-  return (RTTI::isKindOf<Object>(object) && (handle_ < object.handle_));
++  return (RTTI::isKindOf<Object>(&object) && (handle_ < object.handle_));
+ }
+ 
+ BALL_INLINE 
+--- a/include/BALL/KERNEL/predicate.h
++++ b/include/BALL/KERNEL/predicate.h
+@@ -170,7 +170,7 @@
+ 	template <class T>
+ 	bool KernelPredicate<T>::operator () (const Composite& composite) const
+ 	{
+-		return RTTI::isKindOf<T>(composite);
++        return RTTI::isKindOf<T>(&composite);
+ 	}
+ 
+ 	//@}
+--- a/include/BALL/VIEW/MODELS/standardColorProcessor.h
++++ b/include/BALL/VIEW/MODELS/standardColorProcessor.h
+@@ -182,7 +182,7 @@
+ 			virtual const Composite* getAncestor_(const Composite& composite) 
+ 				{ return composite.getAncestor(dummy_chain_);}
+ 
+-			virtual bool isOK_(const Composite& composite) { return RTTI::isKindOf<Chain>(composite);}
++                        virtual bool isOK_(const Composite& composite) { return RTTI::isKindOf<Chain>(&composite);}
+ 			bool canUseMeshShortcut_(const Composite& composite);
+ 
+  			Chain 	dummy_chain_;
+@@ -205,7 +205,7 @@
+ 			virtual const Composite* getAncestor_(const Composite& composite) 
+ 				{ return composite.getAncestor(dummy_molecule_);}
+ 
+-			virtual bool isOK_(const Composite& composite) { return RTTI::isKindOf<Molecule>(composite);}
++                        virtual bool isOK_(const Composite& composite) { return RTTI::isKindOf<Molecule>(&composite);}
+ 			bool canUseMeshShortcut_(const Composite& composite);
+ 
+  			Molecule 	dummy_molecule_;
+--- a/source/APPLICATIONS/BALLVIEW/demoTutorialDialog.C
++++ b/source/APPLICATIONS/BALLVIEW/demoTutorialDialog.C
+@@ -287,7 +287,7 @@
+ 	if (current_step_ == 13 ||
+ 			current_step_ == 14)
+ 	{
+-		if (!RTTI::isKindOf<FinishedSimulationMessage>(*message)) return;
++        if (!RTTI::isKindOf<FinishedSimulationMessage>(message)) return;
+ 	}
+ 	else if (current_step_ == 15)
+ 	{
+@@ -825,7 +825,7 @@
+ 
+ 		case TUTORIAL_ROTATE: // "Rotating"
+ 		{
+-			if (!RTTI::isKindOf<SceneMessage>(*message)) return;
++            if (!RTTI::isKindOf<SceneMessage>(message)) return;
+ 			break;
+ 		}
+ 
+@@ -836,7 +836,7 @@
+ 
+ 		case TUTORIAL_MDS: // "Molecular Dynamics Simulation")
+ 		{
+-			if (!RTTI::isKindOf<DatasetMessage>(*message)) return;
++            if (!RTTI::isKindOf<DatasetMessage>(message)) return;
+ 			DatasetMessage* msg = dynamic_cast<DatasetMessage*>(message);
+ 			if (msg->getDataset() == 0)
+ 			{
+@@ -864,7 +864,7 @@
+ 
+ 		case TUTORIAL_ES:  // "Calculation of electrostatics"
+ 		{
+-			if (!RTTI::isKindOf<DatasetMessage>(*message)) return;
++            if (!RTTI::isKindOf<DatasetMessage>(message)) return;
+ 			DatasetMessage* msg = dynamic_cast<DatasetMessage*>(message);
+ 			if (msg->getDataset() == 0)
+ 			{
+@@ -948,7 +948,7 @@
+ 		}	
+ 		case 4: // "Rotating"
+ 		{
+-			if (!RTTI::isKindOf<SceneMessage>(*message)) return;
++            if (!RTTI::isKindOf<SceneMessage>(message)) return;
+ 			break;
+ 		}	
+ 		case 5: // "Setting light sources"
+--- a/source/APPLICATIONS/BALLVIEW/mainframe.C
++++ b/source/APPLICATIONS/BALLVIEW/mainframe.C
+@@ -243,7 +243,7 @@
+ 		}
+ 
+  		if (e->key() == Qt::Key_Delete &&
+-				RTTI::isKindOf<QTreeWidget>(*sender))
++                RTTI::isKindOf<QTreeWidget>(sender))
+  		{
+  			deleteClicked();
+ 			return true;
+--- a/source/CONCEPT/client.C
++++ b/source/CONCEPT/client.C
+@@ -60,7 +60,7 @@
+ 			throw InvalidClient(__FILE__, __LINE__);
+ 		}	
+ 			
+-		if (!RTTI::isKindOf<PersistentObject>(composite))
++        if (!RTTI::isKindOf<PersistentObject>(&composite))
+ 		{
+ 			throw NoPersistentObject(__FILE__, __LINE__);
+ 		}
+--- a/source/CONCEPT/molecularInformation.C
++++ b/source/CONCEPT/molecularInformation.C
+@@ -44,39 +44,39 @@
+ 	{
+ 		type_ = TYPE__UNKNOWN;
+ 
+-		if (RTTI::isKindOf<Bond>(composite))
++        if (RTTI::isKindOf<Bond>(&composite))
+ 		{
+ 			type_ = TYPE__BOND;
+ 		}			
+-		else if (RTTI::isKindOf<System>(composite))
++        else if (RTTI::isKindOf<System>(&composite))
+ 		{
+ 			type_ = TYPE__SYSTEM;
+ 		}	
+-		else if (RTTI::isKindOf<Protein>(composite))
++        else if (RTTI::isKindOf<Protein>(&composite))
+ 		{
+ 			type_ = TYPE__PROTEIN;
+ 		}
+-		else if (RTTI::isKindOf<Molecule>(composite))
++        else if (RTTI::isKindOf<Molecule>(&composite))
+ 		{
+ 			type_ = TYPE__MOLECULE;
+ 		}
+-		else if (RTTI::isKindOf<Chain>(composite))
++        else if (RTTI::isKindOf<Chain>(&composite))
+ 		{
+ 			type_ = TYPE__CHAIN;
+ 		}	
+-		else if (RTTI::isKindOf<SecondaryStructure>(composite))
++        else if (RTTI::isKindOf<SecondaryStructure>(&composite))
+ 		{
+ 			type_ = TYPE__SECONDARY_STRUCTURE;
+ 		}	
+-		else if (RTTI::isKindOf<Residue>(composite))
++        else if (RTTI::isKindOf<Residue>(&composite))
+ 		{
+ 			type_ = TYPE__RESIDUE;
+ 		}	
+-		else if (RTTI::isKindOf<Fragment>(composite))
++        else if (RTTI::isKindOf<Fragment>(&composite))
+ 		{
+ 			type_ = TYPE__FRAGMENT;
+ 		}	
+-		else if (RTTI::isKindOf<Atom>(composite))
++        else if (RTTI::isKindOf<Atom>(&composite))
+ 		{
+ 			type_ = TYPE__ATOM;
+ 		}	
+@@ -138,7 +138,7 @@
+ 
+ 		String temp(info.getName());
+ 		if (atom->getParent() != 0 &&
+-				RTTI::isKindOf<Residue>(*atom->getParent()))
++                RTTI::isKindOf<Residue>(atom->getParent()))
+ 		{
+ 			info.visit(*atom->getParent());
+ 			temp = info.getName() + " : " + temp;
+--- a/source/CONCEPT/moleculeObjectCreator.C
++++ b/source/CONCEPT/moleculeObjectCreator.C
+@@ -70,14 +70,14 @@
+ 	{
+ 		cout << "read object @ " << (void*)&po << endl;
+ 	
+-		if (RTTI::isKindOf<Atom>(po))
++        if (RTTI::isKindOf<Atom>(&po))
+ 		{
+ 			Atom*	atom = RTTI::castTo<Atom>(po);
+ 			cout << " read atom " << atom->getName() << endl;
+ 			
+ 			return (Composite *)atom;
+ 		} 
+-		else if (RTTI::isKindOf<Protein>(po)) 
++        else if (RTTI::isKindOf<Protein>(&po))
+ 		{
+ 			Protein*	p = RTTI::castTo<Protein>(po);
+ 			cout << " read protein with " 
+@@ -97,7 +97,7 @@
+ 			
+ 			return (Composite *)s;
+ 		} 
+-		else if (RTTI::isKindOf<System>(po)) 
++        else if (RTTI::isKindOf<System>(&po))
+ 		{
+ 			System *s = RTTI::castTo<System>(po);
+ 			cout << " read system with " 
+--- a/source/FORMAT/MOL2File.C
++++ b/source/FORMAT/MOL2File.C
+@@ -134,13 +134,13 @@
+ 
+ 		String mol_type = "SMALL";
+ 		// if we are in a protein, set the molecule type to PROTEIN
+-		if (RTTI::isKindOf<Protein>(new_molecule))
++        if (RTTI::isKindOf<Protein>(&new_molecule))
+ 		{
+ 			mol_type = "PROTEIN";
+ 		}
+ 		// if we are in an nucleic acid,
+ 		// set the type to NUCLEIC_ACID
+-		else if (RTTI::isKindOf<NucleicAcid>(new_molecule))
++        else if (RTTI::isKindOf<NucleicAcid>(&new_molecule))
+ 		{
+ 			mol_type = "PROTEIN";
+ 		}
+@@ -252,7 +252,7 @@
+ 				<< substructure_name[i] << " ";
+ 			Position root_atom = atom_map[&*(substructure_pointers[i]->beginAtom())];
+ 			f << root_atom;
+-			if (RTTI::isKindOf<Residue>(*substructure_pointers[i]))
++            if (RTTI::isKindOf<Residue>(substructure_pointers[i]))
+ 			{
+ 				f << " RESIDUE";
+ 			}
+@@ -992,7 +992,7 @@
+ 		AtomContainer::ChildCompositeConstIterator children_it;
+ 		for (children_it = frag_it->beginChildComposite(); +children_it; ++children_it)
+ 		{
+-			if (RTTI::isKindOf<Atom>(*children_it))
++            if (RTTI::isKindOf<Atom>(&*children_it))
+ 				return true;
+ 		}
+ 
+--- a/source/FORMAT/NMRStarFile.C
++++ b/source/FORMAT/NMRStarFile.C
+@@ -1077,12 +1077,12 @@
+ 		Chain* chain;
+ 
+ 		// first check, if the given AtomContainer is a valid chain
+-		if (RTTI::isKindOf<Chain>(ac))
++        if (RTTI::isKindOf<Chain>(&ac))
+ 		{
+ 			chain = RTTI::castTo<Chain>(ac);
+ 		}
+ 
+-		if (RTTI::isKindOf<System>(ac))
++        if (RTTI::isKindOf<System>(&ac))
+ 		{
+ 			System* system =  RTTI::castTo<System>(ac);
+ 			if (system->countChains() > 0)
+@@ -1137,11 +1137,11 @@
+ 		{	
+ 			// check, if the AtomContainer is a chain
+ 			// first check, if the given AtomContainer is a valid chain
+-			if (RTTI::isKindOf<Chain>(ac))
++            if (RTTI::isKindOf<Chain>(&ac))
+ 			{
+ 				chain = RTTI::castTo<Chain>(ac);
+ 			}
+-			else if (RTTI::isKindOf<System>(ac))
++            else if (RTTI::isKindOf<System>(&ac))
+ 			{
+ 				System* system =  RTTI::castTo<System>(ac);
+ 				if (system->countChains() > 0)
+--- a/source/KERNEL/PDBAtom.C
++++ b/source/KERNEL/PDBAtom.C
+@@ -168,7 +168,7 @@
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor();
+ 				 !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<Protein>(*ancestor_it))
++            if (RTTI::isKindOf<Protein>(&*ancestor_it))
+ 			{
+ 				return (Protein *)&*ancestor_it;
+ 			}
+@@ -187,7 +187,7 @@
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor();
+ 				 !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<Chain>(*ancestor_it))
++            if (RTTI::isKindOf<Chain>(&*ancestor_it))
+ 			{
+ 				return (Chain *)&*ancestor_it;
+ 			}
+@@ -206,7 +206,7 @@
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor();
+ 				 !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<Residue>(*ancestor_it))
++            if (RTTI::isKindOf<Residue>(&*ancestor_it))
+ 			{
+ 				return (Residue *)&*ancestor_it;
+ 			}
+--- a/source/KERNEL/atomContainer.C
++++ b/source/KERNEL/atomContainer.C
+@@ -127,7 +127,7 @@
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor();
+ 				 !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<AtomContainer>(*ancestor_it) == true)
++            if (RTTI::isKindOf<AtomContainer>(&*ancestor_it) == true)
+ 			{
+ 				return (AtomContainer *)&*ancestor_it;
+ 			}
+--- a/source/KERNEL/chain.C
++++ b/source/KERNEL/chain.C
+@@ -69,7 +69,7 @@
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor();
+ 				 !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<Protein>(*ancestor_it) == true)
++            if (RTTI::isKindOf<Protein>(&*ancestor_it) == true)
+ 			{
+ 				return (Protein *)&*ancestor_it;
+ 			}
+--- a/source/KERNEL/molecule.C
++++ b/source/KERNEL/molecule.C
+@@ -74,7 +74,7 @@
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor();
+ 				 !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<System>(*ancestor_it) == true)
++            if (RTTI::isKindOf<System>(&*ancestor_it) == true)
+ 			{
+ 				return (System *)&*ancestor_it;
+ 			}
+--- a/source/KERNEL/residue.C
++++ b/source/KERNEL/residue.C
+@@ -294,7 +294,7 @@
+ 	{
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor(); !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<Protein>(*ancestor_it))
++            if (RTTI::isKindOf<Protein>(&*ancestor_it))
+ 			{
+ 				return (Protein *)&*ancestor_it;
+ 			}
+@@ -312,7 +312,7 @@
+ 	{
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor(); !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<Chain>(*ancestor_it))
++            if (RTTI::isKindOf<Chain>(&*ancestor_it))
+ 			{
+ 				return (Chain *)&*ancestor_it;
+ 			}
+@@ -330,7 +330,7 @@
+ 	{
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor(); !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<SecondaryStructure>(*ancestor_it))
++            if (RTTI::isKindOf<SecondaryStructure>(&*ancestor_it))
+ 			{
+ 				return (SecondaryStructure*)&*ancestor_it;
+ 			}
+--- a/source/KERNEL/secondaryStructure.C
++++ b/source/KERNEL/secondaryStructure.C
+@@ -89,7 +89,7 @@
+ 	{
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor(); !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<Protein>(*ancestor_it))
++            if (RTTI::isKindOf<Protein>(&*ancestor_it))
+ 			{
+ 				return (Protein *)&*ancestor_it;
+ 			}
+@@ -107,7 +107,7 @@
+ 	{
+ 		for (Composite::AncestorIterator ancestor_it = beginAncestor(); !ancestor_it.isEnd(); ++ancestor_it)
+ 		{
+-			if (RTTI::isKindOf<Chain>(*ancestor_it))
++            if (RTTI::isKindOf<Chain>(&*ancestor_it))
+ 			{
+ 				return (Chain *)&*ancestor_it;
+ 			}
+--- a/source/KERNEL/selector.C
++++ b/source/KERNEL/selector.C
+@@ -84,7 +84,7 @@
+   Processor::Result Selector::operator () (Composite& composite)
+   {
+ 		// if the composite is an atom, we apply the expression tree...
+-		if (RTTI::isKindOf<Atom>(composite))
++        if (RTTI::isKindOf<Atom>(&composite))
+ 		{
+ 			Atom& atom = dynamic_cast<Atom&>(composite);
+ 			if (expression_.operator () (atom))
+--- a/source/KERNEL/standardPredicates.C
++++ b/source/KERNEL/standardPredicates.C
+@@ -192,7 +192,7 @@
+ 
+ 	bool NucleotidePredicate::operator () (const Atom& atom) const
+ 	{
+-		return RTTI::isKindOf<Nucleotide>(atom);
++        return RTTI::isKindOf<Nucleotide>(&atom);
+ 	}
+ 
+ 	// in ring predicate
+--- a/source/MOLMEC/AMBER/GAFFTypeProcessor.C
++++ b/source/MOLMEC/AMBER/GAFFTypeProcessor.C
+@@ -48,7 +48,7 @@
+ 	Processor::Result GAFFTypeProcessor::operator() (Composite &composite)
+ 	{
+ 		// TODO: think whether application to other things than molecules would make sense...
+-		if (RTTI::isKindOf<Molecule>(composite))
++        if (RTTI::isKindOf<Molecule>(&composite))
+ 		{
+ 			Molecule *mol = RTTI::castTo<Molecule>(composite);
+ 
+--- a/source/NMR/EFShiftProcessor.C
++++ b/source/NMR/EFShiftProcessor.C
+@@ -311,7 +311,7 @@
+ 	{
+ 		// Here, we collect all target bonds and
+ 		// all charged atoms (as effectors of the electric field).
+-		if (RTTI::isKindOf<Atom>(object))
++        if (RTTI::isKindOf<Atom>(&object))
+ 		{
+ 			Atom* atom_ptr = RTTI::castTo<Atom>(object);
+ 
+@@ -438,7 +438,7 @@
+ 		std::vector<std::pair<Atom*, Atom*> >::iterator tbond_it = bond_list_.begin();
+ 		for (; tbond_it != bond_list_.end(); ++tbond_it)
+ 		{
+-			if  (RTTI::isKindOf<System>(tbond_it->first->getRoot()))
++            if  (RTTI::isKindOf<System>(&tbond_it->first->getRoot()))
+ 			{
+ 				system = dynamic_cast<System*>(&(tbond_it->first->getRoot()));
+ 				break;
+--- a/source/NMR/HBondShiftProcessor.C
++++ b/source/NMR/HBondShiftProcessor.C
+@@ -409,7 +409,7 @@
+   Processor::Result HBondShiftProcessor::operator () (Composite& object)
+ 	{
+ 		// Here, we collect all possible acceptors and donors.
+-		if (RTTI::isKindOf<Atom>(object))
++        if (RTTI::isKindOf<Atom>(&object))
+ 		{
+ 			Atom* atom = RTTI::castTo<Atom>(object);
+ 
+@@ -511,7 +511,7 @@
+ 
+ 		for (Position i = 0; !system && i<acceptors_.size(); i++)
+ 		{
+-			if  (RTTI::isKindOf<System>(acceptors_[i]->getRoot()))
++            if  (RTTI::isKindOf<System>(&acceptors_[i]->getRoot()))
+ 			{
+ 				system = dynamic_cast<System*>(&(acceptors_[i]->getRoot()));
+ 			}
+--- a/source/NMR/anisotropyShiftProcessor.C
++++ b/source/NMR/anisotropyShiftProcessor.C
+@@ -296,7 +296,7 @@
+ 	{
+ 		// Collect all effector bonds(C=O) and store them in eff_list_
+ 		// All protons are collected in proton_list_.
+-		if (!RTTI::isKindOf<Atom>(composite))
++        if (!RTTI::isKindOf<Atom>(&composite))
+ 		{
+ 			return Processor::CONTINUE;
+ 		}
+--- a/source/NMR/empiricalHSShiftProcessor.C
++++ b/source/NMR/empiricalHSShiftProcessor.C
+@@ -315,7 +315,7 @@
+ 		// string the corresponding property computation.
+ 		
+ 		// If the composite is an atom ...
+-		if (RTTI::isKindOf<Atom>(composite))
++        if (RTTI::isKindOf<Atom>(&composite))
+ 		{
+ 			Atom* atom = dynamic_cast<Atom*>(&composite);
+ 			
+@@ -2363,7 +2363,7 @@
+ 		
+ 		for (Position i = 0; i < targets_.size(); i++)
+ 		{
+-			if  (RTTI::isKindOf<System>(targets_[i].current_atom->getRoot()))
++            if  (RTTI::isKindOf<System>(&targets_[i].current_atom->getRoot()))
+ 			{	
+ 				system = dynamic_cast<System*>(&(targets_[i].current_atom->getRoot()));
+ 			}
+--- a/source/NMR/haighMallionShiftProcessor.C
++++ b/source/NMR/haighMallionShiftProcessor.C
+@@ -544,7 +544,7 @@
+ 		
+ 		for (Position i = 0; !system && i<targets_.size(); i++)
+ 		{
+-			if  (RTTI::isKindOf<System>(	targets_[i]->getRoot()))
++            if  (RTTI::isKindOf<System>(&targets_[i]->getRoot()))
+ 			{	
+ 				system = dynamic_cast<System*>(&(targets_[i]->getRoot()));
+ 			}
+--- a/source/NMR/johnsonBoveyShiftProcessor.C
++++ b/source/NMR/johnsonBoveyShiftProcessor.C
+@@ -460,7 +460,7 @@
+ 	{
+ 		// ueberpruefe fuer jedes Residue ob es in residues_with_rings ist und fuege es in die Liste aromat_list_ ein.
+ 		// ueberpruefe fuer jedes Atom die Liste der Expressions und falls eine wahr ist fuege das Atom in die Liste ein.
+-		if (RTTI::isKindOf<Residue>(composite))  // erganze aromat_list_ um aromatische Residues 			
++        if (RTTI::isKindOf<Residue>(&composite))  // erganze aromat_list_ um aromatische Residues
+ 		{
+ 			Residue* residue = RTTI::castTo<Residue>(composite);
+ 			if (residues_with_rings_.has(residue->getName())) 
+@@ -470,7 +470,7 @@
+ 		}
+ 
+ 		// Liste um Aromaten erweitert		
+-		if (RTTI::isKindOf<Atom>(composite))
++        if (RTTI::isKindOf<Atom>(&composite))
+ 		{			
+ 			Atom* atom_ptr = RTTI::castTo<Atom>(composite);
+ 			
+--- a/source/NMR/randomCoilShiftProcessor.C
++++ b/source/NMR/randomCoilShiftProcessor.C
+@@ -72,7 +72,7 @@
+ 		}
+ 
+ 		// Try to get the system.
+-		if (!system_   && (RTTI::isKindOf<System>(atom_ptr->getRoot())))
++        if (!system_   && (RTTI::isKindOf<System>(&atom_ptr->getRoot())))
+ 		{	
+ 			system_ = dynamic_cast<System*>(&(atom_ptr->getRoot()));
+ 		}
+--- a/source/NMR/shiftModel1D.C
++++ b/source/NMR/shiftModel1D.C
+@@ -222,10 +222,10 @@
+ 
+ 		Processor::Result result = Processor::CONTINUE;
+ 
+-		if (!system_ && RTTI::isKindOf<Atom>(composite))
++                if (!system_ && RTTI::isKindOf<Atom>(&composite))
+ 		{
+ 			Atom* atom = dynamic_cast<Atom*>(&composite);
+-			if  (RTTI::isKindOf<System>(atom->getRoot()))
++                        if  (RTTI::isKindOf<System>(&atom->getRoot()))
+ 			{	
+ 				system_ = dynamic_cast<System*>(&(atom->getRoot()));
+ 			}
+--- a/source/NMR/shiftModel2D.C
++++ b/source/NMR/shiftModel2D.C
+@@ -374,10 +374,10 @@
+ 	{
+ 		Processor::Result result = Processor::CONTINUE;
+ 
+-		if (!system_ && RTTI::isKindOf<Atom>(composite))
++                if (!system_ && RTTI::isKindOf<Atom>(&composite))
+ 		{
+ 			Atom* atom = dynamic_cast<Atom*>(&composite);
+-			if  (RTTI::isKindOf<System>(atom->getRoot()))
++                        if  (RTTI::isKindOf<System>(&atom->getRoot()))
+ 			{	
+ 				system_ = dynamic_cast<System*>(&(atom->getRoot()));
+ 			}
+--- a/source/PYTHON/EXTENSIONS/BALLPyMacros.h
++++ b/source/PYTHON/EXTENSIONS/BALLPyMacros.h
+@@ -36,7 +36,7 @@
+ 	sipReleaseType(object, sipType_##type, state)
+ 
+ #define BALL_TO_SIP_MAP(type)\
+-	if (RTTI::isKindOf<type>(*sipCpp))\
++        if (RTTI::isKindOf<type>(sipCpp))\
+ 	{\
+ 		sipType = sipType_##type;\
+ 	}\
+@@ -72,7 +72,7 @@
+ 	sipReleaseInstance(object, sipClass_##type, state)
+ 
+ #define BALL_TO_SIP_MAP(type)\
+-	if (RTTI::isKindOf<type>(*sipCpp))\
++        if (RTTI::isKindOf<type>(sipCpp))\
+ 	{\
+ 		sipClass = sipClass_##type;\
+ 	}\
+--- a/source/STRUCTURE/HBondProcessor.C
++++ b/source/STRUCTURE/HBondProcessor.C
+@@ -94,19 +94,19 @@
+ 		ResidueIterator    ri;
+ 
+ 		// do we have a system?
+-		if (RTTI::isKindOf<System>(composite))
++        if (RTTI::isKindOf<System>(&composite))
+ 		{
+ 			System *s = RTTI::castTo<System>(composite);
+ 			s->apply(bp);
+ 			ri = s->beginResidue();
+ 		}
+-		else if (RTTI::isKindOf<Protein>(composite))
++        else if (RTTI::isKindOf<Protein>(&composite))
+ 		{
+ 			Protein *s = RTTI::castTo<Protein>(composite);
+ 			s->apply(bp);
+ 			ri = s->beginResidue();
+     }
+-		else if (RTTI::isKindOf<Chain>(composite))
++        else if (RTTI::isKindOf<Chain>(&composite))
+ 		{
+ 			Chain *s = RTTI::castTo<Chain>(composite);
+ 			s->apply(bp);
+--- a/source/STRUCTURE/assignBondOrderProcessor.C
++++ b/source/STRUCTURE/assignBondOrderProcessor.C
+@@ -388,7 +388,7 @@
+ 
+ 			// What kind of composite do we have?
+ 			// Do we have a molecule? (Nothing else is allowed)
+-			if (RTTI::isKindOf<Molecule>(ac))
++            if (RTTI::isKindOf<Molecule>(&ac))
+ 			{
+ 				// Store the AtomContainer
+ 				ac_ = ∾
+@@ -1312,11 +1312,11 @@
+ 			apply(i);
+ 
+ 			// What kind of composite do we have?
+-			if (RTTI::isKindOf<System>(*solutions_[i].ac))
++            if (RTTI::isKindOf<System>(solutions_[i].ac))
+ 			{
+ 				return *(RTTI::castTo<System>(*solutions_[i].ac));
+ 			}
+-			else if (RTTI::isKindOf<Molecule>(*solutions_[i].ac))
++            else if (RTTI::isKindOf<Molecule>(solutions_[i].ac))
+ 			{
+ 				Molecule* m = RTTI::castTo<Molecule>(*solutions_[i].ac);
+ 				return *(m->getSystem());
+--- a/source/STRUCTURE/bindingPocketProcessor.C
++++ b/source/STRUCTURE/bindingPocketProcessor.C
+@@ -232,19 +232,19 @@
+ 		layers_.clear();
+ 
+ 		// do we have a system?
+-		if (RTTI::isKindOf<System>(composite))
++        if (RTTI::isKindOf<System>(&composite))
+ 		{
+ 			System *s = RTTI::castTo<System>(composite);
+ 			s->apply(bp);
+ 			ai = s->beginAtom();
+ 		}
+-		else if (RTTI::isKindOf<Protein>(composite))
++        else if (RTTI::isKindOf<Protein>(&composite))
+ 		{
+ 			Protein *s = RTTI::castTo<Protein>(composite);
+ 			s->apply(bp);
+ 			ai = s->beginAtom();
+ 		}
+-		else if (RTTI::isKindOf<Chain>(composite))
++        else if (RTTI::isKindOf<Chain>(&composite))
+ 		{
+ 			Molecule *s = RTTI::castTo<Molecule>(composite);
+ 			s->apply(bp);
+--- a/source/STRUCTURE/defaultProcessors.C
++++ b/source/STRUCTURE/defaultProcessors.C
+@@ -78,7 +78,7 @@
+ 		String atom_name = atom.getName().trim();
+ 		String original_res_name = res_name;
+ 
+-		if (RTTI::isKindOf<Residue>(*atom.getFragment()))
++        if (RTTI::isKindOf<Residue>(atom.getFragment()))
+ 		{
+ 			Residue* residue = RTTI::castTo<Residue>(*atom.getFragment());
+ 				
+@@ -252,7 +252,7 @@
+ 		String atom_name = atom.getName().trim();
+ 		String original_res_name = res_name;
+ 
+-		if (RTTI::isKindOf<Residue>(*atom.getFragment()))
++        if (RTTI::isKindOf<Residue>(atom.getFragment()))
+ 		{
+ 			Residue* residue = RTTI::castTo<Residue>(*atom.getFragment());
+ 				
+--- a/source/STRUCTURE/disulfidBondProcessor.C
++++ b/source/STRUCTURE/disulfidBondProcessor.C
+@@ -215,13 +215,13 @@
+ 	bool DisulfidBondProcessor::connect(Composite* composite1, Composite* composite2, bool toggle)
+ 	{
+ 		bool success = false;
+-		if (RTTI::isKindOf<Residue>(*composite1) && RTTI::isKindOf<Residue>(*composite2) )
++        if (RTTI::isKindOf<Residue>(composite1) && RTTI::isKindOf<Residue>(composite2) )
+ 		{
+ 			Residue* res1 = reinterpret_cast<Residue*>(composite1);
+ 			Residue* res2 = reinterpret_cast<Residue*>(composite2);
+ 			success = connect(res1, res2, toggle);
+ 		}
+-		else if (RTTI::isKindOf<Atom>(*composite1) && RTTI::isKindOf<Atom>(*composite2))
++        else if (RTTI::isKindOf<Atom>(composite1) && RTTI::isKindOf<Atom>(composite2))
+ 		{
+ 				Atom* atom1 = reinterpret_cast<Atom*>(composite1);
+ 				Atom* atom2 = reinterpret_cast<Atom*>(composite2);
+@@ -360,13 +360,13 @@
+ 	bool DisulfidBondProcessor::disconnect(Composite* composite1, Composite* composite2)
+ 	{
+ 		bool success = false;
+-		if (RTTI::isKindOf<Residue>(*composite1) && RTTI::isKindOf<Residue>(*composite2) )
++        if (RTTI::isKindOf<Residue>(composite1) && RTTI::isKindOf<Residue>(composite2) )
+ 		{
+ 			Residue* res1 = reinterpret_cast<Residue*>(composite1);
+ 			Residue* res2 = reinterpret_cast<Residue*>(composite2);
+ 			success = disconnect(res1, res2);
+ 		}
+-		else if (RTTI::isKindOf<Atom>(*composite1) && RTTI::isKindOf<Atom>(*composite2))
++        else if (RTTI::isKindOf<Atom>(composite1) && RTTI::isKindOf<Atom>(composite2))
+ 		{
+ 				Atom* atom1 = reinterpret_cast<Atom*>(composite1);
+ 				Atom* atom2 = reinterpret_cast<Atom*>(composite2);
+--- a/source/STRUCTURE/geometricProperties.C
++++ b/source/STRUCTURE/geometricProperties.C
+@@ -205,7 +205,7 @@
+ 		for (composite_it = reference_composite_->beginComposite(); 
+ 				 composite_it != reference_composite_->endComposite(); ++composite_it) 
+ 		{
+-			if (RTTI::isKindOf<Atom>(*composite_it))
++            if (RTTI::isKindOf<Atom>(&*composite_it))
+ 			{
+ 				atom_ptr = RTTI::castTo<Atom>(*composite_it);
+ 				reference_atoms.push_back(atom_ptr);	
+--- a/source/STRUCTURE/reconstructFragmentProcessor.C
++++ b/source/STRUCTURE/reconstructFragmentProcessor.C
+@@ -129,7 +129,7 @@
+ 	{
+ 		// abort if the object is not a residue (only residues are 
+ 		// contained in the fragment DB)																				
+-		if (!RTTI::isKindOf<Residue>(object))
++        if (!RTTI::isKindOf<Residue>(&object))
+ 		{
+ 			return Processor::CONTINUE;
+ 		}
+--- a/source/STRUCTURE/secondaryStructureProcessor.C
++++ b/source/STRUCTURE/secondaryStructureProcessor.C
+@@ -813,7 +813,7 @@
+ 	 **********************************************/
+ 	Processor::Result SecondaryStructureProcessor::operator() (Composite &composite)
+ 	{
+-		if (!RTTI::isKindOf<Chain>(composite))
++        if (!RTTI::isKindOf<Chain>(&composite))
+ 		{
+ 			return Processor::CONTINUE;
+ 		}
+@@ -910,7 +910,7 @@
+ 		for (; +ssit; ++ssit)
+ 		{
+ 			if ((*ssit).getParent() == 0 ||
+-					!RTTI::isKindOf<SecondaryStructure>(*(*ssit).getParent()))
++                    !RTTI::isKindOf<SecondaryStructure>((*ssit).getParent()))
+ 			{
+ 				to_remove.push_back(&*ssit);
+ 			}
+--- a/source/STRUCTURE/sideChainPlacementProcessor.C
++++ b/source/STRUCTURE/sideChainPlacementProcessor.C
+@@ -144,9 +144,9 @@
+ 			// What kind of composite do we have?
+ 			// Do we have a system, a molecule or a chain? 
+ 			// Nothing else is allowed ...
+-			if (   RTTI::isKindOf<Chain>(ac) 
+-					|| RTTI::isKindOf<Protein>(ac) 
+-					|| RTTI::isKindOf<System>(ac)) 
++            if (   RTTI::isKindOf<Chain>(&ac)
++                    || RTTI::isKindOf<Protein>(&ac)
++                    || RTTI::isKindOf<System>(&ac))
+ 			{
+ 				//System* sys = RTTI::castTo<System>(ac);
+ 				AtomContainer* sys = RTTI::castTo<AtomContainer>(ac);
+@@ -180,7 +180,7 @@
+ 					Chain*   chain = NULL;
+ 					System*  in_sys;
+ 
+-					if (RTTI::isKindOf<System>(ac))
++                    if (RTTI::isKindOf<System>(&ac))
+ 					{
+ 						in_sys = RTTI::castTo<System>(ac);
+ 						if (in_sys->countProteins() == 0)
+@@ -197,9 +197,9 @@
+ 					}
+ 					else
+ 					{
+-						if (RTTI::isKindOf<Protein>(ac))
++                        if (RTTI::isKindOf<Protein>(&ac))
+ 							prot = RTTI::castTo<Protein>(ac);
+-						if (RTTI::isKindOf<Chain>(ac))
++                        if (RTTI::isKindOf<Chain>(&ac))
+ 						{
+ 							chain =  RTTI::castTo<Chain>(ac);
+ 							prot = chain->getProtein();
+--- a/source/STRUCTURE/structureMapper.C
++++ b/source/STRUCTURE/structureMapper.C
+@@ -53,7 +53,7 @@
+ 
+ 		for (it = ac.beginAtomContainer(); +it; ++it)
+ 		{
+-			if (RTTI::isKindOf<Fragment>(*it))
++            if (RTTI::isKindOf<Fragment>(&*it))
+ 			{
+ 				number_of_mol_fragments++;
+ 			}
+@@ -556,7 +556,7 @@
+ 		for	(ac_it = ac.beginAtomContainer(); 
+ 				 ac_it != ac.endAtomContainer(); ++ac_it)
+ 		{
+-			if (RTTI::isKindOf<Fragment>(*ac_it))
++            if (RTTI::isKindOf<Fragment>(&*ac_it))
+ 			{
+ 				ac_fragments.push_back(RTTI::castTo<Fragment>(*ac_it));
+ 			}
+--- a/source/TEST/AddCartoonModel_test.C
++++ b/source/TEST/AddCartoonModel_test.C
+@@ -132,7 +132,7 @@
+ 	cm.createGeometricObjects();
+ 	TEST_EQUAL(cm.getGeometricObjects().size(), 130)
+ 	GeometricObject* go = *cm.getGeometricObjects().begin();
+-	TEST_EQUAL(RTTI::isKindOf<Mesh>(*go), true)
++    TEST_EQUAL(RTTI::isKindOf<Mesh>(go), true)
+ 	Mesh* mesh = dynamic_cast<Mesh*>(go);
+ 	TEST_EQUAL(mesh->vertex.size(), 481)
+ 	TEST_EQUAL(mesh->normal.size(), 481)
+@@ -169,7 +169,7 @@
+ 	cm.createGeometricObjects();
+ 	TEST_EQUAL(cm.getGeometricObjects().size(), 345)
+ 	GeometricObject* go = *cm.getGeometricObjects().begin();
+-	TEST_EQUAL(RTTI::isKindOf<Mesh>(*go), true)
++    TEST_EQUAL(RTTI::isKindOf<Mesh>(go), true)
+ 	Mesh* mesh = dynamic_cast<Mesh*>(go);
+ 	TEST_EQUAL(mesh->vertex.size(), 241)
+ 	TEST_EQUAL(mesh->normal.size(), 241)
+--- a/source/TEST/AtomContainer_test.C
++++ b/source/TEST/AtomContainer_test.C
+@@ -268,7 +268,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<AtomContainer>(*ptr), true)
++        TEST_EQUAL(isKindOf<AtomContainer>(ptr), true)
+ 		AtomContainer*	f1 = castTo<AtomContainer>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countAtomContainers(), 2)
+--- a/source/TEST/Atom_test.C
++++ b/source/TEST/Atom_test.C
+@@ -430,8 +430,8 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Atom>(*ptr), true)
+-		if (isKindOf<Atom>(*ptr))
++        TEST_EQUAL(isKindOf<Atom>(ptr), true)
++        if (isKindOf<Atom>(ptr))
+ 		{
+ 			Atom* pers_atom = castTo<Atom>(*ptr);
+ 			TEST_EQUAL(pers_atom->getName(), atom->getName())
+--- a/source/TEST/Bond_test.C
++++ b/source/TEST/Bond_test.C
+@@ -441,7 +441,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Bond>(*ptr), true)
++        TEST_EQUAL(isKindOf<Bond>(ptr), true)
+ 		Bond*	f1 = castTo<Bond>(*ptr);
+ 		if (f1->getFirstAtom()->getName() == "a1")
+ 		{
+--- a/source/TEST/Chain_test.C
++++ b/source/TEST/Chain_test.C
+@@ -534,7 +534,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Chain>(*ptr), true)
++        TEST_EQUAL(isKindOf<Chain>(ptr), true)
+ 		Chain*	f1 = castTo<Chain>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countResidues(), 2)
+--- a/source/TEST/Composite_test4.C
++++ b/source/TEST/Composite_test4.C
+@@ -200,8 +200,8 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Composite>(*ptr), true)
+-		if (isKindOf<Composite>(*ptr))
++        TEST_EQUAL(isKindOf<Composite>(ptr), true)
++        if (isKindOf<Composite>(ptr))
+ 		{
+ 			Composite* pers_a = castTo<Composite>(*ptr);
+ 			TEST_EQUAL(pers_a->isSelected(), true)
+--- a/source/TEST/Fragment_test.C
++++ b/source/TEST/Fragment_test.C
+@@ -123,7 +123,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Fragment>(*ptr), true)
++        TEST_EQUAL(isKindOf<Fragment>(ptr), true)
+ 		Fragment*	f1 = castTo<Fragment>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countAtoms(), 2)
+--- a/source/TEST/Molecule_test.C
++++ b/source/TEST/Molecule_test.C
+@@ -365,7 +365,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Molecule>(*ptr), true)
++        TEST_EQUAL(isKindOf<Molecule>(ptr), true)
+ 		Molecule*	f1 = castTo<Molecule>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countAtoms(), 2)
+--- a/source/TEST/NamedProperty_test.C
++++ b/source/TEST/NamedProperty_test.C
+@@ -217,8 +217,8 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<NamedProperty>(*ptr), true)
+-		if (isKindOf<NamedProperty>(*ptr))
++        TEST_EQUAL(isKindOf<NamedProperty>(ptr), true)
++        if (isKindOf<NamedProperty>(ptr))
+ 		{
+ 			NamedProperty* pers_a = castTo<NamedProperty>(*ptr);
+ 			TEST_EQUAL(pers_a->getType(), NamedProperty::FLOAT)
+@@ -237,8 +237,8 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<NamedProperty>(*ptr), true)
+-		if (isKindOf<NamedProperty>(*ptr))
++        TEST_EQUAL(isKindOf<NamedProperty>(ptr), true)
++        if (isKindOf<NamedProperty>(ptr))
+ 		{
+ 			NamedProperty* pers_a = castTo<NamedProperty>(*ptr);
+ 			TEST_EQUAL(pers_a->getType(), NamedProperty::OBJECT)
+@@ -257,8 +257,8 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<NamedProperty>(*ptr), true)
+-		if (isKindOf<NamedProperty>(*ptr))
++        TEST_EQUAL(isKindOf<NamedProperty>(ptr), true)
++        if (isKindOf<NamedProperty>(ptr))
+ 		{
+ 			NamedProperty* pers_a = castTo<NamedProperty>(*ptr);
+ 			TEST_EQUAL(pers_a->getType(), NamedProperty::NONE)
+@@ -276,8 +276,8 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<NamedProperty>(*ptr), true)
+-		if (isKindOf<NamedProperty>(*ptr))
++        TEST_EQUAL(isKindOf<NamedProperty>(ptr), true)
++        if (isKindOf<NamedProperty>(ptr))
+ 		{
+ 			NamedProperty* pers_a = castTo<NamedProperty>(*ptr);
+ 			TEST_EQUAL(pers_a->getType(), NamedProperty::STRING)
+@@ -296,8 +296,8 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<NamedProperty>(*ptr), true)
+-		if (isKindOf<NamedProperty>(*ptr))
++        TEST_EQUAL(isKindOf<NamedProperty>(ptr), true)
++        if (isKindOf<NamedProperty>(ptr))
+ 		{
+ 			NamedProperty* pers_a = castTo<NamedProperty>(*ptr);
+ 			TEST_EQUAL(pers_a->getType(), NamedProperty::SMART_OBJECT)
+--- a/source/TEST/NucleicAcid_test.C
++++ b/source/TEST/NucleicAcid_test.C
+@@ -251,7 +251,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<NucleicAcid>(*ptr), true)
++        TEST_EQUAL(isKindOf<NucleicAcid>(ptr), true)
+ 		NucleicAcid* f1 = castTo<NucleicAcid>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countNucleotides(), 2)
+--- a/source/TEST/Nucleotide_test.C
++++ b/source/TEST/Nucleotide_test.C
+@@ -420,7 +420,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Nucleotide>(*ptr), true)
++        TEST_EQUAL(isKindOf<Nucleotide>(ptr), true)
+ 		Nucleotide*	f1 = castTo<Nucleotide>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countAtoms(), 2)
+--- a/source/TEST/PDBAtom_test.C
++++ b/source/TEST/PDBAtom_test.C
+@@ -115,8 +115,8 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<PDBAtom>(*ptr), true)
+-		if (isKindOf<PDBAtom>(*ptr))
++        TEST_EQUAL(isKindOf<PDBAtom>(ptr), true)
++        if (isKindOf<PDBAtom>(ptr))
+ 		{
+ 			PDBAtom* p2 = castTo<PDBAtom>(*ptr);
+ 			TEST_EQUAL(testEqual(*p2, pdba), true)
+--- a/source/TEST/PersistenceManager_test.C
++++ b/source/TEST/PersistenceManager_test.C
+@@ -310,7 +310,7 @@
+ 	// ?????
+ 	// String sig = RTTI::getStreamName<Atom>();
+ 	// Atom* atom = (Atom*) pm.createObject(sig);
+-	// bool test = RTTI::isKindOf<Atom>(atom);
++    // bool test = RTTI::isKindOf<Atom>(&atom);
+ 	// TEST_EQUAL(test, true)
+ RESULT
+ 
+--- a/source/TEST/Protein_test.C
++++ b/source/TEST/Protein_test.C
+@@ -436,7 +436,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Protein>(*ptr), true)
++        TEST_EQUAL(isKindOf<Protein>(ptr), true)
+ 		Protein*	f1 = castTo<Protein>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countChains(), 2)
+--- a/source/TEST/RTTI_test.C
++++ b/source/TEST/RTTI_test.C
+@@ -32,42 +32,42 @@
+ 	Protein*			p_ptr(&p);
+ 	Molecule*			m_ptr(&p);
+ 	AtomContainer*	b_ptr(&p);
+-	TEST_EQUAL(isKindOf<Molecule>(*p_ptr), true)
+-	TEST_EQUAL(isKindOf<Molecule>(*m_ptr), true)
+-	TEST_EQUAL(isKindOf<Molecule>(*b_ptr), true)
+-	TEST_EQUAL(isKindOf<Protein>(*p_ptr), true)
+-	TEST_EQUAL(isKindOf<Protein>(*m_ptr), true)
+-	TEST_EQUAL(isKindOf<Protein>(*b_ptr), true)
+-	TEST_EQUAL(isKindOf<AtomContainer>(*p_ptr), true)
+-	TEST_EQUAL(isKindOf<AtomContainer>(*m_ptr), true)
+-	TEST_EQUAL(isKindOf<AtomContainer>(*b_ptr), true)
+-	TEST_EQUAL(isKindOf<Residue>(*p_ptr), false)
+-	TEST_EQUAL(isKindOf<Residue>(*m_ptr), false)
+-	TEST_EQUAL(isKindOf<Residue>(*b_ptr), false)
++    TEST_EQUAL(isKindOf<Molecule>(p_ptr), true)
++    TEST_EQUAL(isKindOf<Molecule>(m_ptr), true)
++    TEST_EQUAL(isKindOf<Molecule>(b_ptr), true)
++    TEST_EQUAL(isKindOf<Protein>(p_ptr), true)
++    TEST_EQUAL(isKindOf<Protein>(m_ptr), true)
++    TEST_EQUAL(isKindOf<Protein>(b_ptr), true)
++    TEST_EQUAL(isKindOf<AtomContainer>(p_ptr), true)
++    TEST_EQUAL(isKindOf<AtomContainer>(m_ptr), true)
++    TEST_EQUAL(isKindOf<AtomContainer>(b_ptr), true)
++    TEST_EQUAL(isKindOf<Residue>(p_ptr), false)
++    TEST_EQUAL(isKindOf<Residue>(m_ptr), false)
++    TEST_EQUAL(isKindOf<Residue>(b_ptr), false)
+ 	Molecule m;
+ 	m_ptr = &m;
+ 	b_ptr = &m;
+-	TEST_EQUAL(isKindOf<Molecule>(*m_ptr), true)
+-	TEST_EQUAL(isKindOf<Molecule>(*b_ptr), true)
+-	TEST_EQUAL(isKindOf<Protein>(*m_ptr), false)
+-	TEST_EQUAL(isKindOf<Protein>(*b_ptr), false)
+-	TEST_EQUAL(isKindOf<AtomContainer>(*m_ptr), true)
+-	TEST_EQUAL(isKindOf<AtomContainer>(*b_ptr), true)
+-	TEST_EQUAL(isKindOf<Residue>(*m_ptr), false)
+-	TEST_EQUAL(isKindOf<Residue>(*b_ptr), false)
++    TEST_EQUAL(isKindOf<Molecule>(m_ptr), true)
++    TEST_EQUAL(isKindOf<Molecule>(b_ptr), true)
++    TEST_EQUAL(isKindOf<Protein>(m_ptr), false)
++    TEST_EQUAL(isKindOf<Protein>(b_ptr), false)
++    TEST_EQUAL(isKindOf<AtomContainer>(m_ptr), true)
++        TEST_EQUAL(isKindOf<AtomContainer>(b_ptr), true)
++    TEST_EQUAL(isKindOf<Residue>(m_ptr), false)
++    TEST_EQUAL(isKindOf<Residue>(b_ptr), false)
+ 	AtomContainer b;
+ 	b_ptr = &b;
+-	TEST_EQUAL(isKindOf<Molecule>(*b_ptr), false)
+-	TEST_EQUAL(isKindOf<Protein>(*b_ptr), false)
+-	TEST_EQUAL(isKindOf<AtomContainer>(*b_ptr), true)
+-	TEST_EQUAL(isKindOf<Residue>(*b_ptr), false)
++    TEST_EQUAL(isKindOf<Molecule>(b_ptr), false)
++    TEST_EQUAL(isKindOf<Protein>(b_ptr), false)
++    TEST_EQUAL(isKindOf<AtomContainer>(b_ptr), true)
++    TEST_EQUAL(isKindOf<Residue>(b_ptr), false)
+ 
+ 	System*	s_ptr = new System;
+-	TEST_EQUAL(isKindOf<System>(*s_ptr), true)
++    TEST_EQUAL(isKindOf<System>(s_ptr), true)
+ 	delete s_ptr;
+ 
+ 	s_ptr = 0;
+-	TEST_EQUAL(isKindOf<System>(*s_ptr), false)
++    TEST_EQUAL(isKindOf<System>(s_ptr), false)
+ RESULT											
+ 
+ CHECK(RTTI::isInstanceOf<>())
+--- a/source/TEST/Residue_test.C
++++ b/source/TEST/Residue_test.C
+@@ -578,7 +578,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Molecule>(*ptr), true)
++        TEST_EQUAL(isKindOf<Molecule>(ptr), true)
+ 		Molecule*	f1 = castTo<Molecule>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countAtoms(), 2)
+--- a/source/TEST/SecondaryStructure_test.C
++++ b/source/TEST/SecondaryStructure_test.C
+@@ -417,7 +417,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<SecondaryStructure>(*ptr), true)
++        TEST_EQUAL(isKindOf<SecondaryStructure>(ptr), true)
+ 		SecondaryStructure*	f1 = castTo<SecondaryStructure>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countResidues(), 2)
+--- a/source/TEST/System_test.C
++++ b/source/TEST/System_test.C
+@@ -488,7 +488,7 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<System>(*ptr), true)
++        TEST_EQUAL(isKindOf<System>(ptr), true)
+ 		System*	f1 = castTo<System>(*ptr);
+ 		TEST_EQUAL(f1->getName(), "name1")
+ 		TEST_EQUAL(f1->countMolecules(), 1)
+--- a/source/TEST/TextPersistenceManager_test.C
++++ b/source/TEST/TextPersistenceManager_test.C
+@@ -51,7 +51,7 @@
+ 	PersistentObject* po = pm.readObject();
+ 	is.close();
+ 	TEST_NOT_EQUAL(po, 0)
+-	TEST_EQUAL(RTTI::isKindOf<Composite>(*po), true)
++    TEST_EQUAL(RTTI::isKindOf<Composite>(po), true)
+ 	delete po;
+ RESULT
+ 
+--- a/source/TEST/Vector2_test.C
++++ b/source/TEST/Vector2_test.C
+@@ -108,8 +108,8 @@
+ 	TEST_NOT_EQUAL(ptr, 0)
+ 	if (ptr != 0)
+ 	{
+-		TEST_EQUAL(isKindOf<Vector2>(*ptr), true)
+-		if (isKindOf<Vector2>(*ptr))
++        TEST_EQUAL(isKindOf<Vector2>(ptr), true)
++        if (isKindOf<Vector2>(ptr))
+ 		{
+ 			Vector2* v_ptr = castTo<Vector2>(*ptr);
+ 			TEST_REAL_EQUAL(v_ptr->x, 1.0)
+--- a/source/TEST/XDRPersistenceManager_test.C
++++ b/source/TEST/XDRPersistenceManager_test.C
+@@ -50,7 +50,7 @@
+ 	PersistentObject* po = pm.readObject();
+ 	is.close();
+ 	TEST_NOT_EQUAL(po, 0)
+-	TEST_EQUAL(RTTI::isKindOf<Composite>(*po), true)
++    TEST_EQUAL(RTTI::isKindOf<Composite>(po), true)
+ 	delete po;
+ RESULT
+ 
+@@ -64,7 +64,7 @@
+ 	PersistentObject* po = pm.readObject();
+ 	is.close();
+ 	TEST_NOT_EQUAL(po, 0)
+-	TEST_EQUAL(RTTI::isKindOf<Composite>(*po), true)
++    TEST_EQUAL(RTTI::isKindOf<Composite>(po), true)
+ 	// *po >> pm;
+ 	os.close();
+ 	delete po;
+@@ -436,11 +436,11 @@
+ 
+ 	PersistentObject* po =  0;
+ 	STATUS("Before readObject...")
+-	po = pm2.readObject();
+-	STATUS("After readObject...")
++    po = pm2.readObject();
++    STATUS("After readObject...")
+ 	is.close();
+-	TEST_EQUAL(RTTI::isKindOf<Bond>(*po), true)
+-	delete po;
++    TEST_EQUAL(RTTI::isKindOf<Bond>(po), true)
++    delete po;
+ RESULT
+ 	
+ 
+--- a/source/TUTORIAL/bounding_box.C
++++ b/source/TUTORIAL/bounding_box.C
+@@ -58,7 +58,7 @@
+ 
+ 	// if the bounding box is degenerated or if the root of the composite is no
+ 	// System, do not create a bounding box
+-	if (bbox_.a == bbox_.b || !RTTI::isKindOf<System>(*root))
++        if (bbox_.a == bbox_.b || !RTTI::isKindOf<System>(root))
+ 	{
+ 		return false;
+ 	}
+@@ -94,7 +94,7 @@
+ 	}
+ 
+ 	// if we do not encounter an atom, skip it
+-	if (!RTTI::isKindOf<Atom>(composite))
++        if (!RTTI::isKindOf<Atom>(&composite))
+ 	{
+ 		return Processor::CONTINUE;
+ 	}
+--- a/source/VIEW/DIALOGS/atomOverview.C
++++ b/source/VIEW/DIALOGS/atomOverview.C
+@@ -101,7 +101,7 @@
+ 
+ Processor::Result AtomOverview::OverviewProcessor::operator() (Composite& composite)
+ {
+-	if (RTTI::isKindOf<Atom>(composite))
++    if (RTTI::isKindOf<Atom>(&composite))
+ 	{
+ 		Atom* atom = dynamic_cast<Atom*>(&composite);
+ 		if (only_selection_ && !atom->isSelected()) return Processor::CONTINUE;
+@@ -247,7 +247,7 @@
+ 
+ Processor::Result AtomOverview::ApplyProcessor::operator() (Composite& composite)
+ {
+-	if (RTTI::isKindOf<Atom>(composite))
++    if (RTTI::isKindOf<Atom>(&composite))
+ 	{
+ 		Atom* atom = dynamic_cast<Atom*>(&composite);
+ 
+--- a/source/VIEW/DIALOGS/bondProperties.C
++++ b/source/VIEW/DIALOGS/bondProperties.C
+@@ -31,7 +31,7 @@
+ 	parent_ = parent;
+ 	String text;
+ 	if (atom_->getParent() != 0 &&
+-			RTTI::isKindOf<Residue>(*atom_->getParent()))
++            RTTI::isKindOf<Residue>(atom_->getParent()))
+ 	{
+ 		text = ((Residue*) atom_->getParent())->getID();
+ 	}
+@@ -68,7 +68,7 @@
+ 	String text;
+ 	Atom* partner = bond->getPartner(*atom_);
+ 	if (partner->getParent() != 0 &&
+-			RTTI::isKindOf<Residue>(*partner->getParent()))
++            RTTI::isKindOf<Residue>(partner->getParent()))
+ 	{
+ 		text = ((Residue*) partner->getParent())->getID();
+ 	}
+@@ -130,7 +130,7 @@
+ 
+ void BondProperties::focusAtom()
+ {
+-	if (!RTTI::isKindOf<MolecularControl>(*parent_) ||
++    if (!RTTI::isKindOf<MolecularControl>(parent_) ||
+ 			bond_box->currentIndex() == -1) 
+ 	{
+ 		return;
+@@ -148,7 +148,7 @@
+ 
+ void BondProperties::focusPartner()
+ {
+-	if (!RTTI::isKindOf<MolecularControl>(*parent_) ||
++    if (!RTTI::isKindOf<MolecularControl>(parent_) ||
+ 			bond_box->currentIndex() == -1) 
+ 	{
+ 		return;
+--- a/source/VIEW/DIALOGS/coloringSettingsDialog.C
++++ b/source/VIEW/DIALOGS/coloringSettingsDialog.C
+@@ -193,9 +193,9 @@
+ 
+ 		void ColoringSettingsDialog::applySettingsTo(ColorProcessor& cp) const
+ 		{
+-			if (RTTI::isKindOf<CustomColorProcessor>(cp)) return;
++            if (RTTI::isKindOf<CustomColorProcessor>(&cp)) return;
+ 
+-			if (RTTI::isKindOf<ElementColorProcessor>(cp))
++            if (RTTI::isKindOf<ElementColorProcessor>(&cp))
+ 			{
+ 				vector<ColorRGBA> colors = getColors(COLORING_ELEMENT);
+ 				for (Position p = 0; p < colors.size(); p++)
+@@ -205,7 +205,7 @@
+ 				return;
+ 			}
+ 			
+-			if (RTTI::isKindOf<ResidueNameColorProcessor>(cp))
++            if (RTTI::isKindOf<ResidueNameColorProcessor>(&cp))
+ 			{
+ 				for (Position p = 0; p < (Position)residue_table_->rowCount(); p++)
+ 				{
+@@ -215,7 +215,7 @@
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<ResidueNumberColorProcessor>(cp))
++            if (RTTI::isKindOf<ResidueNumberColorProcessor>(&cp))
+ 			{
+ 				ResidueNumberColorProcessor& dp = (*(ResidueNumberColorProcessor*)&cp);
+ 				dp.setFirstColor(first_residue_button->getColor());
+@@ -224,7 +224,7 @@
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<AtomChargeColorProcessor>(cp))
++            if (RTTI::isKindOf<AtomChargeColorProcessor>(&cp))
+ 			{
+ 				AtomChargeColorProcessor& dp = (*(AtomChargeColorProcessor*)&cp);
+ 				dp.getColors()[0] = negative_charge_button->getColor();
+@@ -233,7 +233,7 @@
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<AtomDistanceColorProcessor>(cp))
++            if (RTTI::isKindOf<AtomDistanceColorProcessor>(&cp))
+ 			{
+ 				AtomDistanceColorProcessor& dp = (*(AtomDistanceColorProcessor*)&cp);
+ 				dp.setNullDistanceColor(null_distance_button->getColor());
+@@ -243,7 +243,7 @@
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<OccupancyColorProcessor>(cp))
++            if (RTTI::isKindOf<OccupancyColorProcessor>(&cp))
+ 			{
+ 				OccupancyColorProcessor& dp = (*(OccupancyColorProcessor*)&cp);
+ 				dp.getColors()[0] = minimum_o_button->getColor();
+@@ -251,7 +251,7 @@
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<SecondaryStructureColorProcessor>(cp))
++            if (RTTI::isKindOf<SecondaryStructureColorProcessor>(&cp))
+ 			{
+ 				SecondaryStructureColorProcessor& dp = (*(SecondaryStructureColorProcessor*)&cp);
+ 
+@@ -263,7 +263,7 @@
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<TemperatureFactorColorProcessor>(cp))
++            if (RTTI::isKindOf<TemperatureFactorColorProcessor>(&cp))
+ 			{
+ 				TemperatureFactorColorProcessor& dp = (*(TemperatureFactorColorProcessor*)&cp);
+ 				dp.setMinColor(unassigned_tf_button->getColor());
+@@ -274,7 +274,7 @@
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<ForceColorProcessor>(cp))
++            if (RTTI::isKindOf<ForceColorProcessor>(&cp))
+ 			{
+ 				ForceColorProcessor& dp = (*(ForceColorProcessor*)&cp);
+ 				dp.getColors()[0] = force_min_color_button->getColor();
+@@ -284,7 +284,7 @@
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<ResidueTypeColorProcessor>(cp))
++            if (RTTI::isKindOf<ResidueTypeColorProcessor>(&cp))
+ 			{
+ 				ResidueTypeColorProcessor& dp = (*(ResidueTypeColorProcessor*)&cp);
+ 				dp.setBasicColor(basic_color_button->getColor());
+@@ -296,13 +296,13 @@
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<ChainColorProcessor>(cp))
++            if (RTTI::isKindOf<ChainColorProcessor>(&cp))
+ 			{
+ 				((ChainColorProcessor*)&cp)->setColors(getColors(COLORING_CHAIN));
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<MoleculeColorProcessor>(cp))
++            if (RTTI::isKindOf<MoleculeColorProcessor>(&cp))
+ 			{
+ 				((MoleculeColorProcessor*)&cp)->setColors(getColors(COLORING_MOLECULE));
+ 				return;
+@@ -414,19 +414,19 @@
+ 		void ColoringSettingsDialog::getSettings(const ColorProcessor& cp)
+ 		{
+ 
+-			if (RTTI::isKindOf<CustomColorProcessor>(cp))
++            if (RTTI::isKindOf<CustomColorProcessor>(&cp))
+ 			{
+ 			} else
+ 
+-			if (RTTI::isKindOf<ElementColorProcessor>(cp))
++            if (RTTI::isKindOf<ElementColorProcessor>(&cp))
+ 			{
+ 			} else
+ 			
+-			if (RTTI::isKindOf<ResidueNameColorProcessor>(cp))
++            if (RTTI::isKindOf<ResidueNameColorProcessor>(&cp))
+ 			{
+ 			} else
+ 
+-			if (RTTI::isKindOf<ResidueNumberColorProcessor>(cp))
++            if (RTTI::isKindOf<ResidueNumberColorProcessor>(&cp))
+ 			{
+ 				ResidueNumberColorProcessor& dp = (*(ResidueNumberColorProcessor*)&cp);
+ 				first_residue_button->setColor(dp.getFirstColor());
+@@ -434,7 +434,7 @@
+ 				last_residue_button->setColor(dp.getLastColor());
+ 			} else
+ 
+-			if (RTTI::isKindOf<AtomChargeColorProcessor>(cp))
++            if (RTTI::isKindOf<AtomChargeColorProcessor>(&cp))
+ 			{
+ 				AtomChargeColorProcessor& dp = (*(AtomChargeColorProcessor*)&cp);
+ 				negative_charge_button->setColor( dp.getColors()[0]);
+@@ -442,7 +442,7 @@
+ 				positive_charge_button->setColor( dp.getColors()[2]);
+ 			} else
+ 
+-			if (RTTI::isKindOf<AtomDistanceColorProcessor>(cp))
++            if (RTTI::isKindOf<AtomDistanceColorProcessor>(&cp))
+ 			{
+ 				AtomDistanceColorProcessor& dp = (*(AtomDistanceColorProcessor*)&cp);
+ 				null_distance_button->setColor( dp.getNullDistanceColor());
+@@ -451,14 +451,14 @@
+  				distance_show_selected->setChecked(dp.showSelected());
+ 			} else
+ 
+-			if (RTTI::isKindOf<OccupancyColorProcessor>(cp))
++            if (RTTI::isKindOf<OccupancyColorProcessor>(&cp))
+ 			{
+ 				OccupancyColorProcessor& dp = (*(OccupancyColorProcessor*)&cp);
+ 				minimum_o_button->setColor(dp.getColors()[0]);
+ 				maximum_o_button->setColor(dp.getColors()[1]);
+ 			} else
+ 
+-			if (RTTI::isKindOf<SecondaryStructureColorProcessor>(cp))
++            if (RTTI::isKindOf<SecondaryStructureColorProcessor>(&cp))
+ 			{
+ 				SecondaryStructureColorProcessor& dp = (*(SecondaryStructureColorProcessor*)&cp);
+ 				helix_color_button->setColor(dp.getHelixColor());
+@@ -467,7 +467,7 @@
+ 				turn_color_button->setColor(dp.getTurnColor());
+ 			} else
+ 
+-			if (RTTI::isKindOf<TemperatureFactorColorProcessor>(cp))
++            if (RTTI::isKindOf<TemperatureFactorColorProcessor>(&cp))
+ 			{
+ 				TemperatureFactorColorProcessor& dp = (*(TemperatureFactorColorProcessor*)&cp);
+ 				unassigned_tf_button->setColor( dp.getDefaultColor());
+@@ -476,7 +476,7 @@
+ 				max_tf_slider->setValue((Size)(dp.getMaxValue() * 10.0));
+ 			} else
+ 
+-			if (RTTI::isKindOf<ForceColorProcessor>(cp))
++            if (RTTI::isKindOf<ForceColorProcessor>(&cp))
+ 			{
+ 				ForceColorProcessor& dp = (*(ForceColorProcessor*)&cp);
+ 				force_min_color_button->setColor(dp.getColors()[0]);
+@@ -485,7 +485,7 @@
+ 				force_min_value_slider->setValue((Size)(dp.getMinValue() * 10.0));
+ 			} else
+ 
+-			if (RTTI::isKindOf<ResidueTypeColorProcessor>(cp))
++            if (RTTI::isKindOf<ResidueTypeColorProcessor>(&cp))
+ 			{
+  				ResidueTypeColorProcessor& dp = (*(ResidueTypeColorProcessor*)&cp);
+ 				acidic_color_button->setColor(dp.getAcidicColor());
+@@ -496,7 +496,7 @@
+ 				polar_color_button->setColor(dp.getPolarColor());
+ 			} else
+ 
+-			if (RTTI::isKindOf<ChainColorProcessor>(cp))
++            if (RTTI::isKindOf<ChainColorProcessor>(&cp))
+ 			{
+  				ChainColorProcessor& dp = (*(ChainColorProcessor*)&cp);
+ 				vector<String> 		names;
+@@ -512,7 +512,7 @@
+ 				chain_table_->setContent(names, colors);
+ 			} else
+ 
+-			if (RTTI::isKindOf<MoleculeColorProcessor>(cp))
++            if (RTTI::isKindOf<MoleculeColorProcessor>(&cp))
+ 			{
+  				MoleculeColorProcessor& dp = (*(MoleculeColorProcessor*)&cp);
+ 				vector<String> 		names;
+--- a/source/VIEW/DIALOGS/compositeProperties.C
++++ b/source/VIEW/DIALOGS/compositeProperties.C
+@@ -32,22 +32,22 @@
+ 	named->setPropertyManager(dynamic_cast<PropertyManager*>(composite));
+ 
+ 	setObjectName(name);
+-	if (RTTI::isKindOf<AtomContainer>(*composite))
++    if (RTTI::isKindOf<AtomContainer>(composite))
+ 	{
+ 		name_edit->setText(((AtomContainer*)composite)->getName().c_str());
+ 
+-		if (RTTI::isKindOf<Residue>(*composite))
++        if (RTTI::isKindOf<Residue>(composite))
+ 		{
+ 			id_edit->setText(((Residue*)composite)->getID().c_str());
+ 		}
+ 	}
+ 
+-	if (!RTTI::isKindOf<Residue>(*composite))
++    if (!RTTI::isKindOf<Residue>(composite))
+ 	{
+ 		residues_box->setEnabled(false);
+ 	}
+ 
+-	if (!RTTI::isKindOf<Atom>(*composite))
++    if (!RTTI::isKindOf<Atom>(composite))
+ 	{
+ 		atoms_box->setEnabled(false);
+ 		return;
+@@ -116,7 +116,7 @@
+ {
+ 	try
+ 	{
+-		if (RTTI::isKindOf<Atom>(*composite_))
++        if (RTTI::isKindOf<Atom>(composite_))
+ 		{
+ 			Atom* atom = (Atom*) composite_;
+ 			
+@@ -187,12 +187,12 @@
+ 		return;
+ 	}
+ 
+-	if (RTTI::isKindOf<AtomContainer>(*composite_))
++    if (RTTI::isKindOf<AtomContainer>(composite_))
+ 	{
+ 		((AtomContainer*)composite_)->setName(ascii(name_edit->text()));
+ 	}
+ 
+-	if (RTTI::isKindOf<Residue>(*composite_))
++    if (RTTI::isKindOf<Residue>(composite_))
+ 	{
+ 		Residue* residue = (Residue*) composite_;
+ 		residue->setID(ascii(id_edit->text()));
+--- a/source/VIEW/DIALOGS/displayProperties.C
++++ b/source/VIEW/DIALOGS/displayProperties.C
+@@ -318,7 +318,7 @@
+ 	Log.error() << "DisplayProperties::onNotify " << message << std::endl;
+ #endif
+ 	// new molecule => build graphical representation and notify scene
+-	if (RTTI::isKindOf<CompositeMessage>(*message))
++    if (RTTI::isKindOf<CompositeMessage>(message))
+ 	{
+ 		CompositeMessage *composite_message = RTTI::castTo<CompositeMessage>(*message);
+ 		if (!create_representations_for_new_molecules_ ||
+@@ -335,14 +335,14 @@
+ 		return;
+ 	}
+ 
+-	if (RTTI::isKindOf<ShowDisplayPropertiesMessage>(*message))
++    if (RTTI::isKindOf<ShowDisplayPropertiesMessage>(message))
+ 	{
+ 		checkMenu(*getMainControl());
+ 		show();
+ 		return;
+ 	}
+ 
+-	if (RTTI::isKindOf<RepresentationMessage>(*message))
++    if (RTTI::isKindOf<RepresentationMessage>(message))
+ 	{
+ 		switch (((RepresentationMessage*) message)->getType())
+ 		{
+@@ -378,20 +378,20 @@
+ 		return;
+ 	}
+ 
+-	if (RTTI::isKindOf<ControlSelectionMessage>(*message))
++    if (RTTI::isKindOf<ControlSelectionMessage>(message))
+ 	{
+ 		// disable apply button if selection is empty
+ 		createRepresentationMode();
+ 		return;
+ 	}
+ 
+-	if (RTTI::isKindOf<FinishedSimulationMessage>(*message))
++    if (RTTI::isKindOf<FinishedSimulationMessage>(message))
+ 	{
+ 		checkMenu(*getMainControl());
+ 		return;
+ 	}
+ 
+-	if (RTTI::isKindOf<CreateRepresentationMessage>(*message))
++    if (RTTI::isKindOf<CreateRepresentationMessage>(message))
+ 	{
+ 		CreateRepresentationMessage* crm = (CreateRepresentationMessage*) message;
+ 		if (crm->getComposites().size() == 0) return;
+--- a/source/VIEW/DIALOGS/exportGeometryDialog.C
++++ b/source/VIEW/DIALOGS/exportGeometryDialog.C
+@@ -234,12 +234,12 @@
+ 				// mesh (5) is the only real printable representation
+ 				//
+ 				// TODO: what about spheres, e.g.??
+-				if (! (	 RTTI::isKindOf<Box> (**git)
+-							 ||RTTI::isKindOf<Disc>(**git)
+-							 ||RTTI::isKindOf<GridVisualisation>(**git)
+-							 ||RTTI::isKindOf<Label>(**git)
+-							 ||RTTI::isKindOf<Mesh>(**git)
+-							 ||RTTI::isKindOf<SimpleBox>(**git)
++                if (! (	 RTTI::isKindOf<Box> (*git)
++                             ||RTTI::isKindOf<Disc>(*git)
++                             ||RTTI::isKindOf<GridVisualisation>(*git)
++                             ||RTTI::isKindOf<Label>(*git)
++                             ||RTTI::isKindOf<Mesh>(*git)
++                             ||RTTI::isKindOf<SimpleBox>(*git)
+ 							)
+ 					 )
+ 				{
+--- a/source/VIEW/DIALOGS/labelDialog.C
++++ b/source/VIEW/DIALOGS/labelDialog.C
+@@ -109,7 +109,7 @@
+ 			Log.error() << "LabelDialog " << this << " onNotify " << message << std::endl;
+ #endif
+ 			// selection => store last selection for later processing
+-			if (RTTI::isKindOf<ControlSelectionMessage>(*message))
++            if (RTTI::isKindOf<ControlSelectionMessage>(message))
+ 			{
+ 				ControlSelectionMessage* selection = RTTI::castTo<ControlSelectionMessage>(*message);
+ 				// disabled apply button, if selection is empty
+--- a/source/VIEW/DIALOGS/lightSettings.C
++++ b/source/VIEW/DIALOGS/lightSettings.C
+@@ -49,7 +49,7 @@
+ 	connect( relative, SIGNAL( clicked() ), this, SLOT( positionTypeChanged() ) );
+ 	connect (update_directly_checkBox, SIGNAL(stateChanged(int)), this, SLOT( updateDirectlyBoxChanged()));
+ 
+-	if (parent == 0 || !RTTI::isKindOf<Scene>(*parent)) 
++    if (parent == 0 || !RTTI::isKindOf<Scene>(parent))
+ 	{
+ 		Log.error() << "LightSettings dialog must be created with a Scene as parent!" << std::endl;
+ 		return;
+--- a/source/VIEW/DIALOGS/modelSettingsDialog.C
++++ b/source/VIEW/DIALOGS/modelSettingsDialog.C
+@@ -113,12 +113,12 @@
+ 
+ 		void ModelSettingsDialog::applySettingsTo(ModelProcessor& mp) const
+ 		{
+-			if (RTTI::isKindOf<AddLineModel>(mp))
++            if (RTTI::isKindOf<AddLineModel>(&mp))
+ 			{
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<AddBallAndStickModel>(mp))
++            if (RTTI::isKindOf<AddBallAndStickModel>(&mp))
+ 			{
+ 				AddBallAndStickModel& bsm = *((AddBallAndStickModel*)&mp);
+ 				if (bsm.isStickModel())
+@@ -134,19 +134,19 @@
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<AddSurfaceModel>(mp))
++            if (RTTI::isKindOf<AddSurfaceModel>(&mp))
+ 			{
+ 				((AddSurfaceModel*)&mp)->setProbeRadius(getSurfaceProbeRadius());
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<AddVanDerWaalsModel>(mp))
++            if (RTTI::isKindOf<AddVanDerWaalsModel>(&mp))
+ 			{
+ 				((AddVanDerWaalsModel*) &mp)->setVDWRadiusFactor(getVDWRadiusFactor());
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<AddCartoonModel>(mp))
++            if (RTTI::isKindOf<AddCartoonModel>(&mp))
+ 			{
+ 				AddCartoonModel& cm = *dynamic_cast<AddCartoonModel*>(&mp);
+ 				cm.setTubeRadius(getCartoonTubeRadius());
+@@ -163,19 +163,19 @@
+ 			}
+ 
+ 			// backbone model after cartoon model !!!
+-			if (RTTI::isKindOf<AddBackboneModel>(mp))
++            if (RTTI::isKindOf<AddBackboneModel>(&mp))
+ 			{
+ 				((AddBackboneModel*) &mp)->setTubeRadius(getTubeRadius());
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<HBondModelProcessor>(mp))
++            if (RTTI::isKindOf<HBondModelProcessor>(&mp))
+ 			{
+ 				((HBondModelProcessor*) &mp)->setRadius(getHBondsRadius());
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<ForceModel>(mp))
++            if (RTTI::isKindOf<ForceModel>(&mp))
+ 			{
+ 				((ForceModel*) &mp)->setMaxLength(getForceMaxLength());
+ 				((ForceModel*) &mp)->setScaling(getForceScaling());
+@@ -257,7 +257,7 @@
+ 
+ 		void ModelSettingsDialog::getSettings(const ModelProcessor& mp)
+ 		{
+-			if (RTTI::isKindOf<AddBallAndStickModel>(mp))
++            if (RTTI::isKindOf<AddBallAndStickModel>(&mp))
+ 			{
+ 				if (((AddBallAndStickModel*) &mp)->isStickModel())
+ 				{
+@@ -271,19 +271,19 @@
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<AddSurfaceModel>(mp))
++            if (RTTI::isKindOf<AddSurfaceModel>(&mp))
+ 			{
+ 				setSurfaceProbeRadius(((AddSurfaceModel*)&mp)->getProbeRadius());
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<AddVanDerWaalsModel>(mp))
++            if (RTTI::isKindOf<AddVanDerWaalsModel>(&mp))
+ 			{
+ 				setVDWRadiusFactor(((AddVanDerWaalsModel*) &mp)->getVDWRadiusFactor());
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<AddCartoonModel>(mp))
++            if (RTTI::isKindOf<AddCartoonModel>(&mp))
+ 			{
+ 				AddCartoonModel& cm = *(AddCartoonModel*)(&mp);
+ 				setCartoonTubeRadius(cm.getTubeRadius());
+@@ -301,19 +301,19 @@
+ 			}
+ 
+ 			// after derived class
+-			if (RTTI::isKindOf<AddBackboneModel>(mp))
++            if (RTTI::isKindOf<AddBackboneModel>(&mp))
+ 			{
+ 				setTubeRadius(((AddBackboneModel*) &mp)->getTubeRadius());
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<HBondModelProcessor>(mp))
++            if (RTTI::isKindOf<HBondModelProcessor>(&mp))
+ 			{
+ 				setHBondRadius(((HBondModelProcessor*) &mp)->getRadius());
+ 				return;
+ 			}
+ 					
+-			if (RTTI::isKindOf<ForceModel>(mp))
++            if (RTTI::isKindOf<ForceModel>(&mp))
+ 			{
+ 				setForceScaling(((ForceModel*) &mp)->getScaling());
+ 				setForceMaxLenght(((ForceModel*) &mp)->getMaxLength());
+--- a/source/VIEW/DIALOGS/modifyRepresentationDialog.C
++++ b/source/VIEW/DIALOGS/modifyRepresentationDialog.C
+@@ -310,7 +310,7 @@
+ 				// if the current representation is not already custom colored,
+ 				// change its coloring processor
+ 				if (   (rep_->getColorProcessor() == 0) 
+-						|| (!RTTI::isKindOf<CustomColorProcessor>(*(rep_->getColorProcessor()))))
++                        || (!RTTI::isKindOf<CustomColorProcessor>((rep_->getColorProcessor()))))
+ 				{
+ 					rep_->setColorProcessor(new CustomColorProcessor);
+ 					rep_->setColoringMethod(COLORING_CUSTOM);
+@@ -375,7 +375,7 @@
+ 		#ifdef BALL_VIEW_DEBUG
+ 			Log.error() << "ModifyRepresentationDialog " << this << " onNotify " << message << std::endl;
+ 		#endif
+-			if (RTTI::isKindOf<RepresentationMessage>(*message))
++            if (RTTI::isKindOf<RepresentationMessage>(message))
+ 			{
+ 				RepresentationMessage *rm = RTTI::castTo<RepresentationMessage>(*message);
+ 				Representation* rep = rm->getRepresentation();
+@@ -402,7 +402,7 @@
+ 				return;
+ 			}
+ 
+-			if (!RTTI::isKindOf<DatasetMessage>(*message)) return;
++            if (!RTTI::isKindOf<DatasetMessage>(message)) return;
+ 
+ 			DatasetMessage& dmsg = *(DatasetMessage*)(message);
+ 			if (!dmsg.isValid()) return;
+@@ -553,7 +553,7 @@
+ 			for (; git != rep_->getGeometricObjects().end(); ++git)
+ 			{
+ 				// get the original mesh
+-				if (!RTTI::isKindOf<Mesh>(**git)) continue;
++                if (!RTTI::isKindOf<Mesh>(*git)) continue;
+ 				Mesh& org_mesh = *dynamic_cast<Mesh*>(*git);
+ 
+ 				// copy all vertices and colors into a new mesh
+@@ -703,7 +703,7 @@
+ 			HashSet<const Composite*>::ConstIterator it = roots.begin();
+ 			for(; +it; it++)
+ 			{
+-				if (RTTI::isKindOf<AtomContainer>(**it))
++                if (RTTI::isKindOf<AtomContainer>(*it))
+ 				{
+ 					AtomConstIterator ait;
+ 					const AtomContainer* const acont = dynamic_cast<const AtomContainer*>(*it);
+@@ -714,7 +714,7 @@
+ 						if ((*ait).isSelected()) selected_atoms.push_back(&*ait);
+ 					}
+ 				}
+-				else if (RTTI::isKindOf<Atom>(**it))
++                else if (RTTI::isKindOf<Atom>(*it))
+ 				{
+ 					const Atom* atom = dynamic_cast<const Atom*> (*it);
+ 					all_atoms.push_back(atom);
+@@ -827,7 +827,7 @@
+ 			GeometricObjectList::iterator it = rep_->getGeometricObjects().begin();
+ 			for (; it != rep_->getGeometricObjects().end(); it++)
+ 			{
+-				if (!RTTI::isKindOf<Mesh> (**it)) continue;
++                if (!RTTI::isKindOf<Mesh> (*it)) continue;
+ 
+ 				Mesh* mesh = dynamic_cast<Mesh*> (*it);
+ 
+--- a/source/VIEW/DIALOGS/molecularFileDialog.C
++++ b/source/VIEW/DIALOGS/molecularFileDialog.C
+@@ -186,7 +186,7 @@
+ {
+ 	list<Composite*>& selection = getMainControl()->getMolecularControlSelection();
+ 
+-	if (selection.size() != 1 || !RTTI::isKindOf<System> (**selection.begin()))
++    if (selection.size() != 1 || !RTTI::isKindOf<System> (*selection.begin()))
+ 	{
+ 		setStatusbarText((String)tr("Not a single system selected! Aborting writing..."), true);
+ 		return false;
+@@ -722,7 +722,7 @@
+ 
+ void MolecularFileDialog::onNotify(Message *message)
+ {
+-	if (RTTI::isKindOf<ControlSelectionMessage>(*message)) 
++    if (RTTI::isKindOf<ControlSelectionMessage>(message))
+ 	{
+ 		checkMenu(*getMainControl());
+ 	}
+--- a/source/VIEW/DIALOGS/preferences.C
++++ b/source/VIEW/DIALOGS/preferences.C
+@@ -80,7 +80,7 @@
+ 
+ 		void Preferences::insertEntry(PreferencesEntry *child)
+ 		{
+-			if (!RTTI::isKindOf<QWidget>(*child)) 
++            if (!RTTI::isKindOf<QWidget>(child))
+ 			{
+ 				Log.error() << "PreferencesEntry not derived from QWidget in " 
+ 										<< __FILE__ << "  " << __LINE__<< std::endl;
+--- a/source/VIEW/KERNEL/MODES/editMode.C
++++ b/source/VIEW/KERNEL/MODES/editMode.C
+@@ -612,7 +612,7 @@
+ 
+ 				// prevent adding of atoms to a System:
+ 				// some forcefields will go havoc otherwise
+-				if (RTTI::isKindOf<System>(*ai))
++                if (RTTI::isKindOf<System>(ai))
+ 				{
+ 					System* system = (System*) ai;
+ 					Molecule* mol = system->getMolecule(0);
+@@ -795,7 +795,7 @@
+ 			residue->apply(tf);
+ 
+ 			AtomContainer* s = *containers.begin();
+-			if (RTTI::isKindOf<System>(*s))
++            if (RTTI::isKindOf<System>(s))
+ 			{
+ 				System* system = (System*) s;
+ 				Molecule* mol = system->getMolecule(0);
+@@ -922,7 +922,7 @@
+ 			// case 1: one system with exactly two atoms
+ 			if (selection.size() == 1)
+ 			{
+-				if (RTTI::isKindOf<AtomContainer>(**selection.begin()))
++                if (RTTI::isKindOf<AtomContainer>(*selection.begin()))
+ 				{
+ 					AtomContainer* ac = reinterpret_cast<AtomContainer*>(*selection.begin());
+ 					if (ac->countAtoms() == 2)
+@@ -962,7 +962,7 @@
+ 				HashSet<Composite*>::Iterator it = selection.begin();
+ 				for (; +it; ++it)
+ 				{
+-					if (RTTI::isKindOf<Atom>(**it))
++                    if (RTTI::isKindOf<Atom>(*it))
+ 					{
+ 						if (!first_atom)
+ 						{
+@@ -974,7 +974,7 @@
+ 						}
+ 					}
+ 					// case 3: a single atom in selected atomcontainer
+-					else if (RTTI::isKindOf<AtomContainer>(**it))
++                    else if (RTTI::isKindOf<AtomContainer>(*it))
+ 					{
+ 						AtomContainer* ac = reinterpret_cast<AtomContainer*>(*it);
+ 						if (ac->countAtoms() == 1)
+--- a/source/VIEW/KERNEL/mainControl.C
++++ b/source/VIEW/KERNEL/mainControl.C
+@@ -452,7 +452,7 @@
+ 
+ 			if (menu)
+ 			{
+-				if (!RTTI::isKindOf<QMenu>(*menu->parent()))
++                if (!RTTI::isKindOf<QMenu>(menu->parent()))
+ 				{
+ 					connect(menu, SIGNAL(aboutToShow()), this, SLOT(checkMenus()));
+ 				}
+@@ -758,7 +758,7 @@
+ 				Log.error() << "MainControl " << this << " onNotify " << message << std::endl;
+    		#endif
+ 
+-			if (RTTI::isKindOf<CompositeMessage>(*message))
++            if (RTTI::isKindOf<CompositeMessage>(message))
+ 			{
+ 				CompositeMessage* cmessage = RTTI::castTo<CompositeMessage>(*message);
+ 				switch(cmessage->getType())
+@@ -803,18 +803,18 @@
+ 						return;
+ 				}
+ 			}
+-			else if (RTTI::isKindOf<ControlSelectionMessage> (*message))
++            else if (RTTI::isKindOf<ControlSelectionMessage> (message))
+ 			{
+ 				ControlSelectionMessage* selection_message = RTTI::castTo<ControlSelectionMessage>(*message);
+ 				control_selection_ = selection_message->getSelection();
+ 			}
+-			else if (RTTI::isKindOf<GeometricObjectSelectionMessage>(*message))
++            else if (RTTI::isKindOf<GeometricObjectSelectionMessage>(message))
+ 			{
+ 				GeometricObjectSelectionMessage* selection_message = 
+ 					RTTI::castTo<GeometricObjectSelectionMessage>(*message);
+ 				selectComposites_(*selection_message);
+ 			}
+-			else if (RTTI::isKindOf<RepresentationMessage>(*message))
++            else if (RTTI::isKindOf<RepresentationMessage>(message))
+ 			{
+ 				RepresentationMessage* msg = RTTI::castTo<RepresentationMessage>(*message);
+ 				Representation* rep = msg->getRepresentation();
+@@ -836,7 +836,7 @@
+ 						break;
+ 				}	
+ 			}
+-			else if (RTTI::isKindOf<FinishedSimulationMessage>(*message))
++            else if (RTTI::isKindOf<FinishedSimulationMessage>(message))
+ 			{
+ 				stopedSimulation_();
+ 			}
+@@ -1203,7 +1203,7 @@
+ 			Size nr_of_atoms = 0;
+ 			HashSet<Composite*>::Iterator it = selection_.begin();
+ 			while (it != selection_.end() && 
+-						 RTTI::isKindOf<Atom>(**it) && 
++                         RTTI::isKindOf<Atom>(*it) &&
+ 						 nr_of_atoms < 5)
+ 			{
+ 				atoms[nr_of_atoms] = dynamic_cast<Atom*>(*it);
+@@ -1656,7 +1656,7 @@
+ 			list<ModularWidget*>::iterator it = modular_widgets_.begin();
+ 			for (; it != modular_widgets_.end(); ++it)
+ 			{
+-				if (RTTI::isKindOf<GenericControl>(**it))
++                if (RTTI::isKindOf<GenericControl>(*it))
+ 				{
+ 					(dynamic_cast<GenericControl*>(*it))->deleteCurrentItems();
+ 				}
+@@ -1910,7 +1910,7 @@
+ 		CompositeManager::CompositeIterator cit = getCompositeManager().begin();
+ 		for (; cit != getCompositeManager().end(); cit++)
+ 		{
+-			if (!RTTI::isKindOf<System>(**cit)) continue;
++            if (!RTTI::isKindOf<System>(*cit)) continue;
+ 
+ 			if (!binary)
+ 			{
+@@ -2008,7 +2008,7 @@
+ 		while (file.good() && !file.eof() && current_composite < nr_composites)
+ 		{
+ 			PersistentObject* po = pm->readObject();
+-			if (!RTTI::isKindOf<System>(*po))
++            if (!RTTI::isKindOf<System>(po))
+ 			{
+ 				setStatusbarText((String)tr("Error while reading project file, could not read molecule."), true);
+ 				if (has_dp)	DisplayProperties::getInstance(0)->enableCreationForNewMolecules(true);
+--- a/source/VIEW/KERNEL/modularWidget.C
++++ b/source/VIEW/KERNEL/modularWidget.C
+@@ -59,7 +59,7 @@
+ 
+ 			if (!mwidget) throw(Exception::NullPointer(__FILE__, __LINE__));
+ 
+-			if (!RTTI::isKindOf<QObject>(*mwidget)) 
++            if (!RTTI::isKindOf<QObject>(mwidget))
+ 			{
+ 				Log.error() << "ModularWidget::ModularWidget: widget " 
+ 										<< mwidget << " is not " 
+@@ -165,7 +165,7 @@
+ 
+ 			ConnectionObject* root = (const_cast<ModularWidget*>(this))->getRoot();
+ 
+-			if (!RTTI::isKindOf<MainControl>(*root)) return VIEW::getMainControl();
++            if (!RTTI::isKindOf<MainControl>(root)) return VIEW::getMainControl();
+ 
+ 			return (dynamic_cast<MainControl*>(root));
+ 		}
+--- a/source/VIEW/KERNEL/preferencesEntry.C
++++ b/source/VIEW/KERNEL/preferencesEntry.C
+@@ -80,15 +80,15 @@
+ 
+ 		bool PreferencesEntry::isSupported_(QObject& widget)
+ 		{
+-			if (RTTI::isKindOf<PreferencesObject>(widget) ||
+-					RTTI::isKindOf<ExtendedPreferencesObject>(widget) ||
+-					RTTI::isKindOf<QSlider>(widget)   ||
+-					RTTI::isKindOf<QSpinBox>(widget)  ||
+-					RTTI::isKindOf<QLineEdit>(widget) ||
+-					RTTI::isKindOf<QCheckBox>(widget) ||
+-					RTTI::isKindOf<QComboBox>(widget) ||
+-					RTTI::isKindOf<QButtonGroup>(widget) ||
+-					RTTI::isKindOf<ColorButton>(widget))
++            if (RTTI::isKindOf<PreferencesObject>(&widget) ||
++                    RTTI::isKindOf<ExtendedPreferencesObject>(&widget) ||
++                    RTTI::isKindOf<QSlider>(&widget)   ||
++                    RTTI::isKindOf<QSpinBox>(&widget)  ||
++                    RTTI::isKindOf<QLineEdit>(&widget) ||
++                    RTTI::isKindOf<QCheckBox>(&widget) ||
++                    RTTI::isKindOf<QComboBox>(&widget) ||
++                    RTTI::isKindOf<QButtonGroup>(&widget) ||
++                    RTTI::isKindOf<ColorButton>(&widget))
+ 			{
+ 				return true;
+ 			}
+@@ -175,7 +175,7 @@
+ 					BALLVIEW_DEBUG;
+ 				}
+ 			}
+-			else if (RTTI::isKindOf<PreferencesObject>(*widget))
++            else if (RTTI::isKindOf<PreferencesObject>(widget))
+ 			{
+ 				value = "";
+ 				const PreferencesObject* epo = dynamic_cast<const PreferencesObject*>(widget);
+@@ -184,31 +184,31 @@
+ 					BALLVIEW_DEBUG;
+ 				}
+ 			}
+-			else if (RTTI::isKindOf<QSlider>(*widget))
++            else if (RTTI::isKindOf<QSlider>(widget))
+ 			{
+ 				value = String((dynamic_cast<const QSlider*>(widget))->value());
+ 			}
+-			else if (RTTI::isKindOf<QSpinBox>(*widget))
++            else if (RTTI::isKindOf<QSpinBox>(widget))
+ 			{
+ 				value = String((dynamic_cast<const QSpinBox*>(widget))->value());
+ 			}
+-			else if (RTTI::isKindOf<QLabel>(*widget))
++            else if (RTTI::isKindOf<QLabel>(widget))
+ 			{
+ 				value = getColor(dynamic_cast<const QLabel*>(widget));
+ 			}
+-			else if (RTTI::isKindOf<QLineEdit>(*widget))
++            else if (RTTI::isKindOf<QLineEdit>(widget))
+ 			{
+ 				value = ascii((dynamic_cast<const QLineEdit*>(widget))->text());
+ 			}
+-			else if (RTTI::isKindOf<QCheckBox>(*widget))
++            else if (RTTI::isKindOf<QCheckBox>(widget))
+ 			{
+ 				value = String((dynamic_cast<const QCheckBox*>(widget))->isChecked());
+ 			}
+-			else if (RTTI::isKindOf<QComboBox>(*widget))
++            else if (RTTI::isKindOf<QComboBox>(widget))
+ 			{
+ 				value = String((dynamic_cast<const QComboBox*>(widget))->currentIndex());
+ 			}
+-			else if (RTTI::isKindOf<QButtonGroup>(*widget))
++            else if (RTTI::isKindOf<QButtonGroup>(widget))
+ 			{
+ 				const QButtonGroup* qbg = dynamic_cast<const QButtonGroup*>(widget);
+ 
+@@ -221,7 +221,7 @@
+ 
+ 				value = String(qbg->checkedId());
+ 			}
+-			else if (RTTI::isKindOf<QGroupBox>(*widget))
++            else if (RTTI::isKindOf<QGroupBox>(widget))
+ 			{
+ 				value.clear();
+ 				// QGroupBoxes can either be checkable and/or have QRadioButtons as childs
+@@ -248,7 +248,7 @@
+ 										<< " in PreferencesEntry without QRadioButton" << std::endl;
+ 				return false;
+ 			}
+-			else if (RTTI::isKindOf<ColorButton>(*widget))
++            else if (RTTI::isKindOf<ColorButton>(widget))
+ 			{
+ 				const ColorButton* button = static_cast<const ColorButton*>(widget);
+ 				value = String(button->getColor().name());
+@@ -293,43 +293,43 @@
+ 						BALLVIEW_DEBUG;
+ 					}
+ 				}
+-				else if (RTTI::isKindOf<PreferencesObject>(*widget))
++                else if (RTTI::isKindOf<PreferencesObject>(widget))
+ 				{
+ 					if (!(dynamic_cast<PreferencesObject*>(widget))->setValue(value))
+ 					{
+ 						BALLVIEW_DEBUG;
+ 					}
+ 				}
+-				else if (RTTI::isKindOf<QSlider>(*widget))
++                else if (RTTI::isKindOf<QSlider>(widget))
+ 				{
+ 					(dynamic_cast<QSlider*>(widget))->setValue(value.toInt());
+ 				}
+-				else if (RTTI::isKindOf<QSpinBox>(*widget))
++                else if (RTTI::isKindOf<QSpinBox>(widget))
+ 				{
+ 					(dynamic_cast<QSpinBox*>(widget))->setValue(value.toInt());
+ 				}
+-				else if (RTTI::isKindOf<QLabel>(*widget))
++                else if (RTTI::isKindOf<QLabel>(widget))
+ 				{
+ 					setColor(dynamic_cast<QLabel*>(widget), ColorRGBA(value));
+ 				}
+-				else if (RTTI::isKindOf<QLineEdit>(*widget))
++                else if (RTTI::isKindOf<QLineEdit>(widget))
+ 				{
+ 					(dynamic_cast<QLineEdit*>(widget))->setText(value.c_str());
+ 				}
+-				else if (RTTI::isKindOf<QCheckBox>(*widget))
++                else if (RTTI::isKindOf<QCheckBox>(widget))
+ 				{
+ 					(dynamic_cast<QCheckBox*>(widget))->setChecked(value == "1");
+ 				}
+-				else if (RTTI::isKindOf<QComboBox>(*widget))
++                else if (RTTI::isKindOf<QComboBox>(widget))
+ 				{
+ 					if (value.toUnsignedInt() >= (Position)(dynamic_cast<QComboBox*>(widget))->count()) return false;
+ 					(dynamic_cast<QComboBox*>(widget))->setCurrentIndex(value.toInt());
+ 				}
+-				else if (RTTI::isKindOf<QButtonGroup>(*widget))
++                else if (RTTI::isKindOf<QButtonGroup>(widget))
+ 				{
+ 					(dynamic_cast<QButtonGroup*>(widget))->button(value.toInt())->setChecked(true);
+ 				}
+-				else if (RTTI::isKindOf<QGroupBox>(*widget))
++                else if (RTTI::isKindOf<QGroupBox>(widget))
+ 				{
+ 					QGroupBox* gb = dynamic_cast<QGroupBox*> (widget);
+ 					String v = value;
+@@ -354,7 +354,7 @@
+ 						return false;
+ 					}
+ 				}
+-				else if(RTTI::isKindOf<ColorButton>(*widget))
++                else if(RTTI::isKindOf<ColorButton>(widget))
+ 				{
+ 					ColorButton* button = static_cast<ColorButton*>(widget);
+ 					button->setColor(QColor(value.c_str()));
+--- a/source/VIEW/KERNEL/representation.C
++++ b/source/VIEW/KERNEL/representation.C
+@@ -418,7 +418,7 @@
+ 				Size triangles = 0;
+ 				for (;it != getGeometricObjects().end(); it++)
+ 				{
+-					if (RTTI::isKindOf<Mesh>(**it))
++                    if (RTTI::isKindOf<Mesh>(*it))
+ 					{ 
+ 						triangles += dynamic_cast<Mesh*>(*it)->triangle.size();
+ 					}
+@@ -664,7 +664,7 @@
+ 			const Composite* c_ptr = *getComposites().begin();
+ 
+ 			String composite_name;
+-			if (RTTI::isKindOf<Atom>(*c_ptr))
++            if (RTTI::isKindOf<Atom>(c_ptr))
+ 			{
+ 				if (c_ptr->getParent() != 0)
+ 				{
+@@ -712,7 +712,7 @@
+ 			Vector3 v1, v2;
+ 			for (; it != getGeometricObjects().end(); it++)
+ 			{
+-				if (RTTI::isKindOf<Vertex>(**it))
++                if (RTTI::isKindOf<Vertex>(*it))
+ 				{
+ 					Vertex* v = dynamic_cast<Vertex*>(*it);
+ 					v1 = v->getVertex();
+@@ -720,7 +720,7 @@
+ 					v->setVertex(v1);
+ 				}
+ 
+-				if (RTTI::isKindOf<Vertex2>(**it))
++                if (RTTI::isKindOf<Vertex2>(*it))
+ 				{
+ 					Vertex2* v = dynamic_cast<Vertex2*>(*it);
+ 					v1 = v->getVertex1();
+@@ -731,7 +731,7 @@
+ 					v->setVertex2(v2);
+ 				}
+ 
+-				if (RTTI::isKindOf<Sphere>(**it))
++                if (RTTI::isKindOf<Sphere>(*it))
+ 				{
+ 					Sphere* v = dynamic_cast<Sphere*>(*it);
+ 					v1 = v->getPosition();
+--- a/source/VIEW/MODELS/HBondModel.C
++++ b/source/VIEW/MODELS/HBondModel.C
+@@ -56,7 +56,7 @@
+ 				
+ 		Processor::Result HBondModelProcessor::operator() (Composite& composite)
+ 		{
+-			if (!RTTI::isKindOf<Atom>(composite))
++            if (!RTTI::isKindOf<Atom>(&composite))
+ 			{
+ 				return Processor::CONTINUE;
+ 			}
+--- a/source/VIEW/MODELS/colorProcessor.C
++++ b/source/VIEW/MODELS/colorProcessor.C
+@@ -224,7 +224,7 @@
+ 				list<const Composite*>::const_iterator it = composites_->begin();
+ 				for(; it != composites_->end(); it++)
+ 				{
+-					if (RTTI::isKindOf<AtomContainer>(**it))
++                    if (RTTI::isKindOf<AtomContainer>(*it))
+ 					{
+ 						AtomConstIterator ait;
+ 						const AtomContainer* const acont = dynamic_cast<const AtomContainer*>(*it);
+@@ -233,7 +233,7 @@
+ 							atoms.push_back(&*ait);
+ 						}
+ 					}
+-					else if (RTTI::isKindOf<Atom>(**it))
++                    else if (RTTI::isKindOf<Atom>(*it))
+ 					{
+ 						const Atom* atom = dynamic_cast<const Atom*> (*it);
+ 						atoms.push_back(atom);
+@@ -243,7 +243,7 @@
+ 			else 
+ 			{
+ 				// composite from mesh
+-				if (RTTI::isKindOf<AtomContainer>(*from_mesh))
++                if (RTTI::isKindOf<AtomContainer>(from_mesh))
+ 				{
+ 					AtomConstIterator ait;
+ 					const AtomContainer* const acont = dynamic_cast<const AtomContainer*>(from_mesh);
+@@ -252,7 +252,7 @@
+ 						atoms.push_back(&*ait);
+ 					}
+ 				}
+-				else if (RTTI::isKindOf<Atom>(*from_mesh))
++                else if (RTTI::isKindOf<Atom>(from_mesh))
+ 				{
+ 					const Atom* atom = dynamic_cast<const Atom*> (from_mesh);
+ 					atoms.push_back(atom);
+--- a/source/VIEW/MODELS/labelModel.C
++++ b/source/VIEW/MODELS/labelModel.C
+@@ -47,7 +47,7 @@
+ 		{
+ 			if (mode_ == ONE_LABEL)
+ 			{
+-				if (RTTI::isKindOf<Atom>(composite)) 
++                if (RTTI::isKindOf<Atom>(&composite))
+ 				{
+ 					center_ += (dynamic_cast<Atom*>(&composite))->getPosition();
+ 					nr_objects_ ++;
+@@ -66,11 +66,11 @@
+ 			}
+ 			else if (mode_ == ALL_ATOMS)
+ 			{
+-				do_it = RTTI::isKindOf<Atom>(composite);
++                do_it = RTTI::isKindOf<Atom>(&composite);
+ 			}
+ 			else if (mode_ == ALL_RESIDUES)
+ 			{
+-				do_it = RTTI::isKindOf<Residue>(composite);
++                do_it = RTTI::isKindOf<Residue>(&composite);
+ 			}
+ 
+ 			if (!do_it) return Processor::CONTINUE;
+--- a/source/VIEW/MODELS/lineModel.C
++++ b/source/VIEW/MODELS/lineModel.C
+@@ -36,7 +36,7 @@
+ 
+ 		Processor::Result AddLineModel::operator() (Composite &composite)
+ 		{
+-			if (!RTTI::isKindOf<Atom>(composite))
++            if (!RTTI::isKindOf<Atom>(&composite))
+ 			{
+ 				return Processor::CONTINUE;
+ 			}
+--- a/source/VIEW/MODELS/standardColorProcessor.C
++++ b/source/VIEW/MODELS/standardColorProcessor.C
+@@ -256,7 +256,7 @@
+ 
+ 		bool ResidueNameColorProcessor::canUseMeshShortcut_(const Composite& composite)
+ 		{
+-			return RTTI::isKindOf<Residue>(composite);
++            return RTTI::isKindOf<Residue>(&composite);
+ 		}
+ 
+ 		void ResidueNameColorProcessor::getColor(const Composite& composite, ColorRGBA& color_to_be_set)
+@@ -294,7 +294,7 @@
+ 
+ 		bool ResidueNumberColorProcessor::canUseMeshShortcut_(const Composite& composite)
+ 		{
+-			return RTTI::isKindOf<Residue>(composite);
++            return RTTI::isKindOf<Residue>(&composite);
+ 		}
+ 
+ 		void ResidueNumberColorProcessor::getColor(const Composite& composite, ColorRGBA& color_to_be_set)
+@@ -338,23 +338,23 @@
+ 			ResidueIterator res_it;
+ 			for(; it != composites_->end(); it++)
+ 			{
+-				if (RTTI::isKindOf<System>(**it))
++                if (RTTI::isKindOf<System>(*it))
+ 				{
+ 					res_it = ((System*)*it)->beginResidue();
+ 				}
+-				else if (RTTI::isKindOf<Protein>(**it))
++                else if (RTTI::isKindOf<Protein>(*it))
+ 				{
+ 					res_it = ((Protein*)*it)->beginResidue();
+ 				}
+-				else if (RTTI::isKindOf<Chain>(**it))
++                else if (RTTI::isKindOf<Chain>(*it))
+ 				{
+ 					res_it = ((Chain*)*it)->beginResidue();
+ 				}
+-				else if (RTTI::isKindOf<SecondaryStructure>(**it))
++                else if (RTTI::isKindOf<SecondaryStructure>(*it))
+ 				{
+ 					res_it = ((SecondaryStructure*)*it)->beginResidue();
+ 				}
+-				else if (RTTI::isKindOf<Atom>(**it))
++                else if (RTTI::isKindOf<Atom>(*it))
+ 				{
+ 					const Residue* residue = dynamic_cast<const Residue*>((**it).getParent());
+ 					if (residue == 0) continue;
+@@ -650,7 +650,7 @@
+ 
+ 		Processor::Result AtomDistanceColorProcessor::operator() (GeometricObject*& object)
+ 		{
+-			if (RTTI::isKindOf<Mesh>(*object))
++            if (RTTI::isKindOf<Mesh>(object))
+ 			{
+ 				if (last_composite_of_grid_ == 0)
+ 				{ 
+@@ -659,7 +659,7 @@
+ 				list<const Composite*>::const_iterator it = composites_->begin();
+ 				for(; it != composites_->end(); it++)
+ 				{
+-					if (RTTI::isKindOf<AtomContainer>(**it))
++                    if (RTTI::isKindOf<AtomContainer>(*it))
+ 					{
+ 						AtomIterator ait;
+ 						AtomContainer* acont = (AtomContainer*)(*it);
+@@ -668,7 +668,7 @@
+ 							addAtom(*ait);
+ 						}
+ 					}
+-					else if (RTTI::isKindOf<Atom>(**it))
++                    else if (RTTI::isKindOf<Atom>(*it))
+ 					{
+ 						addAtom(*dynamic_cast<const Atom*> (*it));
+ 					}
+@@ -680,15 +680,15 @@
+ 			}
+ 
+ 			if (object->getComposite() == 0 ||
+-					(!RTTI::isKindOf<Atom>(*object->getComposite()) &&
+-					 !RTTI::isKindOf<Bond>(*object->getComposite())))
++                    (!RTTI::isKindOf<Atom>(object->getComposite()) &&
++                     !RTTI::isKindOf<Bond>(object->getComposite())))
+ 			{
+ 				return ColorProcessor::operator () (object);
+ 			}
+ 
+ 			list_.push_back(object);
+ 
+-			if (RTTI::isKindOf<Bond>(*object->getComposite()))
++            if (RTTI::isKindOf<Bond>(object->getComposite()))
+ 			{
+ 				addAtom(*dynamic_cast<const Bond*>(object->getComposite())->getFirstAtom());
+ 				addAtom(*dynamic_cast<const Bond*>(object->getComposite())->getSecondAtom());
+@@ -836,7 +836,7 @@
+ 
+ 		bool SecondaryStructureColorProcessor::canUseMeshShortcut_(const Composite& composite)
+ 		{
+-			return RTTI::isKindOf<SecondaryStructure>(composite) ||
++            return RTTI::isKindOf<SecondaryStructure>(&composite) ||
+ 				     composite.getAncestor(dummy_ss_) != 0;
+ 		}
+ 
+@@ -941,7 +941,7 @@
+ 
+ 		bool ResidueTypeColorProcessor::canUseMeshShortcut_(const Composite& composite)
+ 		{
+-			return RTTI::isKindOf<Residue>(composite);
++            return RTTI::isKindOf<Residue>(&composite);
+ 		}
+ 
+ 		void ResidueTypeColorProcessor::getColor(const Composite& composite, ColorRGBA& color_to_be_set)
+@@ -1172,7 +1172,7 @@
+ 
+ 		bool ChainColorProcessor::canUseMeshShortcut_(const Composite& composite)
+ 		{
+-			return RTTI::isKindOf<Chain>(composite) ||
++            return RTTI::isKindOf<Chain>(&composite) ||
+ 						 composite.getAncestor(dummy_chain_) != 0;
+ 		}
+ 
+@@ -1186,7 +1186,7 @@
+ 
+ 		bool MoleculeColorProcessor::canUseMeshShortcut_(const Composite& composite)
+ 		{
+-			return RTTI::isKindOf<Molecule>(composite) ||
++            return RTTI::isKindOf<Molecule>(&composite) ||
+ 						 composite.getAncestor(dummy_molecule_) != 0;
+ 		}
+ 
+--- a/source/VIEW/MODELS/surfaceModel.C
++++ b/source/VIEW/MODELS/surfaceModel.C
+@@ -48,7 +48,7 @@
+ 				
+ 		Processor::Result AddSurfaceModel::operator () (Composite& composite)
+ 		{
+-			if (RTTI::isKindOf<AtomContainer>(composite)) 
++            if (RTTI::isKindOf<AtomContainer>(&composite))
+ 			{
+ 				AtomIterator it;
+ 				BALL_FOREACH_ATOM(*(AtomContainer*) &composite, it)
+@@ -58,7 +58,7 @@
+ 				return Processor::CONTINUE;
+ 			}
+ 			
+-			if (!RTTI::isKindOf<Atom>(composite)) return Processor::CONTINUE;
++            if (!RTTI::isKindOf<Atom>(&composite)) return Processor::CONTINUE;
+ 
+ 			atoms_.insert((Atom*) &composite);
+ 
+--- a/source/VIEW/MODELS/vanDerWaalsModel.C
++++ b/source/VIEW/MODELS/vanDerWaalsModel.C
+@@ -38,7 +38,7 @@
+ 
+ 		Processor::Result AddVanDerWaalsModel::operator() (Composite &composite)
+ 		{
+-			if (!RTTI::isKindOf<Atom>(composite))
++            if (!RTTI::isKindOf<Atom>(&composite))
+ 			{
+ 				return Processor::CONTINUE;
+ 			}
+--- a/source/VIEW/RENDERING/RENDERERS/POVRenderer.C
++++ b/source/VIEW/RENDERING/RENDERERS/POVRenderer.C
+@@ -71,7 +71,7 @@
+ 
+ 		void POVRenderer::clear()
+ 		{
+-			if (outfile_ != 0 && RTTI::isKindOf<File>(*outfile_))
++            if (outfile_ != 0 && RTTI::isKindOf<File>(outfile_))
+ 			{
+ 				delete outfile_;
+ 			}
+@@ -87,7 +87,7 @@
+ 		void POVRenderer::setFileName(const String& name)
+ 			throw(Exception::FileNotFound)
+ 		{
+-			if (outfile_ == 0 || !RTTI::isKindOf<File>(*outfile_)) 
++            if (outfile_ == 0 || !RTTI::isKindOf<File>(outfile_))
+ 			{
+ 				outfile_ = new File();
+ 			}
+@@ -96,7 +96,7 @@
+ 
+ 		void POVRenderer::setOstream(std::ostream& out_stream)
+ 		{
+-			if (outfile_ != 0 && RTTI::isKindOf<File>(*outfile_)) 
++            if (outfile_ != 0 && RTTI::isKindOf<File>(outfile_))
+ 			{
+ 				delete outfile_;
+ 			}
+@@ -191,7 +191,7 @@
+ 				    << "// To render this scene, call povray (available from www.povray.org)"
+ 					  << " like this:\n//" << endl;
+ 
+-				if (outfile_ != 0 && RTTI::isKindOf<File>(*outfile_))
++                if (outfile_ != 0 && RTTI::isKindOf<File>(outfile_))
+ 				{
+ 					// Add a command line with the correct options to call POVRay to the header
+ 					// so we can just copy&paste this to render this file.
+@@ -513,7 +513,7 @@
+ 			} // all Representations
+ 
+ 
+-			if (outfile_ != 0 && RTTI::isKindOf<File>(*outfile_))
++            if (outfile_ != 0 && RTTI::isKindOf<File>(outfile_))
+ 			{
+ 				(*(File*)outfile_).close();
+ 			}
+--- a/source/VIEW/RENDERING/RENDERERS/XML3DRenderer.C
++++ b/source/VIEW/RENDERING/RENDERERS/XML3DRenderer.C
+@@ -79,7 +79,7 @@
+ 
+ 		void XML3DRenderer::clear()
+ 		{
+-			if (outfile_ != 0 && RTTI::isKindOf<File>(*outfile_))
++            if (outfile_ != 0 && RTTI::isKindOf<File>(outfile_))
+ 			{
+ 				delete outfile_;
+ 			}
+@@ -121,7 +121,7 @@
+ 			throw(Exception::FileNotFound)
+ 		{
+ 			create_XHTML_ = true;
+-			if (outfile_ == 0 || !RTTI::isKindOf<File>(*outfile_)) 
++            if (outfile_ == 0 || !RTTI::isKindOf<File>(outfile_))
+ 			{
+ 				outfile_ = new File();
+ 			}
+@@ -131,7 +131,7 @@
+ 		void XML3DRenderer::setOstream(std::ostream& out_stream)
+ 		{
+ 			create_XHTML_ = false;
+-			if (outfile_ != 0 && RTTI::isKindOf<File>(*outfile_)) 
++            if (outfile_ != 0 && RTTI::isKindOf<File>(outfile_))
+ 			{
+ 				delete outfile_;
+ 			}
+@@ -481,7 +481,7 @@
+ 			
+ 			if (create_XHTML_) {createXHTMLFooter();};	
+ 
+-			if (outfile_ != 0 && RTTI::isKindOf<File>(*outfile_))
++            if (outfile_ != 0 && RTTI::isKindOf<File>(outfile_))
+ 			{
+ 				(*(File*)outfile_).close();
+ 			}
+--- a/source/VIEW/RENDERING/RENDERERS/renderer.C
++++ b/source/VIEW/RENDERING/RENDERERS/renderer.C
+@@ -89,20 +89,20 @@
+ 		void Renderer::render_(const GeometricObject* object)
+ 		{
+ 			// most used geometric objects first
+-			if 			(RTTI::isKindOf<Sphere>(*object))  				renderSphere_(*(const 								Sphere*) object);
+-			else if (RTTI::isKindOf<TwoColoredTube>(*object)) renderTwoColoredTube_(*(const TwoColoredTube*) object);
+-			else if (RTTI::isKindOf<Mesh>(*object))   				renderMesh_(*(const   									Mesh*) object);
+-			else if (RTTI::isKindOf<TwoColoredLine>(*object)) renderTwoColoredLine_(*(const TwoColoredLine*) object);
+-			else if (RTTI::isKindOf<Point>(*object))  	 			renderPoint_(*(const  								 Point*) object);
+-			else if (RTTI::isKindOf<Disc>(*object))   				renderDisc_(*(const   									Disc*) object);
+-			else if (RTTI::isKindOf<Line>(*object))  	 				renderLine_(*(const   									Line*) object);
+-			else if (RTTI::isKindOf<Tube>(*object))  	 				renderTube_(*(const   									Tube*) object);
+-			else if (RTTI::isKindOf<Box>(*object))  					renderBox_(*(const   		 			 					 Box*) object);
+-			else if (RTTI::isKindOf<SimpleBox>(*object))  		renderSimpleBox_(*(const   		 		 SimpleBox*) object);
+-			else if (RTTI::isKindOf<Label>(*object))  	 			renderLabel_(*(const   				 				 Label*) object);
+-			else if (RTTI::isKindOf<MultiLine>(*object)) renderMultiLine_(*(const MultiLine*) object);
+-			else if (RTTI::isKindOf<GridVisualisation>(*object)) 	renderGridVisualisation_(*(const  GridVisualisation*) object);
+-			else if (RTTI::isKindOf<QuadMesh>(*object))   		 renderQuadMesh_(*(const   						QuadMesh*) object);
++            if 			(RTTI::isKindOf<Sphere>(object))  				renderSphere_(*(const 								Sphere*) object);
++            else if (RTTI::isKindOf<TwoColoredTube>(object)) renderTwoColoredTube_(*(const TwoColoredTube*) object);
++            else if (RTTI::isKindOf<Mesh>(object))   				renderMesh_(*(const   									Mesh*) object);
++            else if (RTTI::isKindOf<TwoColoredLine>(object)) renderTwoColoredLine_(*(const TwoColoredLine*) object);
++            else if (RTTI::isKindOf<Point>(object))  	 			renderPoint_(*(const  								 Point*) object);
++            else if (RTTI::isKindOf<Disc>(object))   				renderDisc_(*(const   									Disc*) object);
++            else if (RTTI::isKindOf<Line>(object))  	 				renderLine_(*(const   									Line*) object);
++            else if (RTTI::isKindOf<Tube>(object))  	 				renderTube_(*(const   									Tube*) object);
++            else if (RTTI::isKindOf<Box>(object))  					renderBox_(*(const   		 			 					 Box*) object);
++            else if (RTTI::isKindOf<SimpleBox>(object))  		renderSimpleBox_(*(const   		 		 SimpleBox*) object);
++            else if (RTTI::isKindOf<Label>(object))  	 			renderLabel_(*(const   				 				 Label*) object);
++            else if (RTTI::isKindOf<MultiLine>(object)) renderMultiLine_(*(const MultiLine*) object);
++            else if (RTTI::isKindOf<GridVisualisation>(object)) 	renderGridVisualisation_(*(const  GridVisualisation*) object);
++            else if (RTTI::isKindOf<QuadMesh>(object))   		 renderQuadMesh_(*(const   						QuadMesh*) object);
+ 			// ... add more types of GeometricObjects here
+ 			else
+ 			{
+--- a/source/VIEW/RENDERING/RENDERERS/rtfactRenderer.C
++++ b/source/VIEW/RENDERING/RENDERERS/rtfactRenderer.C
+@@ -521,7 +521,7 @@
+ 					 it++)
+ 			{
+ 
+-				if (RTTI::isKindOf<Mesh>(**it))
++                                if (RTTI::isKindOf<Mesh>(*it))
+ 				{
+ 					Mesh const& mesh = *(const Mesh*)*it;
+ 
+@@ -591,7 +591,7 @@
+ 					rtfact_needs_update_ = true;
+ 				}
+ 
+-				if (RTTI::isKindOf<Sphere>(**it))
++                                if (RTTI::isKindOf<Sphere>(*it))
+ 				{
+ 					Sphere const& sphere = *(const Sphere*)*it;
+ 
+@@ -641,7 +641,7 @@
+ 					rtfact_needs_update_ = true;
+ 				}
+ 
+-				if (RTTI::isKindOf<TwoColoredTube>(**it))
++                                if (RTTI::isKindOf<TwoColoredTube>(*it))
+ 				{
+ 					TwoColoredTube const& old_tube = *(const TwoColoredTube*)*it;
+ 
+@@ -736,7 +736,7 @@
+ 					rtfact_needs_update_ = true;
+ 				}
+ 
+-				if (RTTI::isKindOf<TwoColoredLine>(**it))
++                                if (RTTI::isKindOf<TwoColoredLine>(*it))
+ 				{
+ 					TwoColoredLine const& old_line = *(const TwoColoredLine*)*it;
+ 
+@@ -904,7 +904,7 @@
+ 					 it++)
+ 			{
+ 
+-				if (RTTI::isKindOf<Mesh>(**it))
++                                if (RTTI::isKindOf<Mesh>(*it))
+ 				{
+ 					Mesh const& mesh = *(const Mesh*)*it;
+ 
+@@ -967,7 +967,7 @@
+ 					rtfact_needs_update_ = true;
+ 				}
+ 
+-				if (RTTI::isKindOf<Sphere>(**it))
++                                if (RTTI::isKindOf<Sphere>(*it))
+ 				{
+ 					Sphere const& sphere = *(const Sphere*)*it;
+ 
+@@ -1017,7 +1017,7 @@
+ 					rtfact_needs_update_ = true;
+ 				}
+ 
+-				if (RTTI::isKindOf<TwoColoredTube>(**it))
++                                if (RTTI::isKindOf<TwoColoredTube>(*it))
+ 				{
+ 					TwoColoredTube const& old_tube = *(const TwoColoredTube*)*it;
+ 
+@@ -1117,7 +1117,7 @@
+ 					rtfact_needs_update_ = true;
+ 				}
+ 
+-				if (RTTI::isKindOf<TwoColoredLine>(**it))
++                                if (RTTI::isKindOf<TwoColoredLine>(*it))
+ 				{
+ 					TwoColoredLine const& old_line = *(const TwoColoredLine*)*it;
+ 
+--- a/source/VIEW/RENDERING/RENDERERS/tilingRenderer.C
++++ b/source/VIEW/RENDERING/RENDERERS/tilingRenderer.C
+@@ -102,7 +102,7 @@
+ 
+ 		void TilingRenderer::renderToBuffer(RenderTarget* target)
+ 		{
+-			if (RTTI::isKindOf<GLRenderer>(*real_renderer_))
++            if (RTTI::isKindOf<GLRenderer>(real_renderer_))
+ 			{
+ 				GLRenderer* gl_renderer = static_cast<GLRenderer*>(real_renderer_);
+ 
+--- a/source/VIEW/RENDERING/renderSetup.C
++++ b/source/VIEW/RENDERING/renderSetup.C
+@@ -173,7 +173,7 @@
+ 			}
+ 
+ 			renderer->setSize(width, height);
+-			if (RTTI::isKindOf<BufferedRenderer>(*renderer))
++            if (RTTI::isKindOf<BufferedRenderer>(renderer))
+ 			{
+ 				if(!(((BufferedRenderer*)renderer)->setFrameBufferFormat(target->getFormat())))
+ 				{
+@@ -376,11 +376,11 @@
+ 
+ 			updateCamera();
+ 
+-			if (RTTI::isKindOf<BufferedRenderer>(*renderer))
++            if (RTTI::isKindOf<BufferedRenderer>(renderer))
+ 			{
+ 				((BufferedRenderer*)renderer)->renderToBuffer(target, *stage_);
+ 			} 
+-			else if (RTTI::isKindOf<GLRenderer>(*renderer))
++            else if (RTTI::isKindOf<GLRenderer>(renderer))
+ 			{
+ 				GLRenderer* current_gl_renderer = static_cast<GLRenderer*>(renderer);
+ 				// TODO: what do we do here? should we push the gl calls somewhere else, i.e. in the GUI thread?
+@@ -389,7 +389,7 @@
+ 
+ 				glFlush();
+ 			}
+-			else if (RTTI::isKindOf<TilingRenderer>(*renderer))
++            else if (RTTI::isKindOf<TilingRenderer>(renderer))
+ 			{
+ 				static_cast<TilingRenderer*>(renderer)->renderToBuffer(target);
+ 				glFlush();
+@@ -552,7 +552,7 @@
+ 		{
+ 			Position texname = 0;
+ 
+-			if (RTTI::isKindOf<GLRenderer>(*renderer))
++            if (RTTI::isKindOf<GLRenderer>(renderer))
+ 			{
+ 				render_mutex_.lock();
+ 
+@@ -568,7 +568,7 @@
+ 
+ 		void RenderSetup::removeGridTextures(const RegularData3D& grid)
+ 		{
+-			if (RTTI::isKindOf<GLRenderer>(*renderer))
++            if (RTTI::isKindOf<GLRenderer>(renderer))
+ 			{
+ 				MutexLocker ml(&render_mutex_);
+ 
+@@ -612,7 +612,7 @@
+ 
+ 		void RenderSetup::projectionModeChanged()
+ 		{
+-			if (RTTI::isKindOf<GLRenderer>(*renderer))
++            if (RTTI::isKindOf<GLRenderer>(renderer))
+ 			{
+ 				static_cast<GLRenderer*>(renderer)->initPerspective();
+ 			}
+@@ -621,18 +621,18 @@
+ 		void RenderSetup::initType_()
+ 		{
+ 			// set the type variable
+-			if (RTTI::isKindOf<GLRenderer>(*renderer))
++            if (RTTI::isKindOf<GLRenderer>(renderer))
+ 				renderer_type_ = OPENGL_RENDERER;
+-			else if (RTTI::isKindOf<POVRenderer>(*renderer))
++            else if (RTTI::isKindOf<POVRenderer>(renderer))
+ 				renderer_type_ = POV_RENDERER;
+-			else if (RTTI::isKindOf<VRMLRenderer>(*renderer))
++            else if (RTTI::isKindOf<VRMLRenderer>(renderer))
+ 				renderer_type_ = VRML_RENDERER;
+-			else if (RTTI::isKindOf<STLRenderer>(*renderer))
++            else if (RTTI::isKindOf<STLRenderer>(renderer))
+ 				renderer_type_ = STL_RENDERER;
+-			else if (RTTI::isKindOf<TilingRenderer>(*renderer))
++            else if (RTTI::isKindOf<TilingRenderer>(renderer))
+ 				renderer_type_ = TILING_RENDERER;
+ #ifdef BALL_HAS_RTFACT
+-			else if (RTTI::isKindOf<RTfactRenderer>(*renderer))
++            else if (RTTI::isKindOf<RTfactRenderer>(renderer))
+ 				renderer_type_ = RTFACT_RENDERER;
+ #endif
+ 			else
+--- a/source/VIEW/WIDGETS/datasetControl.C
++++ b/source/VIEW/WIDGETS/datasetControl.C
+@@ -70,7 +70,7 @@
+ #endif
+ 
+ 	GenericControl::onNotify(message);
+-	if (!RTTI::isKindOf<DatasetMessage>(*message)) return;
++    if (!RTTI::isKindOf<DatasetMessage>(message)) return;
+ 	
+ 	DatasetMessage* msg = (DatasetMessage*) message;
+ 	if (!msg->isValid())
+--- a/source/VIEW/WIDGETS/dockingController.C
++++ b/source/VIEW/WIDGETS/dockingController.C
+@@ -97,7 +97,7 @@
+ 		{
+ 			// if (re)docking has finished, start scoring
+ 			// first check if user has aborted (re)docking
+-			if (RTTI::isKindOf<DockingFinishedMessage>(*message))
++            if (RTTI::isKindOf<DockingFinishedMessage>(message))
+ 			{
+ 				DockingFinishedMessage* dfm = RTTI::castTo<DockingFinishedMessage>(*message);
+ 				
+@@ -128,7 +128,7 @@
+ 			}
+ 
+ 			// DatasetControl sends this messages, when user wants to have a look at a DockResult
+-			if (RTTI::isKindOf<DatasetMessage>(*message))
++            if (RTTI::isKindOf<DatasetMessage>(message))
+ 			{
+ 				DatasetMessage* sdrm = RTTI::castTo<DatasetMessage>(*message);
+ 				if (!sdrm->isValid()) return;
+--- a/source/VIEW/WIDGETS/genericControl.C
++++ b/source/VIEW/WIDGETS/genericControl.C
+@@ -80,7 +80,7 @@
+ 
+ 		void GenericControl::onNotify(Message *message)
+ 		{
+-			if (!RTTI::isKindOf<DeselectControlsMessage>(*message)) return;
++            if (!RTTI::isKindOf<DeselectControlsMessage>(message)) return;
+ 
+ 			listview->clearSelection();
+ 		}
+--- a/source/VIEW/WIDGETS/geometricControl.C
++++ b/source/VIEW/WIDGETS/geometricControl.C
+@@ -167,19 +167,19 @@
+ 
+ 			GenericControl::onNotify(message);
+ 
+-			if (RTTI::isKindOf<TransformationMessage> (*message))
++            if (RTTI::isKindOf<TransformationMessage>(message))
+ 			{
+ 				moveItems(*(TransformationMessage*)message);
+ 				return;
+ 			}
+ 
+-			if (RTTI::isKindOf<SyncClippingPlanesMessage>(*message))
++            if (RTTI::isKindOf<SyncClippingPlanesMessage>(message))
+ 			{
+ 				updateClippingPlanes();
+ 				return;
+ 			}
+ 
+-			if (!RTTI::isKindOf<RepresentationMessage> (*message)) return;
++            if (!RTTI::isKindOf<RepresentationMessage>(message)) return;
+ 
+ 			Representation* rep =	(RTTI::castTo<RepresentationMessage> (*message))->getRepresentation();
+ 			if (rep == 0) return;
+@@ -443,11 +443,11 @@
+ 
+ 				while (!c_ptr->isRoot())
+ 				{
+-					if (RTTI::isKindOf<AtomContainer> (*c_ptr))
++                    if (RTTI::isKindOf<AtomContainer> (c_ptr))
+ 					{
+ 						name = ((const AtomContainer*) c_ptr)->getName() + "->" + name;
+ 					}
+-					else if (RTTI::isKindOf<Atom> (*c_ptr))
++                    else if (RTTI::isKindOf<Atom> (c_ptr))
+ 					{
+ 						name = ((const Atom*) c_ptr)->getName() + "->" + name;
+ 					}
+--- a/source/VIEW/WIDGETS/helpViewer.C
++++ b/source/VIEW/WIDGETS/helpViewer.C
+@@ -164,7 +164,7 @@
+ 			Log.error() << "HelpViewer" << this  << "onNotify " << message << std::endl;
+ #endif
+ 
+-			if (RTTI::isKindOf<RegisterHelpSystemMessage>(*message)) 
++            if (RTTI::isKindOf<RegisterHelpSystemMessage>(message))
+ 			{
+ 				RegisterHelpSystemMessage* msg = RTTI::castTo<RegisterHelpSystemMessage>(*message);
+ 				if (msg->isRegister())
+@@ -179,7 +179,7 @@
+ 				return;
+ 			}
+ 
+-			if (!RTTI::isKindOf<ShowHelpMessage>(*message)) return;
++            if (!RTTI::isKindOf<ShowHelpMessage>(message)) return;
+ 
+ 			ShowHelpMessage* msg = RTTI::castTo<ShowHelpMessage>(*message);
+ 			bool classname = false;
+@@ -317,7 +317,7 @@
+ 			// maybe the library has a bug under windows
+ 			try
+ 			{
+-				if (RTTI::isKindOf<QMenu>(*widget))
++                if (RTTI::isKindOf<QMenu>(widget))
+ 				{
+ 					ignore_event_ = true;
+ 
+--- a/source/VIEW/WIDGETS/molecularControl.C
++++ b/source/VIEW/WIDGETS/molecularControl.C
+@@ -306,7 +306,7 @@
+ 		bool MolecularControl::reactToMessages_(Message* message)
+ 		{
+ 			// react only to NewMolecularMessage, but not to NewCompositeMessage
+-			if (RTTI::isKindOf<CompositeMessage>(*message))
++            if (RTTI::isKindOf<CompositeMessage>(message))
+ 			{
+ 				CompositeMessage* composite_message = RTTI::castTo<CompositeMessage>(*message);
+ 				switch (composite_message->getType())
+@@ -400,14 +400,14 @@
+ 						return false;
+ 				}
+ 			}
+-			else if (RTTI::isKindOf<NewSelectionMessage> (*message))
++            else if (RTTI::isKindOf<NewSelectionMessage>(message))
+ 			{
+ 				NewSelectionMessage* nsm = (NewSelectionMessage*) message;
+ 				setSelection_(true, nsm->openItems());
+ 				return true;
+ 			}
+ 
+-			if (RTTI::isKindOf<ControlSelectionMessage>(*message))
++            if (RTTI::isKindOf<ControlSelectionMessage>(message))
+ 			{
+ 				ControlSelectionMessage* nsm = (ControlSelectionMessage*) message;
+ 				highlight(nsm->getSelection());
+@@ -551,14 +551,14 @@
+ 			paste_action_->setEnabled(allow_paste && composites_muteable);
+ 
+ 			// -----------------------------------> AtomContainer
+-			bool ac = RTTI::isKindOf<AtomContainer>(composite);
++            bool ac = RTTI::isKindOf<AtomContainer>(&composite);
+ 			count_items_action_->setEnabled(ac);
+ 			atom_overview_->setEnabled(ac);
+ 			atom_overview_selection_->setEnabled(ac);
+ 			// <----------------------------------- AtomContainer
+ 
+ 			// -----------------------------------> Atoms
+-			bond_propertes_action_->setEnabled(RTTI::isKindOf<Atom>(composite) && one_item && composites_muteable);
++            bond_propertes_action_->setEnabled(RTTI::isKindOf<Atom>(&composite) && one_item && composites_muteable);
+ 			// <----------------------------------- Atoms
+ 
+ 			composite_properties_action_->setEnabled(one_item);
+@@ -577,7 +577,7 @@
+ 				list<Composite*>::const_iterator it = composite_list.begin();
+ 				for ( ; it!=composite_list.end(); ++it)
+ 				{
+-					if (RTTI::isKindOf<Residue>(**it))
++                    if (RTTI::isKindOf<Residue>(*it))
+ 					{
+ 						Residue* res = reinterpret_cast<Residue*>(*it);
+ 						if (Peptides::OneLetterCode(res->getName()) == 'C')
+@@ -597,7 +597,7 @@
+ 							num_cysteins++;
+ 						}
+ 					}
+-					else if (RTTI::isKindOf<Atom>(**it))
++                    else if (RTTI::isKindOf<Atom>(*it))
+ 					{
+ 						Atom* atom = reinterpret_cast<Atom*>(*it);
+ 						if (atom->getElement() == PTE[Element::S])
+@@ -822,7 +822,7 @@
+ 
+ 			if (selected_.size() > 0) context_composite_ = *selected_.begin();
+ 
+-			if (selected_.size() == 1 && RTTI::isKindOf<System>(**selected_.begin()))
++            if (selected_.size() == 1 && RTTI::isKindOf<System>(*selected_.begin()))
+ 			{
+ 				bool is_in_move_mode = Scene::getInstance(0) && Scene::getInstance(0)->inMoveMode();
+ 
+@@ -1167,7 +1167,7 @@
+ 			list<Composite*>::const_iterator list_it = copy_list_.begin();
+ 			for (; list_it != copy_list_.end(); ++list_it)
+ 			{
+-				if (RTTI::isKindOf<System>(**list_it))
++                if (RTTI::isKindOf<System>(*list_it))
+ 				{
+ 					// create a new copy of the composite
+ 					Composite *new_composite = (Composite*)(*list_it)->create();
+@@ -1238,7 +1238,7 @@
+ 
+ 			if (!show_ss_)
+ 			{
+-				if (RTTI::isKindOf<SecondaryStructure>(composite))
++                if (RTTI::isKindOf<SecondaryStructure>(&composite))
+ 				{
+ 					recurseGeneration_(parent, composite);
+ 					return 0;
+@@ -1354,22 +1354,22 @@
+ 			AtomContainer& ac = *(AtomContainer*) context_composite_;
+ 
+ 			String s;
+-			if (RTTI::isKindOf<System>(ac))
++            if (RTTI::isKindOf<System>(&ac))
+ 			{
+ 				s+=String(((System*)&ac)->countResidues());
+ 				s+= (String)tr(" Residues") + ", ";
+ 			}
+-			else if (RTTI::isKindOf<Protein>(ac))
++            else if (RTTI::isKindOf<Protein>(&ac))
+ 			{
+ 				s+=String(((Protein*)&ac)->countResidues());
+ 				s+= (String)tr(" Residues") + ", ";
+ 			}
+-			else if (RTTI::isKindOf<Chain>(ac))
++            else if (RTTI::isKindOf<Chain>(&ac))
+ 			{
+ 				s+=String(((Chain*)&ac)->countResidues());
+ 				s+= (String)tr(" Residues") + ", ";
+ 			}
+-			if (RTTI::isKindOf<SecondaryStructure>(ac))
++            if (RTTI::isKindOf<SecondaryStructure>(&ac))
+ 			{
+ 				s+=String(((SecondaryStructure*)&ac)->countResidues());
+ 				s+= (String)tr(" Residues") + ", ";
+@@ -1475,32 +1475,32 @@
+ 
+ 		bool MolecularControl::pasteAllowedFor_(Composite& child)
+ 		{
+-			if (RTTI::isKindOf<System>(child)) 
++            if (RTTI::isKindOf<System>(&child))
+ 			{
+ 				return !getSelection().size();
+ 			}
+ 
+ 			if (!getSelection().size()) return false;
+ 
+-			const Composite& parent = **getSelection().begin();
++            const Composite* parent = *getSelection().begin();
+ 
+ 			if (RTTI::isKindOf<Atom>(parent)) return false;
+ 			
+-			if (RTTI::isKindOf<Residue>(parent)) return (RTTI::isKindOf<Atom>(child));
++            if (RTTI::isKindOf<Residue>(parent)) return (RTTI::isKindOf<Atom>(&child));
+ 
+-			if (RTTI::isKindOf<SecondaryStructure>(parent)) return (RTTI::isKindOf<Residue>(child));
++            if (RTTI::isKindOf<SecondaryStructure>(parent)) return (RTTI::isKindOf<Residue>(&child));
+ 
+-			if (RTTI::isKindOf<Chain>(parent)) return (RTTI::isKindOf<SecondaryStructure>(child) ||
+-																								 RTTI::isKindOf<Residue>(child));
++            if (RTTI::isKindOf<Chain>(parent)) return (RTTI::isKindOf<SecondaryStructure>(&child) ||
++                                                                                                 RTTI::isKindOf<Residue>(&child));
+ 			
+-			if (RTTI::isKindOf<Protein>(parent)) return (RTTI::isKindOf<Chain>(child));
++            if (RTTI::isKindOf<Protein>(parent)) return (RTTI::isKindOf<Chain>(&child));
+ 
+-			if (RTTI::isKindOf<Nucleotide>(parent)) return (RTTI::isKindOf<Atom>(child));
++            if (RTTI::isKindOf<Nucleotide>(parent)) return (RTTI::isKindOf<Atom>(&child));
+ 
+-			if (RTTI::isKindOf<NucleicAcid>(parent)) return (RTTI::isKindOf<Nucleotide>(child));
++            if (RTTI::isKindOf<NucleicAcid>(parent)) return (RTTI::isKindOf<Nucleotide>(&child));
+ 
+-			if (RTTI::isKindOf<Molecule>(parent)) return (!RTTI::isKindOf<Molecule>(child));
+-			if (RTTI::isKindOf<System>(parent)) return (RTTI::isKindOf<Molecule>(child));
++            if (RTTI::isKindOf<Molecule>(parent)) return (!RTTI::isKindOf<Molecule>(&child));
++            if (RTTI::isKindOf<System>(parent)) return (RTTI::isKindOf<Molecule>(&child));
+ 
+ 			return true;
+ 		}
+--- a/source/VIEW/WIDGETS/molecularStructure.C
++++ b/source/VIEW/WIDGETS/molecularStructure.C
+@@ -279,11 +279,11 @@
+ 	#ifdef BALL_VIEW_DEBUG
+ 			Log.error() << "MolecularStructure " << this  << "onNotify " << message << std::endl;
+ 	#endif
+-			if (RTTI::isKindOf<ControlSelectionMessage>(*message))
++            if (RTTI::isKindOf<ControlSelectionMessage>(message))
+ 			{
+ 				checkMenu(*getMainControl());
+ 			}
+-			else if (RTTI::isKindOf<CompositeMessage>(*message))
++            else if (RTTI::isKindOf<CompositeMessage>(message))
+ 			{
+ 				CompositeMessage* cmessage = RTTI::castTo<CompositeMessage>(*message);
+ 				switch (cmessage->getType())
+@@ -299,7 +299,7 @@
+ 						return;
+ 				}
+ 			}
+-			else if (RTTI::isKindOf<MolecularTaskMessage>(*message))
++            else if (RTTI::isKindOf<MolecularTaskMessage>(message))
+ 			{
+ 				switch (((RTTI::castTo<MolecularTaskMessage>(*message)))->getType())
+ 				{
+@@ -345,7 +345,7 @@
+ 			list<Composite*>::const_iterator it = selection.begin();
+ 			for (; it != selection.end(); ++it)
+ 			{
+-				if (!RTTI::isKindOf<AtomContainer>(**it))
++                if (!RTTI::isKindOf<AtomContainer>(*it))
+ 				{
+ 					Log.error() << (String)tr("ResidueChecker: cannot apply to a") << " " << typeid(**it).name()
+ 						          << " " << (String)tr("object") << std::endl;
+@@ -764,7 +764,7 @@
+ 				menu->setEnabled(composites_muteable);
+ 
+ //   			calculate_ramachandran_->setEnabled((number_of_selected_objects == 1) &&
+-//   							RTTI::isKindOf<Protein>(**getMainControl()->getMolecularControlSelection().begin()));
++//   							RTTI::isKindOf<Protein>(*getMainControl()->getMolecularControlSelection().begin()));
+ 		}
+ 
+ 
+@@ -776,7 +776,7 @@
+ 			#endif
+ 
+ 			// properties will be used only for atom containers
+-			if (!RTTI::isKindOf<AtomContainer>(composite)) return;
++            if (!RTTI::isKindOf<AtomContainer>(&composite)) return;
+ 
+ 			Log.info() << "> " + (String)tr("applying molecular properties") + " ... " << endl;
+ 
+@@ -1028,7 +1028,7 @@
+ 
+ 			list<Composite*>::iterator it = getMainControl()->getMolecularControlSelection().begin();
+ 			
+-			if (!RTTI::isKindOf<Protein>(**it)) 
++            if (!RTTI::isKindOf<Protein>(*it))
+ 			{
+ 				setStatusbarText((String)tr("Exact two Proteins have to be selected"), true);
+ 				return;
+@@ -1037,7 +1037,7 @@
+ 			a1 = (Protein*) *it;
+ 			it++;
+ 
+-			if (!RTTI::isKindOf<Protein>(**it)) 
++            if (!RTTI::isKindOf<Protein>(*it))
+ 			{
+ 				setStatusbarText((String)tr("Exact two Proteins have to be selected"), true);
+ 				return;
+@@ -1671,7 +1671,7 @@
+ 			/*
+ 			List<Composite*> selection = getMainControl()->getMolecularControlSelection();
+ 			if (!selection.size() != 1 ||
+-					!RTTI::isKindOf<Protein>(**selection.begin()))
++                    !RTTI::isKindOf<Protein>(*selection.begin()))
+ 			{
+ 				setStatusbarText("Exactly one Protein has to be selected for a Ramachandran Plot!");
+ 			}
+--- a/source/VIEW/WIDGETS/scene.C
++++ b/source/VIEW/WIDGETS/scene.C
+@@ -465,27 +465,27 @@
+ 			Log.error() << "Scene " << this  << "onNotify " << message << std::endl;
+ #endif
+ 
+-			if (RTTI::isKindOf<CompositeMessage>(*message))
++            if (RTTI::isKindOf<CompositeMessage>(message))
+ 			{
+ 				CompositeMessage* cm = RTTI::castTo<CompositeMessage>(*message);
+ 				handleCompositeMessage_(cm);
+ 			}
+-			else if (RTTI::isKindOf<ControlSelectionMessage>(*message))
++            else if (RTTI::isKindOf<ControlSelectionMessage>(message))
+ 			{
+ 				ControlSelectionMessage* csm = RTTI::castTo<ControlSelectionMessage>(*message);
+ 				handleControlSelectionMessage_(csm);
+ 			}
+-			else if (RTTI::isKindOf<RepresentationMessage>(*message))
++            else if (RTTI::isKindOf<RepresentationMessage>(message))
+ 			{
+ 				RepresentationMessage* rm = RTTI::castTo<RepresentationMessage>(*message);
+ 				handleRepresentationMessage_(rm);
+ 			}
+-			else if (RTTI::isKindOf<DatasetMessage>(*message))
++            else if (RTTI::isKindOf<DatasetMessage>(message))
+ 			{
+ 				DatasetMessage* dm = RTTI::castTo<DatasetMessage>(*message);
+ 				handleDatasetMessage_(dm);
+ 			}
+-			else if (RTTI::isKindOf<SceneMessage>(*message))
++            else if (RTTI::isKindOf<SceneMessage>(message))
+ 			{
+ 				SceneMessage *sm = RTTI::castTo<SceneMessage>(*message);
+ 				handleSceneMessage_(sm);
+@@ -840,7 +840,7 @@
+ 		{
+ 			for (size_t i=0; i<renderers_.size(); ++i)
+ 			{
+-				if (RTTI::isKindOf<GLRenderWindow>(*(renderers_[i]->target)))
++                if (RTTI::isKindOf<GLRenderWindow>(renderers_[i]->target))
+ 				{
+ 					static_cast<GLRenderWindow*>(renderers_[i]->target)->setDownsamplingFactor(ds_factor);
+ 					renderers_[i]->resize(renderers_[i]->renderer->getWidth(), renderers_[i]->renderer->getHeight());
+@@ -1661,7 +1661,7 @@
+ 			list<Composite*> highl = getMainControl()->getMolecularControlSelection();
+ 			list<Composite*>::iterator lit = highl.begin();
+ 			bool selected_system_or_molecule =   (highl.size() == 1)
+-				&& (RTTI::isKindOf<System>(**lit) || RTTI::isKindOf<Molecule>(**lit) ) ;
++                && (RTTI::isKindOf<System>(*lit) || RTTI::isKindOf<Molecule>(*lit) ) ;
+ 
+ 			if (bondorders_action_)
+ 				bondorders_action_->setEnabled(selected_system_or_molecule && !busy);
+@@ -1698,7 +1698,7 @@
+ 
+ 			renderer->makeCurrent();
+ 			// NOTE: GLRenderers currently render in the GUI thread!
+-			if (RTTI::isKindOf<GLRenderer>(*(renderer->renderer)))
++            if (RTTI::isKindOf<GLRenderer>(renderer->renderer))
+ 				renderer->renderToBuffer();
+ 			else
+ 				renderer->target->refresh();
+@@ -1750,7 +1750,7 @@
+ 			if (renderer->isReadyToSwap())
+ 			{
+ 				// paint all buffers
+-				if (RTTI::isKindOf<GLRenderWindow>(*(renderer->target)))
++                if (RTTI::isKindOf<GLRenderWindow>(renderer->target))
+ 					static_cast<GLRenderWindow*>(renderer->target)->swapBuffers();
+ 
+ 				if (renderer->isContinuous() && (renderer->getTimeToLive() != 0))
+@@ -1765,7 +1765,7 @@
+ 				{
+ 					(*render_it)->makeCurrent();
+ 
+-					if (RTTI::isKindOf<GLRenderWindow>(*((*render_it)->target)))
++                    if (RTTI::isKindOf<GLRenderWindow>((*render_it)->target))
+ 						static_cast<GLRenderWindow*>((*render_it)->target)->swapBuffers();
+ 
+ 					if ((*render_it)->isContinuous() && ((*render_it)->getTimeToLive() != 0))
+@@ -2020,7 +2020,7 @@
+ 				info.visit(*composite);
+ 				QString this_string(info.getName().c_str());
+ 				if (composite->getParent() != 0 &&
+-						RTTI::isKindOf<Residue>(*composite->getParent()))
++                        RTTI::isKindOf<Residue>(composite->getParent()))
+ 				{
+ 					info.visit(*composite->getParent());
+ 					this_string = QString(info.getName().c_str()) + " : " + this_string;
+@@ -2028,7 +2028,7 @@
+ 
+ 				if (this_string == "UNKNOWN") continue;
+ 
+-				if (RTTI::isKindOf<Atom>(*composite))
++                if (RTTI::isKindOf<Atom>(composite))
+ 				{
+ 					this_string += "[T:";
+ 					this_string += ((Atom*)composite)->getTypeName().c_str();
+@@ -2285,7 +2285,7 @@
+ 			// ok, we have to do this the hard way...
+ 
+ 			// What kind of renderer do we have to encapsulate?
+-			if (RTTI::isKindOf<GLRenderer>(*(renderers_[main_renderer_]->renderer)))
++            if (RTTI::isKindOf<GLRenderer>(renderers_[main_renderer_]->renderer))
+ 			{
+ 				// it's a GLRenderer => use tiling
+ 				GLOffscreenTarget* new_widget = new GLOffscreenTarget(main_display_, filename);
+@@ -2319,7 +2319,7 @@
+ 
+ 			}
+ #ifdef BALL_HAS_RTFACT
+-			else if (RTTI::isKindOf<t_RaytracingRenderer>(*(renderers_[main_renderer_]->renderer)))
++            else if (RTTI::isKindOf<t_RaytracingRenderer>(renderers_[main_renderer_]->renderer))
+ 			{
+ 				// create a new renderer
+ 				t_RaytracingRenderer* renderer = new t_RaytracingRenderer;
+@@ -3704,7 +3704,7 @@
+ 
+ 				// prevent adding of atoms to a System:
+ 				// some forcefields will go havoc otherwise
+-				if (RTTI::isKindOf<System>(*ai))
++                if (RTTI::isKindOf<System>(ai))
+ 				{
+ 					System* system = (System*) ai;
+ 					Molecule* mol = system->getMolecule(0);
+--- a/source/VIEW/WIDGETS/testFramework.C
++++ b/source/VIEW/WIDGETS/testFramework.C
+@@ -210,7 +210,7 @@
+ 						 e->type() == QEvent::MouseButtonRelease)
+ 		{
+ 			// abort macro if user presses mouse button:
+-			if (!RTTI::isKindOf<MyMouseEvent>(*e) && e->spontaneous())
++			if (!RTTI::isKindOf<MyMouseEvent>(e) && e->spontaneous())
+ 			{
+  				stop = true;
+ 			}
+@@ -249,9 +249,9 @@
+ 
+ 	if (!recording_) return false;
+ 
+-	if (!RTTI::isKindOf<QKeyEvent>(*e) &&
+-			!RTTI::isKindOf<QMouseEvent>(*e) &&
+-			!RTTI::isKindOf<QShortcutEvent>(*e))
++	if (!RTTI::isKindOf<QKeyEvent>(e) &&
++			!RTTI::isKindOf<QMouseEvent>(e) &&
++			!RTTI::isKindOf<QShortcutEvent>(e))
+ 	{
+ 		return false;
+ 	}
+@@ -601,7 +601,7 @@
+ 												(Qt::KeyboardModifier)modifiers_);
+ 		
+ 		if ((Qt::MouseButton) button_ == Qt::LeftButton &&
+-				RTTI::isKindOf<QMenu>(*widget_) && 
++				RTTI::isKindOf<QMenu>(widget_) && 
+ 				!was_visible)
+ 		{
+ 			hide = true;
diff --git a/debian/patches/series b/debian/patches/series
index 27dae4e..2185ade 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ disable-assign-positions-from-template.patch
 fix-FingerprintSimilarityClustering.patch
 fix-Python-bindings-for-Box.patch
 increase-sleeping-time-on-Socket_test.patch
+modify-rtti-isKindOf-to-take-pointer.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/ball.git



More information about the debian-med-commit mailing list