|
From: David W <di...@ho...> - 2009-05-02 02:47:42
|
Yes, I can see both of your points. In any case, the recommended method is reasonably clean and consolidated. I will be occupied for a while with adding all the commands and options and the other cleanup that needs to be done, but I figured I would ask another question looking forward. What are your thoughts or advice on generating documentation or help. I haven't read in great detail about this yet, so I don't know if there's much control over the documentation format. At the least, our documentation person will create a user's guide for the CLI. It would also be nice for the complete usage to be pretty printed if help is specified on the command line or if there was an error with an option. Is the generated documentation capable of this or was it meant more functional--to make the CLOPS specification file more readable? Date: Fri, 1 May 2009 22:20:55 +0100 From: fi...@gm... To: clo...@li... Subject: Re: [Clops-users] usage after parsing I'd agree with Mikolas, but for slightly different reasons. Extending the option types, by providing your own custom option class is possible but will take a reasonable amount of work, largely in sufficiently understanding the mechanisms involved in order to do so. I wouldn't advise it in this case. Even if you were to create a custom class, it will not be more succinct and barely more efficient than creating a simple method that takes the created option enum type as an argument, and returns an instance of the type that you want (the body of the method just being a switch statement with each case creating and returning the appropriate subclass type). Hope this helps, Fintan _________________________________________________________________ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009 |