Mapper  0.9.0
API documentation
Public Member Functions | List of all members
OpenOrienteering::FollowPathToolHelper Class Reference

Helper class to 'follow' (i.e. More...

#include <tool_helpers.h>

Public Member Functions

 FollowPathToolHelper ()
 Constructs a new helper. More...
 
void startFollowingFromCoord (const PathObject *path, MapCoordVector::size_type coord_index)
 Starts following the given object from a coordinate. More...
 
void startFollowingFromPathCoord (const PathObject *path, const PathCoord &coord)
 Starts following the given object from an arbitrary position indicated by the path coord. More...
 
std::unique_ptr< PathObjectupdateFollowing (const PathCoord &end_coord)
 Updates the process and returns the followed part of the path. More...
 
const PathObjectfollowed_object () const
 Returns the object which is being followed. More...
 
std::size_t partIndex () const
 Returns the index of the path part which is being followed. More...
 

Detailed Description

Helper class to 'follow' (i.e.

extract continuous parts from) PathObjects.

A FollowPathToolHelper can be reused for following different paths.

Constructor & Destructor Documentation

◆ FollowPathToolHelper()

OpenOrienteering::FollowPathToolHelper::FollowPathToolHelper ( )

Constructs a new helper.

Member Function Documentation

◆ followed_object()

const PathObject* OpenOrienteering::FollowPathToolHelper::followed_object ( ) const
inline

Returns the object which is being followed.

◆ partIndex()

std::size_t OpenOrienteering::FollowPathToolHelper::partIndex ( ) const
inline

Returns the index of the path part which is being followed.

◆ startFollowingFromCoord()

void OpenOrienteering::FollowPathToolHelper::startFollowingFromCoord ( const PathObject path,
MapCoordVector::size_type  coord_index 
)

Starts following the given object from a coordinate.

◆ startFollowingFromPathCoord()

void OpenOrienteering::FollowPathToolHelper::startFollowingFromPathCoord ( const PathObject path,
const PathCoord coord 
)

Starts following the given object from an arbitrary position indicated by the path coord.

The path coord does not need to be from the object's path coord vector.

◆ updateFollowing()

std::unique_ptr< PathObject > OpenOrienteering::FollowPathToolHelper::updateFollowing ( const PathCoord end_coord)

Updates the process and returns the followed part of the path.

Returns a pointer that owns nothing if the following failed, e.g. because the path coord is on another path part than the beginning or path and end are the same.


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