[Groonga-commit] groonga/grnxx at efb02bb [master] Move grnxx::alpha::MapHeader to grnxx::alpha::map::Header.

Back to archive index

susumu.yata null+****@clear*****
Fri Apr 26 21:21:33 JST 2013


susumu.yata	2013-04-26 21:21:33 +0900 (Fri, 26 Apr 2013)

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

  Message:
    Move grnxx::alpha::MapHeader to grnxx::alpha::map::Header.

  Added files:
    lib/grnxx/alpha/map/header.hpp
  Modified files:
    lib/grnxx/alpha/map.cpp
    lib/grnxx/alpha/map.hpp
    lib/grnxx/alpha/map/Makefile.am

  Modified: lib/grnxx/alpha/map.cpp (+3 -2)
===================================================================
--- lib/grnxx/alpha/map.cpp    2013-04-26 20:57:46 +0900 (c54693d)
+++ lib/grnxx/alpha/map.cpp    2013-04-26 21:21:33 +0900 (9ff1324)
@@ -20,6 +20,7 @@
 #include "grnxx/alpha/map/array.hpp"
 #include "grnxx/alpha/map/cursor.hpp"
 #include "grnxx/alpha/map/double_array.hpp"
+#include "grnxx/alpha/map/header.hpp"
 #include "grnxx/charset.hpp"
 #include "grnxx/exception.hpp"
 #include "grnxx/slice.hpp"
@@ -83,7 +84,7 @@ Map<T> *Map<T>::create(MapType type, io::Pool pool,
 
 template <typename T>
 Map<T> *Map<T>::open(io::Pool pool, uint32_t block_id) {
-  const MapHeader *header = static_cast<const MapHeader *>(
+  const map::Header *header = static_cast<const map::Header *>(
       pool.get_block_address(block_id));
   switch (header->type) {
     case MAP_ARRAY: {
@@ -101,7 +102,7 @@ Map<T> *Map<T>::open(io::Pool pool, uint32_t block_id) {
 
 template <typename T>
 bool Map<T>::unlink(io::Pool pool, uint32_t block_id) {
-  const MapHeader *header = static_cast<const MapHeader *>(
+  const map::Header *header = static_cast<const map::Header *>(
       pool.get_block_address(block_id));
   switch (header->type) {
     case MAP_ARRAY: {

  Modified: lib/grnxx/alpha/map.hpp (+0 -4)
===================================================================
--- lib/grnxx/alpha/map.hpp    2013-04-26 20:57:46 +0900 (afce2fb)
+++ lib/grnxx/alpha/map.hpp    2013-04-26 21:21:33 +0900 (8cc535d)
@@ -41,10 +41,6 @@ enum MapType : int32_t {
 struct MapOptions {
 };
 
-struct MapHeader {
-  MapType type;
-};
-
 struct MapCursorFlagsIdentifier;
 typedef FlagsImpl<MapCursorFlagsIdentifier> MapCursorFlags;
 

  Modified: lib/grnxx/alpha/map/Makefile.am (+2 -1)
===================================================================
--- lib/grnxx/alpha/map/Makefile.am    2013-04-26 20:57:46 +0900 (1cb4669)
+++ lib/grnxx/alpha/map/Makefile.am    2013-04-26 21:21:33 +0900 (01ee08b)
@@ -12,4 +12,5 @@ libgrnxx_alpha_map_includedir = ${includedir}/grnxx/alpha/map
 libgrnxx_alpha_map_include_HEADERS =	\
 	array.hpp			\
 	cursor.hpp			\
-	double_array.hpp
+	double_array.hpp		\
+	header.hpp

  Added: lib/grnxx/alpha/map/header.hpp (+35 -0) 100644
===================================================================
--- /dev/null
+++ lib/grnxx/alpha/map/header.hpp    2013-04-26 21:21:33 +0900 (1c2ee92)
@@ -0,0 +1,35 @@
+/*
+  Copyright (C) 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_ALPHA_MAP_HEADER_HPP
+#define GRNXX_ALPHA_MAP_HEADER_HPP
+
+#include "grnxx/alpha/map.hpp"
+
+namespace grnxx {
+namespace alpha {
+namespace map {
+
+struct Header {
+  MapType type;
+};
+
+}  // namespace map
+}  // namespace alpha
+}  // namespace grnxx
+
+#endif  // GRNXX_ALPHA_MAP_HEADER_HPP
-------------- next part --------------
HTML����������������������������...
Download 



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