STAR++ v0.2.2
C++ implementation of STAR voting
Loading...
Searching...
No Matches
Star::ExpectedElectionResult::Builder Class Reference

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 ()
 
BuilderwSeat (const Seat &seat)
 
BuilderwWinner (const QString &winner)
 

Detailed Description

ExpectedElectionResults are built by first instantiating a Builder, then adding all predetermined seats to it, and finally calling build().

Constructor & Destructor Documentation

◆ Builder()

Star::ExpectedElectionResult::Builder::Builder ( )

Creates an expected election result builder.

See also
build().

Member Function Documentation

◆ build()

ExpectedElectionResult Star::ExpectedElectionResult::Builder::build ( )

Completes the work-in-progress expected election and returns it.

◆ wSeat()

ExpectedElectionResult::Builder & Star::ExpectedElectionResult::Builder::wSeat ( const Seat seat)

Adds the seat seat to the builder.

See also
wWinner().

◆ wWinner()

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.

See also
wSeat().

The documentation for this class was generated from the following files: