Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-07-23 14:19:08 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-07-23 14:19:08 +0400
commitd1b82d1f15a04a7c2383f0689ceede94971f4b81 (patch)
tree0c94a3a7fb5c23d144395a75567715a224996c8a /source/blender/freestyle/intern/stroke/ChainingIterators.h
parenta9789d90ae7c4408684490844ee9edf37ae84f65 (diff)
soc-2008-mxcurioni: added Iterator class, base class for all iterators in Freestyle (on the C++ side). Created the equivalent in Python BPy_Iterator with the simple interface:
- getExactTypeName() - increment() - decrement() - isBegin() - isEnd() Contrary to previously stated, I am reverting back to implementing iterators in the (Python) API, for different reasons: - it will make testing quicker to achieve, as I won't have to recode a big chunk of the original Python files - it will be a base for API refactoring - it won't prevent the use a list-based approach later (it is simple to get it from the Iterator)
Diffstat (limited to 'source/blender/freestyle/intern/stroke/ChainingIterators.h')
-rwxr-xr-xsource/blender/freestyle/intern/stroke/ChainingIterators.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.h b/source/blender/freestyle/intern/stroke/ChainingIterators.h
index 1e946855dce..121f1c8ba54 100755
--- a/source/blender/freestyle/intern/stroke/ChainingIterators.h
+++ b/source/blender/freestyle/intern/stroke/ChainingIterators.h
@@ -34,13 +34,15 @@
# include "../view_map/ViewMapAdvancedIterators.h"
# include "Predicates1D.h"
+#include "../system/Iterator.h" //soc
+
//using namespace ViewEdgeInternal;
//
// Adjacency iterator used in the chaining process
//
///////////////////////////////////////////////////////////
-class LIB_STROKE_EXPORT AdjacencyIterator{
+class LIB_STROKE_EXPORT AdjacencyIterator : Iterator {
protected:
ViewVertexInternal::orientedViewEdgeIterator _internalIterator;
bool _restrictToSelection;
@@ -71,10 +73,10 @@ public:
virtual ~AdjacencyIterator(){
}
- inline bool isEnd(){
+ virtual inline bool isEnd(){
return _internalIterator.isEnd();
}
- inline bool isBegin(){
+ virtual inline bool isBegin(){
return _internalIterator.isBegin();
}
/*! Returns true if the current ViewEdge is is coming
@@ -94,8 +96,8 @@ public:
increment();
return tmp;
}
- void increment();
-
+ virtual void increment();
+
protected:
bool isValid(ViewEdge* edge);
};