Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Foundation abstraction to implement path-like component sequences.
This library class can be used to build a path abstraction for data structure access or some similar topological coordinate system, like e.g. UI coordinates A PathArray is an iterable sequence of literal component IDs, implemented as tuple of lib::Literal held in fixed inline storage with possible heap allocated (and thus unlimited) extension storage. It offers range checks, standard iteration and array-like indexed component access; as a whole it is copyable, while actual components are immutable after construction. PathArray can be bulk initialised from an explicit sequence of literals; it is normalised on construction to trim and fill interspersed missing elements. Iteration and equality comparison are built on top of the normalisation; iteration starts with the first nonempty element.
Definition in file path-array.hpp.
#include "lib/error.hpp"
#include "lib/symbol.hpp"
#include "lib/iter-adapter.hpp"
#include "lib/meta/variadic-helper.hpp"
#include "lib/format-obj.hpp"
#include "lib/util.hpp"
#include <algorithm>
#include <utility>
#include <string>
#include <memory>
#include <array>
Classes | |
class | Extension |
Heap-allocated extension storage for an immutable sequence of literal strings. More... | |
class | PathArray< chunk_size > |
Abstraction for path-like topological coordinates. More... | |
struct | PathArray< chunk_size >::Split< ARGS > |
Functions | |
template<size_t cl, size_t cr> | |
bool | operator!= (PathArray< cl > const &l, PathArray< cr > const &r) |
template<size_t cl, size_t cr> | |
bool | operator== (PathArray< cl > const &l, PathArray< cr > const &r) |
Equality comparison of arbitrary PathArray objects. | |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |