1
0
Fork 0
flightgear/src/GUI/LauncherArgumentTokenizer.hxx
James Turner 4234876789 Move some Launcher helpers into their own files.
Suggested be Sebastian, and it’s a good idea indeed, the main
launcher file has grown slightly.
2017-04-10 14:38:57 +01:00

34 lines
553 B
C++

#ifndef LAUNCHERARGUMENTTOKENIZER_HXX
#define LAUNCHERARGUMENTTOKENIZER_HXX
#include <QString>
#include <QList>
class LauncherArgumentTokenizer
{
public:
LauncherArgumentTokenizer();
class Arg
{
public:
explicit Arg(QString k, QString v = QString()) : arg(k), value(v) {}
QString arg;
QString value;
};
QList<Arg> tokenize(QString in) const;
private:
enum State {
Start = 0,
Key,
Value,
Quoted,
Comment
};
};
#endif // LAUNCHERARGUMENTTOKENIZER_HXX