Peano
Loading...
Searching...
No Matches
peano4::stacks::STDVectorStack< T >::PushBlockStackView Class Reference

#include <STDVectorStack.h>

Public Member Functions

int size () const
T * set (int index, const T &value)
 Set an entry.
const T & get (int index) const
T & get (int index)
std::string toString () const

Protected Member Functions

 PushBlockStackView (int size, int base, peano4::stacks::STDVectorStack< T > *stack)
 Constructor.

Protected Attributes

const int _size
const int _baseElement
peano4::stacks::STDVectorStack< T > * _stack

Friends

class peano4::stacks::STDVectorStack< T >
 Parent is friend.

Detailed Description

template<class T>
class peano4::stacks::STDVectorStack< T >::PushBlockStackView

Definition at line 217 of file STDVectorStack.h.

Constructor & Destructor Documentation

◆ PushBlockStackView()

template<class T>
peano4::stacks::STDVectorStack< T >::PushBlockStackView::PushBlockStackView ( int size,
int base,
peano4::stacks::STDVectorStack< T > * stack )
protected

Constructor.

Definition at line 227 of file STDVectorStack.h.

References _baseElement, _size, _stack, and size().

Here is the call graph for this function:

Member Function Documentation

◆ get() [1/2]

template<class T>
T & peano4::stacks::STDVectorStack< T >::PushBlockStackView::get ( int index)

Definition at line 265 of file STDVectorStack.h.

References _baseElement, _size, _stack, and assertion2.

◆ get() [2/2]

template<class T>
const T & peano4::stacks::STDVectorStack< T >::PushBlockStackView::get ( int index) const

Definition at line 259 of file STDVectorStack.h.

References _baseElement, _size, _stack, and assertion2.

◆ set()

template<class T>
T * peano4::stacks::STDVectorStack< T >::PushBlockStackView::set ( int index,
const T & value )

Set an entry.

But in Peano's context, we only need the move semantics logically, as we only migrate stuff over stacks. Therefore, I tried to play around with move semantics, but this always broke the code. So I thought I'd better stop doing this and use plain old copies here.

Returns
Pointer to element set

Definition at line 252 of file STDVectorStack.h.

References _baseElement, _size, _stack, and assertion2.

◆ size()

template<class T>
int peano4::stacks::STDVectorStack< T >::PushBlockStackView::size ( ) const

Definition at line 238 of file STDVectorStack.h.

References _size.

Referenced by PushBlockStackView().

Here is the caller graph for this function:

◆ toString()

template<class T>
std::string peano4::stacks::STDVectorStack< T >::PushBlockStackView::toString ( ) const

Definition at line 271 of file STDVectorStack.h.

References _baseElement, and _size.

◆ peano4::stacks::STDVectorStack< T >

template<class T>
friend class peano4::stacks::STDVectorStack< T >
friend

Parent is friend.

Definition at line 208 of file STDVectorStack.h.

References _baseElement, and _size.

Field Documentation

◆ _baseElement

template<class T>
const int peano4::stacks::STDVectorStack< T >::PushBlockStackView::_baseElement
protected

◆ _size

template<class T>
const int peano4::stacks::STDVectorStack< T >::PushBlockStackView::_size
protected

◆ _stack

template<class T>
peano4::stacks::STDVectorStack<T>* peano4::stacks::STDVectorStack< T >::PushBlockStackView::_stack
protected

Definition at line 235 of file STDVectorStack.h.

Referenced by get(), get(), PushBlockStackView(), and set().


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