2 #ifndef LSST_AFW_TABLE_Flag_h_INCLUDED
3 #define LSST_AFW_TABLE_Flag_h_INCLUDED
9 namespace lsst {
namespace afw {
namespace table {
38 #ifndef SWIG_BUG_3465431_FIXED
45 lsst::pex::exceptions::LogicError,
46 "Constructor disabled (it only appears to exist as a workaround for a SWIG bug)."
54 void stream(std::ostream & os)
const {}
126 inline friend std::ostream & operator<<(std::ostream & os, Key<Flag>
const & key) {
128 <<
", bit=" << key.getBit() <<
")";
138 return (*p) & (
Element(1) << _bit);
150 explicit Key(
int offset,
int bit) :
_offset(offset), _bit(bit) {}
158 #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!=(Key const &other) const
Equality comparison.
bool operator==(Key< OtherT > const &other) const
Equality comparison.
bool operator!=(Key< OtherT > const &other) const
Equality comparison.
bool operator==(Key const &other) const
Equality comparison.
void stream(std::ostream &os) const
Defines how fields are printed.
int getBit() const
The index of this field's bit within the integer it shares with other Flag fields.
boost::intrusive_ptr< Manager > Ptr
int getOffset() const
Return the offset in bytes of the integer element that holds this field's bit.
int getElementCount() const
Return the number of subfield elements (always one for scalars).
static std::string getTypeString()
Return a string description of the field type.
static bool const HAS_NAMED_SUBFIELDS
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::get.
T Element
the type of subfields (the same as the type itself for scalars)
#define LSST_EXCEPT(type,...)
A base class for Key that allows subfield keys to be extracted for some field types.
Base class for all records.
A class used as a handle to a particular field in a table.
void setValue(Element *p, ndarray::Manager::Ptr const &, Value v) const
Used to implement RecordBase::set.
bool operator==(Key< OtherT > const &other) const
Equality comparison.
bool isValid() const
Return true if the key was initialized to valid offset.
boost::int64_t Element
the actual storage type (shared by multiple flag fields)
static std::string getTypeString()
Return a string description of the field type.