[Groonga-commit] groonga/grnxx [master] Add create(), open(), and close() to grnxx::alpha::Vector.

Back to archive index

susumu.yata null+****@clear*****
Thu Dec 6 16:18:54 JST 2012


susumu.yata	2012-12-06 16:18:54 +0900 (Thu, 06 Dec 2012)

  New Revision: 1be496a94162b2786c5865d806f760ded0a08adb
  https://github.com/groonga/grnxx/commit/1be496a94162b2786c5865d806f760ded0a08adb

  Log:
    Add create(), open(), and close() to grnxx::alpha::Vector.

  Modified files:
    lib/alpha/vector.hpp

  Modified: lib/alpha/vector.hpp (+13 -0)
===================================================================
--- lib/alpha/vector.hpp    2012-12-06 16:17:04 +0900 (c5b8480)
+++ lib/alpha/vector.hpp    2012-12-06 16:18:54 +0900 (5b315d2)
@@ -241,6 +241,19 @@ class Vector {
     : impl_(VectorImpl::open(pool, block_id, sizeof(Value), PAGE_SIZE,
                              TABLE_SIZE, SECONDARY_TABLE_SIZE, fill_page)) {}
 
+  void create(io::Pool pool) {
+    *this = Vector(VECTOR_CREATE, pool);
+  }
+  void create(io::Pool pool, const Value &default_value) {
+    *this = Vector(VECTOR_CREATE, pool, default_value);
+  }
+  void open(io::Pool pool, uint32_t block_id) {
+    *this = Vector(VECTOR_OPEN, pool, block_id);
+  }
+  void close() {
+    *this = Vector();
+  }
+
   explicit operator bool() const {
     return static_cast<bool>(impl_);
   }
-------------- next part --------------
HTML����������������������������...
Download 



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