The Lean Mean C++ Option Parser Icon

The Lean Mean C++ Option Parser

A no-dependencies C++ program arguments parser

11 Downloads (This Week)
Last Update:
Download optionparser-1.4.tar.gz
Browse All Files

Description

The Lean Mean C++ Option Parser handles the program arguments (argc, argv). It supports the short and long option formats of getopt(), getopt_long() and getopt_long_only() but has a more convenient interface. It is a freestanding, header-only library with no dependencies, not even libc or STL. It comes with a usage message formatter that supports column alignment and line wrapping, making it ideal for localized messages with different lengths.

The Lean Mean C++ Option Parser Web Site

Categories

Software Development

License

MIT License

Features

  • Header-only library. Just #include "optionparser.h" and you're set.
  • Freestanding. There are no dependencies whatsoever, not even the C or C++ standard library.
  • Usage message formatter that supports column alignment and line wrapping.
  • Unlike getopt() and derivatives it doesn't force you to loop through options sequentially. Instead you can access options directly like this:
  • if ( options[QUIET] ) ... //Test for presence of a switch in the argument vector:
  • if ( options[FOO].last()->type() == DISABLE ) ... // --enable-foo/--disable-foo: last one used wins
  • int verbosity = options[VERBOSE].count(); // -v verbose, -vv more verbose
  • for (Option* opt = options[FILE]; opt; opt = opt->next()) // go through all --file=<fname> arguments

KEEP ME UPDATED

Other Useful Business Software

VoIP Monitoring without the Missing Links Icon

With global offices, wireless networks, and data traversing the Internet, troubleshooting VoIP performance is tricky.

VoIP Monitoring without the Missing Links Icon
ThousandEyes extends visibility across corporate networks as well as the public Internet, helping to solve issues from the branch through MPLS links and SIP trunks to service provider networks. Simulate pre-deployment capacity, monitor detailed performance metrics and see how QoS settings impact call quality.

Additional Project Details

Intended Audience

Developers

User Interface

Command-line

Programming Language

C++

Registered

2012-01-20

Thanks for helping keep SourceForge clean.

Screenshot instructions:
Windows
Mac
Red Hat Linux   Ubuntu

Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies
X

Briefly describe the problem (required):

Upload screenshot of ad (required):
Select a file, or drag & drop file here.

Please provide the ad click URL, if possible:

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks