|
STAR++ v0.2.2
C++ implementation of STAR voting
|
The ExpectedElectionResult::Builder class is a utility through expected election result sets can be created. More...
#include <star/expectedelectionresult.h>
Public Member Functions | |
| Builder () | |
| ExpectedElectionResult | build () |
| Builder & | wSeat (const Seat &seat) |
| Builder & | wWinner (const QString &winner) |
ExpectedElectionResults are built by first instantiating a Builder, then adding all predetermined seats to it, and finally calling build().
| Star::ExpectedElectionResult::Builder::Builder | ( | ) |
Creates an expected election result builder.
| ExpectedElectionResult Star::ExpectedElectionResult::Builder::build | ( | ) |
Completes the work-in-progress expected election and returns it.
| ExpectedElectionResult::Builder & Star::ExpectedElectionResult::Builder::wSeat | ( | const Seat & | seat | ) |
Adds the seat seat to the builder.
| ExpectedElectionResult::Builder & Star::ExpectedElectionResult::Builder::wWinner | ( | const QString & | winner | ) |
Adds a seat to the builder with winner winner and a null QualifierResult.
This is a convenience function that can be used along with sameOutcomeAs() to check election results when you only care about the winners of each seat.