Data Structures in C++
Public Member Functions
DataStructure Class Referenceabstract

Base class for all data structures. More...

#include <DataStructure.hpp>

Inheritance diagram for DataStructure:
Collaboration diagram for DataStructure:

Public Member Functions

virtual int getSize ()=0
 Outputs the number of elements stored in the structure. More...
 
virtual std::string getName ()=0
 Provides the name of the data structure as a string representation. More...
 
virtual bool isEmpty ()=0
 Check whether the structure is empty. More...
 
virtual bool isFull ()=0
 Check whether the structure is full. More...
 

Detailed Description

Base class for all data structures.

Author
Douglas De Rizzo Meneghetti (dougl.nosp@m.asri.nosp@m.zzom@.nosp@m.gmai.nosp@m.l.com)
Date
2017-6-14Base class for all data structures. Contains methods that all other data structures must implement.

Definition at line 15 of file DataStructure.hpp.

Member Function Documentation

◆ getName()

virtual std::string DataStructure::getName ( )
pure virtual

Provides the name of the data structure as a string representation.

Returns
name of the data structure

Implemented in ProtectedLinkedList< T >, DynamicStack< T >, LinkedList< T >, StaticQueue< T >, StaticStack< T >, OrderedList< T >, DynamicQueue< T >, Stack< T >, and Queue< T >.

◆ getSize()

virtual int DataStructure::getSize ( )
pure virtual

Outputs the number of elements stored in the structure.

Returns
number of elements stored in the structure

Implemented in ProtectedLinkedList< T >, StaticQueue< T >, StaticStack< T >, DynamicQueue< T >, and DynamicStack< T >.

◆ isEmpty()

virtual bool DataStructure::isEmpty ( )
pure virtual

Check whether the structure is empty.

Returns
True if empty, otherwise false

Implemented in ProtectedLinkedList< T >, StaticQueue< T >, StaticStack< T >, DynamicQueue< T >, and DynamicStack< T >.

◆ isFull()

virtual bool DataStructure::isFull ( )
pure virtual

Check whether the structure is full.

Returns
True if full, otherwise false

Implemented in ProtectedLinkedList< T >, StaticQueue< T >, StaticStack< T >, DynamicQueue< T >, and DynamicStack< T >.


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