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
55 template<
class t_value>
62 template<
class t_iter>
63 Set(
const t_iter& begin,
const t_iter& end)
66 template<
class t_type,
class t_index_type,
class t_memory_allocator,
class t_memory_manager>
70 [[nodiscard]]
bool hasValue(
const t_value& key)
const
72 return SET_BASE<t_value>::find(key) != SET_BASE<t_value>::end();
74 void add(
const t_value& key)
76 SET_BASE<t_value>::insert(key);
78 void add(t_value&& key)
80 SET_BASE<t_value>::insert(std::move(key));
86 for (
const auto& kv : (*
this))
93 for (
const auto& location : *
this)
95 if (location.first == key)
#define SET_BASE
Definition Set.h:39
Specific logic for reserving memory for a Buffer. When managed, and more memory is needed memory is r...
Definition Pointer.hpp:311
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A dummy base class for all Set templates.
Definition Set.h:50
Container that stores unique elements in no particular order, and which allow for fast retrieval or i...
Definition Model.h:51
bool hasValue(const t_value &key) const
Definition Set.h:70
void add(const t_value &key)
Definition Set.h:74
uint04 size() const
Definition Set.h:101
Buffer< t_value, t_index_type, t_memory_allocator, t_memory_manager > values() const
Definition Set.h:83
uint04 indexOf(const t_value &key) const
Definition Set.h:90
Set(const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > &values)
Definition Set.h:67
Set(const t_iter &begin, const t_iter &end)
Definition Set.h:63
void add(t_value &&key)
Definition Set.h:78
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:375
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233