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).
static std::string getTypeString()
Return a string description of the field type.
bool operator==(Key< OtherT > const &other) const
Equality comparison.
static bool const HAS_NAMED_SUBFIELDS
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::get.
bool operator!=(Key const &other) const
Equality comparison.
bool operator==(Key const &other) const
Equality comparison.
static std::string getTypeString()
Return a string description of the field type.
boost::intrusive_ptr< Manager > Ptr
T Element
the type of subfields (the same as the type itself for scalars)
void setValue(Element *p, ndarray::Manager::Ptr const &, Value v) const
Used to implement RecordBase::set.
int getOffset() const
Return the offset in bytes of the integer element that holds this field's bit.
boost::int64_t Element
the actual storage type (shared by multiple flag fields)
bool Value
the type returned by BaseRecord::get
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.
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 isValid() const
Return true if the key was initialized to valid offset.
bool operator==(Key< OtherT > const &other) const
Equality comparison.
bool operator!=(Key< OtherT > const &other) const
Equality comparison.
Key()
Default construct a field.