On Tue, Sep 17, 2013 at 2:41 PM, Christopher Sean Morrison <[email protected]> wrote: > On Sep 15, 2013, at 07:55 AM, Tom Browder <[email protected]> wrote: > > The args will be pointers that are initialized instead of being static > structs, and there will be setter and getter functions to ease ... > Should be possible to support both/either, no? There's a concise simplicity > to static struct initialization and no worries about memory management > issues.
That may be, but I also see more complexity in trying to initialize those parts that can't be static initialized. Also, using both methods would require two kinds of array handling, etc. As I work on the new interface, I find myself going toward a separate arg init function for each TCLAP type we implement, each having its own signature which parrots the TCLAP class. Then the common struct is actually initialized behind the scenes. That way we also piggy-back on the TCLAP manual for how to use each type. As far as memory handling goes, the user will only have to do one bu_arg_free for the array that contains the arg pointers (of course multiple controlled error exits will require a bu_arg_free for each)--that's pretty easy I think. My 2 cents from my rusty C perspective. Best, -Tom ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
