Apologies for the dud quoting. Seems I'm still having some issues with working out my mail client. ;)
On 23/10/2011, at 9:58 AM, <[email protected]> wrote: > > On 23/10/2011, at 1:14 AM, Andre Somers wrote: > > Op 22-10-2011 15:52, Dhaivat Pandya schreef: > > Craig, > > Do have any part of this class implemented? If its, people can test it and > see if it actually meets the users needs. > 2011/10/22 Thiago Macieira <[email protected]<mailto:[email protected]>> > On Saturday, 22 de October de 2011 11:29:38 > [email protected]<mailto:[email protected]> wrote: >> With that out of the way, I've put the class definition up on pastebin for >> comment. I've withheld the implementation until I've had a chance to clear >> it with our legal people. In the meantime, I think the interface of the >> class is probably enough to get some feedback on whether people think this >> has the potential to be a viable candidate for a command line parser for >> Qt: >> > Seems to me Craigs message was clear: yes, there is an implementation, but > no, it is not available to the public for the time being because such a > release must go through the companies legal department. Sounds reasonable to > me. > > I have my doubts on the API. I don't really like the fact that subclassing is > needed to use it. I prefer a solution where basic validation is build in, and > more extended validation is possible (subclassing is OK to me for that case, > but you could also considder a pattern like how QValidator is used.) > > What do you mean by basic validation? The code you include in Qt cannot know > what each of your flags mean, so only you can implement validation on whether > or not the flags and arguments form a sane combination. We started out > thinking along a similar line, but it turns out there's not really anything > that the base class can validate! Since arguments and flags can be > intermingled, you can't even test whether a multi-parameter flag has all > required parameters unless it is the last one on the command line (which is > about the only thing I think the base class can actually validate for you). > > Not sure what your point is with the QValidator approach, since it uses the > same approach as the class I proposed. QValidator has a pure virtual > validate() function too! If you mean that there are a couple of standardish > subclasses of QValidator provided, I come back to my above point that there > isn't really much you can pre-build as far as flag/argument validation is > concerned. Anything that isn't recognised as a flag is treated as an > argument, so there's not much left to validate automatically. > > > -- > Dr Craig Scott > Computational Software Engineering Team Leader, CSIRO (CMIS) > Melbourne, Australia > > > > _______________________________________________ > Development mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/development -- Dr Craig Scott Computational Software Engineering Team Leader, CSIRO (CMIS) Melbourne, Australia _______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
