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

#include <STDVectorStackOverObjectsWithSmartPointers.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 numberOfElements, peano4::stacks::STDVectorStackOverObjectsWithSmartPointers< T > *parentStack)
 Constructor.

Protected Attributes

peano4::stacks::STDVectorStackOverObjectsWithSmartPointers< T > * _parentStack
const int _size
const int _baseElement

Friends

class peano4::stacks::STDVectorStackOverObjectsWithSmartPointers< T >

Detailed Description

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

Definition at line 162 of file STDVectorStackOverObjectsWithSmartPointers.h.

Constructor & Destructor Documentation

◆ PushBlockStackView()

template<class T>
peano4::stacks::STDVectorStackOverObjectsWithSmartPointers< T >::PushBlockStackView::PushBlockStackView ( int numberOfElements,
peano4::stacks::STDVectorStackOverObjectsWithSmartPointers< T > * parentStack )
protected

Constructor.

We add a whole set of elements to the container

Definition at line 176 of file STDVectorStackOverObjectsWithSmartPointers.h.

References _baseElement, peano4::stacks::STDVectorStackOverObjectsWithSmartPointers< T >::_data, _parentStack, _size, and size().

Here is the call graph for this function:

Member Function Documentation

◆ get() [1/2]

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

◆ get() [2/2]

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

◆ set()

template<class T>
T * peano4::stacks::STDVectorStackOverObjectsWithSmartPointers< 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 194 of file STDVectorStackOverObjectsWithSmartPointers.h.

References _baseElement, _parentStack, _size, and assertion2.

◆ size()

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

Definition at line 182 of file STDVectorStackOverObjectsWithSmartPointers.h.

References _size.

Referenced by PushBlockStackView().

Here is the caller graph for this function:

◆ toString()

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

Definition at line 213 of file STDVectorStackOverObjectsWithSmartPointers.h.

References _baseElement, and _size.

◆ peano4::stacks::STDVectorStackOverObjectsWithSmartPointers< T >

Field Documentation

◆ _baseElement

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

◆ _parentStack

◆ _size

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

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