Aargh is a C++ code generator that operates under the GNU General Public License, providing users with a powerful and versatile software tool.
The generated code is thoroughly commented on and carefully indented for improved readability. Traditionally, coding for command-line options has been seen as tedious, error-prone, time-consuming, and not fun. However, Aargh has changed that perception. It takes only defining the options you want in an XML file before running it through Aargh to get a source code that can be compiled and linked into your program. Therefore, making any changes to the rules or adding new options becomes easy since you can simply edit the XML and regenerate the code.
To use Aargh, write an XML file for the desired options, and Aargh produces two C++ files. The first file is a header that initializes a class to detect the options--"Opts" by default--though you can specify a different name. The other file holds the implementation of Opts, which provides member functions for parsing the command line and returning the results. In your code, create an instance of Opts and run Opts::get() to parse the command line by providing argc and argv arguments from main(). If the parsing is successful, the Opts object stores the results and publishes them through a series of accessor functions.
Aargh has several features, including enforcing upper and/or lower limits on the number of non-option arguments, distinguishing between options that take arguments and those that don't, requiring an option, and requiring the argument to an option to be a non-negative integer. It can also enforce upper and/or lower limits on integer arguments and string argument string lengths. Additionally, you can call a function of your own to verify a string argument. Furthermore, Aargh supports multiple occurrences of the same option, thereby building an STL vector to contain the arguments.
The latest features in Aargh include the ability to specify the generated header file's location independently of its name, making it easier to integrate Aargh into complex build environments. Overall, the implementation of Aargh has been received positively by developers as coding for command-line options has become much more manageable and enjoyable.
Version 1.2.2: N/A