23 #ifndef AFW_TABLE_arrays_h_INCLUDED
24 #define AFW_TABLE_arrays_h_INCLUDED
29 namespace lsst {
namespace afw {
namespace table {
61 std::string
const &
name,
62 std::string
const & doc,
63 std::string
const & unit,
64 std::vector<T>
const & docData
79 std::string
const & name,
80 std::string
const & doc,
81 std::string
const & unit,
114 virtual ndarray::Array<T const,1,1>
get(
BaseRecord const & record)
const;
117 virtual void set(
BaseRecord & record, ndarray::Array<T const,1,1>
const & value)
const;
154 #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.
A proxy type for name lookups in a Schema.
table::Key< std::string > name
virtual ndarray::ArrayRef< T, 1, 1 > getReference(BaseRecord &record) const
Get non-const reference array from the given record.
afw::table::Schema schema
ArrayKey()
Default constructor; instance will not be usuable unless subsequently assigned to.
ArrayKey(Key< T > const &begin, int size)
bool operator==(ArrayKey< T > const &other) const
Compare the FunctorKey for equality with another, using the underlying scalar Keys.
virtual ndarray::ArrayRef< T const, 1, 1 > getConstReference(BaseRecord const &record) const
Get const reference array from the given record.
Base class for objects that can return a const reference to part of a record, but are not a true Key...
Tag types used to declare specialized field types.
virtual void set(BaseRecord &record, ndarray::Array< T const, 1, 1 > const &value) const
Set an array in the given record.
Base class for objects that can return a non-const reference to part of a record, but are not a true ...
ArrayKey slice(int begin, int end) const
Return a FunctorKey corresponding to a range of elements.
Base class for all records.
A class used as a handle to a particular field in a table.
Key< T > operator[](int i) const
Return a scalar Key for an element of the array.
bool operator!=(ArrayKey< T > const &other) const
Compare the FunctorKey for equality with another, using the underlying scalar Keys.
bool isValid() const
Return True if the FunctorKey contains valid scalar keys.
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.
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.
int getSize() const
Return the number of elements in the array.