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

The VirtualCoordVector class provides read-only access to possible distinct coordinates and flags. More...

#include <virtual_coord_vector.h>

Collaboration diagram for OpenOrienteering::VirtualCoordVector:
Collaboration graph
[legend]

Public Types

using size_type = VirtualFlagsVector::size_type
 A reaonably sized unsigned integer type for map coord vector sizes and indexes. More...
 

Public Member Functions

 VirtualCoordVector (const VirtualCoordVector &prototype)=default
 Creates another accessor for the data managed by the given prototype. More...
 
 VirtualCoordVector (const MapCoordVector &coords)
 Creates an accessor for the flags and coordinates in coords (case a). More...
 
 VirtualCoordVector (const MapCoordVector &flags, const MapCoordVectorF &coords)
 Creates an accessor for the given flags and the coordinates in coords (case b). More...
 
VirtualCoordVectoroperator= (const VirtualCoordVector &rhs)=default
 Causes this accessor to serve the same data as rhs. More...
 
bool empty () const
 
size_type size () const
 
MapCoordF operator[] (size_type index) const
 
MapCoordF back () const
 

Public Attributes

VirtualFlagsVector flags
 An read-only accessor to the flags which provides an operator[](size_type). More...
 

Detailed Description

The VirtualCoordVector class provides read-only access to possible distinct coordinates and flags.

Some algorithms in Mapper need to be applied not only to original integer coordinate lists, but sometimes also to transformed floating-point coordinates sharing the same flags. This class provides uniform access to coordinates and flags in two cases:

(a) Coordinates and flags coming from the same MapCoordVector, and

(b) Coordinates coming from a MapCoordVectorF, and flags from a MapCoordVector.

Member Typedef Documentation

◆ size_type

A reaonably sized unsigned integer type for map coord vector sizes and indexes.

Constructor & Destructor Documentation

◆ VirtualCoordVector() [1/3]

OpenOrienteering::VirtualCoordVector::VirtualCoordVector ( const VirtualCoordVector prototype)
default

Creates another accessor for the data managed by the given prototype.

◆ VirtualCoordVector() [2/3]

OpenOrienteering::VirtualCoordVector::VirtualCoordVector ( const MapCoordVector coords)
inlineexplicit

Creates an accessor for the flags and coordinates in coords (case a).

◆ VirtualCoordVector() [3/3]

OpenOrienteering::VirtualCoordVector::VirtualCoordVector ( const MapCoordVector flags,
const MapCoordVectorF coords 
)
inlineexplicit

Creates an accessor for the given flags and the coordinates in coords (case b).

Member Function Documentation

◆ back()

MapCoordF OpenOrienteering::VirtualCoordVector::back ( ) const
inline

◆ empty()

bool OpenOrienteering::VirtualCoordVector::empty ( ) const
inline

◆ operator=()

VirtualCoordVector& OpenOrienteering::VirtualCoordVector::operator= ( const VirtualCoordVector rhs)
default

Causes this accessor to serve the same data as rhs.

◆ operator[]()

MapCoordF OpenOrienteering::VirtualCoordVector::operator[] ( size_type  index) const
inline

◆ size()

VirtualCoordVector::size_type OpenOrienteering::VirtualCoordVector::size ( ) const
inline

Member Data Documentation

◆ flags

VirtualFlagsVector OpenOrienteering::VirtualCoordVector::flags

An read-only accessor to the flags which provides an operator[](size_type).


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