CNORXZ
Container with Native Operation Routines and Expressions
|
#include <range_base.h>
Public Member Functions | |
RangeFactoryBase ()=default | |
virtual | ~RangeFactoryBase ()=default |
RangePtr | create () |
Static Public Member Functions | |
static RangePtr | getRegistered (const TypeInfo &info, const RangePtr &r) |
Protected Member Functions | |
virtual void | make ()=0 |
RangePtr | fromCreated (const TypeInfo &info, const Vector< Uuid > &rids) const |
void | addToCreated (const TypeInfo &info, const Vector< Uuid > &rids, const RangePtr &r) |
Protected Attributes | |
RangePtr | mProd |
Abstract factory base class for creating ranges.
Ranges can exclusively create through range factories.
All ranges that are ever created are stored in a product map (sCreated). The object type hash and the uuid of all ranges the created depends on serve as keys. In the case the range does not depend on any other range, its own uuid is used as key. If the range is a result of a cast from another range, the latter's uuid is used as key.
Derived factories are supposed to look for an existing range by calling fromCreated() and, if nullptr returned, add the new range to the map by calling addToCreated(). These steps are supposed to be implemented by overloading the purely virtual function make().
The product is publicly accessible throught the function create().
Definition at line 48 of file range_base.h.
|
default |
Default constructor
|
virtualdefault |
Default destructor
|
protected |
add newly created range to the product map
Definition at line 44 of file range_base.cc.
RangePtr CNORXZ::RangeFactoryBase::create | ( | ) |
Return the product
Definition at line 24 of file range_base.cc.
|
protected |
access the product map (read-only)
Definition at line 33 of file range_base.cc.
|
static |
Definition at line 49 of file range_base.cc.
Abstract method to create the product.
Implemented in CNORXZ::CRangeFactory.
|
protected |
shared pointer to the product
Definition at line 75 of file range_base.h.