Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cmdline.h
Go to the documentation of this file.
1 #ifndef _CMDLINE_H
2 #define _CMDLINE_H
3 
4 #include <selforg/configurable.h>
5 #include <vector>
6 
7 typedef vector<Configurable*> ConfigList;
8 
9 std::vector<string> splitString(const std::string& str, char seperator);
10 
11 /// Shows the values of all parameters of the given configurable objects.
12 // @param file print to file or stdout if NULL
13 // @param lineprefix is used as prefix for each line if not NULL
14 void showParams(const ConfigList& configs, FILE* file = 0, const char* lineprefix = 0);
15 /// Asks the user for changing a parameter of the configurable objects.
16 // ALL input and output goes to stdin and stdout.
17 // @param onTerminate() callback if user quits the program
18 void changeParams(ConfigList& configs, void (*onTerminate)()=0);
19 
20 bool control_c_pressed();
21 void cmd_begin_input();
22 void cmd_handler_init();
23 void cmd_end_input();
24 
25 #endif
void cmd_handler_init()
Definition: cmdline.cpp:76
bool control_c_pressed()
Definition: cmdline.cpp:83
std::vector< string > splitString(const std::string &str, char seperator)
void showParams(const ConfigList &configs, FILE *file=0, const char *lineprefix=0)
Shows the values of all parameters of the given configurable objects.
Definition: cmdline.cpp:9
vector< Configurable * > ConfigList
Definition: cmdline.h:7
void changeParams(ConfigList &configs, void(*onTerminate)()=0)
Asks the user for changing a parameter of the configurable objects.
Definition: cmdline.cpp:17
void cmd_end_input()
Definition: cmdline.cpp:91
void cmd_begin_input()
Definition: cmdline.cpp:87