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

Class iterator

lib/swoc/include/swoc/IPRange.h:1318–1376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1316 * @note Range merges are not triggered by modifications of the @a PAYLOAD via an iterator.
1317 */
1318 class iterator : public const_iterator {
1319 using self_type = iterator;
1320 using super_type = const_iterator;
1321
1322 friend class IPSpace;
1323
1324 protected:
1325 using super_type::super_type; /// Inherit supertype constructors.
1326 /// Protected constructor to convert const to non-const.
1327 /// @note This makes for much less code duplication in iterator relevant methods.
1328 iterator(const_iterator const &that) : const_iterator(that) {}
1329
1330 public:
1331 /// Value type of iteration.
1332 using value_type = detail::ip_space_value_type<PAYLOAD>;
1333 using pointer = value_type *;
1334 using reference = value_type &;
1335
1336 /// Default constructor.
1337 iterator() = default;
1338
1339 /// Copy constructor.
1340 iterator(self_type const &that) = default;
1341
1342 /// Assignment.
1343 self_type &operator=(self_type const &that);
1344
1345 /// Pre-increment.
1346 /// Move to the next element in the list.
1347 /// @return The iterator.
1348 self_type &operator++();
1349
1350 /// Pre-decrement.
1351 /// Move to the previous element in the list.
1352 /// @return The iterator.
1353 self_type &operator--();
1354
1355 /// Post-increment.
1356 /// Move to the next element in the list.
1357 /// @return The iterator value before the increment.
1358 self_type operator++(int);
1359
1360 /// Post-decrement.
1361 /// Move to the previous element in the list.
1362 /// @return The iterator value before the decrement.
1363 self_type operator--(int);
1364
1365 /// Dereference.
1366 /// @return A reference to the referent.
1367 reference operator*() const;
1368
1369 /// Dereference.
1370 /// @return A pointer to the referent.
1371 pointer operator->() const;
1372
1373 protected:
1374 // Retrieve the value and convert from the super (const) type value to the value for iterator.
1375 value_type &value() const;

Callers 5

beginMethod · 0.70
endMethod · 0.70
lower_boundMethod · 0.70
upper_boundMethod · 0.70
iterator_atMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected