CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CNORXZ::RangeBase Class Referenceabstract

#include <range_base.h>

Inheritance diagram for CNORXZ::RangeBase:
CNORXZ::RangeInterface< CRange > CNORXZ::RangeInterface< MRange< Ranges... > > CNORXZ::RangeInterface< PRange< RangeT > > CNORXZ::RangeInterface< SRange< MetaT, S > > CNORXZ::RangeInterface< URange< MetaT > > CNORXZ::RangeInterface< YRange > CNORXZ::RangeInterface< Range > CNORXZ::CRange CNORXZ::MRange< Ranges > CNORXZ::PRange< RangeT > CNORXZ::SRange< MetaT, S > CNORXZ::URange< MetaT > CNORXZ::YRange

Public Types

typedef DIndex IndexType
 

Public Member Functions

virtual ~RangeBase ()=default
 
virtual RangePtr sub (SizeT num) const
 
virtual MArray< RangePtrsub () const
 
virtual SizeT size () const =0
 
virtual SizeT dim () const =0
 
virtual const TypeInfotype () const =0
 
virtual const TypeInfometaType () const =0
 
virtual String stringMeta (SizeT pos) const =0
 
virtual DIndex index (SizeT pos=0) const =0
 
virtual RangePtr extend (const RangePtr &r) const =0
 
bool operator== (const RangeBase &in) const
 
bool operator!= (const RangeBase &in) const
 
Uuid id () const
 
DIndex begin () const
 
DIndex end () const
 

Public Attributes

friend RangeFactoryBase
 

Protected Member Functions

 RangeBase ()
 
virtual Vector< Uuidkey () const =0
 

Protected Attributes

Uuid mId = {0,0}
 
Wptr< RangeBasemThis
 

Detailed Description


Abstract range base class

A range defines a parameter space containers and operations are defined on. Indices can be used to iterate over that space.

Ranges have to be created though a corresponding factory.

See also
RangeFactoryBase

Ranges always exist within a shared pointer and cannot be copied.

Definition at line 94 of file range_base.h.

Member Typedef Documentation

◆ IndexType

Definition at line 97 of file range_base.h.

Constructor & Destructor Documentation

◆ ~RangeBase()

virtual CNORXZ::RangeBase::~RangeBase ( )
virtualdefault

default destructor

◆ RangeBase()

CNORXZ::RangeBase::RangeBase ( )
protected

default constructor

Definition at line 63 of file range_base.cc.

Member Function Documentation

◆ begin()

DIndex CNORXZ::RangeBase::begin ( ) const

return a DIndex pointing to the range's first element

Definition at line 94 of file range_base.cc.

◆ dim()

virtual SizeT CNORXZ::RangeBase::dim ( ) const
pure virtual

Range dimension. Returns the range's dimension, which is equivalent to the number of sub-ranges. If a sub-range has non-zero dimension this is NOT taken into account!

Implemented in CNORXZ::CRange, CNORXZ::MRange< Ranges >, CNORXZ::PRange< RangeT >, CNORXZ::SRange< MetaT, S >, CNORXZ::URange< MetaT >, and CNORXZ::YRange.

◆ end()

DIndex CNORXZ::RangeBase::end ( ) const

return a DIndex pointing to the element after the range's last element

Definition at line 99 of file range_base.cc.

◆ extend()

virtual RangePtr CNORXZ::RangeBase::extend ( const RangePtr & r) const
pure virtual

Create extended range. Creates a new range consisting of the meta data spaces of this range and the range r

Parameters
rshared pointer to range used for extension

Implemented in CNORXZ::CRange, CNORXZ::MRange< Ranges >, CNORXZ::PRange< RangeT >, CNORXZ::SRange< MetaT, S >, CNORXZ::URange< MetaT >, and CNORXZ::YRange.

◆ id()

Uuid CNORXZ::RangeBase::id ( ) const

return the range's uuid

Definition at line 88 of file range_base.cc.

◆ index()

virtual DIndex CNORXZ::RangeBase::index ( SizeT pos = 0) const
pure virtual

◆ key()

virtual Vector< Uuid > CNORXZ::RangeBase::key ( ) const
protectedpure virtual

◆ metaType()

virtual const TypeInfo & CNORXZ::RangeBase::metaType ( ) const
pure virtual

◆ operator!=()

bool CNORXZ::RangeBase::operator!= ( const RangeBase & in) const

check if ranges are not the same

Definition at line 83 of file range_base.cc.

◆ operator==()

bool CNORXZ::RangeBase::operator== ( const RangeBase & in) const

check if ranges are the same

Definition at line 78 of file range_base.cc.

◆ size()

virtual SizeT CNORXZ::RangeBase::size ( ) const
pure virtual

◆ stringMeta()

virtual String CNORXZ::RangeBase::stringMeta ( SizeT pos) const
pure virtual

Meta data in string format at lexicographic position pos.

Parameters
possize type argument

Implemented in CNORXZ::CRange, CNORXZ::MRange< Ranges >, CNORXZ::PRange< RangeT >, CNORXZ::SRange< MetaT, S >, CNORXZ::URange< MetaT >, and CNORXZ::YRange.

◆ sub() [1/2]

MArray< RangePtr > CNORXZ::RangeBase::sub ( ) const
virtual

Access sub-ranges. In the case the range is multi-dimensional this function returns an array of all sub-ranges (empty is one-dimensional)

Reimplemented in CNORXZ::MRange< Ranges >, and CNORXZ::YRange.

Definition at line 73 of file range_base.cc.

◆ sub() [2/2]

RangePtr CNORXZ::RangeBase::sub ( SizeT num) const
virtual

Access sub-ranges. In the case the range is multi-dimensional the num-th sub-range can be accessed through this function

Parameters
numsize type argument

Reimplemented in CNORXZ::YRange, and CNORXZ::MRange< Ranges >.

Definition at line 68 of file range_base.cc.

◆ type()

virtual const TypeInfo & CNORXZ::RangeBase::type ( ) const
pure virtual

Member Data Documentation

◆ mId

Uuid CNORXZ::RangeBase::mId = {0,0}
protected

The range's uuid

Definition at line 172 of file range_base.h.

◆ mThis

Wptr<RangeBase> CNORXZ::RangeBase::mThis
protected

weak pointer to this range

Definition at line 173 of file range_base.h.

◆ RangeFactoryBase

friend CNORXZ::RangeBase::RangeFactoryBase

Definition at line 163 of file range_base.h.


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