2 #ifndef LSST_AFW_TABLE_Flag_h_INCLUDED 3 #define LSST_AFW_TABLE_Flag_h_INCLUDED 47 "Constructor disabled (this Field type is not sized).");
67 static bool const HAS_NAMED_SUBFIELDS =
false;
104 template <
typename OtherT>
108 template <
typename OtherT>
113 bool operator==(
Key const &other)
const {
return _offset == other._offset && _bit == other._bit; }
140 Key(
Key const &) =
default;
142 Key & operator=(
Key const &) =
default;
143 Key & operator=(
Key &&) =
default;
147 inline friend std::ostream &operator<<(std::ostream &os, Key<Flag>
const &key) {
149 <<
", bit=" << key.getBit() <<
")";
157 Value getValue(
Element const *p, ndarray::Manager::Ptr
const &)
const {
158 return (*p) & (
Element(1) << _bit);
162 void setValue(
Element *p, ndarray::Manager::Ptr
const &,
Value v)
const {
170 explicit Key(
int offset,
int bit) : _offset(offset), _bit(bit) {}
179 #endif // !LSST_AFW_TABLE_Flag_h_INCLUDED Field base class default implementation (used for numeric scalars and Angle).
Key()
Default construct a field.
bool Value
the type returned by BaseRecord::get
bool operator==(CoordKey const &lhs, CoordKey const &rhs)
Compare CoordKeys for equality using the constituent Keys.
bool isValid() const
Return true if the key was initialized to valid offset.
A base class for image defects.
bool operator!=(Key< OtherT > const &other) const
Equality comparison.
static std::string getTypeString()
Return a string description of the field type.
int getBit() const
The index of this field's bit within the integer it shares with other Flag fields.
#define LSST_EXCEPT(type,...)
A base class for Key that allows subfield keys to be extracted for some field types.
bool operator==(Key const &other) const
Equality comparison.
Base class for all records.
A class used as a handle to a particular field in a table.
int getElementCount() const
Return the number of subfield elements (always one for scalars).
void stream(std::ostream &os) const
Defines how fields are printed.
bool operator==(Key< OtherT > const &other) const
Equality comparison.
int getOffset() const
Return the offset in bytes of the integer element that holds this field's bit.
std::int64_t Element
the actual storage type (shared by multiple flag fields)
bool operator!=(Key const &other) const
Equality comparison.
static std::string getTypeString()
Return a string description of the field type.