From 6c31ce8db2f8b969f030e5d9d04c9ae511333a06 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 8 May 2022 16:12:55 +0300 Subject: Documented ConsoleInterface --- src/Generic/ConsoleInterface/Command.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Generic/ConsoleInterface/Command.h') diff --git a/src/Generic/ConsoleInterface/Command.h b/src/Generic/ConsoleInterface/Command.h index d00b277..f1eb55b 100644 --- a/src/Generic/ConsoleInterface/Command.h +++ b/src/Generic/ConsoleInterface/Command.h @@ -1,13 +1,24 @@ #ifndef HEADER_CONSOLEINTERFACE_COMMAND #define HEADER_CONSOLEINTERFACE_COMMAND +/*! \file Command.h + * \brief Stores the declaration of class Command + */ + +/*! \brief Stores a 256 character name and a function pointer to be executed when calling run() + * + * Menu uses this class for a more generic implementation of it's navigate function. + */ class Command { char nameInMenu[256]; void (*exec)(); public: + //! Leaves name empty and exec function pointer to nullptr Command(); + //! Copies contents of nameInMenu and stores exec Command(const char* nameInMenu, void (*exec)()); + //! Executes the stored function pointer void run() const; const char* get_nameInMenu() const; -- cgit v1.3.1-23-gd82d