[Groonga-commit] groonga/grnxx at f7ffbf6 [master] Include headers for Array<T> from types.hpp.

Back to archive index

susumu.yata null+****@clear*****
Thu Sep 11 16:25:00 JST 2014


susumu.yata	2014-09-11 16:25:00 +0900 (Thu, 11 Sep 2014)

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

  Message:
    Include headers for Array<T> from types.hpp.

  Added files:
    include/grnxx/types/array.hpp
    include/grnxx/types/array/Makefile.am
  Removed files:
    include/grnxx/array.hpp
    include/grnxx/array/Makefile.am
  Modified files:
    configure.ac
    include/grnxx/Makefile.am
    include/grnxx/column.hpp
    include/grnxx/cursor.hpp
    include/grnxx/db.hpp
    include/grnxx/expression.hpp
    include/grnxx/pipeline.hpp
    include/grnxx/sorter.hpp
    include/grnxx/table.hpp
    include/grnxx/types.hpp
    include/grnxx/types/Makefile.am
    include/grnxx/types/data_types.hpp
    lib/grnxx/array.cpp
    lib/grnxx/column_impl.hpp
    test/test_array.cpp
  Renamed files:
    include/grnxx/types/array/bool.hpp
      (from include/grnxx/array/bool.hpp)
    include/grnxx/types/array/primary.hpp
      (from include/grnxx/array/primary.hpp)
    include/grnxx/types/array/record.hpp
      (from include/grnxx/array/record.hpp)

  Modified: configure.ac (+1 -1)
===================================================================
--- configure.ac    2014-09-11 15:59:52 +0900 (c6b3dfa)
+++ configure.ac    2014-09-11 16:25:00 +0900 (77231f2)
@@ -52,8 +52,8 @@ AC_CHECK_LIB([rt], [clock_gettime])
 AC_CONFIG_FILES([Makefile
                  include/Makefile
                  include/grnxx/Makefile
-                 include/grnxx/array/Makefile
                  include/grnxx/types/Makefile
+                 include/grnxx/types/array/Makefile
                  lib/Makefile
                  lib/grnxx/Makefile
                  src/Makefile

  Modified: include/grnxx/Makefile.am (+0 -2)
===================================================================
--- include/grnxx/Makefile.am    2014-09-11 15:59:52 +0900 (b313a51)
+++ include/grnxx/Makefile.am    2014-09-11 16:25:00 +0900 (35eece4)
@@ -1,9 +1,7 @@
 SUBDIRS =		\
-	array		\
 	types
 
 pkginclude_HEADERS =	\
-	array.hpp	\
 	column.hpp	\
 	cursor.hpp	\
 	db.hpp		\

  Deleted: include/grnxx/array.hpp (+0 -8) 100644
===================================================================
--- include/grnxx/array.hpp    2014-09-11 15:59:52 +0900 (5d8e030)
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef GRNXX_ARRAY_HPP
-#define GRNXX_ARRAY_HPP
-
-#include "grnxx/array/bool.hpp"
-#include "grnxx/array/primary.hpp"
-#include "grnxx/array/record.hpp"
-
-#endif  // GRNXX_ARRAY_HPP

  Deleted: include/grnxx/array/Makefile.am (+0 -4) 100644
===================================================================
--- include/grnxx/array/Makefile.am    2014-09-11 15:59:52 +0900 (0823624)
+++ /dev/null
@@ -1,4 +0,0 @@
-pkgincludedir = ${includedir}/${PACKAGE}/array
-pkginclude_HEADERS =	\
-	bool.hpp	\
-	primary.hpp

  Modified: include/grnxx/column.hpp (+0 -1)
===================================================================
--- include/grnxx/column.hpp    2014-09-11 15:59:52 +0900 (0277fb4)
+++ include/grnxx/column.hpp    2014-09-11 16:25:00 +0900 (1951b1b)
@@ -1,7 +1,6 @@
 #ifndef GRNXX_COLUMN_HPP
 #define GRNXX_COLUMN_HPP
 
-#include "grnxx/array.hpp"
 #include "grnxx/name.hpp"
 #include "grnxx/types.hpp"
 

  Modified: include/grnxx/cursor.hpp (+0 -1)
===================================================================
--- include/grnxx/cursor.hpp    2014-09-11 15:59:52 +0900 (496a4dc)
+++ include/grnxx/cursor.hpp    2014-09-11 16:25:00 +0900 (c085589)
@@ -1,7 +1,6 @@
 #ifndef GRNXX_CURSOR_HPP
 #define GRNXX_CURSOR_HPP
 
-#include "grnxx/array.hpp"
 #include "grnxx/types.hpp"
 
 namespace grnxx {

  Modified: include/grnxx/db.hpp (+0 -1)
===================================================================
--- include/grnxx/db.hpp    2014-09-11 15:59:52 +0900 (cf24d9d)
+++ include/grnxx/db.hpp    2014-09-11 16:25:00 +0900 (a90fbee)
@@ -1,7 +1,6 @@
 #ifndef GRNXX_DB_HPP
 #define GRNXX_DB_HPP
 
-#include "grnxx/array.hpp"
 #include "grnxx/types.hpp"
 
 namespace grnxx {

  Modified: include/grnxx/expression.hpp (+0 -1)
===================================================================
--- include/grnxx/expression.hpp    2014-09-11 15:59:52 +0900 (796763b)
+++ include/grnxx/expression.hpp    2014-09-11 16:25:00 +0900 (b7ef969)
@@ -1,7 +1,6 @@
 #ifndef GRNXX_EXPRESSION_HPP
 #define GRNXX_EXPRESSION_HPP
 
-#include "grnxx/array.hpp"
 #include "grnxx/types.hpp"
 
 namespace grnxx {

  Modified: include/grnxx/pipeline.hpp (+0 -1)
===================================================================
--- include/grnxx/pipeline.hpp    2014-09-11 15:59:52 +0900 (87294fc)
+++ include/grnxx/pipeline.hpp    2014-09-11 16:25:00 +0900 (cd4223a)
@@ -1,7 +1,6 @@
 #ifndef GRNXX_PIPELINE_HPP
 #define GRNXX_PIPELINE_HPP
 
-#include "grnxx/array.hpp"
 #include "grnxx/sorter.hpp"
 #include "grnxx/types.hpp"
 

  Modified: include/grnxx/sorter.hpp (+0 -1)
===================================================================
--- include/grnxx/sorter.hpp    2014-09-11 15:59:52 +0900 (6948745)
+++ include/grnxx/sorter.hpp    2014-09-11 16:25:00 +0900 (c2bd287)
@@ -1,7 +1,6 @@
 #ifndef GRNXX_SORTER_HPP
 #define GRNXX_SORTER_HPP
 
-#include "grnxx/array.hpp"
 #include "grnxx/types.hpp"
 
 namespace grnxx {

  Modified: include/grnxx/table.hpp (+0 -1)
===================================================================
--- include/grnxx/table.hpp    2014-09-11 15:59:52 +0900 (5434de7)
+++ include/grnxx/table.hpp    2014-09-11 16:25:00 +0900 (5652ba5)
@@ -1,7 +1,6 @@
 #ifndef GRNXX_TABLE_HPP
 #define GRNXX_TABLE_HPP
 
-#include "grnxx/array.hpp"
 #include "grnxx/name.hpp"
 #include "grnxx/types.hpp"
 

  Modified: include/grnxx/types.hpp (+1 -10)
===================================================================
--- include/grnxx/types.hpp    2014-09-11 15:59:52 +0900 (c8b4966)
+++ include/grnxx/types.hpp    2014-09-11 16:25:00 +0900 (486a397)
@@ -1,6 +1,7 @@
 #ifndef GRNXX_TYPES_HPP
 #define GRNXX_TYPES_HPP
 
+#include "grnxx/types/array.hpp"
 #include "grnxx/types/base_types.hpp"
 #include "grnxx/types/constants.hpp"
 #include "grnxx/types/data_types.hpp"
@@ -14,16 +15,6 @@
 
 namespace grnxx {
 
-struct Record {
-  Int row_id;
-  Float score;
-
-  Record() = default;
-  Record(Int row_id, Float score) : row_id(row_id), score(score) {}
-
-  Record &operator=(const Record &) & = default;
-};
-
 struct SortOrder {
   unique_ptr<Expression> expression;
   OrderType type;

  Modified: include/grnxx/types/Makefile.am (+4 -0)
===================================================================
--- include/grnxx/types/Makefile.am    2014-09-11 15:59:52 +0900 (ecaede2)
+++ include/grnxx/types/Makefile.am    2014-09-11 16:25:00 +0900 (fe67a09)
@@ -1,5 +1,9 @@
+SUBDIRS =		\
+	array
+
 pkgincludedir = ${includedir}/${PACKAGE}/types
 pkginclude_HEADERS =	\
+	array.hpp	\
 	base_types.hpp	\
 	constants.hpp	\
 	datum.hpp	\

  Added: include/grnxx/types/array.hpp (+8 -0) 100644
===================================================================
--- /dev/null
+++ include/grnxx/types/array.hpp    2014-09-11 16:25:00 +0900 (1f46b81)
@@ -0,0 +1,8 @@
+#ifndef GRNXX_TYPES_ARRAY_HPP
+#define GRNXX_TYPES_ARRAY_HPP
+
+#include "grnxx/types/array/bool.hpp"
+#include "grnxx/types/array/primary.hpp"
+#include "grnxx/types/array/record.hpp"
+
+#endif  // GRNXX_TYPES_ARRAY_HPP

  Added: include/grnxx/types/array/Makefile.am (+5 -0) 100644
===================================================================
--- /dev/null
+++ include/grnxx/types/array/Makefile.am    2014-09-11 16:25:00 +0900 (d8a1db5)
@@ -0,0 +1,5 @@
+pkgincludedir = ${includedir}/${PACKAGE}/types/array
+pkginclude_HEADERS =	\
+	bool.hpp	\
+	primary.hpp	\
+	record.hpp

  Renamed: include/grnxx/types/array/bool.hpp (+6 -4) 97%
===================================================================
--- include/grnxx/array/bool.hpp    2014-09-11 15:59:52 +0900 (fab7db6)
+++ include/grnxx/types/array/bool.hpp    2014-09-11 16:25:00 +0900 (b8aa07f)
@@ -1,7 +1,9 @@
-#ifndef GRNXX_ARRAY_BOOL_HPP
-#define GRNXX_ARRAY_BOOL_HPP
+#ifndef GRNXX_TYPES_ARRAY_BOOL_HPP
+#define GRNXX_TYPES_ARRAY_BOOL_HPP
 
-#include "grnxx/types.hpp"
+#include "grnxx/types/base_types.hpp"
+// TODO: Error will be provided in grnxx/types/error.hpp
+#include "grnxx/types/forward.hpp"
 
 namespace grnxx {
 
@@ -342,4 +344,4 @@ class Array<Bool> {
 
 }  // namespace grnxx
 
-#endif  // GRNXX_ARRAY_BOOL_HPP
+#endif  // GRNXX_TYPES_ARRAY_BOOL_HPP

  Renamed: include/grnxx/types/array/primary.hpp (+6 -4) 96%
===================================================================
--- include/grnxx/array/primary.hpp    2014-09-11 15:59:52 +0900 (f87b268)
+++ include/grnxx/types/array/primary.hpp    2014-09-11 16:25:00 +0900 (ccac1fe)
@@ -1,7 +1,9 @@
-#ifndef GRNXX_ARRAY_PRIMARY_HPP
-#define GRNXX_ARRAY_PRIMARY_HPP
+#ifndef GRNXX_TYPES_ARRAY_PRIMARY_HPP
+#define GRNXX_TYPES_ARRAY_PRIMARY_HPP
 
-#include "grnxx/types.hpp"
+#include "grnxx/types/base_types.hpp"
+// TODO: Error will be provided in grnxx/types/error.hpp
+#include "grnxx/types/forward.hpp"
 
 namespace grnxx {
 
@@ -339,4 +341,4 @@ class Array {
 
 }  // namespace grnxx
 
-#endif  // GRNXX_ARRAY_PRIMARY_HPP
+#endif  // GRNXX_TYPES_ARRAY_PRIMARY_HPP

  Renamed: include/grnxx/types/array/record.hpp (+7 -4) 95%
===================================================================
--- include/grnxx/array/record.hpp    2014-09-11 15:59:52 +0900 (6a8873a)
+++ include/grnxx/types/array/record.hpp    2014-09-11 16:25:00 +0900 (d38c9b7)
@@ -1,7 +1,10 @@
-#ifndef GRNXX_ARRAY_RECORD_HPP
-#define GRNXX_ARRAY_RECORD_HPP
+#ifndef GRNXX_TYPES_ARRAY_RECORD_HPP
+#define GRNXX_TYPES_ARRAY_RECORD_HPP
 
-#include "grnxx/types.hpp"
+#include "grnxx/types/base_types.hpp"
+#include "grnxx/types/data_types.hpp"
+// TODO: Error will be provided in grnxx/types/error.hpp
+#include "grnxx/types/forward.hpp"
 
 namespace grnxx {
 
@@ -310,4 +313,4 @@ class Array<Record> {
 
 }  // namespace grnxx
 
-#endif  // GRNXX_ARRAY_RECORD_HPP
+#endif  // GRNXX_TYPES_ARRAY_RECORD_HPP

  Modified: include/grnxx/types/data_types.hpp (+10 -0)
===================================================================
--- include/grnxx/types/data_types.hpp    2014-09-11 15:59:52 +0900 (dbdd987)
+++ include/grnxx/types/data_types.hpp    2014-09-11 16:25:00 +0900 (311dc40)
@@ -23,6 +23,16 @@ using FloatVector    = Vector<Float>;
 using GeoPointVector = Vector<GeoPoint>;
 using TextVector     = Vector<Text>;
 
+struct Record {
+  Int row_id;
+  Float score;
+
+  Record() = default;
+  Record(Int row_id, Float score) : row_id(row_id), score(score) {}
+
+  Record &operator=(const Record &) & = default;
+};
+
 }  // namespace grnxx
 
 #endif  // GRNXX_TYPES_DATA_TYPES_HPP

  Modified: lib/grnxx/array.cpp (+1 -1)
===================================================================
--- lib/grnxx/array.cpp    2014-09-11 15:59:52 +0900 (658c8e3)
+++ lib/grnxx/array.cpp    2014-09-11 16:25:00 +0900 (38716d9)
@@ -1,4 +1,4 @@
-#include "grnxx/array.hpp"
+#include "grnxx/types.hpp"
 
 #include "grnxx/error.hpp"
 

  Modified: lib/grnxx/column_impl.hpp (+0 -1)
===================================================================
--- lib/grnxx/column_impl.hpp    2014-09-11 15:59:52 +0900 (d6adbb1)
+++ lib/grnxx/column_impl.hpp    2014-09-11 16:25:00 +0900 (0b1efb4)
@@ -1,7 +1,6 @@
 #ifndef GRNXX_COLUMN_IMPL_HPP
 #define GRNXX_COLUMN_IMPL_HPP
 
-#include "grnxx/array.hpp"
 #include "grnxx/column.hpp"
 
 namespace grnxx {

  Modified: test/test_array.cpp (+1 -1)
===================================================================
--- test/test_array.cpp    2014-09-11 15:59:52 +0900 (b8875f2)
+++ test/test_array.cpp    2014-09-11 16:25:00 +0900 (09d9607)
@@ -20,8 +20,8 @@
 #include <random>
 #include <vector>
 
-#include "grnxx/array.hpp"
 #include "grnxx/error.hpp"
+#include "grnxx/types.hpp"
 
 std::mt19937_64 mersenne_twister;
 
-------------- next part --------------
HTML����������������������������...
Download 



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