Lines Matching refs:string
22 #include <string>
54 virtual Result<Success> ParseSection(std::vector<std::string>&& args,
55 const std::string& filename, int line) = 0;
56 virtual Result<Success> ParseLineSection(std::vector<std::string>&&, int) { return Success(); };
65 // They take the form of bool Callback(std::vector<std::string>&& args, std::string* err)
68 // indicating a failure and has an std::string* err parameter into which an error string can
70 using LineCallback = std::function<Result<Success>(std::vector<std::string>&&)>;
74 bool ParseConfig(const std::string& path);
75 bool ParseConfig(const std::string& path, size_t* parse_errors);
76 void AddSectionParser(const std::string& name, std::unique_ptr<SectionParser> parser);
77 void AddSingleLineParser(const std::string& prefix, LineCallback callback);
80 void ParseData(const std::string& filename, const std::string& data, size_t* parse_errors);
81 bool ParseConfigFile(const std::string& path, size_t* parse_errors);
82 bool ParseConfigDir(const std::string& path, size_t* parse_errors);
84 std::map<std::string, std::unique_ptr<SectionParser>> section_parsers_;
85 std::vector<std::pair<std::string, LineCallback>> line_callbacks_;