help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-gengetopt] option group with exclusion


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] option group with exclusion
Date: Thu, 17 Feb 2005 17:39:29 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1

Gyozo, PAPP (VBuster) wrote:
Hi there,

currently I'm struggling to implement an interface which is basically a 
mutually exlcusive group of option with a little exception two of the four 
options are allowed to appear at the same time.

Consider the following situation, there are 4 options:

--all-files
--pattern
--include
--exclude

the rules which cannot be changed because this was what the customer wanted 
actually:
1.)--all-files should not be used neither of the remaining 3 options.
2.)--pattern should not be used neither of the remaining 3 options.
3.) BUT --exclude and --include can be used at the same time.

Apart from the last term this could be easily implemented as a option group. 
But how to modify gengetopt to be able to handle such a situation? I've added 
some code around gengetopt calls in my application, but I feel it is worth 
discussing this problem. May gengetopt address such functionality, too?



Hi there

and sorry for the long silence (very busy days :-)

If I got it right, you'd need a way to have options that are common to more than one mutually exclusive group? As I understand such options would still make sense only if given together with options of these groups? If so, probably the best way to implement so would be to have options that require other options (or other groups as in this case).

what do you think?

Lorenzo

--
+-----------------------------------------------------+
|  Lorenzo Bettini          ICQ# lbetto, 16080134     |
|  PhD in Computer Science                            |
|  Dip. Sistemi e Informatica, Univ. di Firenze       |
|  Tel +39 055 4237441, Fax +39 055 4237437           |
|  Florence - Italy        (GNU/Linux User # 158233)  |
|  Home Page        : http://www.lorenzobettini.it    |
|  http://music.dsi.unifi.it         XKlaim language  |
|  http://www.lorenzobettini.it/purple    Cover Band  |
|  http://www.gnu.org/software/src-highlite           |
|  http://www.gnu.org/software/gengetopt              |
|  http://www.lorenzobettini.it/software/gengen       |
|  http://www.lorenzobettini.it/software/doublecpp    |
+-----------------------------------------------------+





reply via email to

[Prev in Thread] Current Thread [Next in Thread]