[x] commands.h header file for namespace and execute()-function declarations
[x] include new command header in app/metaheaders/commands_meta.h so that command passthrough is possible
[x] commands.cpp with definition for execute()-function
takes command id (integer)
choose a 100 length range for your module that no other modules use. Check app/modules/main/command_parser.cpp for more info.
executes whatever we want to happen for that command
returns printable so user knows program works
command should be pre-validated in app/modules/main/command_parser.cpp , so no need to worry about that here
[x] Set up command parsing for module in app/modules/main/command_parser.cpp
the new module's commands should be already visible here, because of app/metaheaders/commands_meta.h
in the COMMAND PASSTHROUGH section: modify the if - else structure, so that if commandId is in your modules id range, yourModuleNamespace::execute(commandId) gets returned.
NOTE: This file assumes a limit of 100 modules and 100 commands/module. This is hardcoded, so if this limit is not satisfied, the program will break. Changing this requires significant changes.
FROM THIS POINT compiling and linking won't work anymore without modifying the Makefile or compiling by hand
[x] commands.csv file with name,id,desc for all commands in module
This is done so that app/modules/main/module_loader.cpp could load these commands into the command data system
[x] edit app/main.cpp to have the module loading command for your new module
[x] edit the Makefile so that your new module gets compiled and linked
NOTE: all modules call their command environment "commands" so be sure to add a "mv commands.o UNIQUE-NAME.o" before the compilation command, otherwise things will get overwritten
NOTE: Make sure that editing the make command in Makefile doesn't conflict with the tests
Remember to add your new module to the dependencies
Building a module step by step guide: