Searched refs:OptionSpec (Results 1 – 7 of 7) sorted by relevance
/packages/inputmethods/LatinIME/native/dicttoolkit/src/utils/ |
D | arguments_parser.h | 30 class OptionSpec { 33 OptionSpec() = default; 34 OptionSpec &operator=(const OptionSpec &) = default; 36 static OptionSpec keyValueOption(const std::string &valueName, const std::string &defaultValue, in keyValueOption() 38 return OptionSpec(true /* needsValue */, valueName, defaultValue, description); in keyValueOption() 41 static OptionSpec switchOption(const std::string &description) { in switchOption() 42 return OptionSpec(false /* needsValue */, "" /* valueName */, "" /* defaultValue */, in switchOption() 52 OptionSpec(const bool needsValue, const std::string &valueName, const std::string &defaultValue, in OptionSpec() function 100 ArgumentsParser(const std::unordered_map<std::string, OptionSpec> &&optionSpecs, in ArgumentsParser() 113 const std::unordered_map<std::string, OptionSpec> mOptionSpecs;
|
D | arguments_parser.cpp | 54 const OptionSpec &spec = option.second; in printUsage() 75 const OptionSpec &spec = option.second; in printUsage() 102 const OptionSpec &optionSpec = entry.second; in parseArguments()
|
/packages/inputmethods/LatinIME/native/dicttoolkit/tests/utils/ |
D | arguments_parser_test.cpp | 27 std::unordered_map<std::string, OptionSpec> optionSpecs; in TEST() 33 std::unordered_map<std::string, OptionSpec> optionSpecs; in TEST() 34 optionSpecs["a"] = OptionSpec::keyValueOption("valueName", "default", "description"); in TEST() 48 EXPECT_FALSE(ArgumentsParser(std::unordered_map<std::string, OptionSpec>(), in TEST() 57 EXPECT_FALSE(ArgumentsParser(std::unordered_map<std::string, OptionSpec>(), in TEST() 66 EXPECT_FALSE(ArgumentsParser(std::unordered_map<std::string, OptionSpec>(), in TEST() 91 std::unordered_map<std::string, OptionSpec> optionSpecs; in TEST() 92 optionSpecs["a"] = OptionSpec::switchOption("description"); in TEST() 93 optionSpecs["b"] = OptionSpec::keyValueOption("valueName", "default", "description"); in TEST()
|
/packages/inputmethods/LatinIME/native/dicttoolkit/src/command_executors/ |
D | makedict_executor.cpp | 46 std::unordered_map<std::string, OptionSpec> optionSpecs; in getArgumentsParser() 47 optionSpecs["o"] = OptionSpec::keyValueOption("format", "2", in getArgumentsParser() 49 optionSpecs["t"] = OptionSpec::keyValueOption("mode", "off", in getArgumentsParser()
|
D | header_executor.cpp | 38 std::unordered_map<std::string, OptionSpec> optionSpecs; in getArgumentsParser() 39 optionSpecs["p"] = OptionSpec::switchOption("(plumbing) produce output suitable for a script"); in getArgumentsParser()
|
D | diff_executor.cpp | 37 std::unordered_map<std::string, OptionSpec> optionSpecs; in getArgumentsParser() 38 optionSpecs["p"] = OptionSpec::switchOption("(plumbing) produce output suitable for a script"); in getArgumentsParser()
|
D | info_executor.cpp | 41 std::unordered_map<std::string, OptionSpec> optionSpecs; in getArgumentsParser() 42 optionSpecs["p"] = OptionSpec::switchOption("(plumbing) produce output suitable for a script"); in getArgumentsParser()
|