Adds documentation, style fixes.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2021-09-25 17:59:06 +02:00
parent 73b2270fca
commit dbf6fbc1db
5 changed files with 17 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ namespace ArbUt {
using const_iterator = typename std::vector<ValueT>::const_iterator;
public:
/// @brief The type of the value stored in the list.
typedef ValueT type;
List() noexcept : _vector() {}
@@ -154,7 +155,11 @@ namespace ArbUt {
/// @return A std::vector representation of the current list.
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; }
/// @brief Returns a raw pointer to the current list.
/// @return A raw pointer to the current list.
inline List<ValueT>* GetListPointer() { return this; }
};
}

View File

@@ -1,8 +1,8 @@
#ifndef ARBUTILS___BORROWEDPTR_HPP
#define ARBUTILS___BORROWEDPTR_HPP
#include "../Ensure.hpp"
#include <cstddef>
#include "../Ensure.hpp"
namespace ArbUt {
/// @brief A borrowed pointer is used to indicate a pointer that is not owned by its holder. As with all Arbutils

View File

@@ -13,6 +13,7 @@ namespace ArbUt {
using const_iterator = typename std::vector<ValueT*>::const_iterator;
public:
/// @brief The type of the value stored in the list.
typedef ValueT* type;
inline OptionalUniquePtrList() noexcept : _vector() {}
@@ -145,7 +146,11 @@ namespace ArbUt {
/// @return A std::vector representation of the current list.
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; }
/// @brief Returns a raw pointer to the current list.
/// @return A raw pointer to the current list.
inline OptionalUniquePtrList<ValueT>* GetListPointer() { return this; }
};
}

View File

@@ -14,6 +14,7 @@ namespace ArbUt {
using const_iterator = typename std::vector<ValueT*>::const_iterator;
public:
/// @brief The type of the value stored in the list.
typedef ValueT* type;
inline UniquePtrList() noexcept : _vector() {}
@@ -154,7 +155,11 @@ namespace ArbUt {
/// @return A std::vector representation of the current list.
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; }
/// @brief Returns a raw pointer to the current list.
/// @return A raw pointer to the current list.
inline UniquePtrList<ValueT>* GetListPointer() { return this; }
};
}