Data Structures in C++
DataStructure.hpp
Go to the documentation of this file.
1 /**
2  * @author Douglas De Rizzo Meneghetti (douglasrizzom@gmail.com)
3  * @date 2017-6-14
4  * @brief Base class for all data structures
5  */
6 
7 
8 #ifndef AULA1_DATASTRUCTURE_HPP
9 #define AULA1_DATASTRUCTURE_HPP
10 
11 #include <string>
12 
13 //! Base class for all data structures.
14 //! Contains methods that all other data structures must implement.
16  public:
17  //! Outputs the number of elements stored in the structure
18  //! \return number of elements stored in the structure
19  virtual int getSize()=0;
20 
21  //! Provides the name of the data structure as a string representation
22  //! \return name of the data structure
23  virtual std::string getName()=0;
24 
25  //! Check whether the structure is empty
26  //! \return True if empty, otherwise false
27  virtual bool isEmpty()=0;
28 
29  //! Check whether the structure is full
30  //! \return True if full, otherwise false
31  virtual bool isFull()=0;
32 };
33 
34 #endif
Base class for all data structures.
virtual bool isFull()=0
Check whether the structure is full.
virtual std::string getName()=0
Provides the name of the data structure as a string representation.
virtual bool isEmpty()=0
Check whether the structure is empty.
virtual int getSize()=0
Outputs the number of elements stored in the structure.