|
tess 0.4.0
Performance-first tile and path simulation substrate
|
#include <tess/path/path_view.h>
Public Member Functions | |
| constexpr | PathView () noexcept=default |
| constexpr | PathView (std::span< const Coord3 > nodes) noexcept |
| PathView (const std::vector< Coord3 > &nodes) noexcept | |
| PathView (std::vector< Coord3 > &&)=delete | |
| PathView (const std::vector< Coord3 > &&)=delete | |
| constexpr auto | size () const noexcept -> std::size_t |
| constexpr auto | empty () const noexcept -> bool |
| constexpr auto | operator[] (std::size_t index) const noexcept -> const Coord3 & |
| constexpr auto | front () const noexcept -> const Coord3 & |
| constexpr auto | back () const noexcept -> const Coord3 & |
| constexpr auto | begin () const noexcept |
| constexpr auto | end () const noexcept |
| constexpr auto | data () const noexcept -> const Coord3 * |
| constexpr auto | span () const noexcept -> std::span< const Coord3 > |
| constexpr auto | suffix (std::size_t offset) const noexcept -> PathView |
Non-owning, read-only view over a path's coordinates.
Copying a PathView never copies path data. The view has the lifetime of its backing storage: a view returned from scratch search state is invalidated by the next query that reuses that state, and a runtime result view is invalidated by the next process or clear operation. The caller must keep a directly supplied span or vector alive. Concurrent reads are safe only while no owner mutates or reuses the backing storage.
|
constexprdefaultnoexcept |
Constructs an empty view.
|
inlineconstexprnoexcept |
Borrows nodes; the caller retains ownership of the elements.
|
inlinenoexcept |
Borrows an lvalue vector; the vector must outlive the view.
|
delete |
Rejects a temporary vector whose elements would immediately dangle.
|
delete |
Rejects a const temporary vector whose elements would immediately dangle.
|
inlinenodiscardconstexprnoexcept |
Returns the last coordinate; the view must not be empty.
|
inlinenodiscardconstexprnoexcept |
Returns an iterator to the first coordinate.
|
inlinenodiscardconstexprnoexcept |
Returns the borrowed coordinate array; the empty-view value is unspecified.
|
inlinenodiscardconstexprnoexcept |
Returns whether the view contains no coordinates.
|
inlinenodiscardconstexprnoexcept |
Returns the past-the-end iterator.
|
inlinenodiscardconstexprnoexcept |
Returns the first coordinate; the view must not be empty.
|
inlinenodiscardconstexprnoexcept |
Returns a coordinate; index must be less than size().
|
inlinenodiscardconstexprnoexcept |
Returns the number of coordinates in the view.
|
inlinenodiscardconstexprnoexcept |
Returns the underlying borrowed span without copying path data.
|
inlinenodiscardconstexprnoexcept |
Returns the remaining path from offset without copying path data.
The offset is bounds-clamped, so an offset at or past the end returns an empty view. The result shares this view's backing storage and lifetime.