13 #include "eckit/utils/StringTools.h"
16 using namespace eckit;
35 bitfieldDef_(o.bitfieldDef_)
64 case IGNORE:
return "IGNORE";
66 case REAL:
return "REAL";
67 case DOUBLE:
return "DOUBLE";
68 case STRING:
return "STRING";
70 default:
return "UNKNOWN_TYPE";
76 std::string ut(StringTools::upper(t));
77 if (ut ==
"IGNORE")
return IGNORE;
78 if (ut ==
"INTEGER")
return INTEGER;
79 if (ut ==
"REAL")
return REAL;
80 if (ut ==
"DOUBLE")
return DOUBLE;
81 if (ut ==
"STRING")
return STRING;
82 if (ut ==
"BITFIELD")
return BITFIELD;
84 Log::error() <<
"Unknown type: '" << t <<
"'" << std::endl;
85 ASSERT(0 &&
"Unknown type");
106 if (compareDataSizes) {
117 s <<
"name: " <<
name_ <<
", ";
124 ASSERT(names.size() == sizes.size());
126 for (
size_t i = 0;
i < names.size(); ++
i)
127 s << names[
i] <<
":" << sizes[
i]
128 << (
i != names.size() - 1 ?
";" :
"");
const std::string & name() const
void bitfieldDef(const eckit::sql::BitfieldDef &b)
std::unique_ptr< Codec > coder_
bool equals(const Column &other, bool compareDataSizes=true) const
size_t dataSizeDoubles() const
virtual void print(std::ostream &s) const
const eckit::sql::BitfieldDef & bitfieldDef() const
static const char * columnTypeName(api::ColumnType type)
api::ColumnType type() const
void name(const std::string name)
Column & operator=(const Column &)
static api::ColumnType type(const std::string &)
bool operator==(const Column &) const
return true if names and types are the same; do not compare codecs.
const std::string & name() const
eckit::sql::BitfieldDef bitfieldDef_
bitfieldDef_ is not empty if type_ == BITFIELD.
int32_t type_
Note: type_ should be ColumnType, but it is saved on file so must be of a fixed size type.