mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-10 12:49:08 -04:00
updated note on xor
This commit is contained in:
parent
0f874b5e90
commit
3251c3e40d
@ -618,10 +618,8 @@ to add more than two <classname>Arg</classname>s.
|
||||
<programlisting>
|
||||
|
||||
|
||||
ValueArg<string> fileArg("f","file","File name to read",true,"homer",
|
||||
"filename");
|
||||
ValueArg<string> urlArg("u","url","URL to load",true,
|
||||
"http://example.com", "URL");
|
||||
ValueArg<string> fileArg("f","file","File name to read",true,"/dev/null", "filename");
|
||||
ValueArg<string> urlArg("u","url","URL to load",true, "http://example.com", "URL");
|
||||
|
||||
cmd.xorAdd( fileArg, urlArg );
|
||||
cmd.parse(argc, argv);
|
||||
@ -662,14 +660,14 @@ requires additional information.
|
||||
|
||||
<programlisting>
|
||||
|
||||
SwitchArg sss("s", "stdin", "read from STDIN", false);
|
||||
ValueArg<string> fff("f", "file", "read from file", false, "/dev/null", "string");
|
||||
ValueArg<string> uuu("u", "url", "read from URL", false, "http://example.com", "string");
|
||||
SwitchArg stdinArg("s", "stdin", "Read from STDIN", false);
|
||||
ValueArg<string> fileArg("f","file","File name to read",true,"/dev/null", "filename");
|
||||
ValueArg<string> urlArg("u","url","URL to load",true, "http://example.com", "URL");
|
||||
|
||||
vector<Arg*> xorlist;
|
||||
xorlist.push_back(&sss);
|
||||
xorlist.push_back(&fff);
|
||||
xorlist.push_back(&uuu);
|
||||
xorlist.push_back(&stdinArg);
|
||||
xorlist.push_back(&fileArg);
|
||||
xorlist.push_back(&urlArg);
|
||||
|
||||
cmd.xorAdd( xorlist );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user