31 namespace ContactType {
34 enum class Id : unsigned int
45 inline constexpr
unsigned int NumOfTypes() {
return 6U; }
48 bool IsId(
const std::string& s);
51 Id ToId(
const std::string& s);
54 inline constexpr std::size_t
ToSizeT(
Id id) {
return static_cast<std::size_t
>(id); }
64 constexpr
static std::initializer_list<Id> AsInitializerList = {ids...};
bool IsId(const string &s)
Check whether string is name of a ContactPoolType::Id.
Id
Enumerates the ContactPool types.
constexpr std::size_t ToSizeT(Id id)
Cast to size_t for indexing.
constexpr std::initializer_list< Id > IdList
To allow iteration over the type ids.
K12school with lower (inclusive) and upper (exclusive) age bracket.
Id ToId(const string &s)
Converts a string with name to Id.
constexpr unsigned int NumOfTypes()
Number of ContactPool types.
Keeps all available Ids in a template pack and exposes it as a std::initialize_list Useful when initi...
College with lower (inclusive) and upper (exclusive) age bracket.
string ToString(Id c)
Converts a ContactPoolType::Id value to corresponding name.
Namespace for the simulator and related classes.
constexpr IdPack_t IdPack
A constexpr global variable that gives access to the available Ids.
College with lower (inclusive) and upper (exclusive) age bracket.
static constexpr std::initializer_list< Id > AsInitializerList
Exposed as std::initializer_list.