susumu.yata
null+****@clear*****
Thu Sep 11 16:33:52 JST 2014
susumu.yata 2014-09-11 16:33:52 +0900 (Thu, 11 Sep 2014) New Revision: ad8a555c5fe5de95e4ba95e6a2d97f783f22ced2 https://github.com/groonga/grnxx/commit/ad8a555c5fe5de95e4ba95e6a2d97f783f22ced2 Message: Include a header for Error from types.hpp. Modified files: benchmark/benchmark_adjuster.cpp include/grnxx/Makefile.am include/grnxx/types.hpp include/grnxx/types/Makefile.am include/grnxx/types/array/bool.hpp include/grnxx/types/array/primary.hpp include/grnxx/types/array/record.hpp include/grnxx/types/forward.hpp lib/grnxx/array.cpp lib/grnxx/column.cpp lib/grnxx/db.cpp lib/grnxx/error.cpp lib/grnxx/expression.cpp lib/grnxx/name.cpp lib/grnxx/name.hpp lib/grnxx/pipeline.cpp lib/grnxx/sorter.cpp lib/grnxx/table.cpp test/test_array.cpp test/test_column.cpp test/test_db.cpp test/test_expression.cpp test/test_index.cpp test/test_pipeline.cpp test/test_sorter.cpp test/test_table.cpp Renamed files: include/grnxx/types/error.hpp (from include/grnxx/error.hpp) Modified: benchmark/benchmark_adjuster.cpp (+0 -1) =================================================================== --- benchmark/benchmark_adjuster.cpp 2014-09-11 16:25:00 +0900 (6b78ad9) +++ benchmark/benchmark_adjuster.cpp 2014-09-11 16:33:52 +0900 (09145ad) @@ -23,7 +23,6 @@ #include "grnxx/column.hpp" #include "grnxx/cursor.hpp" #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/expression.hpp" #include "grnxx/pipeline.hpp" #include "grnxx/sorter.hpp" Modified: include/grnxx/Makefile.am (+0 -1) =================================================================== --- include/grnxx/Makefile.am 2014-09-11 16:25:00 +0900 (35eece4) +++ include/grnxx/Makefile.am 2014-09-11 16:33:52 +0900 (96b0ac9) @@ -5,7 +5,6 @@ pkginclude_HEADERS = \ column.hpp \ cursor.hpp \ db.hpp \ - error.hpp \ expression.hpp \ index.hpp \ library.hpp \ Modified: include/grnxx/types.hpp (+1 -0) =================================================================== --- include/grnxx/types.hpp 2014-09-11 16:25:00 +0900 (486a397) +++ include/grnxx/types.hpp 2014-09-11 16:33:52 +0900 (bd0b96e) @@ -6,6 +6,7 @@ #include "grnxx/types/constants.hpp" #include "grnxx/types/data_types.hpp" #include "grnxx/types/datum.hpp" +#include "grnxx/types/error.hpp" #include "grnxx/types/forward.hpp" #include "grnxx/types/geo_point.hpp" #include "grnxx/types/options.hpp" Modified: include/grnxx/types/Makefile.am (+1 -0) =================================================================== --- include/grnxx/types/Makefile.am 2014-09-11 16:25:00 +0900 (fe67a09) +++ include/grnxx/types/Makefile.am 2014-09-11 16:33:52 +0900 (95be2bf) @@ -8,6 +8,7 @@ pkginclude_HEADERS = \ constants.hpp \ datum.hpp \ data_types.hpp \ + error.hpp \ forward.hpp \ geo_point.hpp \ options.hpp \ Modified: include/grnxx/types/array/bool.hpp (+1 -2) =================================================================== --- include/grnxx/types/array/bool.hpp 2014-09-11 16:25:00 +0900 (b8aa07f) +++ include/grnxx/types/array/bool.hpp 2014-09-11 16:33:52 +0900 (22f7993) @@ -2,8 +2,7 @@ #define GRNXX_TYPES_ARRAY_BOOL_HPP #include "grnxx/types/base_types.hpp" -// TODO: Error will be provided in grnxx/types/error.hpp -#include "grnxx/types/forward.hpp" +#include "grnxx/types/error.hpp" namespace grnxx { Modified: include/grnxx/types/array/primary.hpp (+1 -2) =================================================================== --- include/grnxx/types/array/primary.hpp 2014-09-11 16:25:00 +0900 (ccac1fe) +++ include/grnxx/types/array/primary.hpp 2014-09-11 16:33:52 +0900 (225ea7c) @@ -2,8 +2,7 @@ #define GRNXX_TYPES_ARRAY_PRIMARY_HPP #include "grnxx/types/base_types.hpp" -// TODO: Error will be provided in grnxx/types/error.hpp -#include "grnxx/types/forward.hpp" +#include "grnxx/types/error.hpp" namespace grnxx { Modified: include/grnxx/types/array/record.hpp (+1 -2) =================================================================== --- include/grnxx/types/array/record.hpp 2014-09-11 16:25:00 +0900 (d38c9b7) +++ include/grnxx/types/array/record.hpp 2014-09-11 16:33:52 +0900 (97d88a2) @@ -3,8 +3,7 @@ #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" +#include "grnxx/types/error.hpp" namespace grnxx { Renamed: include/grnxx/types/error.hpp (+5 -5) 94% =================================================================== --- include/grnxx/error.hpp 2014-09-11 16:25:00 +0900 (ebfa757) +++ include/grnxx/types/error.hpp 2014-09-11 16:33:52 +0900 (7fd145b) @@ -1,7 +1,7 @@ -#ifndef GRNXX_ERROR_HPP -#define GRNXX_ERROR_HPP +#ifndef GRNXX_TYPES_ERROR_HPP +#define GRNXX_TYPES_ERROR_HPP -#include "grnxx/types.hpp" +#include "grnxx/types/base_types.hpp" namespace grnxx { @@ -82,7 +82,7 @@ class Error { __attribute__ ((format (printf, 2, 3))); private: - static constexpr Int MESSAGE_BUF_SIZE = 256; + static constexpr size_t MESSAGE_BUF_SIZE = 256; ErrorCode code_; int line_; @@ -101,4 +101,4 @@ class Error { (error)->set_function(__PRETTY_FUNCTION__), \ (error)->set_message(format, ## __VA_ARGS__))) -#endif // GRNXX_ERROR_HPP +#endif // GRNXX_TYPES_ERROR_HPP Modified: include/grnxx/types/forward.hpp (+0 -7) =================================================================== --- include/grnxx/types/forward.hpp 2014-09-11 16:25:00 +0900 (7c4ec1b) +++ include/grnxx/types/forward.hpp 2014-09-11 16:33:52 +0900 (0ca17c3) @@ -3,19 +3,12 @@ namespace grnxx { -// TODO: Error should be provided in types.hpp. - -// Error information. -class Error; - // Database persistent object types. class DB; class Table; class Column; class Index; -// TODO: Datum should be provided in types.hpp. - // Database temporary object types. class Datum; class Cursor; Modified: lib/grnxx/array.cpp (+0 -2) =================================================================== --- lib/grnxx/array.cpp 2014-09-11 16:25:00 +0900 (38716d9) +++ lib/grnxx/array.cpp 2014-09-11 16:33:52 +0900 (22b1a43) @@ -1,7 +1,5 @@ #include "grnxx/types.hpp" -#include "grnxx/error.hpp" - namespace grnxx { void ArrayErrorReporter::report_memory_error(Error *error) { Modified: lib/grnxx/column.cpp (+0 -1) =================================================================== --- lib/grnxx/column.cpp 2014-09-11 16:25:00 +0900 (0bb09fe) +++ lib/grnxx/column.cpp 2014-09-11 16:33:52 +0900 (c2dfd37) @@ -3,7 +3,6 @@ #include "grnxx/column_impl.hpp" #include "grnxx/cursor.hpp" #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/index.hpp" #include "grnxx/table.hpp" Modified: lib/grnxx/db.cpp (+0 -1) =================================================================== --- lib/grnxx/db.cpp 2014-09-11 16:25:00 +0900 (955d18a) +++ lib/grnxx/db.cpp 2014-09-11 16:33:52 +0900 (dde2824) @@ -1,6 +1,5 @@ #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/table.hpp" namespace grnxx { Modified: lib/grnxx/error.cpp (+1 -1) =================================================================== --- lib/grnxx/error.cpp 2014-09-11 16:25:00 +0900 (5536c35) +++ lib/grnxx/error.cpp 2014-09-11 16:33:52 +0900 (88adc5d) @@ -1,4 +1,4 @@ -#include "grnxx/error.hpp" +#include "grnxx/types.hpp" #include <cstdio> #include <cstdarg> Modified: lib/grnxx/expression.cpp (+0 -1) =================================================================== --- lib/grnxx/expression.cpp 2014-09-11 16:25:00 +0900 (ee3d3c2) +++ lib/grnxx/expression.cpp 2014-09-11 16:33:52 +0900 (1443464) @@ -1,7 +1,6 @@ #include "grnxx/expression.hpp" #include "grnxx/column_impl.hpp" -#include "grnxx/error.hpp" #include "grnxx/table.hpp" #include <iostream> // For debugging. Modified: lib/grnxx/name.cpp (+0 -2) =================================================================== --- lib/grnxx/name.cpp 2014-09-11 16:25:00 +0900 (d418fc8) +++ lib/grnxx/name.cpp 2014-09-11 16:33:52 +0900 (5914f66) @@ -1,7 +1,5 @@ #include "grnxx/name.hpp" -#include "grnxx/error.hpp" - namespace grnxx { namespace { Modified: lib/grnxx/name.hpp (+0 -1) =================================================================== --- lib/grnxx/name.hpp 2014-09-11 16:25:00 +0900 (c3929b9) +++ lib/grnxx/name.hpp 2014-09-11 16:33:52 +0900 (8c31be4) @@ -1,7 +1,6 @@ #ifndef GRNXX_NAME_HPP #define GRNXX_NAME_HPP -#include "grnxx/error.hpp" #include "grnxx/types.hpp" namespace grnxx { Modified: lib/grnxx/pipeline.cpp (+0 -1) =================================================================== --- lib/grnxx/pipeline.cpp 2014-09-11 16:25:00 +0900 (1c95f62) +++ lib/grnxx/pipeline.cpp 2014-09-11 16:33:52 +0900 (f472b8b) @@ -1,7 +1,6 @@ #include "grnxx/pipeline.hpp" #include "grnxx/cursor.hpp" -#include "grnxx/error.hpp" #include "grnxx/expression.hpp" namespace grnxx { Modified: lib/grnxx/sorter.cpp (+0 -1) =================================================================== --- lib/grnxx/sorter.cpp 2014-09-11 16:25:00 +0900 (a7f698d) +++ lib/grnxx/sorter.cpp 2014-09-11 16:33:52 +0900 (2e79c57) @@ -2,7 +2,6 @@ #include <cmath> -#include "grnxx/error.hpp" #include "grnxx/expression.hpp" namespace grnxx { Modified: lib/grnxx/table.cpp (+0 -1) =================================================================== --- lib/grnxx/table.cpp 2014-09-11 16:25:00 +0900 (dd55205) +++ lib/grnxx/table.cpp 2014-09-11 16:33:52 +0900 (172bf0c) @@ -3,7 +3,6 @@ #include "grnxx/column.hpp" #include "grnxx/cursor.hpp" #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include <iostream> // For debug. Modified: test/test_array.cpp (+0 -1) =================================================================== --- test/test_array.cpp 2014-09-11 16:25:00 +0900 (09d9607) +++ test/test_array.cpp 2014-09-11 16:33:52 +0900 (6f326a7) @@ -20,7 +20,6 @@ #include <random> #include <vector> -#include "grnxx/error.hpp" #include "grnxx/types.hpp" std::mt19937_64 mersenne_twister; Modified: test/test_column.cpp (+0 -1) =================================================================== --- test/test_column.cpp 2014-09-11 16:25:00 +0900 (0d5f947) +++ test/test_column.cpp 2014-09-11 16:33:52 +0900 (5819cce) @@ -21,7 +21,6 @@ #include "grnxx/column.hpp" #include "grnxx/cursor.hpp" #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/table.hpp" void test_column() { Modified: test/test_db.cpp (+0 -1) =================================================================== --- test/test_db.cpp 2014-09-11 16:25:00 +0900 (1234d1f) +++ test/test_db.cpp 2014-09-11 16:33:52 +0900 (2989bb1) @@ -19,7 +19,6 @@ #include <iostream> #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/table.hpp" void test_db() { Modified: test/test_expression.cpp (+0 -1) =================================================================== --- test/test_expression.cpp 2014-09-11 16:25:00 +0900 (c58726b) +++ test/test_expression.cpp 2014-09-11 16:33:52 +0900 (23b7fab) @@ -22,7 +22,6 @@ #include "grnxx/column.hpp" #include "grnxx/cursor.hpp" #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/expression.hpp" #include "grnxx/table.hpp" Modified: test/test_index.cpp (+0 -1) =================================================================== --- test/test_index.cpp 2014-09-11 16:25:00 +0900 (bd2ab57) +++ test/test_index.cpp 2014-09-11 16:33:52 +0900 (29872be) @@ -22,7 +22,6 @@ #include "grnxx/column.hpp" #include "grnxx/cursor.hpp" #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/index.hpp" #include "grnxx/table.hpp" Modified: test/test_pipeline.cpp (+0 -1) =================================================================== --- test/test_pipeline.cpp 2014-09-11 16:25:00 +0900 (b5f8fbe) +++ test/test_pipeline.cpp 2014-09-11 16:33:52 +0900 (fdf047b) @@ -22,7 +22,6 @@ #include "grnxx/column.hpp" #include "grnxx/cursor.hpp" #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/expression.hpp" #include "grnxx/pipeline.hpp" #include "grnxx/sorter.hpp" Modified: test/test_sorter.cpp (+0 -1) =================================================================== --- test/test_sorter.cpp 2014-09-11 16:25:00 +0900 (b8ad837) +++ test/test_sorter.cpp 2014-09-11 16:33:52 +0900 (d66ae20) @@ -22,7 +22,6 @@ #include "grnxx/column.hpp" #include "grnxx/cursor.hpp" #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/expression.hpp" #include "grnxx/table.hpp" #include "grnxx/sorter.hpp" Modified: test/test_table.cpp (+0 -1) =================================================================== --- test/test_table.cpp 2014-09-11 16:25:00 +0900 (09e4475) +++ test/test_table.cpp 2014-09-11 16:33:52 +0900 (c696a49) @@ -21,7 +21,6 @@ #include "grnxx/column.hpp" #include "grnxx/cursor.hpp" #include "grnxx/db.hpp" -#include "grnxx/error.hpp" #include "grnxx/table.hpp" void test_table() { -------------- next part -------------- HTML����������������������������...Download