Changes in response to Johanna's code review.

This commit is contained in:
Seth Hall 2020-10-15 12:42:48 -04:00
parent 2f05318a08
commit 56e234a762
3 changed files with 18 additions and 6 deletions

View file

@ -906,9 +906,15 @@ public:
[[deprecated("Remove in v4.1. Use Find() or FindOrDefault().")]]
Val* Lookup(Val* index, bool use_default_val = true);
// Returns true if this is a table[subnet]/set[subnet] and the
// given address was found in the table. Otherwise returns false.
bool Contains(const IPAddr& addr);
/**
* Returns true if this is a table[subnet]/set[subnet] and the
* given address was found in the table. Otherwise returns false.
* @param addr The address to look for.
* @return Boolean value to indicate if addr is in the table or set. If
* self is not a table[subnet]/set[subnet] an internal error will be
* generated and false will be returned.
*/
bool Contains(const IPAddr& addr) const;
// For a table[subnet]/set[subnet], return all subnets that cover
// the given subnet.