/*! \file base_object.h \brief Definition of the base object class. that is a global handler for all classes. */ #ifndef _BASE_OBJECT_H #define _BASE_OBJECT_H #include "class_list.h" #ifndef NULL #define NULL 0x0 #endif class TiXmlElement; //! A class all other classes are derived from class BaseObject { public: BaseObject (const TiXmlElement* root = NULL); virtual ~BaseObject (); void loadParams(const TiXmlElement* root); void setClassID(int id); void setClassName(const char* className); void setClassID(int id, const char* className); /** \returns the className of the corresponding Object */ inline const char* getClassName(void) const { return this->className;}; /** \returns the classID of the corresponding Object */ inline int getClassID(void) const { return this->id; } bool isA (char* className); /** \returns if the object is finalized */ inline bool isFinalized() { return this->finalized; } void finalize(); void setName (const char* newName); const char* getName (void)const { return this->objectName; }; private: const char* className; //!< the name of the class int id; //!< this is the id from the class_list.h enumeration bool finalized; //!< is true if the object is ready to be garbage collected char* objectName; //!< The name of this object }; #endif /* _BASE_OBJECT_H */