#ifndef COMMANDPARSER_H
#define COMMANDPARSER_H

#include <vector>
#include <string>
#include "EncodedString.h"

class CommandParser
{
public:
    bool parse(const EncodedString & command);
    const EncodedString & operator[](size_t index) const
    {
        return m_args[index];
    }
    size_t size() const
    {
        return m_args.size();
    }
    const std::string & parse_error() const
    {
        return m_parse_error;
    }
    const std::vector<EncodedString> args() const
    {
        return m_args;
    }

protected:
    std::vector<EncodedString> m_args;
    std::string m_parse_error;
};

#endif
