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>
157 <<
", bit=" <<
key.getBit() <<
")";
166 return (*p) & (
Element(1) << _bit);
178 explicit Key(
int offset,
int bit) : _offset(offset), _bit(bit) {}
189 struct hash<
lsst::afw::table::Key<lsst::afw::table::Flag>> {
#define LSST_EXCEPT(type,...)
ItemVariant const * other
Base class for all records.
Key specialization for Flag.
bool isValid() const
Return true if the key was initialized to valid offset.
int getOffset() const
Return the offset in bytes of the integer element that holds this field's bit.
bool operator==(Key< OtherT > const &other) const
Equality comparison.
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
int getBit() const
The index of this field's bit within the integer it shares with other Flag fields.
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.
std::size_t hashCombine(std::size_t seed) noexcept
A base class for image defects.
FieldBase & operator=(FieldBase const &)=default
std::int64_t Element
the actual storage type (shared by multiple flag fields)
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
int getElementCount() const
Return the number of subfield elements (always one for scalars).
bool Value
the type returned by BaseRecord::get
FieldBase(FieldBase const &)=default
FieldBase & operator=(FieldBase &&)=default
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.
T Element
the type of subfields (the same as the type itself for scalars)
T Value
the type returned by BaseRecord::get
void setValue(Element *p, ndarray::Manager::Ptr const &, Value v) const
Used to implement BaseRecord::set.
size_t operator()(argument_type const &obj) const noexcept