STAR++
v0.2.2
C++ implementation of STAR voting
Loading...
Searching...
No Matches
qualifierresult.h
1
#ifndef QUALIFIERRESULT_H
2
#define QUALIFIERRESULT_H
3
4
// Shared Library Support
5
#include "star/star_base_export.h"
6
7
// Qt Includes
8
#include <QSet>
9
#include <QString>
10
11
namespace
Star
12
{
13
14
/* TODO: Add an enum that is used for first and second seed that indicates how deep into the runoff qualifier
15
* process Calculator needed to go to fill both
16
*/
17
18
class
STAR_BASE_EXPORT
QualifierResult
19
{
20
//-Instance Variables--------------------------------------------------------------------------------------------------
21
private
:
22
QString mFirstSeed;
23
QString mSecondSeed;
24
QSet<QString> mOverflow;
25
bool
mSimultaneous;
26
27
//-Constructor---------------------------------------------------------------------------------------------------------
28
public
:
29
QualifierResult
();
30
QualifierResult
(
const
QSet<QString>& firstAdv,
const
QSet<QString>& secondAdv = {});
31
QualifierResult
(
const
QString& f,
const
QString& s,
bool
sim,
const
QSet<QString>& o);
32
33
//-Instance Functions-------------------------------------------------------------------------------------------------
34
public
:
35
bool
isNull()
const
;
36
bool
isComplete()
const
;
37
bool
isSeededSimultaneously()
const
;
38
bool
hasFirstSeed()
const
;
39
bool
hasSecondSeed()
const
;
40
41
QString firstSeed()
const
;
42
QString secondSeed()
const
;
43
std::pair<QString, QString> seeds();
44
QSet<QString> overflow()
const
;
45
QSet<QString> unresolved()
const
;
46
47
bool
operator==(
const
QualifierResult
& other)
const
;
48
bool
operator!=(
const
QualifierResult
& other)
const
;
49
};
50
51
}
52
53
#endif
// QUALIFIERRESULT_H
Star::QualifierResult
The QualifierResult class holds the outcome of a runoff qualifier.
Definition
qualifierresult.h:19
Star
The Star namespace is the main namespace through which all functionality of the STAR++ library is acc...
Definition
calculator.cpp:21
lib
include
star
qualifierresult.h
Generated by
1.9.8