Medusa  1.1
Coordinate Free Mehless Method implementation
mm::Range< T, Allocator >::RangeView Class Reference

#include <Range_fwd.hpp>

Detailed Description

template<class T, class Allocator = std::allocator<T>>
class mm::Range< T, Allocator >::RangeView

This class represents a non contiguous view to a Range, allowing for read and write operations.

Definition at line 45 of file Range_fwd.hpp.

+ Collaboration diagram for mm::Range< T, Allocator >::RangeView:

Public Member Functions

 RangeView (RangeView &)=delete
 Disallow copying. More...
 
 RangeView (RangeView &&)=delete
 Disallow moving. More...
 
RangeViewoperator= (RangeView &)=delete
 Disallow copying. More...
 
RangeViewoperator= (RangeView &&)=delete
 Disallow moving. More...
 
Range< T > asRange () const
 Cast to underlying container type. More...
 
void operator= (const Range< T > &rhs)
 Multiindex assignment: a[{1, 2, 3}] = Range<int>({1, 2, 3});. More...
 
void operator= (const value_type &x)
 Multiindex value assignment: a = 4;. More...
 
reference operator[] (size_type i)
 Write access to sub-container elements. More...
 
const_reference operator[] (size_type i) const
 Read access to sub-container elements. More...
 
size_type size () const
 Size of the sub-container. More...
 

Friends

class Range
 
std::ostream & operator<< (std::ostream &os, const RangeView &c)
 Output a RangeView. More...
 

Private Member Functions

 RangeView (Range< T > &receiver_, const indexes_t &modifier_)
 Constructor. More...
 

Private Attributes

Range< T > & receiver
 Reference to object we are viewing / modifying. More...
 
const indexes_tmodifier
 List of indexes of elements to modify. More...
 

Constructor & Destructor Documentation

◆ RangeView() [1/3]

template<class T , class Allocator = std::allocator<T>>
mm::Range< T, Allocator >::RangeView::RangeView ( Range< T > &  receiver_,
const indexes_t modifier_ 
)
inlineprivate

Constructor.

Definition at line 50 of file Range_fwd.hpp.

◆ RangeView() [2/3]

template<class T , class Allocator = std::allocator<T>>
mm::Range< T, Allocator >::RangeView::RangeView ( RangeView )
delete

Disallow copying.

◆ RangeView() [3/3]

template<class T , class Allocator = std::allocator<T>>
mm::Range< T, Allocator >::RangeView::RangeView ( RangeView &&  )
delete

Disallow moving.

Member Function Documentation

◆ asRange()

template<class T , class Allocator = std::allocator<T>>
Range<T> mm::Range< T, Allocator >::RangeView::asRange ( ) const
inline

Cast to underlying container type.

Definition at line 60 of file Range_fwd.hpp.

◆ operator=() [1/4]

template<class T , class Allocator = std::allocator<T>>
void mm::Range< T, Allocator >::RangeView::operator= ( const Range< T > &  rhs)
inline

Multiindex assignment: a[{1, 2, 3}] = Range<int>({1, 2, 3});.

Definition at line 68 of file Range_fwd.hpp.

◆ operator=() [2/4]

template<class T , class Allocator = std::allocator<T>>
void mm::Range< T, Allocator >::RangeView::operator= ( const value_type x)
inline

Multiindex value assignment: a = 4;.

Definition at line 76 of file Range_fwd.hpp.

◆ operator=() [3/4]

template<class T , class Allocator = std::allocator<T>>
RangeView& mm::Range< T, Allocator >::RangeView::operator= ( RangeView &&  )
delete

Disallow moving.

◆ operator=() [4/4]

template<class T , class Allocator = std::allocator<T>>
RangeView& mm::Range< T, Allocator >::RangeView::operator= ( RangeView )
delete

Disallow copying.

◆ operator[]() [1/2]

template<class T , class Allocator = std::allocator<T>>
reference mm::Range< T, Allocator >::RangeView::operator[] ( size_type  i)
inline

Write access to sub-container elements.

Definition at line 82 of file Range_fwd.hpp.

◆ operator[]() [2/2]

template<class T , class Allocator = std::allocator<T>>
const_reference mm::Range< T, Allocator >::RangeView::operator[] ( size_type  i) const
inline

Read access to sub-container elements.

Definition at line 85 of file Range_fwd.hpp.

◆ size()

template<class T , class Allocator = std::allocator<T>>
size_type mm::Range< T, Allocator >::RangeView::size ( ) const
inline

Size of the sub-container.

Definition at line 88 of file Range_fwd.hpp.

Friends And Related Function Documentation

◆ operator<<

template<class T , class Allocator = std::allocator<T>>
std::ostream& operator<< ( std::ostream &  os,
const RangeView c 
)
friend

Output a RangeView.

Definition at line 93 of file Range_fwd.hpp.

Member Data Documentation

◆ modifier

template<class T , class Allocator = std::allocator<T>>
const indexes_t& mm::Range< T, Allocator >::RangeView::modifier
private

List of indexes of elements to modify.

Definition at line 47 of file Range_fwd.hpp.

◆ receiver

template<class T , class Allocator = std::allocator<T>>
Range<T>& mm::Range< T, Allocator >::RangeView::receiver
private

Reference to object we are viewing / modifying.

Definition at line 46 of file Range_fwd.hpp.


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