# flagok (флажок) - C/C++ command line flags library ## Installation 1. `git clone https://unbewohnte.su:3000/Unbewohnte/flagok.git` 2. Either `make static`|`make` to make a static|shared library (if you have make and other *NIX utilities) or simply put header file into your project and compile it your own way ## Usage Each flag has its `name`, `value`, `description` and - `flag_bool` (bool) - `flag_int` (long long) - `flag_uint` (unsigned long long) - `flag_double` (long double) - `flag_string` (char*) are available to be called Example: ``` long long int_value = 1; char* string_value = "hello"; bool bool_value = false; flag_int(&int_value, "-intval", "set int"); flag_str(&string_value, "-stringval", "set string"); flag_bool(&bool_value, "-boolval", "set true or false"); flag_parse(argc, argv); ``` `-help` flag is set automatically and when presented, prints all registered flags' information to stdout Right now the parsing process is not strict and does not output any errors. When for example the argument to integer flag was not provided - the parse function will simply move on onto the next argument and leave the current value untouched. ## License LGPLv3