lsst.afw
19.0.0-25-g6c8df7140+1
|
Go to the documentation of this file.
2 #ifndef AFW_TABLE_BaseRecord_h_INCLUDED
3 #define AFW_TABLE_BaseRecord_h_INCLUDED
97 "Key is not valid (if this is a SourceRecord, make sure slot aliases have been set up).");
99 return reinterpret_cast<typename
Field<T>::Element*
>(
reinterpret_cast<char*
>(_data) +
110 template <
typename T>
112 if (!
key.isValid()) {
115 "Key is not valid (if this is a SourceRecord, make sure slot aliases have been set up).");
117 return reinterpret_cast<typename
Field<T>::Element const*
>(
reinterpret_cast<char const*
>(_data) +
128 template <
typename T>
140 template <
typename T>
150 template <
typename T>
163 template <
typename T,
typename U>
171 template <
typename T>
173 return key.get(*
this);
179 template <
typename T,
typename U>
181 return key.set(*
this, value);
184 template <
typename Ref>
186 return key.getReference(*
this);
189 template <
typename ConstRef>
191 return key.getConstReference(*
this);
200 ndarray::Manager::Ptr
getManager()
const {
return _manager; }
223 ndarray::Manager::Ptr _manager;
226 template <
typename RecordT,
typename ...Args>
229 std::forward<Args>(args)...);
237 #endif // !AFW_TABLE_BaseRecord_h_INCLUDED
T & Reference
the type returned by BaseRecord::operator[] (non-const)
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
BaseColumnView ColumnView
The associated ColumnView class.
Base class for objects that can return a const reference to part of a record, but are not a true Key.
ConstRef operator[](ConstReferenceFunctorKey< ConstRef > const &key) const
T get(OutputFunctorKey< T > const &key) const
Compute a calculated or aggregate field.
BaseRecord & operator=(BaseRecord &&)=delete
Defines the fields and offsets for a table.
CatalogT< BaseRecord > Catalog
Template of CatalogT used to hold records of this type.
Ref operator[](ReferenceFunctorKey< Ref > const &key)
Column-wise view into a sequence of records that have been allocated contiguously.
virtual void _stream(std::ostream &os) const
Called by operator<<.
Helper struct that contains the information passed from BaseTable to BaseRecord at construction.
Base class for all tables.
Base class for objects that can extract a value from a record, but are not a true Key themselves.
ndarray::Manager::Ptr getManager() const
Field< T >::Element * getElement(Key< T > const &key)
Return a pointer to the underlying elements of a field (non-const).
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied.
Field< T >::Element const * getElement(Key< T > const &key) const
Return a pointer to the underlying elements of a field (const).
BaseRecord(ConstructionToken const &, detail::RecordData &&data)
Construct a record with uninitialized data.
ItemVariant const * other
Base class for all records.
Field< T >::ConstReference operator[](Key< T > const &key) const
Return a const reference (or const-reference-like type) to the field's value.
A mapping between the keys of two Schemas, used to copy data between them.
A class used as a handle to a particular field in a table.
CatalogT< BaseRecord const > ConstCatalog
Template of CatalogT used to hold const records of this type.
BaseRecord(BaseRecord &&)=delete
T const & ConstReference
the type returned by BaseRecord::operator[] (const)
A base class for image defects.
#define LSST_EXCEPT(type,...)
BaseRecord(const BaseRecord &)=delete
Base class for objects that can return a non-const reference to part of a record, but are not a true ...
friend std::ostream & operator<<(std::ostream &os, BaseRecord const &record)
Write the record's content out, one field on each line.
void assign(BaseRecord const &other)
Copy all field values from other to this, requiring that they have equal schemas.
BaseRecord & operator=(const BaseRecord &)=delete
Field< T >::Reference operator[](Key< T > const &key)
Return a reference (or reference-like type) to the field's value.
T Value
the type returned by BaseRecord::get
std::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Schema getSchema() const
Return the Schema that holds this record's fields and keys.
void set(InputFunctorKey< T > const &key, U const &value)
Set a calculated or aggregate field.
FieldBase< T >::Element Element
Type used to store field data in the table (a field may have multiple elements).
std::shared_ptr< RecordT > constructRecord(Args &&...args)
Helper function that must be used by all _makeRecord overrides to actually construct records.
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
BaseTable Table
The associated table class.