diff options
Diffstat (limited to 'src/message.hpp')
| -rw-r--r-- | src/message.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/message.hpp b/src/message.hpp new file mode 100644 index 0000000..f34d19c --- /dev/null +++ b/src/message.hpp @@ -0,0 +1,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
\ No newline at end of file |
