LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
A polymorphic functor base class for generating record IDs for a table. More...
#include <IdFactory.h>
Public Member Functions | |
virtual RecordId | operator() ()=0 |
Return a new unique RecordId. More... | |
virtual void | notify (RecordId id)=0 |
Notify the IdFactory that the given ID has been used and must not be returned by operator(). More... | |
virtual boost::shared_ptr < IdFactory > | clone () const =0 |
Deep-copy the IdFactory. More... | |
virtual | ~IdFactory () |
Static Public Member Functions | |
static boost::shared_ptr < IdFactory > | makeSimple () |
Return a simple IdFactory that simply counts from 1. More... | |
static boost::shared_ptr < IdFactory > | makeSource (RecordId expId, int reserved) |
Return an IdFactory that includes another, fixed ID in the higher-order bits. More... | |
Private Member Functions | |
void | operator= (IdFactory const &other) |
A polymorphic functor base class for generating record IDs for a table.
The IDs produced by an IdFactory need not be sequential, but they must be unique, both with respect to the IDs it generates itself and those passed to it via the notify() member function. Valid IDs must be nonzero, as zero is used to indicate null in some contexts.
Definition at line 19 of file IdFactory.h.
|
inlinevirtual |
Definition at line 51 of file IdFactory.h.
|
pure virtual |
Deep-copy the IdFactory.
|
static |
Return a simple IdFactory that simply counts from 1.
This is used when an empty pointer is passed to the BaseTable constructor.
|
static |
Return an IdFactory that includes another, fixed ID in the higher-order bits.
[in] | expId | ID to include in the upper bits via a bitwise OR. |
[in] | reserved | How many bits to reserve for the part of the ID that is unique. |
The final record ID will be:
|
pure virtual |
Notify the IdFactory that the given ID has been used and must not be returned by operator().
|
pure virtual |
Return a new unique RecordId.
|
inlineprivate |
Definition at line 56 of file IdFactory.h.