Library 2

Added template
This commit is contained in:
Alessandro Ferro
2021-04-10 13:34:50 +02:00
parent d68ff24f42
commit 2941c1d298
36 changed files with 2799 additions and 0 deletions

View File

@ -0,0 +1,90 @@
#ifndef QUEUELST_HPP
#define QUEUELST_HPP
/* ************************************************************************** */
#include "../queue.hpp"
#include "../../list/list.hpp"
/* ************************************************************************** */
namespace lasd {
/* ************************************************************************** */
template <typename Data>
class QueueLst { // Must extend Queue<Data> and List<Data>
private:
// ...
protected:
// using List<Data>::???;
// ...
public:
// Default constructor
// QueueLst() specifier;
/* ************************************************************************ */
// Specific constructor
// QueueLst(argument) specifiers; // A queue obtained from a LinearContainer
/* ************************************************************************ */
// Copy constructor
// QueueLst(argument);
// Move constructor
// QueueLst(argument);
/* ************************************************************************ */
// Destructor
// ~QueueLst() specifier;
/* ************************************************************************ */
// Copy assignment
// type operator=(argument);
// Move assignment
// type operator=(argument);
/* ************************************************************************ */
// Comparison operators
// type operator==(argument) specifiers;
// type operator!=(argument) specifiers;
/* ************************************************************************ */
// Specific member functions (inherited from Queue)
// type Enqueue(argument) specifiers; // Override Queue member (copy of the value)
// type Enqueue(argument) specifiers; // Override Queue member (move of the value)
// type Head() specifiers; // Override Queue member (must throw std::length_error when empty)
// type Dequeue() specifiers; // Override Queue member (must throw std::length_error when empty)
// type HeadNDequeue() specifiers; // Override Queue member (must throw std::length_error when empty)
/* ************************************************************************ */
// Specific member functions (inherited from Container)
// type Clear() specifiers; // Override Container member
};
/* ************************************************************************** */
}
#include "queuelst.cpp"
#endif