Reorganise memory model to make it clear Memory.hpp should be referenced.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-12-11 15:29:27 +01:00
parent c4a4aedb04
commit 26fea2ac20
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
8 changed files with 23 additions and 24 deletions

View File

@ -1,15 +1,14 @@
#ifndef ARBUTILS_MEMORY_HPP #ifndef ARBUTILS_MEMORY_HPP
#define ARBUTILS_MEMORY_HPP #define ARBUTILS_MEMORY_HPP
#include "BorrowedPtr.hpp" #include "__BorrowedPtr.hpp"
#include "OptionalBorrowedPtr.hpp" #include "__OptionalBorrowedPtr.hpp"
#include "UniquePtr.hpp" #include "__OptionalUniquePtr.hpp"
#include "OptionalUniquePtr.hpp" #include "__UniquePtr.hpp"
#include "UniquePtrList.hpp" #include "__UniquePtrList.hpp"
namespace ArbUt { namespace ArbUt {
template <class T> template <class T> using OwnedPtr<T> = T*;
using OwnedPtr<T> = T*;
} }
#endif // ARBUTILS_MEMORY_HPP #endif // ARBUTILS_MEMORY_HPP

View File

@ -1,5 +1,5 @@
#ifndef ARBUTILS_BORROWEDPTR_HPP #ifndef ARBUTILS___BORROWEDPTR_HPP
#define ARBUTILS_BORROWEDPTR_HPP #define ARBUTILS___BORROWEDPTR_HPP
#include "../Assert.hpp" #include "../Assert.hpp"
@ -98,4 +98,4 @@ namespace std {
}; };
} }
#endif // ARBUTILS_BORROWEDPTR_HPP #endif // ARBUTILS___BORROWEDPTR_HPP

View File

@ -1,5 +1,5 @@
#ifndef ARBUTILS_OPTIONALBORROWEDPTR_HPP #ifndef ARBUTILS___OPTIONALBORROWEDPTR_HPP
#define ARBUTILS_OPTIONALBORROWEDPTR_HPP #define ARBUTILS___OPTIONALBORROWEDPTR_HPP
#include "../Assert.hpp" #include "../Assert.hpp"
@ -94,4 +94,4 @@ namespace std {
}; };
} }
#endif // ARBUTILS_OPTIONALBORROWEDPTR_HPP #endif // ARBUTILS___OPTIONALBORROWEDPTR_HPP

View File

@ -1,5 +1,5 @@
#ifndef ARBUTILS_SCOPEDPTR_HPP #ifndef ARBUTILS___SCOPEDPTR_HPP
#define ARBUTILS_SCOPEDPTR_HPP #define ARBUTILS___SCOPEDPTR_HPP
#include "../Assert.hpp" #include "../Assert.hpp"
@ -73,4 +73,4 @@ namespace std {
}; };
} }
#endif // ARBUTILS_SCOPEDPTR_HPP #endif // ARBUTILS___SCOPEDPTR_HPP

View File

@ -1,5 +1,5 @@
#ifndef ARBUTILS_UNIQUEPTR_HPP #ifndef ARBUTILS___UNIQUEPTR_HPP
#define ARBUTILS_UNIQUEPTR_HPP #define ARBUTILS___UNIQUEPTR_HPP
#include "../Assert.hpp" #include "../Assert.hpp"
@ -76,4 +76,4 @@ namespace std {
}; };
} }
#endif // ARBUTILS_UNIQUEPTR_HPP #endif // ARBUTILS___UNIQUEPTR_HPP

View File

@ -1,7 +1,7 @@
#ifndef ARBUTILS_UNIQUEPTRLIST_HPP #ifndef ARBUTILS___UNIQUEPTRLIST_HPP
#define ARBUTILS_UNIQUEPTRLIST_HPP #define ARBUTILS___UNIQUEPTRLIST_HPP
#include "BorrowedPtr.hpp" #include "__BorrowedPtr.hpp"
namespace ArbUt { namespace ArbUt {
/// @brief Collection of pointers that is owned by the list. When the list exits scope, the destructor on all /// @brief Collection of pointers that is owned by the list. When the list exits scope, the destructor on all
@ -144,4 +144,4 @@ namespace ArbUt {
}; };
} }
#endif // ARBUTILS_UNIQUEPTRLIST_HPP #endif // ARBUTILS___UNIQUEPTRLIST_HPP

View File

@ -1,6 +1,6 @@
#ifdef TESTS_BUILD #ifdef TESTS_BUILD
#include "../extern/doctest.hpp" #include "../extern/doctest.hpp"
#include "../src/Memory/UniquePtrList.hpp" #include "../src/Memory/__UniquePtrList.hpp"
using namespace ArbUt; using namespace ArbUt;
TEST_CASE("Create Unique Ptr list, append") { TEST_CASE("Create Unique Ptr list, append") {