Lumiera  0.pre.03
»edit your freedom«
ref-array-impl.hpp File Reference

Go to the source code of this file.

Description

Some (library-) implementations of the RefArray interface.

Being an array-like object exposing just a const ref, it is typically used on interfaces, and the type of the array "elements" usually is a ABC or interface. The actual implementation typically holds a subclass, and is either based on a vector, or a fixed storage contained within the implementation. The only price to pay is a virtual call on element access.

For advanced uses it would be possible to have a pointer-array or even an embedded storage of variant-records, able to hold a mixture of subclasses. (the latter cases will be implemented when needed).

Deprecated:
5/2025 to be reworked and obsoleted — do not use further
See also
several-builder.hpp
ref-array-test.cpp

Definition in file ref-array-impl.hpp.

#include "lib/ref-array.hpp"
#include "include/logging.h"
#include <vector>

Classes

class  RefArrayTable< B, n, IM >
 RefArray implementation based on a fixed size array, i.e. More...
 
class  RefArrayVector< B, IM >
 This variation of the wrapper actually is a vector, but can act as a RefArray. More...
 
class  RefArrayVectorWrapper< B, IM >
 Wrap a vector holding objects of a subtype and provide array-like access using the interface type. More...
 

Namespaces

 lib
 Implementation namespace for support and library code.