DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
DGtal::concepts::CStack< T > Struct Template Reference

Aim: This concept gathers classes that provide a stack interface. More...

#include <DGtal/base/CStack.h>

Inheritance diagram for DGtal::concepts::CStack< T >:
boost::CopyConstructible< T > boost::Assignable< T >

Public Types

typedef T::value_type Value
 
typedef T::size_type Size
 

Public Member Functions

 BOOST_CONCEPT_USAGE (CStack)
 
void checkConstConstraints () const
 

Private Attributes

myX
 
Value myV
 
Size myS
 
bool myB
 

Detailed Description

template<typename T>
struct DGtal::concepts::CStack< T >

Aim: This concept gathers classes that provide a stack interface.

Description of concept 'CStack'

Refinement of copy constructible and assignable

Inner types

Notation

Definitions

Valid expressions and semantics

| Name | Expression | Type requirements | Return type | Precondition | Semantics | Post condition | Complexity | |----—+---------—+----------------—+---------------------—+-----------—+---------------------------------—+-------------—+---------—| | size | x.size() | | Size | | returns the number of elements | | O(1) | | empty | x.empty() | | bool | | 'true' is empty, 'false' otherwise | | O(1) | | top | x.top() | | Value& or const Value& | | returns the top element | | O(1) | | push | x.push(v) | | void | | inserts a new element at the top | | O(1) | | pop | x.pop() | | void | | removes the top element | | O(1) |

Models

std::stack, BackInsertionSequenceToStackAdapter, FrontInsertionSequenceToStackAdapter are the usual models of CStack.

Template Parameters
Tthe type that should be a model of CStack.

Definition at line 91 of file CStack.h.

Member Typedef Documentation

◆ Size

template<typename T >
typedef T::size_type DGtal::concepts::CStack< T >::Size

Definition at line 96 of file CStack.h.

◆ Value

template<typename T >
typedef T::value_type DGtal::concepts::CStack< T >::Value

Definition at line 95 of file CStack.h.

Member Function Documentation

◆ BOOST_CONCEPT_USAGE()

template<typename T >
DGtal::concepts::CStack< T >::BOOST_CONCEPT_USAGE ( CStack< T >  )
inline

◆ checkConstConstraints()

template<typename T >
void DGtal::concepts::CStack< T >::checkConstConstraints ( ) const
inline

Field Documentation

◆ myB

template<typename T >
bool DGtal::concepts::CStack< T >::myB
private

Definition at line 118 of file CStack.h.

Referenced by DGtal::concepts::CStack< T >::checkConstConstraints().

◆ myS

template<typename T >
Size DGtal::concepts::CStack< T >::myS
private

Definition at line 117 of file CStack.h.

Referenced by DGtal::concepts::CStack< T >::checkConstConstraints().

◆ myV

template<typename T >
Value DGtal::concepts::CStack< T >::myV
private

◆ myX

template<typename T >
T DGtal::concepts::CStack< T >::myX
private

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