17 #ifndef JUBATUS_CORE_STORAGE_COLUMN_TYPE_HPP_
18 #define JUBATUS_CORE_STORAGE_COLUMN_TYPE_HPP_
54 "bit_vector_type expects bit_vector's length as second argument");
62 "unneeded second parameter, it is used only for bit_vector_type");
162 template<
class Buffer>
164 packer.pack_array(2);
165 packer.pack(static_cast<uint8_t>(
type_));
169 if (o.type != msgpack::type::ARRAY || o.via.array.size != 2) {
170 throw msgpack::type_error();
173 o.via.array.ptr[0].convert(&type);
175 o.via.array.ptr[1].convert(&bit_vector_length);
189 #endif // JUBATUS_CORE_STORAGE_COLUMN_TYPE_HPP_
void msgpack_pack(msgpack::packer< Buffer > &packer) const
void msgpack_unpack(msgpack::object o)
column_type & operator=(const column_type &orig)
static size_t memory_size(size_t bit_width)
column_type(type_name name, int length)
friend bool operator!=(const column_type &x, const column_type &y)
bool is(const type_name &type) const
friend bool operator==(const column_type &x, const column_type &y)
std::string type_as_string() const
size_t bit_vector_length() const
void swap(column_type &rhs)
void swap(weighted_point &p1, weighted_point &p2)
msgpack::packer< jubatus_packer > packer
friend std::ostream & operator<<(std::ostream &os, const column_type &type)
column_type(type_name name)