aboutsummaryrefslogtreecommitdiff
path: root/src/message.hpp
blob: f34d19cc5fd4d721326f068f3a6bb295ca2737cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef WANDA_MESSAGE_HPP
#define WANDA_MESSAGE_HPP

#include <cstddef>
#include <istream>
#include <string>
#include <optional>

namespace wanda
{

struct message
{
    explicit operator std::string() const;

    std::size_t size() const;

    std::string source;
    std::string command;
    std::optional<std::string> argument;
};

std::istream & operator>>(std::istream & in, message & message);
std::ostream & operator<<(std::ostream & out, message const & message);

} // namespace wanda

#endif