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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#ifndef INCLUDED_ROUND_
#define INCLUDED_ROUND_
#include <cmath>
#include <iosfwd>
#include <istream>
// contains a round specification from the config file
#include "../typedefs/typedefs.h"
#include "../globals/globals.h"
class Round
{
friend std::istream &operator>>(std::istream &in, Round &round);
friend std::ostream &operator<<(std::ostream &out, Round const &round);
double d_age;
Uint16Vect d_modalities; // modalities used in this screening round
StringVect const &d_modalityIDs;
public:
Round(StringVect const &modalityIDs);
bool add(uint16_t idx);
bool none() const; // true: none was specified;
double age() const;
uint16_t rndAge() const; // rounded double age value
// modality indices used by
Uint16Vect const &modalityIndices() const; // this screening round
// StringVect const &modalityIDs() const; // screening round
private:
std::ostream &insert(std::ostream &out) const;
};
#include "round.f"
using RoundVect = std::vector<Round>;
#endif
|