24 #include <boost/algorithm/string.hpp> 28 namespace ContactType {
31 using boost::to_upper;
35 static map<string, Id> ids{
45 return (ids.count(t) == 1);
50 static map<string, Id> ids{
60 return (ids.count(t) == 1) ? ids[t] :
throw runtime_error(
"ContactType::ToId> not available:" + t);
65 static map<Id, string> names{
73 return (names.count(c) == 1) ? names[c] :
throw runtime_error(
"ContactType::ToString> not available:");
bool IsId(const string &s)
Check whether string is name of a ContactPoolType::Id.
Id
Enumerates the ContactPool types.
Id ToId(const string &s)
Converts a string with name to Id.
Definition of ContactPool Id Type.
string ToString(Id c)
Converts a ContactPoolType::Id value to corresponding name.
Namespace for the simulator and related classes.