LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
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 Value
 the type returned by BaseRecord::get
 
using Reference
 the type returned by BaseRecord::operator[] (non-const)
 
using ConstReference
 the type returned by BaseRecord::operator[] (const)
 
using Element
 the type of subfields (the same as the type itself for scalars)
 

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
 
std::size_t getElementCount () const noexcept
 Return the number of subfield elements (always one for scalars).
 
 FieldBase ()=default
 
 FieldBase (std::size_t)
 
 FieldBase (FieldBase const &) noexcept=default
 
 FieldBase (FieldBase &&) noexcept=default
 
FieldBaseoperator= (FieldBase const &) noexcept=default
 
FieldBaseoperator= (FieldBase &&) noexcept=default
 
 ~FieldBase () noexcept=default
 

Static Public Member Functions

static std::string getTypeString ()
 Return a string description of the field type.
 
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.
 
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 [1/2]

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

the type of subfields (the same as the type itself for scalars)

Definition at line 45 of file FieldBase.h.

◆ Element [2/2]

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 [1/2]

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

the type returned by BaseRecord::get

Definition at line 42 of file FieldBase.h.

◆ Value [2/2]

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/8]

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

◆ FieldBase() [2/8]

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

Definition at line 47 of file Flag.h.

47 {
49 "Constructor disabled (this Field type is not sized).");
50 }
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition Exception.h:48
Field base class default implementation (used for numeric scalars and lsst::geom::Angle).
Definition FieldBase.h:41

◆ FieldBase() [3/8]

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

◆ FieldBase() [4/8]

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

◆ ~FieldBase() [1/2]

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

◆ FieldBase() [5/8]

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

◆ FieldBase() [6/8]

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

Definition at line 57 of file FieldBase.h.

57 {
59 "Constructor disabled (this Field type is not sized).");
60 }

◆ FieldBase() [7/8]

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

◆ FieldBase() [8/8]

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

◆ ~FieldBase() [2/2]

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

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.

78{ return *p; }

◆ getElementCount() [1/2]

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.

38{ return 1; }

◆ getElementCount() [2/2]

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

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

Definition at line 48 of file FieldBase.h.

48{ return 1; }

◆ 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.

75{ return *p; }

◆ getTypeString() [1/2]

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

Return a string description of the field type.

Definition at line 51 of file FieldBase.cc.

56 {
58}

◆ getTypeString() [2/2]

static 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.

41{ return "Flag"; }

◆ 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.

81{ return *p; }

◆ makeDefault()

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

Needed to allow Keys to be default-constructed.

Definition at line 69 of file FieldBase.h.

69{ return FieldBase(); }

◆ operator=() [1/4]

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

◆ operator=() [2/4]

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

◆ operator=() [3/4]

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

◆ operator=() [4/4]

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.

84{ *p = v; }

◆ stream() [1/2]

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

Defines how Fields are printed.

Definition at line 72 of file FieldBase.h.

72{}

◆ stream() [2/2]

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.

60{}

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