The CLI parser module, provides a CLI parser using the UntitledCLIParser library.
Enabling the module
To enable the module, you can either hard-code the USE_CLI_PARSER_MODULE
option in your CMakeLists.txt
file by finding the following line:
option(USE_CLI_PARSER_MODULE "Use the CLI Parser module" OFF)
and modifying the line to look like this:
option(USE_CLI_PARSER_MODULE "Use the CLI Parser module" ON)
Alternatively, you can also generate through the CMake CLI:
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DUSE_CLI_PARSER_MODULE=ON
Finally, update your uvproj.yaml
so that the cli_parser
key under enabled-modules
is set to true like this:
name: "MyProject"
version: "1.0.0.0"
engine-version: "1.0.0.0"
enabled-modules:
cli_parser: true
Next, in your source file, include the Modules.hpp
header:
#include <Modules/Modules.hpp>
Event safety
The entire module is flagged as event safe at Any time
. It is recommended that you use the module during the Startup
event.
Using the module
For documentation, head to the project's GitHub repository. Remember that CLI arguments are stored as argv
and argc
in the Instance
(this is easier to use than the std::vector<FString> arguments
member that is also provided).
Checking for the module
To check for the module at compile time, use the UIMGUI_CLI_PARSER_MODULE_ENABLED
macro.
Runtime checking can be done using the cli_parser
member of the ModuleSettings
struct. More info can be found here.
- Home
- Beginner content
- Install guide
- Creating and using the UI components
- The Instance
- The Init Info struct
- Additional features
- Custom type definitions
- C API development
- Config files and Folders
- Interfaces
- Internal Event safety
- Modules system
- I18N
- Plotting
- Knobs
- Spinners
- Toggles
- Text Utils
- Undo/Redo
- CLI Parser
- Theming
- OS
- Opening URLs and using file pickers
- Exec integration
- Fonts
- Unix
- DBus utilities
- XDG integration
- Collaborating with others
- Advanced content
- Loading dynamic libraries at runtime
- Understanding the library layout
- Compilation mode modifiers
- Adding plugin support to your application
- Production export and deployment
- Developer and contributor resources
- Misc