Gadget
Public Member Functions | List of all members
StrStack Class Reference

This class implements a simple stack of string objects. More...

#include <strstack.h>

Collaboration diagram for StrStack:
Collaboration graph

Public Member Functions

 StrStack ()
 This is the default StrStack constructor. More...
 
 ~StrStack ()
 This is the default StrStack destructor. More...
 
void clearString ()
 This function will remove the top string from the stack. More...
 
void storeString (const char *str)
 This function will put a new string on to the top of the stack. More...
 
void clearStack ()
 This function will clear all the strings from the stack. More...
 
char * sendAll () const
 This function will send all the strings on the stack as one long new string. More...
 
char * sendTop () const
 This function will send the top string from the stack as a new string. More...
 
int getSize ()
 This will return the number of strings currently stored on the stack. More...
 

Detailed Description

This class implements a simple stack of string objects.

Constructor & Destructor Documentation

◆ StrStack()

StrStack::StrStack ( )
inline

This is the default StrStack constructor.

◆ ~StrStack()

StrStack::~StrStack ( )

This is the default StrStack destructor.

Member Function Documentation

◆ clearStack()

void StrStack::clearStack ( )
inline

This function will clear all the strings from the stack.

◆ clearString()

void StrStack::clearString ( )

This function will remove the top string from the stack.

◆ getSize()

int StrStack::getSize ( )
inline

This will return the number of strings currently stored on the stack.

Returns
the number of strings on the stack

◆ sendAll()

char * StrStack::sendAll ( ) const

This function will send all the strings on the stack as one long new string.

Returns
stack

◆ sendTop()

char * StrStack::sendTop ( ) const

This function will send the top string from the stack as a new string.

Returns
string

◆ storeString()

void StrStack::storeString ( const char *  str)

This function will put a new string on to the top of the stack.

Parameters
stris the name of the string

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