5#include "star/star_base_export.h"
30 QList<Ballot> mBallots;
32 QMap<QString, int> mTotals;
33 QList<Rank> mScoreRankings;
44 QStringList candidates()
const;
45 const QList<Ballot>& ballots()
const;
46 int seatCount()
const;
48 int totalScore(
const QString& candidate)
const;
49 const QList<Rank>& scoreRankings()
const;
70 QHash<QString, int> mVotes;
78 const Voter& voter()
const;
80 int score(
const QString& candidate)
const;
81 QString preference(
const QString& candidateA,
const QString& candidateB)
const;
92 Builder(
const QString& name = QString());
96 Builder& wName(
const QString& name);
97 Builder& wBallot(
const Voter& voter,
const QList<Vote>& votes);
The Election::Ballot class represents a single ballot for a given election.
Definition election.h:65
The Election::Builder class is a utility through which elections can be prepared.
Definition election.h:85
The Election class represents a collection of candidates and ballots.
Definition election.h:19
The Star namespace is the main namespace through which all functionality of the STAR++ library is acc...
Definition calculator.cpp:21
The Election::Voter struct represents a single vote for a candidate in an election.
Definition election.h:59
QString candidate
Definition election.h:60
int score
Definition election.h:61
The Election::Voter struct contains the details of a voter participating in an election.
Definition election.h:53
QString name
Definition election.h:54
QString anonymousName
Definition election.h:55