susumu.yata
null+****@clear*****
Tue Oct 7 11:30:11 JST 2014
susumu.yata 2014-10-07 11:30:11 +0900 (Tue, 07 Oct 2014) New Revision: 95fc5396a1a832f98d8fc3b052d1e449c8597e3a https://github.com/groonga/grnxx/commit/95fc5396a1a832f98d8fc3b052d1e449c8597e3a Message: Add aliases for public interface classes. Modified files: lib/grnxx/impl/column/column_base.cpp lib/grnxx/impl/column/column_base.hpp lib/grnxx/impl/db.cpp lib/grnxx/impl/db.hpp lib/grnxx/impl/table.cpp lib/grnxx/impl/table.hpp Modified: lib/grnxx/impl/column/column_base.cpp (+3 -3) =================================================================== --- lib/grnxx/impl/column/column_base.cpp 2014-10-07 11:24:40 +0900 (6909edb) +++ lib/grnxx/impl/column/column_base.cpp 2014-10-07 11:30:11 +0900 (2f11e61) @@ -10,7 +10,7 @@ namespace grnxx { namespace impl { ColumnBase::ColumnBase() - : grnxx::Column(), + : ColumnInterface(), table_(nullptr), name_(), data_type_(), @@ -19,11 +19,11 @@ ColumnBase::ColumnBase() ColumnBase::~ColumnBase() {} -grnxx::Table *ColumnBase::table() const { +TableInterface *ColumnBase::table() const { return table_; } -grnxx::Table *ColumnBase::ref_table() const { +TableInterface *ColumnBase::ref_table() const { return ref_table_; } Modified: lib/grnxx/impl/column/column_base.hpp (+6 -3) =================================================================== --- lib/grnxx/impl/column/column_base.hpp 2014-10-07 11:24:40 +0900 (0265c86) +++ lib/grnxx/impl/column/column_base.hpp 2014-10-07 11:30:11 +0900 (db2ca3d) @@ -8,23 +8,26 @@ namespace grnxx { namespace impl { +using TableInterface = grnxx::Table; +using ColumnInterface = grnxx::Column; + class Table; -class ColumnBase : public grnxx::Column { +class ColumnBase : public ColumnInterface { public: // -- Public API (grnxx/column.hpp) -- ColumnBase(); virtual ~ColumnBase(); - grnxx::Table *table() const; + TableInterface *table() const; StringCRef name() const { return name_.ref(); } DataType data_type() const { return data_type_; } - grnxx::Table *ref_table() const; + TableInterface *ref_table() const; bool has_key_attribute() const { return has_key_attribute_; } Modified: lib/grnxx/impl/db.cpp (+1 -1) =================================================================== --- lib/grnxx/impl/db.cpp 2014-10-07 11:24:40 +0900 (5adcf64) +++ lib/grnxx/impl/db.cpp 2014-10-07 11:30:11 +0900 (2ccb816) @@ -3,7 +3,7 @@ namespace grnxx { namespace impl { -DB::DB() : grnxx::DB(), tables_() {} +DB::DB() : DBInterface(), tables_() {} DB::~DB() {} Modified: lib/grnxx/impl/db.hpp (+3 -1) =================================================================== --- lib/grnxx/impl/db.hpp 2014-10-07 11:24:40 +0900 (dca087a) +++ lib/grnxx/impl/db.hpp 2014-10-07 11:30:11 +0900 (a3537cb) @@ -7,7 +7,9 @@ namespace grnxx { namespace impl { -class DB : public grnxx::DB { +using DBInterface = grnxx::DB; + +class DB : public DBInterface { public: // -- Public API (grnxx/db.hpp) -- Modified: lib/grnxx/impl/table.cpp (+2 -2) =================================================================== --- lib/grnxx/impl/table.cpp 2014-10-07 11:24:40 +0900 (5a801e9) +++ lib/grnxx/impl/table.cpp 2014-10-07 11:30:11 +0900 (01d9859) @@ -211,7 +211,7 @@ CursorResult TableCursor::reverse_read(Error *, ArrayRef<Record> records) { // -- Table -- Table::Table() - : grnxx::Table(), + : TableInterface(), db_(nullptr), name_(), columns_(), @@ -224,7 +224,7 @@ Table::Table() Table::~Table() {} -grnxx::DB *Table::db() const { +DBInterface *Table::db() const { return db_; } Modified: lib/grnxx/impl/table.hpp (+5 -2) =================================================================== --- lib/grnxx/impl/table.hpp 2014-10-07 11:24:40 +0900 (117b305) +++ lib/grnxx/impl/table.hpp 2014-10-07 11:30:11 +0900 (b9ed720) @@ -9,16 +9,19 @@ namespace grnxx { namespace impl { +using DBInterface = grnxx::DB; +using TableInterface = grnxx::Table; + class DB; -class Table : public grnxx::Table { +class Table : public TableInterface { public: // -- Public API (grnxx/table.hpp) -- Table(); ~Table(); - grnxx::DB *db() const; + DBInterface *db() const; StringCRef name() const { return name_.ref(); } -------------- next part -------------- HTML����������������������������...Download