Home
last modified time | relevance | path

Searched refs:OptionSpec (Results 1 – 7 of 7) sorted by relevance

/packages/inputmethods/LatinIME/native/dicttoolkit/src/utils/
Darguments_parser.h30 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;
Darguments_parser.cpp54 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/
Darguments_parser_test.cpp27 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/
Dmakedict_executor.cpp46 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()
Dheader_executor.cpp38 std::unordered_map<std::string, OptionSpec> optionSpecs; in getArgumentsParser()
39 optionSpecs["p"] = OptionSpec::switchOption("(plumbing) produce output suitable for a script"); in getArgumentsParser()
Ddiff_executor.cpp37 std::unordered_map<std::string, OptionSpec> optionSpecs; in getArgumentsParser()
38 optionSpecs["p"] = OptionSpec::switchOption("(plumbing) produce output suitable for a script"); in getArgumentsParser()
Dinfo_executor.cpp41 std::unordered_map<std::string, OptionSpec> optionSpecs; in getArgumentsParser()
42 optionSpecs["p"] = OptionSpec::switchOption("(plumbing) produce output suitable for a script"); in getArgumentsParser()