mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Instead of being hardcoded in the python script, preferences specific to each country are defined in the country_preferences.h and .csv files. Change-Id: I71e276341e1586935b4d5814be5b1be80fa170a0
35 lines
1.0 KiB
C++
35 lines
1.0 KiB
C++
#ifndef COUNTRY_PREFERENCES_H
|
|
#define COUNTRY_PREFERENCES_H
|
|
|
|
#include <poincare/preferences.h>
|
|
|
|
class CountryPreferences {
|
|
public:
|
|
enum class AvailableExamModes : uint8_t {
|
|
StandardOnly,
|
|
All
|
|
};
|
|
|
|
enum class MethodForQuartiles : uint8_t {
|
|
MedianOfSublist,
|
|
CumulatedFrequency
|
|
};
|
|
|
|
constexpr CountryPreferences(AvailableExamModes availableExamModes, MethodForQuartiles methodForQuartiles, Poincare::Preferences::UnitFormat unitFormat) :
|
|
m_availableExamModes(availableExamModes),
|
|
m_methodForQuartiles(methodForQuartiles),
|
|
m_unitFormat(unitFormat)
|
|
{}
|
|
|
|
constexpr AvailableExamModes availableExamModes() const { return m_availableExamModes; }
|
|
constexpr MethodForQuartiles methodForQuartiles() const { return m_methodForQuartiles; }
|
|
constexpr Poincare::Preferences::UnitFormat unitFormat() const { return m_unitFormat; }
|
|
|
|
private:
|
|
const AvailableExamModes m_availableExamModes;
|
|
const MethodForQuartiles m_methodForQuartiles;
|
|
const Poincare::Preferences::UnitFormat m_unitFormat;
|
|
};
|
|
|
|
#endif
|