lsst.afw
21.0.0-34-g13549a6f6+8935f19055
|
Key specialization for Flag. More...
#include <Flag.h>
Public Types | |
typedef bool | Value |
the type returned by BaseRecord::get More... | |
typedef std::int64_t | Element |
the actual storage type (shared by multiple flag fields) More... | |
Public Member Functions | |
template<typename OtherT > | |
bool | operator== (Key< OtherT > const &other) const |
Equality comparison. More... | |
template<typename OtherT > | |
bool | operator!= (Key< OtherT > const &other) const |
bool | operator== (Key const &other) const |
bool | operator!= (Key const &other) const |
std::size_t | hash_value () const noexcept |
Return a hash of this object. More... | |
int | getOffset () const |
Return the offset in bytes of the integer element that holds this field's bit. More... | |
int | getBit () const |
The index of this field's bit within the integer it shares with other Flag fields. More... | |
bool | isValid () const |
Return true if the key was initialized to valid offset. More... | |
Key () | |
Default construct a field. More... | |
Key (Key const &)=default | |
Key (Key &&)=default | |
Key & | operator= (Key const &)=default |
Key & | operator= (Key &&)=default |
~Key ()=default | |
Key< FieldBase< Flag >::Element > | getStorage () const |
Return a key corresponding to the integer element where this field's bit is packed. More... | |
int | getElementCount () const |
Return the number of subfield elements (always one for scalars). More... | |
Static Public Member Functions | |
static std::string | getTypeString () |
Return a string description of the field type. More... | |
Static Public Attributes | |
static bool const | HAS_NAMED_SUBFIELDS = false |
Protected Member Functions | |
void | stream (std::ostream &os) const |
Defines how fields are printed. More... | |
Friends | |
class | detail::Access |
class | BaseRecord |
std::ostream & | operator<< (std::ostream &os, Key< Flag > const &key) |
Stringification. More... | |
Key specialization for Flag.
Flag fields are special; their keys need to contain not only the offset to the integer element they share with other Flag fields, but also their position in that shared field.
Flag fields operate mostly like a bool field, but they do not support reference access, and internally they are packed into an integer shared by multiple fields so the marginal cost of each Flag field is only one bit.
|
inherited |
|
inherited |
the type returned by BaseRecord::get
|
inline |
|
default |
|
default |
|
default |
|
inline |
|
inlineinherited |
|
inline |
|
inherited |
Return a key corresponding to the integer element where this field's bit is packed.
Definition at line 15 of file KeyBase.cc.
|
inlinestaticinherited |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
default |
|
default |
|
inline |
|
inline |
Equality comparison.
Two keys with different types are never equal. Keys with the same type are equal if they point to the same location in a table, regardless of what Schema they were constructed from (for instance, if a field has a different name in one Schema than another, but is otherwise the same, the two keys will be equal).
|
inlineprotectedinherited |
|
friend |
|
friend |
|
friend |
|
staticinherited |