AudioManager
7.6.6
Native Application Runtime Environment
|
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
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;
In the constructor, add the argument to the commandline like this
And then in the startup controller routine (or later) you can get the value of the argument, like
An example can be found in the plugins repository in the test controller.