#include "FITKAbstractGUIObject.h" #include "FITKGUIRepo.h" namespace Core { FITKAbstractGUIObject::FITKAbstractGUIObject() { //自动分配ID static int ID = 0; _guiID = ++ID; //加入仓库 FITKGUIREPO->insertGUIObject(this); } FITKAbstractGUIObject::~FITKAbstractGUIObject() { //从仓库移除 FITKGUIREPO->removeGUIObject(this); } int FITKAbstractGUIObject::getGUIObjectID() const { return _guiID; } }