Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 8773588

Browse files
matthiasrichtersawenzel
authored andcommitted
Removing getRowData from iterator
The additional method does not fit the concept of an iterator, row description is now part of the iterator value type
1 parent 2c9ed00 commit 8773588

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Algorithm/include/Algorithm/TableView.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,10 @@ class TableView {
154154
/// Iterator class for configurable direction, i.e. either row or column
155155
class iterator { // TODO: derive from forward_iterator
156156
public:
157+
struct value_type : public FrameData {
158+
RowDescType desc;
159+
};
157160
using self_type = iterator;
158-
using value_type = FrameData;
159161

160162
enum IteratorDirections {
161163
kAlongRow,
@@ -191,6 +193,7 @@ class TableView {
191193
if (!mIsCached) {
192194
self_type* ncthis = const_cast<self_type*>(this);
193195
mParent->get(mRow, mColumn, ncthis->mCache);
196+
ncthis->mCache.desc = mParent->getRowData(mRow);
194197
ncthis->mIsCached = true;
195198
}
196199
return mCache;
@@ -212,15 +215,11 @@ class TableView {
212215
if (!mIsCached) {
213216
self_type* ncthis = const_cast<self_type*>(this);
214217
ncthis->mIsCached = mParent->get(mRow, mColumn, ncthis->mCache);
218+
ncthis->mCache.desc = mParent->getRowData(mRow);
215219
}
216220
return mIsCached;
217221
}
218222

219-
const RowDescType& getRowData() const {
220-
static RowDescType invalid;
221-
return invalid;
222-
}
223-
224223
protected:
225224
IteratorDirections mDirection;
226225
unsigned mRow;

0 commit comments

Comments
 (0)