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

0
librerie/exercise4/Exercise4.pdf Normal file → Executable file
View File

25
librerie/exercise4/bst/bst.cpp Normal file → Executable file
View File

@ -1,10 +1,29 @@
namespace lasd {
/* ************************************************************************** */
template <typename Data>
BST<Data>::BST(const BST<Data>& bst)
: BinaryTreeLnk<Data>(bst){}
// ...
template <typename Data>
BST<Data>::BST(BST<Data>&& bst) noexcept
: BinaryTreeLnk<Data>(std::move(bst)){}
/* ************************************************************************** */
template <typename Data>
BST<Data>::~BST(){
BinaryTreeLnk<Data>::Clear();
}
template <typename Data>
BST<Data>& BST<Data>::operator=(const BST<Data>& bst){
BinaryTreeLnk<Data>::operator=(bst);
return *this;
}
template <typename Data>
BST<Data>& BST<Data>::operator=(BST<Data>&& bst) noexcept{
BinaryTreeLnk<Data>::operator=(std::move(bst));
return *this;
}
}

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;
/* ************************************************************************ */

0
librerie/exercise4/build.sh Normal file → Executable file
View File

0
librerie/exercise4/main.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/binarytree/binarytree.hpp Normal file → Executable file
View File

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

0
librerie/exercise4/zlasdtest/container/container.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/container/container.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise1/fulltest.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise1/simpletest.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise1/test.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise2/fulltest.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise2/simpletest.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise2/test.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise3/fulltest.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise3/simpletest.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise3/test.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise4/fulltest.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise4/simpletest.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/exercise4/test.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/iterator/iterator.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/list/list.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/queue/queue.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/stack/stack.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/test.cpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/test.hpp Normal file → Executable file
View File

0
librerie/exercise4/zlasdtest/vector/vector.hpp Normal file → Executable file
View File

0
librerie/exercise4/zmytest/test.cpp Normal file → Executable file
View File

0
librerie/exercise4/zmytest/test.hpp Normal file → Executable file
View File