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; }
122 return utils::hashCombine(17, _offset, _bit);
157 <<
", bit=" << key.
getBit() <<
")";
166 return (*p) & (
Element(1) << _bit);
190 struct hash<
lsst::afw::table::Key<lsst::afw::table::Flag>> {
#define LSST_EXCEPT(type,...)
Base class for all records.
Key specialization for Flag.
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()
Default construct a field.
bool operator==(Key const &other) const
Key & operator=(Key &&)=default
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.
Key & operator=(Key const &)=default
std::size_t hash_value() const noexcept
Return a hash of this object.
friend std::ostream & operator<<(std::ostream &os, Key< Flag > const &key)
Stringification.
KeyBase(KeyBase const &)=default
KeyBase & operator=(KeyBase &&)=default
KeyBase(KeyBase &&)=default
KeyBase & operator=(KeyBase const &)=default
A base class for Key that allows subfield keys to be extracted for some field types.
static bool const HAS_NAMED_SUBFIELDS
A class used as a handle to a particular field in a table.
bool operator==(Key< OtherT > const &other) const noexcept
Equality comparison.
Key() noexcept
Default construct a field.
A base class for image defects.
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.
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
Field base class default implementation (used for numeric scalars and lsst::geom::Angle).
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.
T Value
the type returned by BaseRecord::get
T Element
the type of subfields (the same as the type itself for scalars)
size_t operator()(argument_type const &obj) const noexcept