forked from maik-nack/OptimizationSolver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathISet.h
67 lines (51 loc) · 1.48 KB
/
ISet.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef ISET_H
#define ISET_H
#include "IVector.h"
#include "SHARED_EXPORT.h"
class SHARED_EXPORT ISet
{
public:
enum InterfaceTypes
{
INTERFACE_0,
DIMENSION_INTERFACE_IMPL
};
virtual int getId() const = 0;
/*factories*/
static ISet* createSet(unsigned int R_dim);
virtual int put(IVector const* const item) = 0;
virtual int get(unsigned int index, IVector*& pItem) const = 0;
virtual int remove(unsigned int index) = 0;
virtual int contains(IVector const* const pItem, bool & rc) const = 0;
virtual unsigned int getSize() const = 0;
virtual int clear() = 0;
class IIterator
{
public:
virtual int next() = 0;
virtual int prev() = 0;
virtual bool isEnd() const = 0;
virtual bool isBegin() const = 0;
protected:
IIterator(ISet const* const set, int pos);
/*dtor*/
virtual ~IIterator(){};
private:
/*non default copyable*/
IIterator(const IIterator& other) = delete;
void operator=(const IIterator& other) = delete;
};
virtual IIterator* end() = 0;
virtual IIterator* begin() = 0;
virtual int deleteIterator(IIterator * pIter) = 0;
virtual int getByIterator(IIterator const* pIter, IVector*& pItem) const = 0;
/*dtor*/
virtual ~ISet(){};
protected:
ISet() = default;
private:
/*non default copyable*/
ISet(const ISet& other) = delete;
void operator=(const ISet& other) = delete;
};
#endif // ISET_H