Skip to content

Commit 47bf918

Browse files
committed
Revert "Lining up message's get_body"
This reverts commit 38fcd3a.
1 parent 38fcd3a commit 47bf918

File tree

2 files changed

+198
-198
lines changed

2 files changed

+198
-198
lines changed

include/network/message/message.hpp

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,62 +15,65 @@
1515

1616
namespace network {
1717

18-
struct message_pimpl;
18+
struct message_pimpl;
1919

20-
// The common message type.
21-
struct message : message_base {
22-
// Nested types
23-
typedef boost::iterator_range<
20+
// The common message type.
21+
struct message : message_base {
22+
// Nested types
23+
typedef boost::iterator_range<
2424
std::multimap<std::string, std::string>::const_iterator>
2525
headers_range;
2626

27-
// Constructors
28-
message();
29-
message(message const & other);
30-
message(message && other) = default;
27+
// Constructors
28+
message();
29+
message(message const & other);
3130

32-
// Assignment
33-
message& operator=(message const &other);
34-
message& operator=(message &&other);
31+
// Assignment
32+
message & operator=(message other);
3533

36-
// Mutators
37-
virtual void set_destination(std::string const & destination);
38-
virtual void set_source(std::string const & source);
39-
virtual void append_header(std::string const & name,
40-
std::string const & value);
41-
virtual void remove_headers(std::string const & name);
42-
virtual void remove_headers();
43-
virtual void set_body(std::string const & body);
44-
virtual void append_body(std::string const & data);
34+
// Mutators
35+
virtual void set_destination(std::string const & destination);
36+
virtual void set_source(std::string const & source);
37+
virtual void append_header(std::string const & name,
38+
std::string const & value);
39+
virtual void remove_headers(std::string const & name);
40+
virtual void remove_headers();
41+
virtual void set_body(std::string const & body);
42+
virtual void append_body(std::string const & data);
4543

46-
// Retrievers
47-
virtual void get_destination(std::string & destination) const;
48-
virtual void get_source(std::string & source) const;
49-
virtual void get_headers(boost::function<void(std::string const &, std::string const &)> inserter) const;
50-
virtual void get_headers(std::string const & name,
51-
boost::function<void(std::string const &, std::string const &)> inserter) const;
52-
virtual void get_headers(boost::function<bool(std::string const &, std::string const &)> predicate,
53-
boost::function<void(std::string const &, std::string const &)> inserter) const;
54-
virtual void get_body(std::string & body) const;
55-
virtual void get_body(boost::function<void(std::string::const_iterator, size_t)> chunk_reader, size_t size) const;
44+
// Retrievers
45+
virtual void get_destination(std::string & destination) const;
46+
virtual void get_source(std::string & source) const;
47+
virtual void get_headers(
48+
boost::function<void(std::string const &, std::string const &)> inserter) const;
49+
virtual void get_headers(
50+
std::string const & name,
51+
boost::function<void(std::string const &, std::string const &)> inserter) const;
52+
virtual void get_headers(
53+
boost::function<bool(std::string const &, std::string const &)> predicate,
54+
boost::function<void(std::string const &, std::string const &)> inserter) const;
55+
virtual void get_body(std::string & body) const;
56+
virtual void get_body(
57+
boost::function<void(boost::iterator_range<char const *>)> chunk_reader,
58+
size_t size) const;
5659

57-
void swap(message & other);
60+
void swap(message & other);
5861

59-
// Destructor
60-
virtual ~message();
61-
private:
62-
message_pimpl * pimpl;
63-
};
62+
// Destructor
63+
virtual ~message();
64+
private:
65+
message_pimpl * pimpl;
66+
};
6467

65-
inline void swap(message & left, message & right) {
68+
inline void swap(message & left, message & right) {
6669
left.swap(right);
67-
}
70+
}
6871

69-
template <class Directive>
70-
message_base & operator<< (message_base & msg, Directive directive) {
71-
directive(msg);
72-
return msg;
73-
}
72+
template <class Directive>
73+
message_base & operator<< (message_base & msg, Directive directive) {
74+
directive(msg);
75+
return msg;
76+
}
7477

7578
} // namespace network
7679

0 commit comments

Comments
 (0)