|
lsst.afw
14.0-27-gbdf48f848+1
|
Base class for all records. More...
#include <BaseRecord.h>
Public Types | |
| typedef BaseTable | Table |
| The associated table class. More... | |
| typedef BaseColumnView | ColumnView |
| The associated ColumnView class. More... | |
| typedef CatalogT< BaseRecord > | Catalog |
| Template of CatalogT used to hold records of this type. More... | |
| typedef CatalogT< BaseRecord const > | ConstCatalog |
| Template of CatalogT used to hold const records of this type. More... | |
| typedef unsigned long | memId |
| typedef memId(* | memNewCallback) (const memId cid) |
| typedef memId(* | memCallback) (const Citizen *ptr) |
Public Member Functions | |
| BaseRecord (const BaseRecord &)=delete | |
| BaseRecord & | operator= (const BaseRecord &)=delete |
| BaseRecord (BaseRecord &&)=delete | |
| BaseRecord & | operator= (BaseRecord &&)=delete |
| Schema | getSchema () const |
| Return the Schema that holds this record's fields and keys. More... | |
| std::shared_ptr< BaseTable const > | getTable () const |
| Return the table this record is associated with. More... | |
| template<typename T > | |
| Field< T >::Element * | getElement (Key< T > const &key) |
| Return a pointer to the underlying elements of a field (non-const). More... | |
| template<typename T > | |
| Field< T >::Element const * | getElement (Key< T > const &key) const |
| Return a pointer to the underlying elements of a field (const). More... | |
| template<typename T > | |
| Field< T >::Reference | operator[] (Key< T > const &key) |
| Return a reference (or reference-like type) to the field's value. More... | |
| template<typename T > | |
| Field< T >::ConstReference | operator[] (Key< T > const &key) const |
| Return a const reference (or const-reference-like type) to the field's value. More... | |
| template<typename T > | |
| Field< T >::Value | get (Key< T > const &key) const |
| Return the value of a field for the given key. More... | |
| template<typename T , typename U > | |
| void | set (Key< T > const &key, U const &value) |
| Set value of a field for the given key. More... | |
| template<typename T > | |
| T | get (OutputFunctorKey< T > const &key) const |
| Compute a calculated or aggregate field. More... | |
| template<typename T , typename U > | |
| void | set (InputFunctorKey< T > const &key, U const &value) |
| Set a calculated or aggregate field. More... | |
| template<typename Ref > | |
| Ref | operator[] (ReferenceFunctorKey< Ref > const &key) |
| template<typename ConstRef > | |
| ConstRef | operator[] (ConstReferenceFunctorKey< ConstRef > const &key) const |
| void | assign (BaseRecord const &other) |
| Copy all field values from other to this, requiring that they have equal schemas. More... | |
| void | assign (BaseRecord const &other, SchemaMapper const &mapper) |
| Copy field values from other to this, using a mapper. More... | |
| ndarray::Manager::Ptr | getManager () const |
| virtual | ~BaseRecord () |
| std::string | repr () const |
| void | markPersistent (void) |
| memId | getId () const |
Static Public Member Functions | |
| static bool | hasBeenCorrupted () |
| static memId | getNextMemId () |
| static int | init () |
| static int | census (int, memId startingMemId=0) |
| static void | census (std::ostream &stream, memId startingMemId=0) |
| static const std::vector< const Citizen *> * | census () |
| static int | census (int, memId startingMemId=0) |
| static void | census (std::ostream &stream, memId startingMemId=0) |
| static const std::vector< const Citizen *> * | census () |
| static memId | setNewCallbackId (memId id) |
| static memId | setNewCallbackId (memId id) |
| static memId | setDeleteCallbackId (memId id) |
| static memId | setDeleteCallbackId (memId id) |
| static memNewCallback | setNewCallback (memNewCallback func) |
| static memCallback | setDeleteCallback (memCallback func) |
| static memCallback | setCorruptionCallback (memCallback func) |
Public Attributes | |
| magicSentinel | |
Protected Member Functions | |
| virtual void | _assign (BaseRecord const &other) |
| Called by assign() after transferring fields to allow subclass data members to be copied. More... | |
| BaseRecord (std::shared_ptr< BaseTable > const &table) | |
| Construct a record with uninitialized data. More... | |
Friends | |
| class | BaseTable |
| class | BaseColumnView |
Base class for all records.
BaseRecord is a polymorphic base class that provides the core record interface: access to fields and links back to the table it is associated with. Field access is provided by the templated get, set, and operator[] member functions. As templates they are nonvirtual and cannot be overridden by subclasses. The implementations for these accessors is in the FieldBase template specializations.
Each subclass of BaseRecord should be paired with a subclass of BaseTable. All record creation goes through a table, as the table allocates the memory used to store a record's fields and holds the Schema instance that defines those fields.
Records are noncopyable, and are hence usually passed by shared_ptr or [const-]reference.
Definition at line 29 of file BaseRecord.h.
Template of CatalogT used to hold records of this type.
Definition at line 46 of file BaseRecord.h.
The associated ColumnView class.
Definition at line 43 of file BaseRecord.h.
| typedef CatalogT<BaseRecord const> lsst::afw::table::BaseRecord::ConstCatalog |
Template of CatalogT used to hold const records of this type.
Definition at line 49 of file BaseRecord.h.
The associated table class.
Definition at line 40 of file BaseRecord.h.
|
delete |
|
delete |
|
inlinevirtual |
Definition at line 174 of file BaseRecord.h.
|
inlineprotected |
Construct a record with uninitialized data.
Definition at line 181 of file BaseRecord.h.
|
inlineprotectedvirtual |
Called by assign() after transferring fields to allow subclass data members to be copied.
Reimplemented in lsst::afw::table::SourceRecord, and lsst::afw::table::ExposureRecord.
Definition at line 178 of file BaseRecord.h.
| void lsst::afw::table::BaseRecord::assign | ( | BaseRecord const & | other | ) |
Copy all field values from other to this, requiring that they have equal schemas.
| void lsst::afw::table::BaseRecord::assign | ( | BaseRecord const & | other, |
| SchemaMapper const & | mapper | ||
| ) |
Copy field values from other to this, using a mapper.
|
inline |
Return the value of a field for the given key.
No checking is done to ensure the Key belongs to the correct schema.
Definition at line 123 of file BaseRecord.h.
|
inline |
Compute a calculated or aggregate field.
Definition at line 144 of file BaseRecord.h.
|
inline |
Return a pointer to the underlying elements of a field (non-const).
This low-level access is intended mostly for use with serialization; users should generally prefer the safer get(), set() and operator[] member functions.
Definition at line 65 of file BaseRecord.h.
|
inline |
Return a pointer to the underlying elements of a field (const).
This low-level access is intended mostly for use with serialization; users should generally prefer the safer get(), set() and operator[] member functions.
Definition at line 83 of file BaseRecord.h.
|
inline |
Definition at line 172 of file BaseRecord.h.
|
inline |
Return the Schema that holds this record's fields and keys.
Definition at line 52 of file BaseRecord.h.
|
inline |
Return the table this record is associated with.
Definition at line 55 of file BaseRecord.h.
|
delete |
|
delete |
|
inline |
Return a reference (or reference-like type) to the field's value.
Some field types (Point, Moments, Flag, Covariance, and Coord) do not support reference access.
No checking is done to ensure the Key belongs to the correct schema.
Definition at line 101 of file BaseRecord.h.
|
inline |
Return a const reference (or const-reference-like type) to the field's value.
Some field types (Point, Moments, Flag, Covariance, and Coord) do not support reference access.
No checking is done to ensure the Key belongs to the correct schema.
Definition at line 113 of file BaseRecord.h.
|
inline |
Definition at line 157 of file BaseRecord.h.
|
inline |
Definition at line 162 of file BaseRecord.h.
|
inline |
Set value of a field for the given key.
This method has an additional template parameter because some fields accept and convert different types to the stored field type.
No checking is done to ensure the Key belongs to the correct schema.
Definition at line 136 of file BaseRecord.h.
|
inline |
Set a calculated or aggregate field.
Definition at line 152 of file BaseRecord.h.
|
friend |
Definition at line 187 of file BaseRecord.h.
|
friend |
Definition at line 186 of file BaseRecord.h.
1.8.13