The enumeration name in C ++ is a character, not a string. There is no way to match between a string and an enumeration value unless you provide this mapping yourself by writing a method, for example:
EMISSION emission_to_string(const std::string& name)
{
if ( name == "EMISSION::EMIT1")
{
return EMISSION::EMIT1;
}
... etc
}
Then you get the value as a string from the_tree property and apply this mapping.
, . boost:: bimap, enum- > string OR string- > enum, , , if-. , boost:: assign , , .