Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IModelUnit

Model Units

A model unit is a leaf (not a node) in the project tree and the root containing model {@link elements.Element} elements. It is both a(n abstract) unit as well as "model element-like" by virtue of being an MxAbstractElement, but minus the following features of MxElement: public - a model unit is public by nature container - a model unit is itself the root of the tree of elements it contains

A unit acts as scope to resolve by-id references and keeps a cache of elements it owns.

Hierarchy

Implemented by

Index

Properties

container

container: IStructuralUnit

id

id: string

isLoaded

isLoaded: boolean

Whether this unit has been completely loaded and does not consist of the unit's interface (which corresponds to the unit being partial).

model

moduleName

moduleName: string

qualifiedName

qualifiedName: string

typeName

typeName: string

unit

Unit that owns/contains this thing.

versionInfo

Methods

allProperties

load

  • load<T>(callback?: function): any
  • load<T>(): T

toJSON

  • toJSON(): Object
  • Renders the structure as plain JSON (without observables magic). This is intended for debugging and development convenience. Note that the resulting object is not of the interface type corresponding to this structure.

    Returns Object

traverse

  • traverse(visit: function): void
  • Traverses this structure by calling the provided visitor function on itself and all the structures contained (as part) by it, in depth-first order, and it returns synchronously after that. Traverse will visit all descendants of the structure, so make sure it is loaded first.

    Parameters

    Returns void

traversePublicParts

  • traversePublicParts(visit: function): void
  • Traverses this structure by calling the provided visitor function on itself and all the structures contained (as part) by it, in depth-first order, and it returns synchronously after that. This visitor will only access the parts of the structure that are publicly visible, in other words, which are part of the interface of the structure.

    Parameters

    Returns void

Generated using TypeDoc