![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "lib/path-array.hpp"
Abstraction for path-like topological coordinates.
A sequence of Literal strings, with array-like access and standard iteration. Implemented as fixed size inline tuple with heap allocated unlimited extension space.
Definition at line 225 of file path-array.hpp.
Classes | |
| struct | Split |
Public Types | |
| using | const_iterator = lib::IterAdapter< Literal const *, PathArray const * > |
| using | iterator = const_iterator |
| using | value_type = Literal |
| using | reference = Literal & |
| using | const_reference = Literal const & |
Public Member Functions | |
| template<typename... ARGS> | |
| PathArray (ARGS &&...args) | |
| PathArray (PathArray &&)=default | |
| PathArray (PathArray const &)=default | |
| PathArray (PathArray &o) | |
| PathArray & | operator= (PathArray const &)=default |
| PathArray & | operator= (PathArray &&)=default |
| size_t | size () const |
| size_t | leafLevel () const |
| bool | empty () const |
| operator string () const | |
| joins nonempty content, separated by slash | |
| Literal const & | operator[] (size_t idx) const |
| Array style indexed access. | |
| size_t | indexOf (Literal const &content) const |
| reverse lookup of actual path content | |
| iterator | begin () const |
| iterator | end () const |
Friends | |
| void | iterNext (const PathArray *, const Literal *&pos) |
| Implementation of Iteration-logic: pull next element. | |
| bool | checkPoint (const PathArray *src, const Literal *&pos) |
| Implementation of Iteration-logic: detect iteration end. | |
| iterator | begin (PathArray const &pa) |
| iterator | end (PathArray const &pa) |
Protected Member Functions | |
| Literal * | getPosition (size_t idx) |
| Literal * | expandPosition (size_t idx) |
| void | setContent (Literal *pos, const char *val) |
| void | truncateTo (size_t newSize) |
| void | normalise () |
| establish the contract of PathArray | |
Private Types | |
| using | LiteralArray = std::array< Literal, chunk_size > |
Private Member Functions | |
| template<size_t... prefix, size_t... rest, typename... ARGS> | |
| PathArray (IndexSeq< prefix... >, IndexSeq< rest... >, ARGS &&...args) | |
| bool | isValid (Literal const *pos) const |
| iterator | firstNonempty () const |
| Literal const * | findInlineEnd () const |
| find effective end of data in the inline array, i.e. | |
Private Attributes | |
| LiteralArray | elms_ |
| con::Extension | tail_ |
|
inlineprivate |
delegate ctor to place the initialiser arguments appropriately
NULL ptrs, which is achieved with the help of meta::pickInit(). The con::Extension is an embedded smart-ptr, which, when receiving additional tail arguments, will place and manage them within a heap allocated array. Definition at line 244 of file path-array.hpp.
References PathArray< chunk_size >::normalise().
Here is the call graph for this function:Definition at line 269 of file path-array.hpp.
Definition at line 277 of file path-array.hpp.
| struct lib::PathArray::Split |
|
private |
Definition at line 229 of file path-array.hpp.
| using const_iterator = lib::IterAdapter<Literal const*, PathArray const*> |
Definition at line 371 of file path-array.hpp.
| using iterator = const_iterator |
Definition at line 372 of file path-array.hpp.
| using value_type = Literal |
Definition at line 374 of file path-array.hpp.
Definition at line 375 of file path-array.hpp.
| using const_reference = Literal const& |
Definition at line 376 of file path-array.hpp.
|
inline |
Definition at line 284 of file path-array.hpp.
References PathArray< chunk_size >::elms_, PathArray< chunk_size >::findInlineEnd(), Extension::size(), and PathArray< chunk_size >::tail_.
Referenced by UICoord::Builder::append(), UICoordResolver::coverPartially(), GenNodeLocationQuery::determineCoverage(), UICoordResolver::existentiallyQuantify(), PathArray< chunk_size >::expandPosition(), stage::interact::anonymous_namespace{ui-coord-resolver.cpp}::find_wildcardFree_suffix(), GenNodeLocationQuery::getChildren(), UICoordResolver::isCovered(), UICoord::isExtendedBelow(), PathArray< chunk_size >::leafLevel(), PathArray< chunk_size >::normalise(), lib::operator==(), PathArray< chunk_size >::operator[](), UICoordResolver::pathResolution(), UICoord::Builder::size(), PathArray_test::verify_boundaries(), UICoord_test::verify_builder(), PathArray_test::verify_iteration(), and UICoord_test::verify_stringRepr().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 291 of file path-array.hpp.
References PathArray< chunk_size >::empty(), and PathArray< chunk_size >::size().
Referenced by TestElementAccess::performAccessTo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 297 of file path-array.hpp.
References PathArray< chunk_size >::elms_.
Referenced by UICoord::Builder::empty(), and PathArray< chunk_size >::leafLevel().
Here is the caller graph for this function:
|
inline |
joins nonempty content, separated by slash
Definition at line 535 of file path-array.hpp.
|
inline |
Array style indexed access.
| error::Invalid | on bound violation |
Definition at line 313 of file path-array.hpp.
References PathArray< chunk_size >::size(), and util::toString().
Here is the call graph for this function:
|
inline |
reverse lookup of actual path content
| content | reference to actual content residing within the path |
| error::Invalid | when the given storage location is outside the data content storage of this path |
Definition at line 330 of file path-array.hpp.
References PathArray< chunk_size >::elms_, Extension::indexOf(), Extension::isValid(), PathArray< chunk_size >::tail_, and util::toString().
Referenced by UICoordResolver::extend(), and PathArray_test::verify_iteration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 379 of file path-array.hpp.
References PathArray< chunk_size >::firstNonempty().
Referenced by UICoordResolver::extend(), lib::operator==(), and PathArray_test::verify_iteration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 380 of file path-array.hpp.
Referenced by PathArray< chunk_size >::normalise(), and PathArray< chunk_size >::truncateTo().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 390 of file path-array.hpp.
References PathArray< chunk_size >::elms_, Extension::isValid(), and PathArray< chunk_size >::tail_.
Here is the call graph for this function:
|
inlineprivate |
Definition at line 399 of file path-array.hpp.
References PathArray< chunk_size >::elms_.
Referenced by PathArray< chunk_size >::begin().
Here is the caller graph for this function:
|
inlineprivate |
find effective end of data in the inline array, i.e.
the position behind the last usable content
Definition at line 412 of file path-array.hpp.
References PathArray< chunk_size >::elms_.
Referenced by PathArray< chunk_size >::size().
Here is the caller graph for this function:
|
inlineprotected |
access content element by index
null if out of bounds Definition at line 429 of file path-array.hpp.
References PathArray< chunk_size >::elms_, Extension::size(), and PathArray< chunk_size >::tail_.
Referenced by PathArray< chunk_size >::normalise(), and PathArray< chunk_size >::truncateTo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotected |
ensure storage for the indicated position exists
Definition at line 446 of file path-array.hpp.
References PathArray< chunk_size >::elms_, Extension::resizeTo(), PathArray< chunk_size >::size(), Extension::size(), and PathArray< chunk_size >::tail_.
Referenced by UICoord::Builder::overwrite().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotected |
force new content into the given entry
Definition at line 459 of file path-array.hpp.
Referenced by PathArray< chunk_size >::normalise(), UICoord::Builder::overwrite(), and PathArray< chunk_size >::truncateTo().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 466 of file path-array.hpp.
References PathArray< chunk_size >::elms_, PathArray< chunk_size >::end(), PathArray< chunk_size >::getPosition(), Extension::resizeTo(), PathArray< chunk_size >::setContent(), Extension::size(), and PathArray< chunk_size >::tail_.
Referenced by UICoord::Builder::truncateTo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotected |
establish the contract of PathArray
Definition at line 491 of file path-array.hpp.
References Symbol::ANY, PathArray< chunk_size >::elms_, Symbol::EMPTY, PathArray< chunk_size >::end(), PathArray< chunk_size >::getPosition(), Extension::resizeTo(), PathArray< chunk_size >::setContent(), PathArray< chunk_size >::size(), Extension::size(), and PathArray< chunk_size >::tail_.
Referenced by PathArray< chunk_size >::PathArray(), and UICoord::Builder::normalise().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 231 of file path-array.hpp.
Referenced by PathArray< chunk_size >::empty(), PathArray< chunk_size >::expandPosition(), PathArray< chunk_size >::findInlineEnd(), PathArray< chunk_size >::firstNonempty(), PathArray< chunk_size >::getPosition(), PathArray< chunk_size >::indexOf(), PathArray< chunk_size >::isValid(), PathArray< chunk_size >::normalise(), PathArray< chunk_size >::size(), and PathArray< chunk_size >::truncateTo().
|
private |
Definition at line 232 of file path-array.hpp.
Referenced by PathArray< chunk_size >::expandPosition(), PathArray< chunk_size >::getPosition(), PathArray< chunk_size >::indexOf(), PathArray< chunk_size >::isValid(), PathArray< chunk_size >::normalise(), PathArray< chunk_size >::size(), and PathArray< chunk_size >::truncateTo().
|
friend |
Implementation of Iteration-logic: pull next element.
Definition at line 347 of file path-array.hpp.
|
friend |
Implementation of Iteration-logic: detect iteration end.
Definition at line 354 of file path-array.hpp.
Definition at line 382 of file path-array.hpp.
Definition at line 383 of file path-array.hpp.
Inheritance diagram for PathArray< chunk_size >:
Collaboration diagram for PathArray< chunk_size >: