23 #ifndef AFW_TABLE_arrays_h_INCLUDED 24 #define AFW_TABLE_arrays_h_INCLUDED 109 virtual ndarray::Array<T const, 1, 1>
get(
BaseRecord const& record)
const;
112 virtual void set(
BaseRecord& record, ndarray::Array<T const, 1, 1>
const& value)
const;
121 bool operator==(
ArrayKey<T> const& other)
const {
return other._begin == _begin && other._size == _size; }
127 bool isValid()
const {
return _begin.isValid(); }
136 ArrayKey(
Key<T> const& begin,
int size) : _begin(begin), _size(size) {}
145 #endif // !AFW_TABLE_arrays_h_INCLUDED Defines the fields and offsets for a table.
A FunctorKey used to get or set a ndarray::Array from a sequence of scalar Keys.
bool operator!=(ArrayKey< T > const &other) const
Compare the FunctorKey for equality with another, using the underlying scalar Keys.
A proxy type for name lookups in a Schema.
static ArrayKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit, std::vector< T > const &docData)
Add an array of fields to a Schema, and return an ArrayKey that points to them.
table::Key< std::string > name
afw::table::Schema schema
bool isValid() const
Return True if the FunctorKey contains valid scalar keys.
bool operator==(ArrayKey< T > const &other) const
Compare the FunctorKey for equality with another, using the underlying scalar Keys.
virtual ndarray::ArrayRef< T, 1, 1 > getReference(BaseRecord &record) const
Get non-const reference array from the given record.
ArrayKey & operator=(ArrayKey const &)
A base class for image defects.
Base class for objects that can return a const reference to part of a record, but are not a true Key...
Key< T > operator[](int i) const
Return a scalar Key for an element of the array.
Tag types used to declare specialized field types.
ArrayKey slice(int begin, int end) const
Return a FunctorKey corresponding to a range of elements.
int getSize() const
Return the number of elements in the array.
Base class for objects that can return a non-const reference to part of a record, but are not a true ...
Base class for all records.
A class used as a handle to a particular field in a table.
virtual ndarray::ArrayRef< T const, 1, 1 > getConstReference(BaseRecord const &record) const
Get const reference array from the given record.
ArrayKey()
Default constructor; instance will not be usable unless subsequently assigned to. ...
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.