For various types of Key, xset<Key> is implemented as a B+Tree in application libraries. An IXSet allows for accessing any xset in a type invariant manner.
$interface+ IXSet
{
void Construct();
InputArchive Insert(InputArchive ar);
InputArchive Delete(InputArchive ar);
InputArchive Find(InputArchive ar, bool& found) const;
ssize_t size() const;
void Serialise(Archive& ar) const;
InputArchive Deserialise(InputArchive ar);
ptr<IObject> GetRootNode();
ptr<IBiDirIterator> GetIterator() const;
InputArchive ScanOver(InputArchive ar);
ptr<IKeyType> GetKeyType();
};
void Construct()
InputArchive Insert(InputArchive ar)
Reads the key from the archive, and inserts an element with that key into the set.
InputArchive Delete(InputArchive ar)
Reads the key from the archive, and deletes the element with that key (if any) from the set.
InputArchive Find(InputArchive ar, bool& found) const
Reads the key from the archive, and sets found according to whether the key is present in the set.
ssize_t size() const
Total number of elements in the set
void Serialise(Archive& ar) const
Serialise the entire set to the given archive
InputArchive Deserialise(InputArchive ar)
Deserialise the entire set from the given archive
ptr<IObject> GetRootNode()
ptr<IBiDirIterator> GetIterator() const
Retrieves an IBiDirIterator which is a bi-directional iterator that can be used to iterate through all key values of the set. The returned iterator must be closed after it is no longer required.
InputArchive ScanOver(InputArchive ar)
ptr<IKeyType> GetKeyType()