DGtal 1.3.0
|
Aim: This concept gathers classes that provide a stack interface. More...
#include <DGtal/base/CStack.h>
Public Types | |
typedef T::value_type | Value |
typedef T::size_type | Size |
Public Member Functions | |
BOOST_CONCEPT_USAGE (CStack) | |
void | checkConstConstraints () const |
Private Attributes | |
T | myX |
Value | myV |
Size | myS |
bool | myB |
Aim: This concept gathers classes that provide a stack interface.
Description of concept 'CStack'
| 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) |
std::stack, BackInsertionSequenceToStackAdapter, FrontInsertionSequenceToStackAdapter are the usual models of CStack.
T | the type that should be a model of CStack. |
typedef T::size_type DGtal::concepts::CStack< T >::Size |
typedef T::value_type DGtal::concepts::CStack< T >::Value |
|
inline |
Definition at line 98 of file CStack.h.
References DGtal::concepts::CStack< T >::checkConstConstraints(), DGtal::concepts::CStack< T >::myV, DGtal::concepts::CStack< T >::myX, and DGtal::concepts::ConceptUtils::sameType().
|
inline |
Definition at line 107 of file CStack.h.
References DGtal::concepts::CStack< T >::myB, DGtal::concepts::CStack< T >::myS, DGtal::concepts::CStack< T >::myV, DGtal::concepts::CStack< T >::myX, and DGtal::concepts::ConceptUtils::sameType().
Referenced by DGtal::concepts::CStack< T >::BOOST_CONCEPT_USAGE().
|
private |
Definition at line 118 of file CStack.h.
Referenced by DGtal::concepts::CStack< T >::checkConstConstraints().
|
private |
Definition at line 117 of file CStack.h.
Referenced by DGtal::concepts::CStack< T >::checkConstConstraints().
|
private |
Definition at line 116 of file CStack.h.
Referenced by DGtal::concepts::CStack< T >::BOOST_CONCEPT_USAGE(), and DGtal::concepts::CStack< T >::checkConstConstraints().
|
private |
Definition at line 115 of file CStack.h.
Referenced by DGtal::concepts::CStack< T >::BOOST_CONCEPT_USAGE(), and DGtal::concepts::CStack< T >::checkConstConstraints().