2 #ifndef AFW_TABLE_IdFactory_h_INCLUDED
3 #define AFW_TABLE_IdFactory_h_INCLUDED
30 virtual std::shared_ptr<IdFactory>
clone()
const = 0;
37 static std::shared_ptr<IdFactory>
makeSimple();
61 #endif // !AFW_TABLE_IdFactory_h_INCLUDED
std::int64_t RecordId
Type used for unique IDs for records.
static std::shared_ptr< IdFactory > makeSource(RecordId expId, int reserved)
Return an IdFactory that includes another, fixed ID in the higher-order bits.
virtual RecordId operator()()=0
Return a new unique RecordId.
static std::shared_ptr< IdFactory > makeSimple()
Return a simple IdFactory that simply counts from 1.
A polymorphic functor base class for generating record IDs for a table.
virtual void notify(RecordId id)=0
Notify the IdFactory that the given ID has been used and must not be returned by operator().
virtual std::shared_ptr< IdFactory > clone() const =0
Deep-copy the IdFactory.