|
NavMap
|
Typed layer view storing one T value per NavCel.
More...
#include <NavMap.hpp>


Public Member Functions | |
| std::vector< T > & | data () |
| const std::vector< T > & | data () const |
| LayerView (std::string name, size_t nitems, LayerType t) | |
| Construct a typed view. | |
| const std::string & | name () const override |
| size_t | size () const override |
| LayerType | type () const override |
Element access (indexed by NavCelId). | |
| T & | operator[] (NavCelId cid) |
| const T & | operator[] (NavCelId cid) const |
Layer hashing & access | |
| std::vector< T > & | mutable_data () const |
| void | set_data (const std::vector< T > &v) |
| std::uint64_t | content_hash () const override |
| Return 64-bit content hash (cached; recomputed lazily). | |
| std::shared_ptr< LayerViewBase > | clone () const override |
| Independent copy of this layer (data, name, type, cached hash and pending changes). | |
| Public Member Functions inherited from LayerViewBase | |
| bool | all_changed () const noexcept |
| Whether the whole layer changed (then changed() is not meaningful). | |
| const std::vector< NavCelId > & | changed () const noexcept |
| Cells changed one by one since the last clear_changes(), in order of first change. | |
| void | clear_changes () const |
| Forget the recorded changes (call it once every consumer has seen them). | |
| bool | has_changes () const noexcept |
| void | mark_all_changed () const noexcept |
| Record that the whole layer changed. | |
| void | mark_changed (NavCelId cid) const |
Record that cell cid changed (deduplicated). | |
| void | mark_dirty () const noexcept |
| Mark content dirty (forces hash recompute on next query). | |
| virtual | ~LayerViewBase ()=default |
Public Attributes | |
| std::vector< T > | data_ |
| Values, one per NavCel. | |
| std::string | name_ |
| Layer name (key in the registry). | |
| LayerType | type_ |
Runtime type tag (must match T). | |
Additional Inherited Members | |
| Protected Attributes inherited from LayerViewBase | |
| bool | all_changed_ {true} |
| std::vector< NavCelId > | changed_ |
| std::vector< std::uint64_t > | changed_bits_ |
| std::uint64_t | hash_cache_ {0} |
| bool | hash_dirty_ {true} |
Typed layer view storing one T value per NavCel.
| T | Scalar type (uint8_t, float, double). |
Construct a typed view.
| name | Layer name. |
| nitems | Number of NavCels. |
| t | Runtime type tag corresponding to T. |
|
overridevirtual |
Independent copy of this layer (data, name, type, cached hash and pending changes).
Implements LayerViewBase.
|
overridevirtual |
Return 64-bit content hash (cached; recomputed lazily).
Implements LayerViewBase.
| std::vector< T > & data | ( | ) |
| const std::vector< T > & data | ( | ) | const |
| std::vector< T > & mutable_data | ( | ) | const |
|
overridevirtual |
Implements LayerViewBase.
| T & operator[] | ( | NavCelId | cid | ) |
| const T & operator[] | ( | NavCelId | cid | ) | const |
| void set_data | ( | const std::vector< T > & | v | ) |
|
overridevirtual |
Implements LayerViewBase.
|
overridevirtual |
Implements LayerViewBase.
| std::vector<T> data_ |
Values, one per NavCel.
| std::string name_ |
Layer name (key in the registry).
| LayerType type_ |
Runtime type tag (must match T).