[Groonga-commit] groonga/grnxx at cab86b6 [master] Add grnxx::storage::ChunkIndex.

Back to archive index

susumu.yata null+****@clear*****
Wed Apr 24 17:19:23 JST 2013


susumu.yata	2013-04-24 17:19:23 +0900 (Wed, 24 Apr 2013)

  New Revision: cab86b6f21c66590a1fbf6907d95baf8dd7c62d7
  https://github.com/groonga/grnxx/commit/cab86b6f21c66590a1fbf6907d95baf8dd7c62d7

  Message:
    Add grnxx::storage::ChunkIndex.

  Added files:
    lib/grnxx/storage/chunk_index.cpp
    lib/grnxx/storage/chunk_index.hpp
  Modified files:
    lib/grnxx/storage/Makefile.am

  Modified: lib/grnxx/storage/Makefile.am (+2 -0)
===================================================================
--- lib/grnxx/storage/Makefile.am    2013-04-24 16:14:18 +0900 (244f998)
+++ lib/grnxx/storage/Makefile.am    2013-04-24 17:19:23 +0900 (f192041)
@@ -3,6 +3,7 @@ noinst_LTLIBRARIES = libgrnxx_storage.la
 libgrnxx_storage_la_LDFLAGS = @AM_LTLDFLAGS@
 
 libgrnxx_storage_la_SOURCES =		\
+	chunk_index.cpp			\
 	file.cpp			\
 	file-posix.cpp			\
 	file-windows.cpp		\
@@ -16,6 +17,7 @@ libgrnxx_storage_la_SOURCES =		\
 
 libgrnxx_storage_includedir = ${includedir}/grnxx/storage
 libgrnxx_storage_include_HEADERS =	\
+	chunk_index.hpp			\
 	file.hpp			\
 	file-posix.hpp			\
 	file-windows.hpp		\

  Added: lib/grnxx/storage/chunk_index.cpp (+31 -0) 100644
===================================================================
--- /dev/null
+++ lib/grnxx/storage/chunk_index.cpp    2013-04-24 17:19:23 +0900 (627428b)
@@ -0,0 +1,31 @@
+/*
+  Copyright (C) 2012-2013  Brazil, Inc.
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License, or (at your option) any later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+#include "grnxx/storage/chunk_index.hpp"
+
+namespace grnxx {
+namespace storage {
+
+ChunkIndex::ChunkIndex(uint32_t id)
+    : id_(id),
+      file_id_(0),
+      offset_(0),
+      size_(0),
+      reserved_(0) {}
+
+}  // namespace storage
+}  // namespace grnxx

  Added: lib/grnxx/storage/chunk_index.hpp (+39 -0) 100644
===================================================================
--- /dev/null
+++ lib/grnxx/storage/chunk_index.hpp    2013-04-24 17:19:23 +0900 (f21dab3)
@@ -0,0 +1,39 @@
+/*
+  Copyright (C) 2012-2013  Brazil, Inc.
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License, or (at your option) any later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+#ifndef GRNXX_STORAGE_CHUNK_INDEX_HPP
+#define GRNXX_STORAGE_CHUNK_INDEX_HPP
+
+#include "grnxx/basic.hpp"
+
+namespace grnxx {
+namespace storage {
+
+struct ChunkIndex {
+  uint32_t id_;
+  uint32_t file_id_;
+  uint64_t offset_;
+  uint64_t size_;
+  uint64_t reserved_;
+
+  explicit ChunkIndex(uint32_t id);
+};
+
+}  // namespace storage
+}  // namespace grnxx
+
+#endif  // GRNXX_STORAGE_CHUNK_INDEX_HPP
-------------- next part --------------
HTML����������������������������...
Download 



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