lsst.afw g3a5ebb7d8a+28b83bf6a5
Loading...
Searching...
No Matches
lsst::afw::table::FieldBase< Flag > Struct Reference

Specialization for Flag fields. More...

#include <Flag.h>

Inheritance diagram for lsst::afw::table::FieldBase< Flag >:
lsst::afw::table::Element< Flag > lsst::afw::table::Field< Flag > lsst::afw::table::Key< Flag > lsst::afw::table::Key< Flag >

Public Types

using Value = bool
 the type returned by BaseRecord::get
using Element = std::int64_t
 the actual storage type (shared by multiple flag fields)
using Reference
 the type returned by BaseRecord::operator[] (non-const)
using ConstReference
 the type returned by BaseRecord::operator[] (const)

Public Member Functions

std::size_t getElementCount () const
 Return the number of subfield elements (always one for scalars).
 FieldBase ()=default
 FieldBase (std::size_t)
 FieldBase (FieldBase const &)=default
 FieldBase (FieldBase &&)=default
FieldBaseoperator= (FieldBase const &)=default
FieldBaseoperator= (FieldBase &&)=default
 ~FieldBase ()=default

Static Public Member Functions

static std::string getTypeString ()
 Return a string description of the field type.

Protected Member Functions

void stream (std::ostream &os) const
 Defines how fields are printed.
Reference getReference (Element *p, ndarray::Manager::Ptr const &) const
 Used to implement BaseRecord::operator[] (non-const).
ConstReference getConstReference (Element const *p, ndarray::Manager::Ptr const &) const
 Used to implement BaseRecord::operator[] (const).
Value getValue (Element const *p, ndarray::Manager::Ptr const &) const
 Used to implement BaseRecord::get.
void setValue (Element *p, ndarray::Manager::Ptr const &, Value v) const
 Used to implement BaseRecord::set.

Static Protected Member Functions

static FieldBase makeDefault () noexcept
 Needed to allow Keys to be default-constructed.

Detailed Description

Specialization for Flag fields.

Flag fields are handled specially in many places, because their keys have both an offset into an integer element and the bit in that element; while other fields have one or more elements per field, Flags have multiple fields per element. This means we can't put all the custom code for Flag in FieldBase, and because Flags have an explicit Key specialization, we put the record access implementation in Key.

Definition at line 33 of file Flag.h.

Member Typedef Documentation

◆ ConstReference

using lsst::afw::table::FieldBase< Flag >::ConstReference

the type returned by BaseRecord::operator[] (const)

Definition at line 44 of file FieldBase.h.

◆ Element

using lsst::afw::table::FieldBase< Flag >::Element = std::int64_t

the actual storage type (shared by multiple flag fields)

Definition at line 35 of file Flag.h.

◆ Reference

using lsst::afw::table::FieldBase< Flag >::Reference

the type returned by BaseRecord::operator[] (non-const)

Definition at line 43 of file FieldBase.h.

◆ Value

using lsst::afw::table::FieldBase< Flag >::Value = bool

the type returned by BaseRecord::get

Definition at line 34 of file Flag.h.

Constructor & Destructor Documentation

◆ FieldBase() [1/4]

lsst::afw::table::FieldBase< Flag >::FieldBase ( )
default

◆ FieldBase() [2/4]

lsst::afw::table::FieldBase< Flag >::FieldBase ( std::size_t )
inline

Definition at line 47 of file Flag.h.

◆ FieldBase() [3/4]

lsst::afw::table::FieldBase< Flag >::FieldBase ( FieldBase< Flag > const & )
default

◆ FieldBase() [4/4]

lsst::afw::table::FieldBase< Flag >::FieldBase ( FieldBase< Flag > && )
default

◆ ~FieldBase()

lsst::afw::table::FieldBase< Flag >::~FieldBase ( )
default

Member Function Documentation

◆ getConstReference()

ConstReference lsst::afw::table::FieldBase< Flag >::getConstReference ( Element const * p,
ndarray::Manager::Ptr const &  ) const
inlineprotected

Used to implement BaseRecord::operator[] (const).

Definition at line 78 of file FieldBase.h.

◆ getElementCount()

std::size_t lsst::afw::table::FieldBase< Flag >::getElementCount ( ) const
inline

Return the number of subfield elements (always one for scalars).

Definition at line 38 of file Flag.h.

◆ getReference()

Reference lsst::afw::table::FieldBase< Flag >::getReference ( Element * p,
ndarray::Manager::Ptr const &  ) const
inlineprotected

Used to implement BaseRecord::operator[] (non-const).

Definition at line 75 of file FieldBase.h.

◆ getTypeString()

std::string lsst::afw::table::FieldBase< Flag >::getTypeString ( )
inlinestatic

Return a string description of the field type.

Definition at line 41 of file Flag.h.

◆ getValue()

Value lsst::afw::table::FieldBase< Flag >::getValue ( Element const * p,
ndarray::Manager::Ptr const &  ) const
inlineprotected

Used to implement BaseRecord::get.

Definition at line 81 of file FieldBase.h.

◆ makeDefault()

FieldBase lsst::afw::table::FieldBase< Flag >::makeDefault ( )
inlinestaticprotectednoexcept

Needed to allow Keys to be default-constructed.

Definition at line 69 of file FieldBase.h.

◆ operator=() [1/2]

FieldBase & lsst::afw::table::FieldBase< Flag >::operator= ( FieldBase< Flag > && )
default

◆ operator=() [2/2]

FieldBase & lsst::afw::table::FieldBase< Flag >::operator= ( FieldBase< Flag > const & )
default

◆ setValue()

void lsst::afw::table::FieldBase< Flag >::setValue ( Element * p,
ndarray::Manager::Ptr const & ,
Value v ) const
inlineprotected

Used to implement BaseRecord::set.

Definition at line 84 of file FieldBase.h.

◆ stream()

void lsst::afw::table::FieldBase< Flag >::stream ( std::ostream & os) const
inlineprotected

Defines how fields are printed.

Definition at line 60 of file Flag.h.


The documentation for this struct was generated from the following files: