You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
574 B
28 lines
574 B
2 years ago
|
#ifndef COMMANDDECODER_H
|
||
|
#define COMMANDDECODER_H
|
||
|
|
||
|
#include <QList>
|
||
|
#include "CommandsType.h"
|
||
|
|
||
|
class CommandDecoder
|
||
|
{
|
||
|
private:
|
||
|
QList<CommandsType> _decodedList;
|
||
|
bool _isNextItemValue = true;
|
||
|
int j = 0;
|
||
|
int _argc;
|
||
|
|
||
|
bool isCommand(char* argv);
|
||
|
void checkIfEnoughArgsAreProvided(int argc);
|
||
|
QList<CommandsType> CommandValueDecoder(char* argv[]);
|
||
|
void initCommandStrcut(char* argv, CommandsType& sample);
|
||
|
void checkIfNextItemShallBeValue(char* argv);
|
||
|
|
||
|
public:
|
||
|
CommandDecoder();
|
||
|
|
||
|
QList<CommandsType> decoderString(int argc, char* argv[]);
|
||
|
};
|
||
|
|
||
|
#endif //COMMANDDECODER_H
|