How do you read a enum-class from an XML file using the boost::property_tree
library?
I would like to avoid reading it as a string and mapping the string to the enum-class in my program.
How do you read a enum-class from an XML file using the boost::property_tree
library?
I would like to avoid reading it as a string and mapping the string to the enum-class in my program.
Read the
property_tree/xml_parser.hpp
header file. It's pretty straightforward.Here are the most important parts, all in the
boost::property_tree::xml_parser
namespace: