2#ifndef LSST_AFW_TABLE_Flag_h_INCLUDED
3#define LSST_AFW_TABLE_Flag_h_INCLUDED
49 "Constructor disabled (this Field type is not sized).");
106 template <
typename OtherT>
110 template <
typename OtherT>
115 bool operator==(
Key const &other)
const {
return _offset == other._offset && _bit == other._bit; }
157 <<
", bit=" << key.getBit() <<
")";
166 return (*p) & (
Element(1) << _bit);
190struct hash<
lsst::afw::table::Key<lsst::afw::table::Flag>> {
#define LSST_EXCEPT(type,...)
bool isValid() const
Return true if the key was initialized to valid offset.
bool operator==(Key< OtherT > const &other) const
Equality comparison.
std::size_t getBit() const
The index of this field's bit within the integer it shares with other Flag fields.
Key & operator=(Key &&)=default
Key()
Default construct a field.
bool operator==(Key const &other) const
bool operator!=(Key< OtherT > const &other) const
bool operator!=(Key const &other) const
std::size_t getOffset() const
Return the offset in bytes of the integer element that holds this field's bit.
friend std::ostream & operator<<(std::ostream &os, Key< Flag > const &key)
Stringification.
std::size_t hash_value() const noexcept
Return a hash of this object.
Key & operator=(Key const &)=default
KeyBase & operator=(KeyBase const &)=default
KeyBase(KeyBase const &)=default
static bool const HAS_NAMED_SUBFIELDS
Key< FieldBase< Flag >::Element > getStorage() const
Return a key corresponding to the integer element where this field's bit is packed.
KeyBase(KeyBase &&)=default
KeyBase & operator=(KeyBase &&)=default
A class used as a handle to a particular field in a table.
bool operator==(Key< OtherT > const &other) const noexcept
Equality comparison.
std::size_t getOffset() const noexcept
Return the offset (in bytes) of this field within a record.
Key() noexcept
Default construct a field.
std::size_t hashCombine(std::size_t seed) noexcept
FieldBase & operator=(FieldBase const &)=default
std::size_t getElementCount() const
Return the number of subfield elements (always one for scalars).
void stream(std::ostream &os) const
Defines how fields are printed.
std::int64_t Element
the actual storage type (shared by multiple flag fields)
static std::string getTypeString()
Return a string description of the field type.
FieldBase(FieldBase &&)=default
FieldBase(FieldBase const &)=default
FieldBase & operator=(FieldBase &&)=default
bool Value
the type returned by BaseRecord::get
static std::string getTypeString()
Return a string description of the field type.
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement BaseRecord::get.
void setValue(Element *p, ndarray::Manager::Ptr const &, Value v) const
Used to implement BaseRecord::set.
lsst::afw::table::Key< lsst::afw::table::Flag > argument_type
size_t operator()(argument_type const &obj) const noexcept