I want to control my server by typing commands in the console, but since it is not modular to write something like
switch(command)
{
case 'command1':
command1();
break;
/* And so on */
}
in the class Server, how can I create a list of methods bound to functions, that I can easily modify in the future and apply it to other parts of my code ?