6#include "boost/format.hpp"
7#include "boost/preprocessor/seq/for_each.hpp"
8#include "boost/preprocessor/tuple/to_seq.hpp"
23struct TypeTraits<
std::uint8_t> {
24 static char const *getName() {
return "B"; }
27struct TypeTraits<
std::uint16_t> {
28 static char const *getName() {
return "U"; }
31struct TypeTraits<
std::int32_t> {
32 static char const *getName() {
return "I"; }
35struct TypeTraits<
std::int64_t> {
36 static char const *getName() {
return "L"; }
39struct TypeTraits<float> {
40 static char const *getName() {
return "F"; }
43struct TypeTraits<double> {
44 static char const *getName() {
return "D"; }
47struct TypeTraits<
lsst::geom::Angle> {
48 static char const *getName() {
return "Angle"; }
57 return TypeTraits<T>::getName();
64 return (boost::format(
"Array%s") % TypeTraits<U>::getName()).str();
75 if (isVariableLength()) {
89 if (isVariableLength()) {
94 if (value.
size() > _size) {
97 (boost::format(
"String (%d) is too large for field (%d).") % value.
size() % _size).str());
106#define INSTANTIATE_FIELD_BASE(r, data, elem) template struct FieldBase<elem>;
#define LSST_EXCEPT(type,...)
#define INSTANTIATE_FIELD_BASE(r, data, elem)
Tag types used to declare specialized field types.
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
char Element
the type of subfields and array elements
static std::string getTypeString()
Return a string description of the field type.
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.
#define AFW_TABLE_FIELD_TYPE_N
#define AFW_TABLE_FIELD_TYPE_TUPLE