2#ifndef AFW_TABLE_DETAIL_Access_h_INCLUDED
3#define AFW_TABLE_DETAIL_Access_h_INCLUDED
7#include "ndarray/Manager.h"
36 if (!
static_cast<Key<T> const &
>(kb).isValid()) {
40 "Cannot extract subfield key from invalid key of type '%s' "
41 "(most often this is caused by failing to setup centroid or shape slots)") %
52 if (!
static_cast<Key<Array<T> > const &>(kb).isValid()) {
54 (boost::format(
"Cannot extract subfield key from invalid key of type '%s' ") %
72 return Key<T>(offset, field);
90 schema._impl->_recordSize += bytes;
#define LSST_EXCEPT(type,...)
Tag types used to declare specialized field types.
Base class for all records.
Base class for all tables.
A base class for Key that allows subfield keys to be extracted for some field types.
A class used as a handle to a particular field in a table.
std::size_t getOffset() const noexcept
Return the offset (in bytes) of this field within a record.
Defines the fields and offsets for a table.
static Key< typename Key< T >::Element > extractElement(KeyBase< T > const &kb, std::size_t n)
static Key< Array< T > > extractRange(KeyBase< Array< T > > const &kb, std::size_t begin, std::size_t end)
static Key< T > makeKey(std::size_t offset)
static void padSchema(Schema &schema, std::size_t bytes)
static Key< T > makeKey(Field< T > const &field, std::size_t offset)
static Key< Array< T > > makeKeyArray(std::size_t offset, std::size_t size)
static Key< Flag > makeKey(std::size_t offset, std::size_t bit)
static Key< std::string > makeKeyString(std::size_t offset, std::size_t size)
static std::string getTypeString()
Return a string description of the field type.
T Element
the type of subfields (the same as the type itself for scalars)
A description of a field in a table.