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).");
61 static bool const HAS_NAMED_SUBFIELDS =
false;
91 template <
typename OtherT>
95 template <
typename OtherT>
100 bool operator==(
Key const &other)
const {
return _offset == other._offset && _bit == other._bit; }
128 inline friend std::ostream &operator<<(std::ostream &os, Key<Flag>
const &key) {
130 <<
", bit=" << key.getBit() <<
")";
138 Value getValue(
Element const *p, ndarray::Manager::Ptr
const &)
const {
139 return (*p) & (
Element(1) << _bit);
143 void setValue(
Element *p, ndarray::Manager::Ptr
const &,
Value v)
const {
151 explicit Key(
int offset,
int bit) : _offset(offset), _bit(bit) {}
160 #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.