39 Set() : std::set<T>() {}
44 Set(
const T& singleElement) :
47 this->insert(singleElement);
57 for(
auto it=this->cbegin(); it!=this->cend(); it++){
70 return (this->size() == 0);
80 return *(this->begin());
90 auto it = this->find(value);
91 return (it != this->end());
100 auto it = this->find(value);
101 if(it != this->end()){
111 template<
template <
typename>
class A>
114 for(
const T& t : container)
124 return static_cast<int>(this->size());
Definition: EngineUtils.h:33
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:37
Set(const T &singleElement)
Constructs a set with a single element.
Definition: Set.h:44
bool contains(const T &value) const
check, if set contains a specific value
Definition: Set.h:88
bool isEmpty() const
Definition: Set.h:68
QList< T > toList() const
converts the set to a list. The order is random
Definition: Set.h:54
T first() const
get copy of first element
Definition: Set.h:78
void remove(const T &value)
removes every item that matches value
Definition: Set.h:98
Helper functions.
Definition: Utils.h:38