Contents

copyCollection

Creates a deep copy of a collection.

Declaration

virtual OSCollection *copyCollection(
 OSDictionary *cycleDict = 0);

Parameters

  • cycleDict:

    A dictionary of all of the collections that have been copied so far, to start the copy at the top level pass NULL for cycleDict.

Return Value

The newly copied collecton, NULL on failure.

Overview

This function copies the collection and all of the contained collections recursively. Objects that are not derived from OSCollection are retained rather than copied.

Subclasses of OSCollection must override this function to properly support deep copies.

See Also

Miscellaneous