kDB: Knowledge DataBase
Loading...
Searching...
No Matches
kdb
tools
kdb
AbstractCommand.h
1
#include <knowCore/Global.h>
2
3
#include <QMap>
4
5
class
QCommandLineParser;
6
7
class
AbstractCommand
8
{
9
public
:
10
virtual
~AbstractCommand
();
11
virtual
void
setup(QCommandLineParser* _parser) = 0;
12
virtual
int
execute(QCommandLineParser* _parser) = 0;
13
static
QMap<QString, AbstractCommand*>
commands;
14
};
15
16
#define REGISTER_COMMAND(_NAME_, _CMD_NAME_) \
17
struct Factory ## _NAME_ \
18
{ \
19
Factory ## _NAME_() \
20
{ \
21
AbstractCommand::commands[# _CMD_NAME_] = new _NAME_(); \
22
} \
23
}; \
24
Factory ## _NAME_ factory ## _NAME_;
AbstractCommand
Definition
AbstractCommand.h:8
QMap
Definition
Forward.h:12
Generated by
1.12.0