mirror of
https://github.com/xfarrow/lasd.git
synced 2025-06-05 21:49:14 +02:00
Library 2
Added template
This commit is contained in:
61
librerie/exercise2/queue/queue.hpp
Executable file
61
librerie/exercise2/queue/queue.hpp
Executable file
@ -0,0 +1,61 @@
|
||||
|
||||
#ifndef QUEUE_HPP
|
||||
#define QUEUE_HPP
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../container/container.hpp"
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
namespace lasd {
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
template <typename Data>
|
||||
class Queue { // Must extend Container
|
||||
|
||||
private:
|
||||
|
||||
// ...
|
||||
|
||||
protected:
|
||||
|
||||
// ...
|
||||
|
||||
public:
|
||||
|
||||
// Destructor
|
||||
// ~Queue() specifiers
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Copy assignment
|
||||
// type operator=(argument); // Copy assignment of abstract types should not be possible.
|
||||
|
||||
// Move assignment
|
||||
// type operator=(argument); // Move assignment of abstract types should not be possible.
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Comparison operators
|
||||
// type operator==(argument) specifiers; // Comparison of abstract types might not be possible.
|
||||
// type operator!=(argument) specifiers; // Comparison of abstract types might not be possible.
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Specific member functions
|
||||
|
||||
// type Enqueue(argument) specifiers; // Copy of the value
|
||||
// type Enqueue(argument) specifiers; // Move of the value
|
||||
// type Head() specifiers; // (concrete function must throw std::length_error when empty)
|
||||
// type Dequeue() specifiers; // (concrete function must throw std::length_error when empty)
|
||||
// type HeadNDequeue() specifiers; // (concrete function must throw std::length_error when empty)
|
||||
|
||||
};
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user