You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The CPM lib provides a standardized way to read command line parameters.

Example

The program is executed with binary_name --my_int=42 --simulated_time=true

#include "cpm/CommandLineReader.hpp"
bool use_simulated_time = cpm::cmd_parameter_bool("simulated_time", false, argc, argv);
int my_int = cpm::cmd_parameter_int("my_int", 5, argc, argv);

References

https://git.rwth-aachen.de/CPM/Project/Lab/cpm_base/blob/master/cpm_lib/include/cpm/CommandLineReader.hpp

https://git.rwth-aachen.de/CPM/Project/Lab/cpm_base/blob/master/cpm_lib/src/CommandLineReader.cpp

  • No labels