Index: /orxonox/branches/levelLoader/src/Makefile.am
===================================================================
--- /orxonox/branches/levelLoader/src/Makefile.am	(revision 4232)
+++ /orxonox/branches/levelLoader/src/Makefile.am	(revision 4233)
@@ -22,4 +22,5 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/animation
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/loading
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/subprojects
 
@@ -151,4 +152,5 @@
 		 util/common/list_template.h \
 		 util/resource_manager.h \
+		 util/loading/load_param.h \
 		 lib/util/ini_parser.h \
 		 lib/util/substring.h \
@@ -189,6 +191,5 @@
 
 ## orxonox.conf will be used from home-dir instead.
-EXTRA_DIST = orxonox.conf \
-	     proto/proto_class.h \
+EXTRA_DIST = proto/proto_class.h \
 	     proto/proto_class.cc \
 	     proto/proto_singleton.h \
Index: /orxonox/branches/levelLoader/src/Makefile.in
===================================================================
--- /orxonox/branches/levelLoader/src/Makefile.in	(revision 4232)
+++ /orxonox/branches/levelLoader/src/Makefile.in	(revision 4233)
@@ -280,5 +280,5 @@
 target_vendor = @target_vendor@
 MAINSRCDIR = .
-AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/subprojects
+AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/util/loading -I$(MAINSRCDIR)/subprojects
 noinst_LIBRARIES = libORXgui.a \
 		   libtinyxml.a
@@ -403,4 +403,5 @@
 		 util/common/list_template.h \
 		 util/resource_manager.h \
+		 util/loading/load_param.h \
 		 lib/util/ini_parser.h \
 		 lib/util/substring.h \
@@ -437,6 +438,5 @@
 		       lib/xmlparser/tinyxmlparser.cc
 
-EXTRA_DIST = orxonox.conf \
-	     proto/proto_class.h \
+EXTRA_DIST = proto/proto_class.h \
 	     proto/proto_class.cc \
 	     proto/proto_singleton.h \
@@ -1694,5 +1694,5 @@
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/world_entities
+	$(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/util/loading $(distdir)/world_entities
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
Index: /orxonox/branches/levelLoader/src/util/loading/load_param.h
===================================================================
--- /orxonox/branches/levelLoader/src/util/loading/load_param.h	(revision 4233)
+++ /orxonox/branches/levelLoader/src/util/loading/load_param.h	(revision 4233)
@@ -0,0 +1,37 @@
+
+#ifndef _LOAD_PARAM_H
+#define _LOAD_PARAM_H
+
+
+// abstract base class
+class baseLoadParam
+{
+ public:
+  //  virtual void Call(const char* string)=0;        // call using function
+};
+
+
+// derived template class
+template<class T> class LoadParam : public baseLoadParam
+{
+ private:
+  T* pt2Object;                  // pointer to object
+
+ public:
+  LoadParam(const char* loadString, T* pt2Object, void(T::*function)(const char*))
+    { 
+      this->pt2Object = pt2Object;
+
+      (*pt2Object.*function)(loadString);
+    };
+
+  LoadParam(const char* loadString, T* pt2Object, void(T::*function)(float))
+    { 
+      this->pt2Object = pt2Object;
+      
+      (*pt2Object.*function)(atoi(loadString));
+    };
+};
+
+
+#endif /* _LOAD_PARAM_H */
Index: /orxonox/branches/levelLoader/src/world_entities/world_entity.cc
===================================================================
--- /orxonox/branches/levelLoader/src/world_entities/world_entity.cc	(revision 4232)
+++ /orxonox/branches/levelLoader/src/world_entities/world_entity.cc	(revision 4233)
@@ -23,6 +23,5 @@
 #include "vector.h"
 
-//#include "stdincl.h"
-//#include "collision.h"
+#include "load_param.h"
 
 using namespace std;
@@ -51,14 +50,9 @@
     {
       PRINTF(2)("WorldEntity is missing a proper 'name'\n");
-      string = "Unknown";
-      temp = new char[strlen(string + 2)];
-      strcpy( temp, string);
-      this->setName( temp);
+      this->setName("unknown");
     }
   else
     {
-      temp = new char[strlen(string + 2)];
-      strcpy( temp, string);
-      this->setName( temp);
+      LoadParam<WorldEntity> (string, this, &WorldEntity::setName);
     }
   // Model Loading	
@@ -66,5 +60,5 @@
   string = grabParameter( root, "model");
   if( string != NULL)
-    this->model = (Model*)ResourceManager::getInstance()->load(string, OBJ, RP_CAMPAIGN);
+    LoadParam<WorldEntity>(string, this, &WorldEntity::loadModel);
   else
     {
@@ -87,4 +81,13 @@
   if (this->model)
     ResourceManager::getInstance()->unload(this->model);
+}
+
+/**
+   \brief loads a Model onto a WorldEntity
+   \param fileName the name of the model to load
+*/
+void WorldEntity::loadModel(const char* fileName)
+{
+  this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN);
 }
 
Index: /orxonox/branches/levelLoader/src/world_entities/world_entity.h
===================================================================
--- /orxonox/branches/levelLoader/src/world_entities/world_entity.h	(revision 4232)
+++ /orxonox/branches/levelLoader/src/world_entities/world_entity.h	(revision 4233)
@@ -27,4 +27,5 @@
   virtual ~WorldEntity ();
 
+  void loadModel(const char* fileName);
 
   //void setCollision (CollisionCluster* newhull);
