STAR++ v0.2.2
C++ implementation of STAR voting
Loading...
Searching...
No Matches
seat.h
1#ifndef SEAT_H
2#define SEAT_H
3
4// Shared Library Support
5#include "star/star_base_export.h"
6
7// Qt Includes
8#include <QObject>
9
10// Project Includes
11#include "star/qualifierresult.h"
12
13namespace Star
14{
15
16class STAR_BASE_EXPORT Seat
17{
18//-Instance Variables--------------------------------------------------------------------------------------------------
19private:
20 QString mWinner;
21 QualifierResult mQualifierResult;
22
23//-Constructor---------------------------------------------------------------------------------------------------------
24public:
25 Seat();
26 Seat(const QualifierResult& qualifierResult);
27 Seat(const QString& winner, const QualifierResult& qualifierResult = QualifierResult());
28
29//-Instance Functions-------------------------------------------------------------------------------------------------
30public:
31 bool isNull() const;
32 bool isFilled() const;
33 bool isExceptionFilled() const;
34 bool isUpset() const;
35
36 QString winner() const;
37 QualifierResult qualifierResult() const;
38
39 bool operator==(const Seat& other) const;
40 bool operator!=(const Seat& other) const;
41};
42
43}
44
45#endif // SEAT_H
The QualifierResult class holds the outcome of a runoff qualifier.
Definition qualifierresult.h:19
The Seat class contains the outcome for a specific seat in a given election.
Definition seat.h:17
The Star namespace is the main namespace through which all functionality of the STAR++ library is acc...
Definition calculator.cpp:21