susumu.yata
null+****@clear*****
Tue Dec 16 10:43:55 JST 2014
susumu.yata 2014-11-18 11:54:17 +0900 (Tue, 18 Nov 2014) New Revision: 6499084ff51b866e368c7baa6e345b7277ae4322 https://github.com/groonga/grnxx/commit/6499084ff51b866e368c7baa6e345b7277ae4322 Message: Remove commented-out old implementations. Modified files: lib/grnxx/impl/column/scalar/text.hpp lib/grnxx/impl/column/vector/float.hpp lib/grnxx/impl/column/vector/geo_point.hpp lib/grnxx/impl/column/vector/int.hpp Modified: lib/grnxx/impl/column/scalar/text.hpp (+0 -7) =================================================================== --- lib/grnxx/impl/column/scalar/text.hpp 2014-11-17 21:13:06 +0900 (52559ff) +++ lib/grnxx/impl/column/scalar/text.hpp 2014-11-18 11:54:17 +0900 (e36889b) @@ -62,13 +62,6 @@ class Column<Text> : public ColumnBase { return Text(&bodies_[offset + sizeof(uint64_t)], size); } } -// Text get(Int row_id) const { -// size_t value_id = row_id.value(); -// if (value_id >= values_.size()) { -// return Text::na(); -// } -// return values_[value_id]; -// } // Read values. // // On failure, throws an exception. Modified: lib/grnxx/impl/column/vector/float.hpp (+0 -57) =================================================================== --- lib/grnxx/impl/column/vector/float.hpp 2014-11-17 21:13:06 +0900 (0dce527) +++ lib/grnxx/impl/column/vector/float.hpp 2014-11-18 11:54:17 +0900 (23bab02) @@ -74,63 +74,6 @@ class Column<Vector<Float>> : public ColumnBase { static Vector<Float> parse_datum(const Datum &datum); }; -//template <> -//class Column<Vector<Float>> : public ColumnBase { -// public: -// // -- Public API -- - -// bool set(Error *error, Int row_id, const Datum &datum); -// bool get(Error *error, Int row_id, Datum *datum) const; - -// // -- Internal API -- - -// // Create a new column. -// // -// // Returns a pointer to the column on success. -// // On failure, returns nullptr and stores error information into "*error" if -// // "error" != nullptr. -// static unique_ptr<Column> create(Error *error, -// Table *table, -// const StringCRef &name, -// const ColumnOptions &options); - -// ~Column(); - -// bool set_default_value(Error *error, Int row_id); -// void unset(Int row_id); - -// // Return a value identified by "row_id". -// // -// // Assumes that "row_id" is valid. Otherwise, the result is undefined. -// Vector<Float> get(Int row_id) const { -// Int size = static_cast<Int>(headers_[row_id] & 0xFFFF); -// if (size == 0) { -// return Vector<Float>(nullptr, 0); -// } -// Int offset = static_cast<Int>(headers_[row_id] >> 16); -// if (size < 0xFFFF) { -// return Vector<Float>(&bodies_[offset], size); -// } else { -// // The size of a long vector is stored in front of the body. -// std::memcpy(&size, &bodies_[offset], sizeof(Int)); -// return Vector<Float>(&bodies_[offset + 1], size); -// } -// } - -// // Read values. -// void read(ArrayCRef<Record> records, ArrayRef<Vector<Float>> values) const { -// for (Int i = 0; i < records.size(); ++i) { -// values.set(i, get(records.get_row_id(i))); -// } -// } - -// private: -// Array<UInt> headers_; -// Array<Float> bodies_; - -// Column(); -//}; - } // namespace impl } // namespace grnxx Modified: lib/grnxx/impl/column/vector/geo_point.hpp (+0 -59) =================================================================== --- lib/grnxx/impl/column/vector/geo_point.hpp 2014-11-17 21:13:06 +0900 (03f7014) +++ lib/grnxx/impl/column/vector/geo_point.hpp 2014-11-18 11:54:17 +0900 (5a68286) @@ -75,65 +75,6 @@ class Column<Vector<GeoPoint>> : public ColumnBase { static Vector<GeoPoint> parse_datum(const Datum &datum); }; -//// TODO -//template <> -//class Column<Vector<GeoPoint>> : public ColumnBase { -// public: -// // -- Public API -- - -// bool set(Error *error, Int row_id, const Datum &datum); -// bool get(Error *error, Int row_id, Datum *datum) const; - -// // -- Internal API -- - -// // Create a new column. -// // -// // Returns a pointer to the column on success. -// // On failure, returns nullptr and stores error information into "*error" if -// // "error" != nullptr. -// static unique_ptr<Column> create(Error *error, -// Table *table, -// const StringCRef &name, -// const ColumnOptions &options); - -// ~Column(); - -// bool set_default_value(Error *error, Int row_id); -// void unset(Int row_id); - -// // Return a value identified by "row_id". -// // -// // Assumes that "row_id" is valid. Otherwise, the result is undefined. -// Vector<GeoPoint> get(Int row_id) const { -// Int size = static_cast<Int>(headers_[row_id] & 0xFFFF); -// if (size == 0) { -// return Vector<GeoPoint>(nullptr, 0); -// } -// Int offset = static_cast<Int>(headers_[row_id] >> 16); -// if (size < 0xFFFF) { -// return Vector<GeoPoint>(&bodies_[offset], size); -// } else { -// // The size of a long vector is stored in front of the body. -// std::memcpy(&size, &bodies_[offset], sizeof(Int)); -// return Vector<GeoPoint>(&bodies_[offset + 1], size); -// } -// } - -// // Read values. -// void read(ArrayCRef<Record> records, -// ArrayRef<Vector<GeoPoint>> values) const { -// for (Int i = 0; i < records.size(); ++i) { -// values.set(i, get(records.get_row_id(i))); -// } -// } - -// private: -// Array<UInt> headers_; -// Array<GeoPoint> bodies_; - -// Column(); -//}; - } // namespace impl } // namespace grnxx Modified: lib/grnxx/impl/column/vector/int.hpp (+0 -60) =================================================================== --- lib/grnxx/impl/column/vector/int.hpp 2014-11-17 21:13:06 +0900 (9fec61e) +++ lib/grnxx/impl/column/vector/int.hpp 2014-11-18 11:54:17 +0900 (1447d17) @@ -74,66 +74,6 @@ class Column<Vector<Int>> : public ColumnBase { static Vector<Int> parse_datum(const Datum &datum); }; -//// TODO -//template <> -//class Column<Vector<Int>> : public ColumnBase { -// public: -// // -- Public API -- - -// bool set(Error *error, Int row_id, const Datum &datum); -// bool get(Error *error, Int row_id, Datum *datum) const; - -// // -- Internal API -- - -// // Create a new column. -// // -// // Returns a pointer to the column on success. -// // On failure, returns nullptr and stores error information into "*error" if -// // "error" != nullptr. -// static unique_ptr<Column> create(Error *error, -// Table *table, -// const StringCRef &name, -// const ColumnOptions &options); - -// ~Column(); - -// bool set_default_value(Error *error, Int row_id); -// void unset(Int row_id); - -// void clear_references(Int row_id); - -// // Return a value identified by "row_id". -// // -// // Assumes that "row_id" is valid. Otherwise, the result is undefined. -// Vector<Int> get(Int row_id) const { -// Int size = static_cast<Int>(headers_[row_id] & 0xFFFF); -// if (size == 0) { -// return Vector<Int>(nullptr, 0); -// } -// Int offset = static_cast<Int>(headers_[row_id] >> 16); -// if (size < 0xFFFF) { -// return Vector<Int>(&bodies_[offset], size); -// } else { -// // The size of a long vector is stored in front of the body. -// size = bodies_[offset]; -// return Vector<Int>(&bodies_[offset + 1], size); -// } -// } - -// // Read values. -// void read(ArrayCRef<Record> records, ArrayRef<Vector<Int>> values) const { -// for (Int i = 0; i < records.size(); ++i) { -// values.set(i, get(records.get_row_id(i))); -// } -// } - -// private: -// Array<UInt> headers_; -// Array<Int> bodies_; - -// Column(); -//}; - } // namespace impl } // namespace grnxx -------------- next part -------------- HTML����������������������������... Download