#ifndef KITEMSET_H
#define KITEMSET_H
-#include <kitemviews/kitemrange.h>
+#include "dolphin_export.h"
+#include "kitemviews/kitemrange.h"
/**
* @brief Stores a set of integer numbers in a space-efficient way.
* The complexity of most operations depends on the number of ranges.
*/
-class KItemSet
+class DOLPHIN_EXPORT KItemSet
{
public:
KItemSet();
KItemSet(const KItemSet& other);
+ ~KItemSet();
+ KItemSet& operator=(const KItemSet& other);
/**
* Returns the number of items in the set.
return *this;
}
+ ~iterator() = default;
+
int operator*() const
{
return m_rangeIt->index + m_offset;
{
}
- const_iterator(const iterator& other) :
+ explicit const_iterator(const iterator& other) :
m_rangeIt(other.m_rangeIt),
m_offset(other.m_offset)
{
return *this;
}
+ ~const_iterator() = default;
+
int operator*() const
{
return m_rangeIt->index + m_offset;
{
}
+inline KItemSet::~KItemSet() = default;
+
+inline KItemSet& KItemSet::operator=(const KItemSet& other)
+{
+ m_itemRanges=other.m_itemRanges;
+ return *this;
+}
+
inline int KItemSet::count() const
{
int result = 0;