LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
Static Public Member Functions | List of all members
lsst::afw::table::detail::Access Class Reference

#include <Access.h>

Static Public Member Functions

template<typename T >
static Key< typename Key< T >
::Element > 
extractElement (KeyBase< T > const &kb, int n)
 
template<typename T >
static Key< Array< T > > extractRange (KeyBase< Array< T > > const &kb, int begin, int end)
 
template<typename T >
static Key< T > makeKey (int offset)
 
template<typename T >
static Key< T > makeKey (Field< T > const &field, int offset)
 
static Key< Flag > makeKey (int offset, int bit)
 
static void padSchema (Schema &schema, int bytes)
 

Detailed Description

Definition at line 29 of file Access.h.

Member Function Documentation

template<typename T >
static Key<typename Key<T>::Element> lsst::afw::table::detail::Access::extractElement ( KeyBase< T > const &  kb,
int  n 
)
inlinestatic

Definition at line 34 of file Access.h.

34  {
35  if (!static_cast<Key<T> const &>(kb).isValid()) {
36  throw LSST_EXCEPT(
37  pex::exceptions::LogicError,
38  (boost::format("Cannot extract subfield key from invalid key of type '%s' "
39  "(most often this is caused by failing to setup centroid or shape slots)")
40  % Key<T>::getTypeString()).str()
41  );
42  }
43  return Key<typename Key<T>::Element>(
44  static_cast<Key<T> const &>(kb).getOffset() + n * sizeof(typename Key<T>::Element)
45  );
46  }
#define LSST_EXCEPT(type,...)
Definition: Exception.h:46
template<typename T >
static Key< Array<T> > lsst::afw::table::detail::Access::extractRange ( KeyBase< Array< T > > const &  kb,
int  begin,
int  end 
)
inlinestatic

Definition at line 50 of file Access.h.

50  {
51  if (!static_cast<Key< Array<T> > const &>(kb).isValid()) {
52  throw LSST_EXCEPT(
53  pex::exceptions::LogicError,
54  (boost::format("Cannot extract subfield key from invalid key of type '%s' ")
55  % Key<T>::getTypeString()).str()
56  );
57  }
58  return Key< Array<T> >(
59  static_cast<Key< Array<T> > const &>(kb).getOffset() + begin * sizeof(typename Key<T>::Element),
60  end - begin
61  );
62  }
#define LSST_EXCEPT(type,...)
Definition: Exception.h:46
template<typename T >
static Key<T> lsst::afw::table::detail::Access::makeKey ( int  offset)
inlinestatic

Definition at line 66 of file Access.h.

66  {
67  return Key<T>(offset);
68  }
template<typename T >
static Key<T> lsst::afw::table::detail::Access::makeKey ( Field< T > const &  field,
int  offset 
)
inlinestatic

Definition at line 72 of file Access.h.

72  {
73  return Key<T>(offset, field);
74  }
static Key<Flag> lsst::afw::table::detail::Access::makeKey ( int  offset,
int  bit 
)
inlinestatic

Definition at line 77 of file Access.h.

77  {
78  return Key<Flag>(offset, bit);
79  }
static void lsst::afw::table::detail::Access::padSchema ( Schema schema,
int  bytes 
)
inlinestatic

Definition at line 82 of file Access.h.

82  {
83  schema._edit();
84  schema._impl->_recordSize += bytes;
85  }
tbl::Schema schema
Definition: CoaddPsf.cc:324

The documentation for this class was generated from the following file: