From c5431e4d321dbf0152e6826841c1ef5c1291ba5b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 14 Jun 2022 15:38:50 +0300 Subject: Added files from project 2 (mirror) --- .../Project 2/docs/html/classCommand.html | 167 +++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 Year 1/Object-oriented Programming/Project 2/docs/html/classCommand.html (limited to 'Year 1/Object-oriented Programming/Project 2/docs/html/classCommand.html') diff --git a/Year 1/Object-oriented Programming/Project 2/docs/html/classCommand.html b/Year 1/Object-oriented Programming/Project 2/docs/html/classCommand.html new file mode 100644 index 0000000..285455d --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 2/docs/html/classCommand.html @@ -0,0 +1,167 @@ + + + + + + + +FMI Table: Command Class Reference + + + + + + + + + +
+
+ + + + + + +
+
FMI Table +
+
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 2 | Project Topic 7 |
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
Command Class Reference
+
+
+ +

Stores a 256 character name and a function pointer to be executed when calling run() + More...

+ +

#include <Command.h>

+ + + + + + + + + + + + + +

+Public Member Functions

+ Command ()
 Leaves name empty and exec function pointer to nullptr.
 
 Command (const char *name, void(*exec)(const char *params))
 Copies contents of nameInMenu and stores exec. More...
 
void run (const char *params) const
 Executes the stored function pointer. More...
 
+const char * get_name () const
 
+

Detailed Description

+

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.

+

Constructor & Destructor Documentation

+ +

◆ Command()

+ +
+
+ + + + + + + + + + + + + + + + + + +
Command::Command (const char * name,
void(*)(const char *params) exec 
)
+
+ +

Copies contents of nameInMenu and stores exec.

+
Parameters
+ + + +
nameC-style string, class stores at most 255 characters (last character is always terminating zero)
execFunction pointer that will be executed when run() is called. Can be nullptr.
+
+
+ +
+
+

Member Function Documentation

+ +

◆ run()

+ +
+
+ + + + + + + + +
void Command::run (const char * params) const
+
+ +

Executes the stored function pointer.

+

Executes the stored function pointer, when it's not nullptr. Otherwise does nothing.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + -- cgit v1.3.1-23-gd82d