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
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
lsst::afw::table::IdFactory Class Referenceabstract

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

virtual lsst::afw::table::IdFactory::~IdFactory ( )
inlinevirtual

Definition at line 51 of file IdFactory.h.

51 {}

Member Function Documentation

virtual boost::shared_ptr< IdFactory > lsst::afw::table::IdFactory::clone ( ) const
pure virtual

Deep-copy the IdFactory.

static boost::shared_ptr< IdFactory > lsst::afw::table::IdFactory::makeSimple ( )
static

Return a simple IdFactory that simply counts from 1.

This is used when an empty pointer is passed to the BaseTable constructor.

static boost::shared_ptr< IdFactory > lsst::afw::table::IdFactory::makeSource ( RecordId  expId,
int  reserved 
)
static

Return an IdFactory that includes another, fixed ID in the higher-order bits.

Parameters
[in]expIdID to include in the upper bits via a bitwise OR.
[in]reservedHow many bits to reserve for the part of the ID that is unique.

The final record ID will be:

* (upper << reserved) | sequence
*
virtual void lsst::afw::table::IdFactory::notify ( RecordId  id)
pure virtual

Notify the IdFactory that the given ID has been used and must not be returned by operator().

virtual RecordId lsst::afw::table::IdFactory::operator() ( )
pure virtual

Return a new unique RecordId.

void lsst::afw::table::IdFactory::operator= ( IdFactory const &  other)
inlineprivate

Definition at line 56 of file IdFactory.h.

56 {}

The documentation for this class was generated from the following file: