67 if (
i < ac - 1 && av[
i+1][0] !=
'-')
74 OString tmp(
"'-O', please check");
77 tmp += OString::Concat(
" your input '") + av[
i+1] +
"'";
91 if (av[
i][2] !=
'D' || av[
i][3] !=
'\0')
93 OString tmp = OString::Concat(
"'-nD', please check your input '") + av[
i] +
"'";
100 if (av[
i][2] ==
'\0')
102 if (
i < ac - 1 && av[
i+1][0] !=
'-')
109 OString tmp(
"'-T', please check");
112 tmp += OString::Concat(
" your input '") + av[
i+1] +
"'";
134 if (av[
i][2] !=
'\0')
136 OString tmp(
"'-L', please check");
139 tmp += OString::Concat(
" your input '") + av[
i] +
"'";
147 throw IllegalArgument(
"'-L' could not be combined with '-C' or '-CS' option");
154 if (av[
i][3] !=
'\0')
156 OString tmp(
"'-CS', please check");
159 tmp += OString::Concat(
" your input '") + av[
i] +
"'";
167 throw IllegalArgument(
"'-CS' could not be combined with '-L' or '-C' option");
172 else if (av[
i][2] !=
'\0')
174 OString tmp(
"'-C', please check");
177 tmp += OString::Concat(
" your input '") + av[
i] +
"'";
185 throw IllegalArgument(
"'-C' could not be combined with '-L' or '-CS' option");
192 if (av[
i][3] !=
'\0')
194 OString tmp(
"'-Gc', please check");
197 tmp += OString::Concat(
" your input '") + av[
i] +
"'";
206 else if (av[
i][2] !=
'\0')
208 OString tmp(
"'-G', please check");
211 tmp += OString::Concat(
" your input '") + av[
i] +
"'";
221 if (av[
i][2] ==
'\0')
223 if (
i < ac - 1 && av[
i+1][0] !=
'-')
230 OString tmp(
"'-X', please check");
233 tmp += OString::Concat(
" your input '") + av[
i+1] +
"'";
255 FILE* cmdFile = fopen(av[
i]+1,
"r");
256 if( cmdFile ==
nullptr )
267 while (fscanf(cmdFile,
"%511s", buffer) != EOF && rargc < 512)
269 rargv[rargc]= strdup(buffer);
276 for (
int j=0; j < rargc; j++)
294 OString
help =
"\nusing: " +
295 m_program +
" [-options] file_1 ... file_n\nOptions:\n"
296 " -O<path> = path describes the root directory for the generated output.\n"
297 " The output directory tree is generated under this directory.\n"
298 " -T<name> = name specifies a type or a list of types. The output for this\n"
299 " [t1;...] type is generated. If no '-T' option is specified,\n"
300 " then output for all types is generated.\n"
301 " Example: 'com.sun.star.uno.XInterface' is a valid type.\n"
302 " -L = UNO type functions are generated lightweight, that means only\n"
303 " the name and typeclass are given and everything else is retrieved\n"
304 " from the type library dynamically. The default is that UNO type\n"
305 " functions provides enough type information for bootstrapping C++.\n"
306 " '-L' should be the default for external components.\n"
307 " -C = UNO type functions are generated comprehensive that means all\n"
308 " necessary information is available for bridging the type in UNO.\n"
309 " -nD = no dependent types are generated.\n"
310 " -G = generate only target files which does not exists.\n"
311 " -Gc = generate only target files which content will be changed.\n"
312 " -X<file> = extra types which will not be taken into account for generation.\n\n" +
320 OString version =
m_program +
" Version 2.0\n\n";
OString prepareVersion() const
bool initOptions(int ac, char *av[], bool bCmdFile=false) override
OString prepareHelp() override
StringVector m_inputFiles
StringVector m_extra_input_files
bool isValid(const ::rtl::OString &option) const