33#include <NDEVR/BaseValues.h>
34#include <NDEVR/LibAssert.h>
35#include <NDEVR/Buffer.h>
36#define NDEVR_USE_ROBIN_MAP 1
37#if NDEVR_USE_ROBIN_MAP
38#include "tsl/robin_set.h"
39#define SET_BASE tsl::robin_set
42#define SET_BASE std::set
57 template<
class t_value>
72 template<
class t_iter>
73 Set(
const t_iter& begin,
const t_iter& end)
74 : SET_BASE<t_value>(begin, end)
80 template<
class t_type,
class t_memory_manager>
87 template<
class t_type>
88 Set(std::initializer_list<t_type> l)
89 : SET_BASE<t_value>(l)
96 [[nodiscard]]
bool hasValue(
const t_value& key)
const
98 return SET_BASE<t_value>::find(key) != SET_BASE<t_value>::end();
104 void add(
const t_value& key)
106 SET_BASE<t_value>::insert(key);
114 SET_BASE<t_value>::insert(std::move(key));
120 template<
class t_add_type>
123 for (
uint04 i = 0; i < key.size(); i++)
130 template<class t_index_type = uint04, class t_memory_manager = BufferAllocator<t_value, DetermineAlignment<sizeof(t_value)>(),
ObjectInfo<t_value>::Primitive, t_index_type,
false>>
134 for (
const auto& kv : (*
this))
146 for (
const auto& location : *
this)
148 if (location.first == key)
152 return Constant<uint04>::Invalid;
The equivelent of std::vector but with a bit more control.
A dummy base class for all Set templates.
void addAll(const Buffer< t_add_type > &key)
Inserts all elements from the given Buffer into the Set.
uint04 size() const
Returns the number of elements in the Set.
Set(const Buffer< t_type, t_memory_manager > &values)
Constructs a Set from a Buffer, inserting all Buffer elements.
Buffer< HyperGraphAction *, t_memory_manager > values() const
void add(const t_value &key)
Inserts a value into the Set by const reference.
Set()
Default constructor.
uint04 indexOf(const t_value &key) const
Finds the iteration index of a value within the Set.
bool hasValue(const t_value &key) const
Checks whether the Set contains the given value.
void add(t_value &&key)
Inserts a value into the Set by move.
Set(const t_iter &begin, const t_iter &end)
Constructs a Set from an iterator range.
Set(std::initializer_list< t_type > l)
Constructor that allows for an initializer list, allowing { and } to be used.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.
Information about the object.