29 lines
729 B
C++
29 lines
729 B
C++
#ifndef IRCPARSER_HPP
|
|
# define IRCPARSER_HPP
|
|
|
|
# include <string>
|
|
# include <vector>
|
|
# include "IrcMessage.hpp"
|
|
|
|
class IrcParser
|
|
{
|
|
private:
|
|
static std::string trimLeft(const std::string &s);
|
|
static std::string trimRight(const std::string &s);
|
|
static std::string toUpper(const std::string &s);
|
|
static bool isSpace(char c);
|
|
static bool isCommandChar(char c);
|
|
static bool isValidCommand(const std::string &command);
|
|
static void parseParams(const std::string &s, size_t pos, IrcMessage &msg);
|
|
|
|
public:
|
|
IrcParser(void);
|
|
IrcParser(const IrcParser &other);
|
|
IrcParser &operator=(const IrcParser &other);
|
|
~IrcParser(void);
|
|
|
|
static IrcMessage parseLine(const std::string &line);
|
|
};
|
|
|
|
#endif
|