Public Member Functions | Private Attributes | List of all members
cost_map::CostMapIterator Class Reference

#include <costmap_iterator.hpp>

Public Member Functions

 CostMapIterator (const cost_map::CostMap &gridMap)
 
 CostMapIterator (const CostMapIterator *other)
 
CostMapIterator end () const
 
const Index getUnwrappedIndex () const
 
bool isPastEnd () const
 
bool operator!= (const CostMapIterator &other) const
 
const Indexoperator* () const
 
CostMapIteratoroperator++ ()
 
CostMapIteratoroperator= (const CostMapIterator &other)
 

Private Attributes

Index endIndex_
 End index of the circular buffer. More...
 
Index index_
 Current index. More...
 
bool isPastEnd_
 Is iterator out of scope. More...
 
Size size_
 Size of the buffer. More...
 
Index startIndex_
 Start index of the circular buffer. More...
 

Detailed Description

Iterator class to iterate trough the entire grid map.

Definition at line 15 of file costmap_iterator.hpp.

Constructor & Destructor Documentation

cost_map::CostMapIterator::CostMapIterator ( const cost_map::CostMap gridMap)

Constructor.

Parameters
gridMapthe grid map to iterate on.

Definition at line 14 of file cost_map_iterator.cpp.

cost_map::CostMapIterator::CostMapIterator ( const CostMapIterator other)

Copy constructor.

Parameters
otherthe object to copy.

Definition at line 24 of file cost_map_iterator.cpp.

Member Function Documentation

CostMapIterator cost_map::CostMapIterator::end ( ) const

Return the end iterator

Returns
the end iterator (useful when performing normal iterator processing with ++).

Definition at line 64 of file cost_map_iterator.cpp.

const Index cost_map::CostMapIterator::getUnwrappedIndex ( ) const

Retrieve the index as unwrapped index, i.e., as the corresponding index of a grid map with no circular buffer offset.

Definition at line 53 of file cost_map_iterator.cpp.

bool cost_map::CostMapIterator::isPastEnd ( ) const

Indicates if iterator is past end.

Returns
true if iterator is out of scope, false if end has not been reached.

Definition at line 71 of file cost_map_iterator.cpp.

bool cost_map::CostMapIterator::operator!= ( const CostMapIterator other) const

Compare to another iterator.

Returns
whether the current iterator points to a different address than the other one.

Definition at line 43 of file cost_map_iterator.cpp.

const Index & cost_map::CostMapIterator::operator* ( ) const

Dereference the iterator with const.

Returns
the value to which the iterator is pointing.

Definition at line 48 of file cost_map_iterator.cpp.

CostMapIterator & cost_map::CostMapIterator::operator++ ( )

Increase the iterator to the next element.

Returns
a reference to the updated iterator.

Definition at line 58 of file cost_map_iterator.cpp.

CostMapIterator & cost_map::CostMapIterator::operator= ( const CostMapIterator other)

Assignment operator.

Parameters
iteratorthe iterator to copy data from.
Returns
a reference to *this.

Definition at line 33 of file cost_map_iterator.cpp.

Member Data Documentation

Index cost_map::CostMapIterator::endIndex_
private

End index of the circular buffer.

Definition at line 83 of file costmap_iterator.hpp.

Index cost_map::CostMapIterator::index_
private

Current index.

Definition at line 86 of file costmap_iterator.hpp.

bool cost_map::CostMapIterator::isPastEnd_
private

Is iterator out of scope.

Definition at line 89 of file costmap_iterator.hpp.

Size cost_map::CostMapIterator::size_
private

Size of the buffer.

Definition at line 77 of file costmap_iterator.hpp.

Index cost_map::CostMapIterator::startIndex_
private

Start index of the circular buffer.

Definition at line 80 of file costmap_iterator.hpp.


The documentation for this class was generated from the following files:


cost_map_core
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:03:41