44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
#ifndef IRCMESSAGE_HPP
|
|
# define IRCMESSAGE_HPP
|
|
|
|
# include <string>
|
|
# include <vector>
|
|
|
|
class IrcMessage
|
|
{
|
|
private:
|
|
std::string _prefix;
|
|
std::string _command;
|
|
std::vector<std::string> _params;
|
|
std::string _raw;
|
|
bool _valid;
|
|
std::string _error;
|
|
|
|
public:
|
|
IrcMessage(void);
|
|
IrcMessage(const IrcMessage &other);
|
|
IrcMessage &operator=(const IrcMessage &other);
|
|
~IrcMessage(void);
|
|
|
|
void setPrefix(const std::string &prefix);
|
|
void setCommand(const std::string &command);
|
|
void addParam(const std::string ¶m);
|
|
void setRaw(const std::string &raw);
|
|
void setValid(bool valid);
|
|
void setError(const std::string &error);
|
|
|
|
const std::string &getPrefix(void) const;
|
|
const std::string &getCommand(void) const;
|
|
const std::vector<std::string> &getParams(void) const;
|
|
const std::string &getRaw(void) const;
|
|
bool isValid(void) const;
|
|
const std::string &getError(void) const;
|
|
|
|
bool hasPrefix(void) const;
|
|
bool hasParam(size_t index) const;
|
|
const std::string ¶m(size_t index) const;
|
|
size_t paramCount(void) const;
|
|
};
|
|
|
|
#endif
|