[Groonga-commit] groonga/grnxx at a4005e5 [master] Define options in types.hpp.

Back to archive index

susumu.yata null+****@clear*****
Tue Jul 15 10:41:07 JST 2014


susumu.yata	2014-07-15 10:41:07 +0900 (Tue, 15 Jul 2014)

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

  Message:
    Define options in types.hpp.

  Removed files:
    lib/grnxx/cursor.cpp
  Modified files:
    include/grnxx/column.hpp
    include/grnxx/cursor.hpp
    include/grnxx/db.hpp
    include/grnxx/index.hpp
    include/grnxx/table.hpp
    include/grnxx/types.hpp
    lib/grnxx/Makefile.am
    lib/grnxx/types.cpp

  Modified: include/grnxx/column.hpp (+1 -5)
===================================================================
--- include/grnxx/column.hpp    2014-07-14 18:37:11 +0900 (de6acd3)
+++ include/grnxx/column.hpp    2014-07-15 10:41:07 +0900 (f492b4a)
@@ -3,15 +3,11 @@
 
 #include <vector>
 
-#include "grnxx/types.hpp"
-
 #include "grnxx/name.hpp"
+#include "grnxx/types.hpp"
 
 namespace grnxx {
 
-struct ColumnOptions {
-};
-
 class Column {
  public:
   virtual ~Column();

  Modified: include/grnxx/cursor.hpp (+0 -14)
===================================================================
--- include/grnxx/cursor.hpp    2014-07-14 18:37:11 +0900 (78baa2c)
+++ include/grnxx/cursor.hpp    2014-07-15 10:41:07 +0900 (dc96ab0)
@@ -5,20 +5,6 @@
 
 namespace grnxx {
 
-struct CursorOptions {
-  // The first "offset" records are skipped.
-  Int offset;
-
-  // At most "limit" records are read.
-  Int limit;
-
-  // The order of records.
-  OrderType order_type;
-
-  // Initialize the options.
-  CursorOptions();
-};
-
 class Cursor {
  public:
   virtual ~Cursor() {}

  Modified: include/grnxx/db.hpp (+0 -3)
===================================================================
--- include/grnxx/db.hpp    2014-07-14 18:37:11 +0900 (562e3a6)
+++ include/grnxx/db.hpp    2014-07-15 10:41:07 +0900 (13508fe)
@@ -7,9 +7,6 @@
 
 namespace grnxx {
 
-struct DBOptions {
-};
-
 class DB {
  public:
   ~DB();

  Modified: include/grnxx/index.hpp (+1 -5)
===================================================================
--- include/grnxx/index.hpp    2014-07-14 18:37:11 +0900 (26c958b)
+++ include/grnxx/index.hpp    2014-07-15 10:41:07 +0900 (4659756)
@@ -1,15 +1,11 @@
 #ifndef GRNXX_INDEX_HPP
 #define GRNXX_INDEX_HPP
 
-#include "grnxx/types.hpp"
-
 #include "grnxx/name.hpp"
+#include "grnxx/types.hpp"
 
 namespace grnxx {
 
-struct IndexOptions {
-};
-
 class Index {
  public:
   virtual ~Index();

  Modified: include/grnxx/table.hpp (+1 -5)
===================================================================
--- include/grnxx/table.hpp    2014-07-14 18:37:11 +0900 (78c8e39)
+++ include/grnxx/table.hpp    2014-07-15 10:41:07 +0900 (5878bba)
@@ -3,15 +3,11 @@
 
 #include <vector>
 
-#include "grnxx/types.hpp"
-
 #include "grnxx/name.hpp"
+#include "grnxx/types.hpp"
 
 namespace grnxx {
 
-struct TableOptions {
-};
-
 class Table {
  public:
    ~Table();

  Modified: include/grnxx/types.hpp (+30 -6)
===================================================================
--- include/grnxx/types.hpp    2014-07-14 18:37:11 +0900 (cc95943)
+++ include/grnxx/types.hpp    2014-07-15 10:41:07 +0900 (446fbae)
@@ -107,12 +107,6 @@ class Table;
 class Column;
 class Index;
 
-// Database persistent object option types.
-struct DBOptions;
-struct TableOptions;
-struct ColumnOptions;
-struct IndexOptions;
-
 // Database built-in data types.
 enum DataType {
   INVALID_DATA,
@@ -363,6 +357,36 @@ enum OrderType {
   REVERSE_ORDER
 };
 
+// Database persistent object option types.
+struct DBOptions {
+  DBOptions();
+};
+
+struct TableOptions {
+  TableOptions();
+};
+
+struct ColumnOptions {
+  ColumnOptions();
+};
+
+struct IndexOptions {
+  IndexOptions();
+};
+
+struct CursorOptions {
+  // The first "offset" records are skipped (default: 0).
+  Int offset;
+
+  // At most "limit" records are read (default: numeric_limits<Int>::max()).
+  Int limit;
+
+  // The order of records (default: REGULAR_ORDER).
+  OrderType order_type;
+
+  CursorOptions();
+};
+
 // Database temporary object types.
 class Datum;
 class Cursor;

  Modified: lib/grnxx/Makefile.am (+0 -1)
===================================================================
--- lib/grnxx/Makefile.am    2014-07-14 18:37:11 +0900 (05be14a)
+++ lib/grnxx/Makefile.am    2014-07-15 10:41:07 +0900 (8050317)
@@ -10,7 +10,6 @@ libgrnxx_la_LDFLAGS = @AM_LTLDFLAGS@
 
 libgrnxx_la_SOURCES =			\
 	column.cpp			\
-	cursor.cpp			\
 	db.cpp				\
 	error.cpp			\
 	expression.cpp			\

  Deleted: lib/grnxx/cursor.cpp (+0 -10) 100644
===================================================================
--- lib/grnxx/cursor.cpp    2014-07-14 18:37:11 +0900 (de8202f)
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "grnxx/cursor.hpp"
-
-namespace grnxx {
-
-CursorOptions::CursorOptions()
-    : offset(0),
-      limit(numeric_limits<Int>::max()),
-      order_type(REGULAR_ORDER) {}
-
-}  // namespace grnxx

  Modified: lib/grnxx/types.cpp (+13 -0)
===================================================================
--- lib/grnxx/types.cpp    2014-07-14 18:37:11 +0900 (b8b73c8)
+++ lib/grnxx/types.cpp    2014-07-15 10:41:07 +0900 (f250aa3)
@@ -38,4 +38,17 @@ void GeoPoint::fix(Int *latitude, Int *longitude) {
   }
 }
 
+DBOptions::DBOptions() {}
+
+TableOptions::TableOptions() {}
+
+ColumnOptions::ColumnOptions() {}
+
+IndexOptions::IndexOptions() {}
+
+CursorOptions::CursorOptions()
+    : offset(0),
+      limit(numeric_limits<Int>::max()),
+      order_type(REGULAR_ORDER) {}
+
 }  // namespace grnxx
-------------- next part --------------
HTML����������������������������...
Download 



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