MCPcopy Create free account
hub / github.com/apache/trafficserver / header_field_value_iterator

Class header_field_value_iterator

include/tscpp/api/Headers.h:114–172  ·  view source on GitHub ↗

* @brief A header field value iterator iterates through all header fields. */

Source from the content-addressed store, hash-verified

112 * @brief A header field value iterator iterates through all header fields.
113 */
114class header_field_value_iterator
115{
116private:
117 HeaderFieldValueIteratorState *state_;
118
119public:
120 using iterator_category = std::forward_iterator_tag;
121 using value_type = int;
122
123 /**
124 * Constructor for header_field_value_iterator, this shouldn't need to be used directly.
125 * @param bufp the TSMBuffer associated with the headers
126 * @param mloc the TSMLoc associated with the headers.
127 * @param field_loc the TSMLoc associated with the field.
128 * @param index the index of the value in the HeaderField
129 * @warning This shouldn't need to be used directly!
130 */
131 header_field_value_iterator(void *bufp, void *hdr_loc, void *field_loc, int index);
132
133 /**
134 * Copy Constructor for header_field_value_iterator, this shouldn't need to be used directly.
135 * @param header_field_value_iterator an existing iterator to copy
136 * @warning This shouldn't need to be used directly!
137 */
138 header_field_value_iterator(const header_field_value_iterator &it);
139 ~header_field_value_iterator();
140
141 /**
142 * Dereference this iterator into a string (get the value pointed to by this iterator)
143 * @return a string which is the value pointed to by this iterator
144 */
145 std::string operator*();
146
147 /**
148 * Advance the iterator to the next header field value
149 * @return a reference to a the next iterator
150 */
151 header_field_value_iterator &operator++();
152
153 /**
154 * Advance the current iterator to the next header field
155 * @return a new iterator which points to the next element
156 */
157 header_field_value_iterator operator++(int);
158
159 /**
160 * Compare two iterators returning true if they are equal
161 * @return true if two iterators are equal
162 */
163 bool operator==(const header_field_value_iterator &rhs) const;
164
165 /**
166 * Compare two iterators returning true if they are NOT equal
167 * @return true if two iterators are not equal.
168 */
169 bool operator!=(const header_field_value_iterator &rhs) const;
170
171 friend class HeaderField;

Callers 3

beginMethod · 0.85
endMethod · 0.85
operator[]Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected