15 #ifndef CAMPAIGN_SERVER_CONTROL_HPP_INCLUDED
16 #define CAMPAIGN_SERVER_CONTROL_HPP_INCLUDED
53 return args_[0].empty();
81 return args_.size() - 1;
102 throw std::out_of_range(
"control line argument range exceeded");
122 #endif // CAMPAIGN_SERVER_CONTROL_HPP_INCLUDED
const std::string & cmd() const
Returns the control command.
bool empty() const
Whether the control line is empty.
const std::string & operator[](size_t n) const
Returns the nth argument.
size_t args_count() const
Returns the total number of arguments, not including the command itself.
std::vector< std::string > args_
control_line(const std::string &str)
Parses a control line string.
std::string full() const
Return the full command line string.
const std::string & arg(size_t n) const
Returns the nth argument.
std::string join(T const &v, const std::string &s=",")
Generates a new string joining container items in a list.
Represents a server control line written to a communication socket.
std::vector< std::string > split(std::string const &val, const char c, const int flags)
Splits a (comma-)separated string into a vector of pieces.
GLsizei const GLcharARB ** string