Is there an alternative to to "boost/property_tree" ?
Actually I'm trying to remove all boost implementations of C++ and use standard library functions. I've been able to find alternatives to some other implementations of boost C++ but none so for property tree.
Motivation to not use boost: Mostly dealing with added dependencies
bool Processor::init(std::istream& xml, std::istream& rioxml, const std::string& logconfig, const std::string& recoveryConfig) {
boost::property_tree::ptree config;
boost::property_tree::ptree rioconfig;
try {
boost::property_tree::xml_parser::read_xml(xml, config,
boost::property_tree::xml_parser::no_comments);
boost::property_tree::xml_parser::read_xml(rioxml, rioconfig,
boost::property_tree::xml_parser::no_comments);
return Initialize(config, rioconfig, logconfig, recoveryConfig);
}
catch(const boost::property_tree::xml_parser::xml_parser_error& ex){
LOG_ERROR(LOGCAT_DEFAULT, MSGID_UNKNOWN, "Failed to parse business config: " << logconfig);
return false;
}
}
Aucun commentaire:
Enregistrer un commentaire