diff --git a/docs/manual.xml b/docs/manual.xml index 9ef5841..752aee2 100644 --- a/docs/manual.xml +++ b/docs/manual.xml @@ -654,6 +654,28 @@ wasn't matched, it will also return FALSE.) throw("Very bad things..."); + +It is helpful to note that Args of any type can be xor'd together. +This means that you can xor a SwitchArg with a ValueArg. +This is helpful in situations where one of several options is necessary and one of the options +requires additional information. + + + + 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"); + + vector<Arg*> xorlist; + xorlist.push_back(&sss); + xorlist.push_back(&fff); + xorlist.push_back(&uuu); + + cmd.xorAdd( xorlist ); + + + +