API Guides > ConceptRT 3.x
LinkedStack< T > Class Template Reference

Linked stack. More...

Detailed Description

template<typename T>
class ConceptRT::LinkedStack< T >

Linked stack.

Template Parameters
TStack items type.

Public Member Methods

void Push (T item)
 Pushes an item onto this stack. More...
 
bool TryPop (T &item)
 Try Removes and returns the top-of-stack item. More...
 
bool TryPop ()
 Try Removes the top-of-stack item. More...
 
void Pop (T &item)
 Removes and returns the top-of-stack item. More...
 
void Pop ()
 Removes the top-of-stack item. More...
 
T & GetTop () const
 Gets the top item. More...
 
void Clear ()
 Clears the stack More...
 
Int32 GetCount () const
 Gets the number of items. More...
 
bool IsEmpty () const
 Query if this stack is empty. More...
 

Methods Documentation

void Clear ( )

Clears the stack

Warning
Non-Deterministic: Deletion of all cells on the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
Int32 GetCount ( ) const

Gets the number of items.

Returns
The number of items.
T & GetTop ( ) const

Gets the top item.

Returns
The top item.
RT Exceptions:
RT_ERROR_TRY_TO_ACCESS_UNEXISTANT_CONTENT
bool IsEmpty ( ) const

Query if this stack is empty.

Returns
true if empty, false if not.
void Pop ( T &  item)

Removes and returns the top-of-stack item.

Parameters
item[in,out] The item to pop.
Warning
Non-Deterministic: Deletion of a cell on the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
RT Exceptions:
RT_ERROR_TRY_TO_ACCESS_UNEXISTANT_CONTENT
void Pop ( )

Removes the top-of-stack item.

Warning
Non-Deterministic: Deletion of a cell on the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
void Push ( item)

Pushes an item onto this stack.

Parameters
itemThe item to push.
Warning
Non-Deterministic: Creation of a cell on the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
bool TryPop ( T &  item)

Try Removes and returns the top-of-stack item.

Parameters
item[in,out] The item to pop.
Returns
true if it succeeds, false if it fails.
Warning
Non-Deterministic: Deletion of a cell on the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
bool TryPop ( )

Try Removes the top-of-stack item.

Returns
true if it succeeds, false if it fails.
Warning
Non-Deterministic: Deletion of a cell on the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.