Library 4

few methods added
This commit is contained in:
Alessandro Ferro
2021-05-11 16:28:01 +02:00
parent a062709dc4
commit 599433ced3
30 changed files with 32 additions and 17 deletions

24
librerie/exercise4/bst/bst.hpp Normal file → Executable file
View File

@@ -13,22 +13,18 @@ namespace lasd {
/* ************************************************************************** */
template <typename Data>
class BST { // Must extend BinaryTreeLnk<Data>
private:
// ...
class BST : virtual public BinaryTreeLnk<Data> { // Must extend BinaryTreeLnk<Data>
protected:
// using BinaryTreeLnk<Data>::???;
using BinaryTreeLnk<Data>::size;
using BinaryTreeLnk<Data>::root;
using typename BinaryTreeLnk<Data>::NodeLnk;
// ...
public:
// Default constructor
// BST() specifiers;
BST() = default;
/* ************************************************************************ */
@@ -38,23 +34,23 @@ public:
/* ************************************************************************ */
// Copy constructor
// BST(argument) specifiers;
BST(const BST<Data>&);
// Move constructor
// BST(argument) specifiers;
BST(BST<Data>&&) noexcept;
/* ************************************************************************ */
// Destructor
// ~BST() specifiers;
~BST();
/* ************************************************************************ */
// Copy assignment
// type operator=(argument) specifiers;
BST& operator=(const BST<Data>&);
// Move assignment
// type operator=(argument) specifiers;
BST& operator=(BST<Data>&&) noexcept;
/* ************************************************************************ */