Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9329 in orxonox.OLD


Ignore:
Timestamp:
Jul 18, 2006, 7:34:48 PM (18 years ago)
Author:
bensch
Message:

orxonox/proxy: bo cleanup

Location:
branches/proxy/src/lib/lang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/lang/base_object.cc

    r9304 r9329  
    2121#include "util/loading/load_param.h"
    2222#include "class_list.h"
    23 
    24 #include "synchronizeable.h"
    25 
    2623
    2724/**
     
    4845  ClassList::removeFromClassList(this);
    4946
    50   //  delete []this->className;
    5147  if (this->xmlElem != NULL)
    5248    delete this->xmlElem;
     
    5955void BaseObject::loadParams(const TiXmlElement* root)
    6056{
    61   // all loadParams should sometime arrive here.
     57  // all loadParams should arrive here, and be tested for (root != NULL)
    6258  assert (root != NULL);
    6359
     60  // copy the xml-element for to know how it was loaded.
    6461  if (this->xmlElem != NULL)
    6562    delete this->xmlElem;
    6663  this->xmlElem = root->Clone();
     64
    6765  // name setup
    6866  LoadParam(root, "name", this, BaseObject, setName)
     
    9088/**
    9189 * @brief set the name of the Object
     90 * @param objectName The new name of the Object.
    9291 */
    9392void BaseObject::setName (const std::string& objectName)
     
    162161 * @returns true on match, false otherwise.
    163162 */
    164 bool BaseObject::operator==(const std::string& objectName)
     163bool BaseObject::operator==(const std::string& objectName) const
    165164{
    166165  return (this->objectName == objectName);
    167166}
    168167
    169 
    170 /**
    171  * @brief displays everything this class is
    172  * @TODO REIMPLEMENT WITH SENSE.
    173  */
    174 void BaseObject::whatIs() const
    175 {
    176 
    177 }
  • branches/proxy/src/lib/lang/base_object.h

    r8362 r9329  
    11/*!
    22 * @file base_object.h
    3   *  Definition of the base object class.
    4 
    5     This is a global handler for all classes.
    6 */
     3 * @brief Definition of the BaseObject class.
     4 *
     5 * This is a global handler for all classes Object and Class names
     6 *
     7 * BaseObject is the class, that handles object registration and
     8 * is the only write-access member of ClassList, where the Objects
     9 * References are stored.
     10 */
    711
    812
    9 #ifndef _BASE_OBJECT_H
    10 #define _BASE_OBJECT_H
     13#ifndef __BASE_OBJECT_H_
     14#define __BASE_OBJECT_H_
    1115
    1216#include "class_id.h"
     
    4145  bool isA (ClassID classID) const;
    4246  bool isA (const std::string& className) const;
    43   void whatIs() const;
    4447
    45   bool operator==(const std::string& objectName);
    4648  /** @param classID comparer for a ClassID @returns true on match, false otherwise */
    47   bool operator==(ClassID classID) { return this->isA(classID); };
     49  bool operator==(ClassID classID) const  { return this->isA(classID); };
     50  bool operator==(const std::string& objectName) const;
    4851
    4952protected:
     
    5457
    5558private:
    56 
    5759  std::string        className;        //!< the name of the class
    5860  long               classID;          //!< this is the id from the class_id.h enumeration
     
    6466};
    6567
    66 #endif /* _BASE_OBJECT_H */
     68#endif /* __BASE_OBJECT_H_ */
Note: See TracChangeset for help on using the changeset viewer.