NavMap
Loading...
Searching...
No Matches
LayerViewBase Struct Referenceabstract

Non-templated base for runtime layer handling. More...

#include <NavMap.hpp>

Inheritance diagram for LayerViewBase:
Collaboration diagram for LayerViewBase:

Public Member Functions

virtual std::uint64_t content_hash () const =0
 Return 64-bit content hash (cached; recomputed lazily).
 
void mark_dirty () const noexcept
 Mark content dirty (forces hash recompute on next query).
 
virtual const std::string & name () const =0
 
virtual size_t size () const =0
 
virtual LayerType type () const =0
 
virtual ~LayerViewBase ()=default
 

Protected Attributes

std::uint64_t hash_cache_ {0}
 
bool hash_dirty_ {true}
 

Detailed Description

Non-templated base for runtime layer handling.

A layer stores one scalar value per NavCel (triangle).

Constructor & Destructor Documentation

◆ ~LayerViewBase()

virtual ~LayerViewBase ( )
virtualdefault

Member Function Documentation

◆ content_hash()

virtual std::uint64_t content_hash ( ) const
pure virtual

Return 64-bit content hash (cached; recomputed lazily).

Implemented in LayerView< T >, and LayerView< T >.

◆ mark_dirty()

void mark_dirty ( ) const
noexcept

Mark content dirty (forces hash recompute on next query).

◆ name()

virtual const std::string & name ( ) const
pure virtual
Returns
Layer name (unique within the registry).

Implemented in LayerView< T >, and LayerView< T >.

◆ size()

virtual size_t size ( ) const
pure virtual
Returns
Number of items (= number of NavCels).

Implemented in LayerView< T >, and LayerView< T >.

◆ type()

virtual LayerType type ( ) const
pure virtual
Returns
Type tag of the underlying storage.

Implemented in LayerView< T >, and LayerView< T >.

Member Data Documentation

◆ hash_cache_

std::uint64_t hash_cache_ {0}
mutableprotected

◆ hash_dirty_

bool hash_dirty_ {true}
mutableprotected

The documentation for this struct was generated from the following file: