Skip to content

Commit

Permalink
Begin defining a Walker_iterator class which isn't a member of Octree
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jul 1, 2020
1 parent ea1a90c commit 3f01217
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions Octree/include/CGAL/Octree.h
Expand Up @@ -24,6 +24,7 @@

#include <CGAL/Octree/Octree_node.h>
#include <CGAL/Octree/Split_criterion.h>
#include <CGAL/Octree/Walker_iterator.h>

#include <CGAL/bounding_box.h>
#include <boost/iterator/transform_iterator.hpp>
Expand Down
41 changes: 41 additions & 0 deletions Octree/include/CGAL/Octree/Walker_iterator.h
@@ -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

0 comments on commit 3f01217

Please sign in to comment.