LSSTApplications  18.0.0+106,18.0.0+50,19.0.0,19.0.0+1,19.0.0+10,19.0.0+11,19.0.0+13,19.0.0+17,19.0.0+2,19.0.0-1-g20d9b18+6,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+6,19.0.0-1-g6fe20d0+1,19.0.0-1-g7011481+9,19.0.0-1-g8c57eb9+6,19.0.0-1-gb5175dc+11,19.0.0-1-gdc0e4a7+9,19.0.0-1-ge272bc4+6,19.0.0-1-ge3aa853,19.0.0-10-g448f008b,19.0.0-12-g6990b2c,19.0.0-2-g0d9f9cd+11,19.0.0-2-g3d9e4fb2+11,19.0.0-2-g5037de4,19.0.0-2-gb96a1c4+3,19.0.0-2-gd955cfd+15,19.0.0-3-g2d13df8,19.0.0-3-g6f3c7dc,19.0.0-4-g725f80e+11,19.0.0-4-ga671dab3b+1,19.0.0-4-gad373c5+3,19.0.0-5-ga2acb9c+2,19.0.0-5-gfe96e6c+2,w.2020.01
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
lsst::afw::table::FieldBase< T > Struct Template Reference

Field base class default implementation (used for numeric scalars and lsst::geom::Angle). More...

#include <FieldBase.h>

Inheritance diagram for lsst::afw::table::FieldBase< T >:
lsst::afw::table::Key< afw::table::Array< Scalar > > lsst::afw::table::Key< afw::table::Flag > lsst::afw::table::Key< CentroidElement > lsst::afw::table::Key< double > lsst::afw::table::Key< Element > lsst::afw::table::Key< ErrElement > lsst::afw::table::Key< float > lsst::afw::table::Key< FluxErrElement > lsst::afw::table::Key< int > lsst::afw::table::Key< lsst::afw::table::Array< int > > lsst::afw::table::Key< lsst::afw::table::Array< Scalar > > lsst::afw::table::Key< lsst::geom::Angle > lsst::afw::table::Key< Mag > lsst::afw::table::Key< MagErrElement > lsst::afw::table::Key< meas::base::Flux > lsst::afw::table::Key< Scalar > lsst::afw::table::Key< std::int64_t > lsst::afw::table::Key< std::uint16_t > lsst::afw::table::Field< T > lsst::afw::table::Key< T >

Public Types

typedef T Value
 the type returned by BaseRecord::get More...
 
typedef T & Reference
 the type returned by BaseRecord::operator[] (non-const) More...
 
typedef T const & ConstReference
 the type returned by BaseRecord::operator[] (const) More...
 
typedef T Element
 the type of subfields (the same as the type itself for scalars) More...
 

Public Member Functions

int getElementCount () const noexcept
 Return the number of subfield elements (always one for scalars). More...
 
 FieldBase ()=default
 
 FieldBase (int)
 
 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. More...
 

Protected Member Functions

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

Static Protected Member Functions

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

Detailed Description

template<typename T>
struct lsst::afw::table::FieldBase< T >

Field base class default implementation (used for numeric scalars and lsst::geom::Angle).

Definition at line 43 of file FieldBase.h.

Member Typedef Documentation

◆ ConstReference

template<typename T>
typedef T const& lsst::afw::table::FieldBase< T >::ConstReference

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

Definition at line 46 of file FieldBase.h.

◆ Element

template<typename T>
typedef T lsst::afw::table::FieldBase< T >::Element

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

Definition at line 47 of file FieldBase.h.

◆ Reference

template<typename T>
typedef T& lsst::afw::table::FieldBase< T >::Reference

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

Definition at line 45 of file FieldBase.h.

◆ Value

template<typename T>
typedef T lsst::afw::table::FieldBase< T >::Value

the type returned by BaseRecord::get

Definition at line 44 of file FieldBase.h.

Constructor & Destructor Documentation

◆ FieldBase() [1/4]

template<typename T>
lsst::afw::table::FieldBase< T >::FieldBase ( )
default

◆ FieldBase() [2/4]

template<typename T>
lsst::afw::table::FieldBase< T >::FieldBase ( int  )
inline

Definition at line 59 of file FieldBase.h.

59  {
61  "Constructor disabled (this Field type is not sized).");
62  }
Reports errors in the logical structure of the program.
Definition: Runtime.h:46
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48

◆ FieldBase() [3/4]

template<typename T>
lsst::afw::table::FieldBase< T >::FieldBase ( FieldBase< T > const &  )
defaultnoexcept

◆ FieldBase() [4/4]

template<typename T>
lsst::afw::table::FieldBase< T >::FieldBase ( FieldBase< T > &&  )
defaultnoexcept

◆ ~FieldBase()

template<typename T>
lsst::afw::table::FieldBase< T >::~FieldBase ( )
defaultnoexcept

Member Function Documentation

◆ getConstReference()

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

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

Definition at line 80 of file FieldBase.h.

80 { return *p; }

◆ getElementCount()

template<typename T>
int lsst::afw::table::FieldBase< T >::getElementCount ( ) const
inlinenoexcept

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

Definition at line 50 of file FieldBase.h.

50 { return 1; }

◆ getReference()

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

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

Definition at line 77 of file FieldBase.h.

77 { return *p; }

◆ getTypeString()

template<typename T >
std::string lsst::afw::table::FieldBase< T >::getTypeString ( )
static

Return a string description of the field type.

Definition at line 56 of file FieldBase.cc.

56  {
57  return TypeTraits<T>::getName();
58 }

◆ getValue()

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

Used to implement BaseRecord::get.

Definition at line 83 of file FieldBase.h.

83 { return *p; }

◆ makeDefault()

template<typename T>
static FieldBase lsst::afw::table::FieldBase< T >::makeDefault ( )
inlinestaticprotectednoexcept

Needed to allow Keys to be default-constructed.

Definition at line 71 of file FieldBase.h.

71 { return FieldBase(); }

◆ operator=() [1/2]

template<typename T>
FieldBase& lsst::afw::table::FieldBase< T >::operator= ( FieldBase< T > const &  )
defaultnoexcept

◆ operator=() [2/2]

template<typename T>
FieldBase& lsst::afw::table::FieldBase< T >::operator= ( FieldBase< T > &&  )
defaultnoexcept

◆ setValue()

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

Used to implement BaseRecord::set.

Definition at line 86 of file FieldBase.h.

86 { *p = v; }

◆ stream()

template<typename T>
void lsst::afw::table::FieldBase< T >::stream ( std::ostream os) const
inlineprotected

Defines how Fields are printed.

Definition at line 74 of file FieldBase.h.

74 {}

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