3 changed files with 36 additions and 8 deletions
			
			
		@ -0,0 +1,27 @@ | 
				
			|||
#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 | 
				
			|||
					Loading…
					
					
				
		Reference in new issue