LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
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() <<
")";
165 Value getValue(
Element const *p, ndarray::Manager::Ptr
const &)
const {
166 return (*p) & (
Element(1) << _bit);
170 void setValue(Element *p, ndarray::Manager::Ptr
const &, Value v)
const {
172 *p |= (Element(1) << _bit);
174 *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>> {
196 #endif // !LSST_AFW_TABLE_Flag_h_INCLUDED
FieldBase(FieldBase const &)=default
std::int64_t Element
the actual storage type (shared by multiple flag fields)
bool operator!=(Key< OtherT > const &other) const
static bool const HAS_NAMED_SUBFIELDS
Key() noexcept
Default construct a field.
Key()
Default construct a field.
Key & operator=(Key const &)=default
FieldBase & operator=(FieldBase const &)=default
A base class for Key that allows subfield keys to be extracted for some field types.
void stream(std::ostream &os) const
Defines how fields are printed.
std::size_t hash_value() const noexcept
Return a hash of this object.
bool isValid() const
Return true if the key was initialized to valid offset.
FieldBase & operator=(FieldBase &&)=default
int getElementCount() const
Return the number of subfield elements (always one for scalars).
bool operator==(Key const &other) const
FieldBase(FieldBase &&)=default
bool operator!=(Key const &other) const
ItemVariant const * other
Base class for all records.
Reports errors in the logical structure of the program.
KeyBase(KeyBase &&)=default
A class used as a handle to a particular field in a table.
int getBit() const
The index of this field's bit within the integer it shares with other Flag fields.
friend std::ostream & operator<<(std::ostream &os, Key< Flag > const &key)
Stringification.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
bool operator==(Key< OtherT > const &other) const
Equality comparison.
std::size_t hashCombine(std::size_t seed) noexcept
Combine hashes.
Field base class default implementation (used for numeric scalars and lsst::geom::Angle).
KeyBase & operator=(KeyBase const &)=default
static std::string getTypeString()
Return a string description of the field type.
KeyBase & operator=(KeyBase &&)=default
size_t operator()(argument_type const &obj) const noexcept
KeyBase(KeyBase const &)=default
Key & operator=(Key &&)=default
bool Value
the type returned by BaseRecord::get
bool operator==(Key< OtherT > const &other) const noexcept
Equality comparison.
int getOffset() const
Return the offset in bytes of the integer element that holds this field's bit.
Key specialization for Flag.