Lumiera  0.pre.03
»edit your freedom«
Extension Class Reference

#include "lib/path-array.hpp"

Description

Heap-allocated extension storage for an immutable sequence of literal strings.

The size of the allocation is determined and fixed once, at construction time, derived from the number of initialisers. The first slot within the allocation stores this length. Extension can be empty (default constructed), in which case no heap allocation is performed.

Definition at line 74 of file path-array.hpp.

Public Member Functions

template<typename... ELMS>
 Extension (ELMS &&...elms)
 
 Extension (Extension const &r)
 
 Extension (Extension &&rr) noexcept
 
bool empty () const
 
size_t indexOf (Literal const *pos) const
 
bool isValid (Literal const *pos) const
 
 operator bool () const
 
Extensionoperator= (Extension o)
 
Literal const & operator[] (size_t idx) const
 
void resizeTo (size_t cnt)
 
size_t size () const
 

Private Types

using PStorage = Literal *
 

Private Member Functions

PStorage newCopy () const
 allocate a copy. More...
 

Static Private Member Functions

static size_t & size (PStorage &p)
 

Private Attributes

PStorage storage_
 

Member Function Documentation

◆ newCopy()

PStorage newCopy ( ) const
inlineprivate

allocate a copy.

Note
caller has to manage the allocated memory
Warning
call to Literal's ctor deliberately elided

Definition at line 93 of file path-array.hpp.

References Extension::newCopy().

Referenced by Extension::newCopy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Collaboration diagram for Extension:

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