Definition at line 45 of file using_skia_and_harfbuzz.cpp.
◆ BaseOption()
BaseOption::BaseOption |
( |
std::string |
_selector, |
|
|
std::string |
_description |
|
) |
| |
|
inline |
◆ ~BaseOption()
virtual BaseOption::~BaseOption |
( |
| ) |
|
|
inlinevirtual |
◆ Init()
void BaseOption::Init |
( |
const std::vector< BaseOption * > & |
option_list, |
|
|
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
Definition at line 68 of file using_skia_and_harfbuzz.cpp.
69 {
70 std::map<std::string, BaseOption *>
options;
73 }
74 for (
int i = 1;
i < argc;
i++) {
75 std::string option_selector(
argv[
i]);
76 auto it =
options.find(option_selector);
79 break;
80 }
81 const char *option_value =
argv[
i + 1];
82 it->second->set(option_value);
84 } else {
85 printf(
"Ignoring unrecognized option: %s.\n",
argv[
i]);
87 printf(
"\tTakes text from stdin and produces pdf file.\n");
88 printf(
"Supported options:\n");
90 printf(
"\t%s\t%s (%s)\n", opt->selector.c_str(),
91 opt->description.c_str(), opt->valueToString().c_str());
92 }
94 }
95 }
96}
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
◆ set()
virtual void BaseOption::set |
( |
const std::string & |
_value | ) |
|
|
pure virtual |
◆ valueToString()
virtual std::string BaseOption::valueToString |
( |
| ) |
|
|
pure virtual |
◆ description
std::string BaseOption::description |
◆ selector
std::string BaseOption::selector |
The documentation for this struct was generated from the following file: