Lumiera
0.pre.03
»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.
Public Types | |
using | const_iterator = lib::IterAdapter< Literal const *, PathArray const * > |
using | const_reference = Literal const & |
using | iterator = const_iterator |
using | reference = Literal & |
using | value_type = Literal |
Public Member Functions | |
template<typename... ARGS> | |
PathArray (ARGS &&...args) | |
PathArray (PathArray &&)=default | |
PathArray (PathArray const &)=default | |
PathArray (PathArray &o) | |
iterator | begin () const |
bool | empty () const |
iterator | end () const |
size_t | indexOf (Literal const &content) const |
reverse lookup of actual path content More... | |
size_t | leafLevel () const |
operator string () const | |
joins nonempty content, separated by slash | |
PathArray & | operator= (PathArray const &)=default |
PathArray & | operator= (PathArray &&)=default |
Literal const & | operator[] (size_t idx) const |
Array style indexed access. More... | |
size_t | size () const |
Classes | |
struct | Split |
Friends | |
iterator | begin (PathArray const &pa) |
bool | checkPoint (const PathArray *src, const Literal *&pos) |
Implementation of Iteration-logic: detect iteration end. More... | |
iterator | end (PathArray const &pa) |
void | iterNext (const PathArray *, const Literal *&pos) |
Implementation of Iteration-logic: pull next element. More... | |
Protected Member Functions | |
Literal * | expandPosition (size_t idx) |
Literal * | getPosition (size_t idx) |
void | normalise () |
establish the contract of PathArray More... | |
void | setContent (Literal *pos, const char *val) |
void | truncateTo (size_t newSize) |
Private Types | |
using | CcP = const char * |
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) | |
Literal const * | findInlineEnd () const |
find effective end of data in the inline array, i.e. More... | |
iterator | firstNonempty () const |
bool | isValid (Literal const *pos) const |
Private Attributes | |
LiteralArray | elms_ |
con::Extension | tail_ |
struct lib::PathArray::Split |
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 245 of file path-array.hpp.
|
inline |
Array style indexed access.
error::Invalid | on bound violation |
Definition at line 314 of file path-array.hpp.
|
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 331 of file path-array.hpp.
Referenced by UICoordResolver::extend().
|
inline |
Definition at line 380 of file path-array.hpp.
Referenced by PathArray< UIC_INLINE_SIZE >::begin(), UICoordResolver::extend(), and lib::operator==().
|
inlineprivate |
find effective end of data in the inline array, i.e.
the position behind the last usable content
Definition at line 413 of file path-array.hpp.
|
inlineprotected |
access content element by index
null
if out of bounds Definition at line 430 of file path-array.hpp.
|
inlineprotected |
ensure storage for the indicated position exists
Definition at line 447 of file path-array.hpp.
Referenced by UICoord::Builder::truncateTo().
|
inlineprotected |
force new content into the given entry
Definition at line 460 of file path-array.hpp.
Referenced by UICoord::Builder::truncateTo().
|
inlineprotected |
establish the contract of PathArray
Definition at line 492 of file path-array.hpp.
Referenced by UICoord::Builder::truncateTo().
Implementation of Iteration-logic: pull next element.
Definition at line 348 of file path-array.hpp.
Implementation of Iteration-logic: detect iteration end.
Definition at line 355 of file path-array.hpp.