LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
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  }
table::Key< int > field
Definition: ApCorrMap.cc:72
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  }
afw::table::Schema schema
Definition: GaussianPsf.cc:41

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