This class contains a set of integers.
A IntegerSet is just a set of nonnegative integers. It can add new members to the set, find its members by value() or index() (sorted by size, with 1 first), look for the largest contained number, and produce an SQL "where" clause matching its contents.
Constructs a set that's an exact copy of other. This constructor is a little expensive, both in time and space.
Constructs an empty set.
Adds each value in set to this set.
Adds all numbers between n1 and n2 to the set, including both n1 and n2.
n1 and n2 must both be nonzero.
Removes all numbers from this set.
Returns true if this set contains all values in other, and false if not.
Returns true if value is present in this set, and false if not.
Returns the number of numbers in this IntegerSet.
Returns the contents of this set as a comma-separated list of decimal numbers.
Returns the index of value index, or 0 if value is not in this Set.
If this set contains the UIDs in a mailbox, this function converts from UIDs to MSNs. See Session::msn().
Returns a set containing all values which are contained in both this IntegerSet and in other.
Returns true if the set is empty, and false if not.
Returns the largest number in this IntegerSet, or 0 if the set is empty.
This private helper ensures that all blocks have an accurate count of set bits, and that no blocks are empty.
Removes all values contained in other from this set.
Removes value from this set. Does nothing unless value is present in the set.
Removes v1, v2 and all values between them from this set.
Returns the contents of this set in IMAP syntax. The shortest possible representation is returned, with strictly increasing values, without repetitions, with ":" and "," as necessary.
If the set is empty, so is the returned string.
Returns the smallest UID in this IntegerSet, or 0 if the set is empty.
Returns the value at index, or 0 if index is greater than count().
If this set contains the UIDs in a mailbox, this function converts from MSNs to UIDs. See Session::uid().
This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.