2 #ifndef AFW_TABLE_BaseColumnView_h_INCLUDED 3 #define AFW_TABLE_BaseColumnView_h_INCLUDED 46 ndarray::Array<IntT, 1, 1>
getArray()
const {
return _array; }
61 ndarray::Array<IntT, 1, 1> _array;
93 ndarray::ArrayRef<T, 1>
const operator[](
Key<T> const&
key)
const;
97 ndarray::ArrayRef<T, 2, 1>
const operator[](
Key<
Array<T> >
const& key)
const;
106 ndarray::result_of::vectorize<detail::FlagExtractor, ndarray::Array<Field<Flag>::Element
const, 1> >
::type 135 template <
typename InputIterator>
146 template <
typename InputIterator>
159 ndarray::Manager::Ptr
const& manager);
169 template <
typename RecordT>
173 typedef typename RecordT::Table
Table;
181 template <
typename InputIterator>
196 template <
typename InputIterator>
198 InputIterator last) {
205 void* buf = first->_data;
206 ndarray::Manager::Ptr manager = first->_manager;
207 char* expected =
reinterpret_cast<char*
>(buf) + recordSize;
208 for (++first; first != last; ++
first, ++recordCount, expected += recordSize) {
209 if (first->_data != expected || first->_manager != manager) {
211 "Record data is not contiguous in memory.");
217 template <
typename InputIterator>
219 InputIterator last) {
220 if (first == last)
return true;
224 void* buf = first->_data;
225 ndarray::Manager::Ptr manager = first->_manager;
226 char* expected =
reinterpret_cast<char*
>(buf) + recordSize;
227 for (++first; first != last; ++
first, ++recordCount, expected += recordSize) {
228 if (first->_data != expected || first->_manager != manager) {
238 #endif // !AFW_TABLE_BaseColumnView_h_INCLUDED Defines the fields and offsets for a table.
ndarray::Array< IntT, 1, 1 > getArray() const
int getRecordSize() const
Return the raw size of a record in bytes.
Column-wise view into a sequence of records that have been allocated contiguously.
A packed representation of a collection of Flag field columns.
std::shared_ptr< BaseTable > getTable() const
Return the table that owns the records.
IntT getMask(std::string const &name) const
static ColumnViewT make(std::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
ColumnViewT(BaseColumnView const &base)
Schema getSchema() const
Return the schema that defines the fields.
A base class for image defects.
static BaseColumnView make(std::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
std::shared_ptr< Table > getTable() const
Return the table that owns the records.
A description of a field in a table.
Tag types used to declare specialized field types.
T static_pointer_cast(T... args)
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
A class used as a handle to a particular field in a table.
Key specialization for Flag.
IntT getMask(Key< Flag > const &key) const
static bool isRangeContiguous(std::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Return true if the given record iterator range is continuous and the records all belong to the given ...
std::vector< SchemaItem< Flag > > const & getSchemaItems() const
Base class for all tables.
Reports errors that are due to events beyond the control of the program.