@@ -11,7 +11,7 @@ namespace network {
1111
1212struct basic_storage_pimpl {
1313 basic_storage_pimpl ();
14- basic_storage_pimpl (basic_storage_pimpl const &);
14+ basic_storage_pimpl (basic_storage_pimpl const &);
1515
1616 virtual basic_storage_pimpl* clone ();
1717 protected:
@@ -23,88 +23,85 @@ struct basic_storage_pimpl {
2323};
2424
2525basic_storage_base::basic_storage_base ()
26- : pimpl(new (std::nothrow) basic_storage_pimpl())
27- {}
26+ : pimpl(new (std::nothrow) basic_storage_pimpl()) {}
2827
29- basic_storage_base::basic_storage_base (basic_storage_base const & other)
30- : pimpl(other.clone())
31- {}
28+ basic_storage_base::basic_storage_base (basic_storage_base const & other)
29+ : pimpl(other.clone()) {}
3230
33- void basic_storage_base::set_destination (std::string const & destination) {
31+ void basic_storage_base::set_destination (std::string const & destination) {
3432 pimpl->destination_ = destination;
3533}
3634
37- void basic_storage_base::set_source (std::string const & source) {
35+ void basic_storage_base::set_source (std::string const & source) {
3836 pimpl->source_ = source;
3937}
4038
41- void basic_storage_base::append_header (std::string const & name,
42- std::string const & value) {
39+ void basic_storage_base::append_header (std::string const & name,
40+ std::string const & value) {
4341 pimpl->headers_ .insert (std::make_pair (name, value));
4442}
4543
46- void basic_storage_base::remove_headers (std::string const & name) {
44+ void basic_storage_base::remove_headers (std::string const & name) {
4745 pimpl->headers_ .erase (name);
4846}
4947
5048void basic_storage_base::remove_headers () {
5149 basic_storage_pimpl::headers_container_type ().swap (pimpl->headers_ );
5250}
5351
54- void basic_storage_base::set_body (std::string const & body) {
52+ void basic_storage_base::set_body (std::string const & body) {
5553 pimpl->body = body;
5654}
5755
58- void basic_storage_base::append_body (std::string const & data) {
56+ void basic_storage_base::append_body (std::string const & data) {
5957 pimpl->body .append (data);
6058}
6159
62- void basic_storage_base::get_destination (std::string & destination) {
60+ void basic_storage_base::get_destination (std::string& destination) {
6361 destination = pimpl->destination ;
6462}
6563
66- void basic_storage_base::get_source (std::string & source) {
64+ void basic_storage_base::get_source (std::string& source) {
6765 source = pimpl->source ;
6866}
6967
70- void basic_storage_base::get_headers (function<void (std::string const &, std::string const &)> inserter) {
68+ void basic_storage_base::get_headers (
69+ function<void (std::string const &, std::string const &)> inserter) {
7170 copy (pimpl->headers_ , inserter);
7271}
7372
74- void basic_storage_base::get_headers (std::string const & name, function<void (std::string const &, std::string const &)> inserter) {
75- basic_storage_pimpl::headers_container_type::const_iterator
76- it = pimpl->headers_ .find (name),
77- pe = pimpl->headers_ .end ();
73+ void basic_storage_base::get_headers (
74+ std::string const & name,
75+ function<void (std::string const &, std::string const &)> inserter) {
76+ basic_storage_pimpl::headers_container_type::const_iterator it =
77+ pimpl->headers_ .find (name), pe = pimpl->headers_ .end ();
7878 for (; it != pe; ++it)
7979 inserter (it->first , it->second );
8080}
8181
82- void basic_storage_base::get_body (std::string & body) {
82+ void basic_storage_base::get_body (std::string& body) {
8383 // TODO use iostreams!
8484 body = pimpl_->body ;
8585}
8686
87- void basic_storage_base::get_body (function<void (iterator_range<char const *>)> chunk_reader, size_t size) {
87+ void basic_storage_base::get_body (
88+ function<void (iterator_range<char const *>)> chunk_reader,
89+ size_t size) {
8890 // TODO use iostreams!
89- std::string::const_iterator it = pimpl->body .begin (),
90- pe = pimpl->body .end ();
91+ std::string::const_iterator it = pimpl->body .begin (), pe = pimpl->body .end ();
9192 std::advance (it, size);
9293 chunk_reader (make_iterator_range (it, pe));
9394 pimpl->body .assign (it, pe);
9495}
9596
96- basic_storage_base::~basic_storage_base () {
97- pimpl->reset ();
98- }
97+ basic_storage_base::~basic_storage_base () { pimpl->reset (); }
9998
100- void basic_storage_base::swap (basic_storage_base & other) {
99+ void basic_storage_base::swap (basic_storage_base& other) {
101100 std::swap (pimpl, other.pimpl );
102101}
103102
104- void swap (basic_storage_base & l, basic_storage_base & r) {
105- l.swap (r);
106- }
103+ void swap (basic_storage_base& l, basic_storage_base& r) { l.swap (r); }
107104
108105} /* network */
109-
106+
110107#endif /* NETWORK_MESSAGE_BASIC_MESSAGE_IPP_20110911 */
0 commit comments