Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
GEOGen::VectorStack< T > Class Template Reference

A stack implemented in a GEO::vector. More...

#include <geogram/voronoi/generic_RVD_utils.h>

Public Member Functions

void push (const T &x)
 Pushes a new item onto the stack.
 
void pop ()
 Pops the top of the stack. More...
 
const T & top () const
 Gets the item on the top. More...
 
bool empty () const
 Tests whether the stack is empty.
 

Detailed Description

template<class T>
class GEOGen::VectorStack< T >

A stack implemented in a GEO::vector.

Used by the Android version of GEOGen::RestrictedVoronoiDiagram. The std::stack class has some problems with multithread memory protection issues (it seems that a SMP-safe global lock on memory is missing in Android libraries).

Definition at line 69 of file generic_RVD_utils.h.

Member Function Documentation

◆ pop()

template<class T >
void GEOGen::VectorStack< T >::pop ( )
inline

Pops the top of the stack.

Precondition
!empty()

Definition at line 82 of file generic_RVD_utils.h.

◆ top()

template<class T >
const T& GEOGen::VectorStack< T >::top ( ) const
inline

Gets the item on the top.

Returns
a const reference to the item on the top
Precondition
!empty()

Definition at line 91 of file generic_RVD_utils.h.


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