AudioManager  7.6.6
Native Application Runtime Environment
CommandLineParsing

TCLAP

Commandline parsing is accomplished via a template library that is added to the source tree of the Audiomanager: TCLAP. The license of this libraty is MIT. It manages commandline parsing in a handy way. More information can be found here: http://tclap.sourceforge.net

CommandLine Parsing in the Plugins

The commandline Class that parses the commandline can be accessed via am::CAmCommandLineSingleton . This factory creates a commandline object that can be accessed everywhere in the Audiomanager. In the constructor of a plugin, the plugins can add commandline arguments they hold as member. Here the member, in this case of type TCLAP::ValueArg<std::string> mCommandLineArg;

mCommandLineArg("K","controllerPluginArg","a test argument for the controller",false,"bla","string")

In the constructor, add the argument to the commandline like this

CAmCommandLineSingleton::instance()->add(mCommandLineArg);

And then in the startup controller routine (or later) you can get the value of the argument, like

mCommandLineArg.getValue()

An example can be found in the plugins repository in the test controller.