[Groonga-commit] groonga/grnxx [master] Add a constructor of DoubleArrayKey.

Back to archive index

susumu.yata null+****@clear*****
Mon Jan 7 16:43:30 JST 2013


susumu.yata	2013-01-07 16:43:30 +0900 (Mon, 07 Jan 2013)

  New Revision: 2d450a828b2bcd1c42dc8a155ea5479479b64100
  https://github.com/groonga/grnxx/commit/2d450a828b2bcd1c42dc8a155ea5479479b64100

  Log:
    Add a constructor of DoubleArrayKey.

  Modified files:
    lib/alpha/double_array.cpp
    lib/alpha/double_array.hpp

  Modified: lib/alpha/double_array.cpp (+8 -0)
===================================================================
--- lib/alpha/double_array.cpp    2013-01-07 16:32:08 +0900 (a44d0ad)
+++ lib/alpha/double_array.cpp    2013-01-07 16:43:30 +0900 (1c11178)
@@ -23,6 +23,14 @@ namespace alpha {
 DoubleArrayCreate DOUBLE_ARRAY_CREATE;
 DoubleArrayOpen DOUBLE_ARRAY_OPEN;
 
+DoubleArrayKey::DoubleArrayKey(uint64_t id, const char *address,
+                               uint64_t length)
+  : id_low_(static_cast<uint32_t>(id)),
+    id_high_(static_cast<uint8_t>(id >> 32)),
+    buf_() {
+  std::memcpy(buf_, address, length);
+}
+
 std::unique_ptr<DoubleArrayImpl> DoubleArrayImpl::create(io::Pool pool) {
   // TODO
   return nullptr;

  Modified: lib/alpha/double_array.hpp (+2 -0)
===================================================================
--- lib/alpha/double_array.hpp    2013-01-07 16:32:08 +0900 (2801497)
+++ lib/alpha/double_array.hpp    2013-01-07 16:43:30 +0900 (413f89c)
@@ -103,6 +103,8 @@ class DoubleArrayEntry {
 // TODO
 class DoubleArrayKey {
  public:
+  DoubleArrayKey(uint64_t id, const char *address, uint64_t length);
+
   uint64_t id() const {
     return id_low_ | (static_cast<uint64_t>(id_high_) << 32);
   }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index