One problem with static initialization that's been bothering me is how
to get info back from the C++ side without a pointer.

Couldn't we use a pipe or read/write data to a tmp file?  (Or shared memory?)

And static initialization is much easier by using a unique (and
simple) struct for each arg type and using enums and const char* as
members.  The file name for data transfer would be unique based on the
struct info just as is used by TCLAP.

The parsing function would get the static arg pointers, parse the
command line, and write all to a pipe or file which the calling C
program would interpret with the getters.  The only heap memory use
would be the C++ side which should be taken care of by C++, and any
open pipes or files used would be closed on exit.

Comments?

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

Reply via email to