File: addround.cc

package info (click to toggle)
simrisc 16.05.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,568 kB
  • sloc: cpp: 6,877; fortran: 665; makefile: 112; ansic: 112; sh: 107
file content (34 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#define XERR
#include "screening.ih"

    // false: round: none was specified
    // true: round: age modality/ties was specified

bool Screening::addRound(LineInfo *noneLine, LineInfo const &lineInfo)
{
    Round round(d_modalities.modalityIDs());

//xerr(lineInfo.txt);

    auto in = Parser::extract(lineInfo, round);   // extracts the age

    if (round.none())
    {
        *noneLine = lineInfo;               // save the last round: none line
        return false;
    }

    if (not in)
        return true;

    if (not increasingAge(round))           // ages must increase
    {
        Err::msg(Err::ROUND_AGES_DONT_INC) << endl;
        return true;
    }

    if (addModality(in, round))
        d_roundVect.push_back(move(round));

    return true;
}