Adds documentation, style fixes.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
73b2270fca
commit
dbf6fbc1db
|
@ -13,6 +13,7 @@ namespace ArbUt {
|
||||||
using const_iterator = typename std::vector<ValueT>::const_iterator;
|
using const_iterator = typename std::vector<ValueT>::const_iterator;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/// @brief The type of the value stored in the list.
|
||||||
typedef ValueT type;
|
typedef ValueT type;
|
||||||
|
|
||||||
List() noexcept : _vector() {}
|
List() noexcept : _vector() {}
|
||||||
|
@ -154,7 +155,11 @@ namespace ArbUt {
|
||||||
/// @return A std::vector representation of the current list.
|
/// @return A std::vector representation of the current list.
|
||||||
std::vector<ValueT>& GetStdList() noexcept { return _vector; }
|
std::vector<ValueT>& GetStdList() noexcept { return _vector; }
|
||||||
|
|
||||||
|
/// @brief Returns a raw pointer to the current list.
|
||||||
|
/// @return A raw pointer to the current list.
|
||||||
inline const List<ValueT>* GetListPointer() const { return this; }
|
inline const List<ValueT>* GetListPointer() const { return this; }
|
||||||
|
/// @brief Returns a raw pointer to the current list.
|
||||||
|
/// @return A raw pointer to the current list.
|
||||||
inline List<ValueT>* GetListPointer() { return this; }
|
inline List<ValueT>* GetListPointer() { return this; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef ARBUTILS___BORROWEDPTR_HPP
|
#ifndef ARBUTILS___BORROWEDPTR_HPP
|
||||||
#define ARBUTILS___BORROWEDPTR_HPP
|
#define ARBUTILS___BORROWEDPTR_HPP
|
||||||
|
|
||||||
#include "../Ensure.hpp"
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include "../Ensure.hpp"
|
||||||
|
|
||||||
namespace ArbUt {
|
namespace ArbUt {
|
||||||
/// @brief A borrowed pointer is used to indicate a pointer that is not owned by its holder. As with all Arbutils
|
/// @brief A borrowed pointer is used to indicate a pointer that is not owned by its holder. As with all Arbutils
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace ArbUt {
|
||||||
using const_iterator = typename std::vector<ValueT*>::const_iterator;
|
using const_iterator = typename std::vector<ValueT*>::const_iterator;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/// @brief The type of the value stored in the list.
|
||||||
typedef ValueT* type;
|
typedef ValueT* type;
|
||||||
|
|
||||||
inline OptionalUniquePtrList() noexcept : _vector() {}
|
inline OptionalUniquePtrList() noexcept : _vector() {}
|
||||||
|
@ -145,7 +146,11 @@ namespace ArbUt {
|
||||||
/// @return A std::vector representation of the current list.
|
/// @return A std::vector representation of the current list.
|
||||||
std::vector<ValueT*>& GetStdList() noexcept { return _vector; }
|
std::vector<ValueT*>& GetStdList() noexcept { return _vector; }
|
||||||
|
|
||||||
|
/// @brief Returns a raw pointer to the current list.
|
||||||
|
/// @return A raw pointer to the current list.
|
||||||
inline const OptionalUniquePtrList<ValueT>* GetListPointer() const { return this; }
|
inline const OptionalUniquePtrList<ValueT>* GetListPointer() const { return this; }
|
||||||
|
/// @brief Returns a raw pointer to the current list.
|
||||||
|
/// @return A raw pointer to the current list.
|
||||||
inline OptionalUniquePtrList<ValueT>* GetListPointer() { return this; }
|
inline OptionalUniquePtrList<ValueT>* GetListPointer() { return this; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace ArbUt {
|
||||||
using const_iterator = typename std::vector<ValueT*>::const_iterator;
|
using const_iterator = typename std::vector<ValueT*>::const_iterator;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/// @brief The type of the value stored in the list.
|
||||||
typedef ValueT* type;
|
typedef ValueT* type;
|
||||||
|
|
||||||
inline UniquePtrList() noexcept : _vector() {}
|
inline UniquePtrList() noexcept : _vector() {}
|
||||||
|
@ -154,7 +155,11 @@ namespace ArbUt {
|
||||||
/// @return A std::vector representation of the current list.
|
/// @return A std::vector representation of the current list.
|
||||||
std::vector<ValueT*>& GetStdList() noexcept { return _vector; }
|
std::vector<ValueT*>& GetStdList() noexcept { return _vector; }
|
||||||
|
|
||||||
|
/// @brief Returns a raw pointer to the current list.
|
||||||
|
/// @return A raw pointer to the current list.
|
||||||
inline const UniquePtrList<ValueT>* GetListPointer() const { return this; }
|
inline const UniquePtrList<ValueT>* GetListPointer() const { return this; }
|
||||||
|
/// @brief Returns a raw pointer to the current list.
|
||||||
|
/// @return A raw pointer to the current list.
|
||||||
inline UniquePtrList<ValueT>* GetListPointer() { return this; }
|
inline UniquePtrList<ValueT>* GetListPointer() { return this; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
#include "../src/Memory/Memory.hpp"
|
#include "../src/Memory/Memory.hpp"
|
||||||
using namespace ArbUt;
|
using namespace ArbUt;
|
||||||
|
|
||||||
TEST_CASE("Scoped Pointer deletes child after out of scope") {
|
TEST_CASE("Scoped Pointer deletes child after out of scope") { auto a = ScopedPtr<uint32_t>(new uint32_t(100)); }
|
||||||
auto a = ScopedPtr<uint32_t>(new uint32_t(100));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue