[Groonga-commit] groonga/grnxx at b19229f [master] Add Sorter::sort() for convenience and remove SortStatus.

Back to archive index

susumu.yata null+****@clear*****
Thu Jun 19 10:43:28 JST 2014


susumu.yata	2014-06-19 10:43:28 +0900 (Thu, 19 Jun 2014)

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

  Message:
    Add Sorter::sort() for convenience and remove SortStatus.

  Modified files:
    new-interface/sorter.hpp

  Modified: new-interface/sorter.hpp (+12 -5)
===================================================================
--- new-interface/sorter.hpp    2014-06-19 10:36:26 +0900 (00b7a3d)
+++ new-interface/sorter.hpp    2014-06-19 10:43:28 +0900 (9c49629)
@@ -5,11 +5,6 @@
 
 namespace grnxx {
 
-enum SortStatus {
-  SORT_CONTINUE,
-  SORT_FINISH
-};
-
 class Sorter {
  public:
   Sorter();
@@ -54,6 +49,18 @@ class Sorter {
   // - 演算で例外が発生する.
   // - リソースを確保できない.
   virtual bool finish(Error *error) = 0;
+
+  // レコードの一覧を整列する.
+  // 成功すれば true を返す.
+  // 失敗したときは *error にその内容を格納し, false を返す.
+  //
+  // reset(), finish() を呼び出すことで整列をおこなう.
+  //
+  // 失敗する状況としては,以下のようなものが挙げられる.
+  // - 不正なレコードの一覧が指定された.
+  // - 演算で例外が発生する.
+  // - リソースを確保できない.
+  virtual bool sort(Error *error, RecordSet *record_set) = 0;
 };
 
 }  // namespace grnxx
-------------- next part --------------
HTML����������������������������...
다운로드 



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