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.

Member Function Documentation

◆ get() [1/2]

◆ get() [2/2]

◆ 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 peano4::stacks::STDVectorStack< T >::PushBlockStackView::_baseElement, peano4::stacks::STDVectorStack< T >::PushBlockStackView::_size, peano4::stacks::STDVectorStack< T >::PushBlockStackView::_stack, and assertion2.

◆ size()

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

◆ toString()

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

Friends And Related Symbol Documentation

◆ 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.

Field Documentation

◆ _baseElement

◆ _size

◆ _stack


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