DNSNameSet objects

A DNSNameSet object is a set of DNSName objects. Based on std::unordered_set (hash table). Creating a DNSName is done with the newDNSNameSet():

myset = newDNSNameSet()

The set can be filled by func:DNSNameSet:add:

myset.add(newDNSName("domain1.tld"))
myset.add(newDNSName("domain2.tld"))

Functions and methods of a DNSNameSet

newDNSNameSet(name) → DNSNameSet

Returns the DNSNameSet.

class DNSNameSet

A DNSNameSet object is a set of DNSName objects.

:add(name)

Adds the name to the set.

:param DNSName name The name to add.

:empty() → bool

Returns true is the DNSNameSet is empty.

:clear()

Clean up the set.

:toString() → string

Returns a human-readable form of the DNSName.

:size() → int

Returns the number of names in the set.

:delete(name) → int
Removes the name from the set. Returns the number of deleted elements.

:param DNSName name The name to remove.

:check(name) → bool
Returns true if the set contains the name.

:param DNSname name The name.