Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Stack< std::string > Class Template Reference

Specialisation for string as element type. More...

#include <stack2.hpp>

Collaboration diagram for Stack< std::string >:
Collaboration graph

Public Member Functions

 Stack ()
 Default constructor. More...
 
bool empty () const
 Check whether stack is empty. More...
 
void pop ()
 Pop element off the stack. More...
 
void push (const std::string &s)
 Pushes element onto stack. More...
 
std::string top () const
 Return top element of the stack (but not pop-ing it). More...
 

Private Attributes

std::deque< std::string > elems
 Container for the stack elements. More...
 

Detailed Description

template<>
class Stack< std::string >

Specialisation for string as element type.

Definition at line 16 of file stack2.hpp.

Constructor & Destructor Documentation

Stack< std::string >::Stack ( )
inline

Default constructor.

Definition at line 20 of file stack2.hpp.

Member Function Documentation

bool Stack< std::string >::empty ( ) const
inline

Check whether stack is empty.

Returns
True iff empty.

Definition at line 24 of file stack2.hpp.

References Stack< T >::elems.

void Stack< std::string >::pop ( )

Pop element off the stack.

Definition at line 43 of file stack2.hpp.

References Stack< T >::elems.

Referenced by main().

Here is the caller graph for this function:

void Stack< std::string >::push ( const std::string &  s)

Pushes element onto stack.

Parameters
sString pushed on stack.

Definition at line 51 of file stack2.hpp.

References Stack< T >::elems.

Referenced by main().

Here is the caller graph for this function:

std::string Stack< std::string >::top ( ) const

Return top element of the stack (but not pop-ing it).

Returns
Top element of the stack.

Definition at line 53 of file stack2.hpp.

References Stack< T >::elems.

Referenced by main().

Here is the caller graph for this function:

Member Data Documentation

std::deque<std::string> Stack< std::string >::elems
private

Container for the stack elements.

Definition at line 38 of file stack2.hpp.


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