![]() |
FireSTARR
|
A vector with added thread safety. More...
#include <SafeVector.h>

Public Member Functions | |
| ~SafeVector ()=default | |
| Destructor. | |
| SafeVector ()=default | |
| Construct empty SafeVector. | |
| SafeVector (const SafeVector &rhs) | |
| Copy constructor. | |
| SafeVector (SafeVector &&rhs) noexcept | |
| Move constructor. | |
| SafeVector & | operator= (const SafeVector &rhs) noexcept |
| Copy assignment operator. | |
| SafeVector & | operator= (SafeVector &&rhs) noexcept |
| Move assignment operator. | |
| void | addValue (MathSize value) |
| Add a value to the SafeVector. | |
| std::vector< MathSize > | getValues () const |
| Get a vector with the stored values. | |
| Statistics | getStatistics () const |
| Calculate Statistics for values in this SafeVector. | |
| size_t | size () const noexcept |
| Number of values in the SafeVector. | |
Private Attributes | |
| std::vector< MathSize > | values_ {} |
| Vector of stored values. | |
| mutex | mutex_ {} |
| Mutex for parallel access. | |
A vector with added thread safety.
| fs::util::SafeVector::SafeVector | ( | const SafeVector & | rhs | ) |
Copy constructor.
| rhs | SafeVector to copy from |
|
noexcept |
Move constructor.
| rhs | SafeVector to move from |
| void fs::util::SafeVector::addValue | ( | MathSize | value | ) |
Add a value to the SafeVector.
| value | Value to add |

|
nodiscard |
Calculate Statistics for values in this SafeVector.

|
nodiscard |
Get a vector with the stored values.

|
noexcept |
|
noexcept |
|
nodiscardnoexcept |
Number of values in the SafeVector.