Documentation Language: Swift

Method

register(_:)

Registers an object with this resource without adding it as a root object.

@discardableResult func register(_ object: any EObject) -> Bool

Parameters

object

The object to register with this resource.

Return Value

true if the object was registered, false if it already exists.

Discussion

This method adds the object to the resource’s object map for ID resolution, but does not add it to the root objects list. Use this for objects that will be contained by other objects (e.g., during XMI parsing when parent-child relationships will be established separately).