@@ -24,27 +24,23 @@ namespace impl {
24
24
* a range of iterators (std::pair<iterator, iterator>)
25
25
* whose keys are all equal to the index string.
26
26
*
27
- * This type is also convertible to a
28
- * headers_range<basic_message<tag> >::type
29
- * Which allows for full range support.
30
- *
31
- * The type is also convertible to a
32
- * headers_container<Tag>::type
33
- * Which copies the headers from the wrapped message.
34
- *
35
27
*/
36
28
struct headers_wrapper {
37
29
typedef std::multimap<std::string, std::string> container_type;
38
- typedef iterator_range< shared_container_iterator<container_type> >
39
- range_type;
30
+ typedef shared_container_iterator<container_type> iterator;
31
+ typedef iterator_range<iterator> range_type;
40
32
41
33
explicit headers_wrapper (message_base & message);
42
34
range_type operator [] (std::string const & key) const ;
43
35
operator range_type () const ;
36
+ operator container_type () const ;
44
37
container_type::size_type count () const ;
45
38
container_type::size_type count (std::string const &key) const ;
39
+ iterator begin () const ;
40
+ iterator end () const ;
46
41
private:
47
- void init_cache_all ();
42
+ void init_cache_all () const ;
43
+ message_base & message_;
48
44
mutable shared_ptr<container_type> cache_;
49
45
};
50
46
@@ -65,4 +61,3 @@ headers(message_base & message_) {
65
61
#endif
66
62
67
63
#endif // __NETWORK_MESSAGE_WRAPPERS_HEADERS_HPP__
68
-
0 commit comments