forked from cpp-netlib/cpp-netlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdirectives.hpp
32 lines (22 loc) · 1.16 KB
/
directives.hpp
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
29
30
31
// Copyright Dean Michael Berris 2007.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef __NETWORK_MESSAGE_DIRECTIVES_HPP__
#define __NETWORK_MESSAGE_DIRECTIVES_HPP__
#include <boost/network/message/directives/detail/string_directive.hpp>
#include <boost/network/message/directives/header.hpp>
#include <boost/network/message/directives/remove_header.hpp>
namespace boost { namespace network {
template <class Tag, class Directive>
inline basic_message<Tag> &
operator<< (basic_message<Tag> & message_, Directive const & directive) {
directive(message_);
return message_;
}
BOOST_NETWORK_STRING_DIRECTIVE(source, source_, message.source(source_), message.source=source_);
BOOST_NETWORK_STRING_DIRECTIVE(destination, destination_, message.destination(destination_), message.destination=destination_);
BOOST_NETWORK_STRING_DIRECTIVE(body, body_, message.body(body_), message.body=body_);
} // namespace network
} // namespace boost
#endif // __NETWORK_MESSAGE_DIRECTIVES_HPP__