6 A :class:`DNSNameSet` object is a set of :class:`DNSName` objects.
7 Based on std::set (usually implemented as red-black trees).
8 Creating a ``DNSName`` is done with the :func:`newDNSNameSet`::
10 myset = newDNSNameSet()
12 The set can be filled by func:`DNSNameSet:add`::
14 myset.add(newDNSName("domain1.tld"))
15 myset.add(newDNSName("domain2.tld"))
17 Functions and methods of a ``DNSNameSet``
18 -----------------------------------------
20 .. function:: newDNSNameSet(name) -> DNSNameSet
22 Returns the :class:`DNSNameSet`.
26 A ``DNSNameSet`` object is a set of :class:`DNSName` objects.
28 .. method:: DNSNameSet:add(name)
30 Adds the name to the set.
32 :param DNSName name The name to add.
34 .. method:: DNSNameSet:empty() -> bool
36 Returns true is the DNSNameSet is empty.
38 .. method:: DNSNameSet:clear()
42 .. method:: DNSNameSet:toString() -> string
44 Returns a human-readable form of the DNSName.
46 .. method:: DNSNameSet:size() -> int
48 Returns the number of names in the set.
50 .. method:: DNSNameSet:delete(name) -> int
52 Removes the name from the set. Returns the number of deleted elements.
54 :param DNSName name The name to remove.
56 .. method:: DNSNameSet:check(name) -> bool
58 Returns true if the set contains the name.
60 :param DNSname name The name.