#pragma once class IDbObject { public: /*! * \brief getDbId - check if object exists in db and return its id if any * \return id on success, 0 otherwise */ virtual int getDbId() = 0; /*! * \brief createInDb - create object in db * \return new object id on success, 0 otherwise */ virtual int createInDb() = 0; /*! * \brief getOrInsertDbId - get existing object id or try to create a new * object and get its id * \return existing or new object id on success, 0 otherwise */ virtual int getOrInsertDbId() = 0; };