Properties::Properties(const std::string& filename) { PropertiesEvent ev(*this); std::ifstream in(filename.c_str()); if (!in) throw std::runtime_error("could not open file \"" + filename + '"'); PropertiesParser(ev).parse(in); }
PropertiesFile::PropertiesFile(const std::string& filename) { PropertiesEvent ev(*this); std::ifstream in(filename.c_str()); if (!in) throw PropertiesParserError("could not open properties file \"" + filename + '"'); PropertiesParser(ev).parse(in); }
Properties::Properties(std::istream& in) { PropertiesEvent ev(*this); PropertiesParser(ev).parse(in); }