/*! * @file new_class_id.h * @brief Definition of a dynamically allocating ClassID * */ #ifndef _NEW_CLASS_ID_H #define _NEW_CLASS_ID_H #include "type_info.h" #include #include #include "new_object_list.h" //! A class to dynamically allocate ClassID's and support a isA operator class NewClassID { public: NewClassID(); ~NewClassID(); template void registerObject(T* object, NewObjectList& list); private: NewObjectListBase* _objectList; std::list _iterators; }; template void NewClassID::registerObject(T* object, NewObjectList& objectList) { this->_objectList = &objectList; _iterators.push_back(objectList.registerObject(object)); } #endif /* _NEW_CLASS_ID_H */