-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin defining a Walker_iterator class which isn't a member of Octree
- Loading branch information
1 parent
ea1a90c
commit 3f01217
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
#ifndef OCTREE_WALKER_ITERATOR_H | ||
#define OCTREE_WALKER_ITERATOR_H | ||
|
||
#include <boost/iterator/iterator_facade.hpp> | ||
|
||
namespace CGAL { | ||
|
||
template<class Value> | ||
class Walker_iterator : | ||
public boost::iterator_facade<Walker_iterator<Value>, Value, boost::forward_traversal_tag> { | ||
|
||
public: | ||
|
||
Walker_iterator() : m_value(nullptr) {} | ||
|
||
Walker_iterator(Value *value) : m_value(value) {} | ||
|
||
private: | ||
friend class boost::iterator_core_access; | ||
|
||
bool equal(Walker_iterator<Value> const &other) const { | ||
return m_value == other.m_value; | ||
} | ||
|
||
void increment() { | ||
// TODO | ||
} | ||
|
||
Value &dereference() const { | ||
return m_value; | ||
} | ||
|
||
private: | ||
|
||
Value *m_value; | ||
}; | ||
|
||
} | ||
|
||
#endif //OCTREE_WALKER_ITERATOR_H |