Index: trunk/src/lib/lang/base_object.cc
===================================================================
--- trunk/src/lib/lang/base_object.cc	(revision 7199)
+++ trunk/src/lib/lang/base_object.cc	(revision 7221)
@@ -34,8 +34,8 @@
 BaseObject::BaseObject()
 {
+  this->classID = CL_BASE_OBJECT;
   this->className = "BaseObject";
-  this->classID = CL_BASE_OBJECT;
-
-  this->objectName = NULL;
+
+  this->objectName = "";
   this->classList = NULL;
   this->xmlElem = NULL;
@@ -52,6 +52,4 @@
 
   //  delete []this->className;
-  if (this->objectName)
-    delete[] this->objectName;
   if (this->xmlElem != NULL)
     delete this->xmlElem;
@@ -80,5 +78,5 @@
  * @param className the class name
 */
-void BaseObject::setClassID(ClassID classID, const char* className)
+void BaseObject::setClassID(ClassID classID, const std::string& className)
 {
   //printf("%s(0x%.8X)->%s(0x%.8X)\n", this->className, this->classID, className, classID);
@@ -95,15 +93,7 @@
  * @brief set the name of the Object
  */
-void BaseObject::setName (const char* objectName)
-{
-  if (this->objectName)
-    delete[] this->objectName;
-  if (objectName != NULL)
-  {
-    this->objectName = new char[strlen(objectName)+1];
-    strcpy(this->objectName, objectName);
-  }
-  else
-    this->objectName = NULL;
+void BaseObject::setName (const std::string& objectName)
+{
+  this->objectName = objectName;
 }
 
@@ -160,5 +150,5 @@
  * @returns true if it is, false otherwise
  */
-bool BaseObject::isA (const char* className) const
+bool BaseObject::isA (const std::string& className) const
 {
   ClassID classID = ClassList::StringToID(className);
@@ -173,8 +163,7 @@
  * @returns true on match, false otherwise.
  */
-bool BaseObject::operator==(const char* objectName)
-{
-  if (likely(this->objectName != NULL && objectName != NULL))
-    return (strcmp(this->objectName, objectName)) ? false : true;
+bool BaseObject::operator==(const std::string& objectName)
+{
+  return (this->objectName == objectName);
 }
 
@@ -197,7 +186,9 @@
 int BaseObject::writeState( const byte * data, int length, int sender )
 {
-  SYNCHELP_READ_BEGIN();
-
-  if ( objectName )
+  /// FIXME STD
+
+  /*  SYNCHELP_READ_BEGIN();
+
+  if ( !objectName.empty() )
   {
     delete[] objectName;
@@ -211,5 +202,5 @@
   }
 
-  return SYNCHELP_READ_N;
+  return SYNCHELP_READ_N;*/
 }
 
@@ -222,9 +213,10 @@
 int BaseObject::readState( byte * data, int maxLength )
 {
-  SYNCHELP_WRITE_BEGIN();
+///FIXME STD
+  /*  SYNCHELP_WRITE_BEGIN();
 
   //PRINTF(0)("objectname = %s\n", this->objectName);
   SYNCHELP_WRITE_STRING( this->objectName, NWT_BO_NAME );
 
-  return SYNCHELP_WRITE_N;
-}
+  return SYNCHELP_WRITE_N;*/
+}
Index: trunk/src/lib/lang/base_object.h
===================================================================
--- trunk/src/lib/lang/base_object.h	(revision 7199)
+++ trunk/src/lib/lang/base_object.h	(revision 7221)
@@ -16,4 +16,5 @@
 #endif
 
+#include <string>
 #include "stdincl.h"
 
@@ -30,12 +31,12 @@
 
   virtual void loadParams(const TiXmlElement* root);
-  void setName (const char* newName);
+  void setName (const std::string& newName);
   /** returns the Name of this Object */
-  inline const char* getName ()const { return this->objectName; };
+  inline const char* getName ()const { return this->objectName.c_str(); };
   /** @returns the XML-Element with whicht this Object was loaded */
   inline TiXmlNode* getXmlElem() const { return this->xmlElem; };
 
   /** @returns the className of the corresponding Object */
-  inline const char* getClassName() const { return this->className; };
+  inline const char* getClassName() const { return this->className.c_str(); };
   /** @returns the classID of the corresponding Object */
   inline int getClassID() const { return this->classID; };
@@ -43,8 +44,8 @@
 
   bool isA (ClassID classID) const;
-  bool isA (const char* className) const;
+  bool isA (const std::string& className) const;
   void whatIs() const;
 
-  bool operator==(const char* objectName);
+  bool operator==(const std::string& objectName);
   /** @param classID comparer for a ClassID @returns true on match, false otherwise */
   bool operator==(ClassID classID) { return this->isA(classID); };
@@ -54,10 +55,10 @@
 
  protected:
-  void setClassID(ClassID classID, const char* className);
+   void setClassID(ClassID classID, const std::string& className);
 
  private:
-    const char*        className;        //!< the name of the class
+    std::string        className;        //!< the name of the class
     long               classID;          //!< this is the id from the class_id.h enumeration
-    char*              objectName;       //!< The name of this object
+    std::string        objectName;       //!< The name of this object
 
     ClassList*         classList;        //!< Pointer to the ClassList this Object is inside of
Index: trunk/src/lib/lang/class_list.cc
===================================================================
--- trunk/src/lib/lang/class_list.cc	(revision 7199)
+++ trunk/src/lib/lang/class_list.cc	(revision 7221)
@@ -37,7 +37,7 @@
  *  Creates a new ClassList
 */
-ClassList::ClassList(ClassID classID, unsigned long classIDFull, const char* className)
-{
-  this->className = className;
+ClassList::ClassList(ClassID classID, unsigned long classIDFull, const std::string& className)
+  : className(className)
+{
   this->classID = classID;
   this->classIDFull = classIDFull;
@@ -56,5 +56,5 @@
 
 //! a List of all strings of all classes, that have registered so far.
-std::list<const char*> ClassList::classNames;
+std::list<std::string> ClassList::classNames;
 
 /**
@@ -67,10 +67,10 @@
  * !! Before unsing the ClassList, as it creates the ClassLits
  */
-ClassList* ClassList::addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const char* className)
+ClassList* ClassList::addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const std::string& className)
 {
   if (unlikely(classList == NULL))
     ClassList::classList = new list<ClassList>();
 
-  PRINTF(5)("subscribe a '%s'\n", className );
+  PRINTF(5)("subscribe a '%s'\n", className.c_str() );
 
   ClassList* regClass = ClassList::getClassList(classID);
@@ -113,5 +113,5 @@
  * befor it changes anything.
  */
-const std::list<const char*>* ClassList::getClassNames()
+const std::list<std::string>* ClassList::getClassNames()
 {
   if (ClassList::classNames.size() != ClassList::classList->size())
@@ -155,5 +155,5 @@
  * @return the List accessed by classID, or NULL if not found
  */
-const std::list<BaseObject*>* ClassList::getList(const char* className)
+const std::list<BaseObject*>* ClassList::getList(const std::string& className)
 {
   ClassList* fl;
@@ -191,7 +191,7 @@
  * @returns the ClassList with className as specifyer, or NULL if not
  */
-ClassList* ClassList::getClassList(const char* className)
-{
-  if (className == NULL)
+ClassList* ClassList::getClassList(const std::string& className)
+{
+  if (className.empty())
     return NULL;
   std::list<ClassList>::iterator classIT = find (classList->begin(), classList->end(), className);
@@ -207,5 +207,5 @@
  * @todo: speed this up!!
  */
-BaseObject* ClassList::getObject(const char* objectName, ClassID classID)
+BaseObject* ClassList::getObject(const std::string& objectName, ClassID classID)
 {
   if (classID != CL_NULL)
@@ -216,5 +216,5 @@
       std::list<BaseObject*>::iterator bo;
       for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++)
-        if ((*bo)->getName() != NULL && !strcmp((*bo)->getName(), objectName))
+        if ((*bo)->getName() != NULL && objectName == (*bo)->getName())
           return (*bo);
     }
@@ -227,5 +227,5 @@
       std::list<BaseObject*>::iterator bo;
       for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++)
-        if ((*bo)->getName() != NULL && !strcmp((*bo)->getName(), objectName))
+        if ((*bo)->getName() != NULL && objectName == (*bo)->getName())
           return (*bo);
     }
@@ -276,5 +276,5 @@
     if (object->isA((*cl).classID))
   {
-    PRINT(0)("=%s::0x%.8X=-", (*cl).className, (*cl).classID);
+    PRINT(0)("=%s::0x%.8X=-", (*cl).className.c_str(), (*cl).classID);
   }
 }
@@ -285,8 +285,10 @@
  * @return a String containing the name of the Class, NULL if the Class was not found
  */
-const char* ClassList::IDToString(ClassID classID)
-{
+const std::string& ClassList::IDToString(ClassID classID)
+{
+  static const std::string empty("");
+
   ClassList* cl = ClassList::getClassList(classID);
-  return (cl != NULL) ? cl->className : NULL;
+  return (cl != NULL) ? cl->className : empty;
 }
 
@@ -296,5 +298,5 @@
  * @return the ClassID. CL_NULL, if the class was not found.
  */
-ClassID ClassList::StringToID(const char* className)
+ClassID ClassList::StringToID(const std::string& className)
 {
   ClassList* cl = ClassList::getClassList(className);
@@ -307,10 +309,7 @@
  * @returns true on match, false otherwise
  */
-bool ClassList::operator==(const char* className)
-{
-  if (likely( className != NULL && this->className != NULL))
-    return (!strcmp(this->className, className));
-  else
-    return false;
+bool ClassList::operator==(const std::string& className)
+{
+  return (this->className == className);
 }
 
@@ -342,9 +341,9 @@
       while (pow(10, lenCount) <= (*cl).objectList.size())
         ++lenCount;
-      for (int i=0; i < 30-strlen((*cl).className) - lenCount; i++)
+      for (int i=0; i < 30-(*cl).className.size() - lenCount; i++)
         (niceString[i]) = ' ';
-      niceString[30-strlen((*cl).className) - lenCount] = '\0';
-
-      PRINT(0)("| CLASS %s::%s %d\n", (*cl).className, niceString, (*cl).objectList.size());
+      niceString[30-(*cl).className.size() - lenCount] = '\0';
+
+      PRINT(0)("| CLASS %s::%s %d\n", (*cl).className.c_str(), niceString, (*cl).objectList.size());
 
       if (debugLevel >=2 && (*cl).objectList.size() > 0)
@@ -371,5 +370,5 @@
  * @see ClassList::debug
  */
-void ClassList::debugS(const char* className, unsigned int debugLevel)
+void ClassList::debugS(const std::string& className, unsigned int debugLevel)
 {
   ClassList::debug(debugLevel, ClassList::StringToID(className));
Index: trunk/src/lib/lang/class_list.h
===================================================================
--- trunk/src/lib/lang/class_list.h	(revision 7199)
+++ trunk/src/lib/lang/class_list.h	(revision 7221)
@@ -10,4 +10,5 @@
 #include "class_id.h"
 #include <list>
+#include <string>
 #ifndef NULL
 #define NULL     0    //!< NULL
@@ -32,9 +33,9 @@
 class ClassList {
   public:
-    ClassList(ClassID classID, unsigned long classIDFull, const char* className);
+    ClassList(ClassID classID, unsigned long classIDFull, const std::string& className);
     virtual ~ClassList();
 
     /* MAINTENANCE FUNCTIONS THESE ARE !!ONLY FOR BASEOBJECT !! */
-    static ClassList*                     addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const char* className);
+    static ClassList*                     addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const std::string& className);
     static void                           removeFromClassList(BaseObject* objectPointer);
 
@@ -42,7 +43,7 @@
 
     static const std::list<BaseObject*>*  getList(ClassID classID = CL_NULL);// { return (ClassList* fl = ClassList::getClassList(classID) != NULL)? &(fl->objectList) : NULL; };
-    static const std::list<BaseObject*>*  getList(const char* className); // { return (ClassList* fl = ClassList::getClassList(className) != NULL)? &(fl->objectList) : NULL;  };
-    static const std::list<const char*>*  getClassNames();
-    static BaseObject*                    getObject(const char* name, ClassID classID = CL_NULL);
+    static const std::list<BaseObject*>*  getList(const std::string& className); // { return (ClassList* fl = ClassList::getClassList(className) != NULL)? &(fl->objectList) : NULL;  };
+    static const std::list<std::string>*  getClassNames();
+    static BaseObject*                    getObject(const std::string& name, ClassID classID = CL_NULL);
     static bool                           exists(const BaseObject* object, ClassID classID = CL_NULL);
 
@@ -51,28 +52,28 @@
     static void                           whatIs(const BaseObject* object);
 
-    static const char*                    IDToString(ClassID classID = CL_NULL);
-    static ClassID                        StringToID(const char* className);
+    static const std::string&             IDToString(ClassID classID = CL_NULL);
+    static ClassID                        StringToID(const std::string& className);
     static void                           debug(unsigned int debugLevel = 0, ClassID classID = CL_NULL);
-    static void                           debugS(const char* className = NULL, unsigned int debugLevel = 0);
+    static void                           debugS(const std::string& className = "", unsigned int debugLevel = 0);
 
     inline bool                           operator==(ClassID classID) { return (this->classID == classID); };
-    bool                                  operator==(const char* className);
+    bool                                  operator==(const std::string& className);
     inline ClassID                        getLeafClassID() const { return this->classID; };
 
   private:
     static ClassList*                     getClassList(ClassID classID);
-    static ClassList*                     getClassList(const char* className);
+    static ClassList*                     getClassList(const std::string& className);
 
   private:
-    ClassID                         classID;                //!< ClassID stored in this ClassList
-    unsigned long                   classIDFull;            //!< The Full ClassID of this Class.
+    ClassID                               classID;                //!< ClassID stored in this ClassList
+    unsigned long                         classIDFull;            //!< The Full ClassID of this Class.
 
-    const char*                     className;              //!< Name of the Class Stored here
+    const std::string                     className;              //!< Name of the Class Stored here
 
-    std::list<BaseObject*>          objectList;             //!< A list of Objects belonging to this Class
+    std::list<BaseObject*>                objectList;             //!< A list of Objects belonging to this Class
 
     // STATIC MEMBERS
-    static std::list<ClassList>*    classList;              //!< The first Class in the List
-    static std::list<const char*>   classNames;             //!< a List of all Names of all classes, that have registered so far.
+    static std::list<ClassList>*          classList;              //!< The first Class in the List
+    static std::list<std::string>         classNames;             //!< a List of all Names of all classes, that have registered so far.
 };
 
