6 #include "boost/format.hpp" 7 #include "boost/preprocessor/seq/for_each.hpp" 8 #include "boost/preprocessor/tuple/to_seq.hpp" 23 struct TypeTraits<
std::uint8_t> {
24 static char const *getName() {
return "B"; }
27 struct TypeTraits<
std::uint16_t> {
28 static char const *getName() {
return "U"; }
31 struct TypeTraits<
std::int32_t> {
32 static char const *getName() {
return "I"; }
35 struct TypeTraits<
std::int64_t> {
36 static char const *getName() {
return "L"; }
39 struct TypeTraits<
float> {
40 static char const *getName() {
return "F"; }
43 struct TypeTraits<double> {
44 static char const *getName() {
return "D"; }
48 static char const *getName() {
return "Angle"; }
57 return TypeTraits<T>::getName();
64 return (
boost::format(
"Array%s") % TypeTraits<U>::getName()).str();
72 "Size must be provided when constructing a string field.");
78 if (isVariableLength()) {
80 return std::string(*reinterpret_cast<std::string const *>(p));
92 if (isVariableLength()) {
109 #define INSTANTIATE_FIELD_BASE(r, data, elem) template struct FieldBase<elem>; Field base class default implementation (used for numeric scalars and lsst::geom::Angle).
table::Key< table::Array< int > > _size
Reports attempts to exceed implementation-defined length limits for some classes. ...
#define AFW_TABLE_FIELD_TYPE_TUPLE
#define INSTANTIATE_FIELD_BASE(r, data, elem)
A base class for image defects.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
void setValue(Element *p, ndarray::Manager::Ptr const &, Value v) const
Used to implement BaseRecord::set.
BOOST_PP_SEQ_FOR_EACH(INSTANTIATE_COLUMNVIEW_SCALAR, _, BOOST_PP_TUPLE_TO_SEQ(AFW_TABLE_SCALAR_FIELD_TYPE_N, AFW_TABLE_SCALAR_FIELD_TYPE_TUPLE)) BOOST_PP_SEQ_FOR_EACH(INSTANTIATE_COLUMNVIEW_ARRAY
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement BaseRecord::get.
static std::string getTypeString()
Return a string description of the field type.
char Element
the type of subfields and array elements
#define AFW_TABLE_FIELD_TYPE_N