moonrockz/diagrams/observation does not have a README file

    ArchitectureElement

    Architecture elements. Connections and alignments are references.

    ArchitectureElement::equal

    automatically derived

    ArchitectureElement::id

    fn ArchitectureElement::id(self : ArchitectureElement) -> String?

    ArchitectureElement::kind_name

    fn ArchitectureElement::kind_name(self : ArchitectureElement) -> String

    ArchitectureElement::not_equal

    automatically derived

    ArchitectureElement::to_repr

    automatically derived

    BpmnElement

    pub(all) enum BpmnElement {
    Diagram(String)
    Node(
    Node
    )
    Flow(
    Flow
    )
    } derive(Eq,
    Debug
    )

    BPMN elements. Flows, boundary attachments and group membership are references.

    BpmnElement::equal

    fn BpmnElement::equal(BpmnElement, BpmnElement) -> Bool
    automatically derived

    BpmnElement::id

    fn BpmnElement::id(self : BpmnElement) -> String?

    BpmnElement::kind_name

    fn BpmnElement::kind_name(self : BpmnElement) -> String

    BpmnElement::not_equal

    fn BpmnElement::not_equal(x : BpmnElement, y : BpmnElement) -> Bool
    automatically derived

    BpmnElement::to_repr

    automatically derived

    Control

    pub(all) enum Control {
    Continue
    SkipChildren
    Stop
    } derive(Eq,
    Debug
    )

    Control::equal

    fn Control::equal(Control, Control) -> Bool
    automatically derived

    Control::not_equal

    fn Control::not_equal(x : Control, y : Control) -> Bool
    automatically derived

    Control::to_repr

    automatically derived

    Cursor

    pub struct Cursor {
    // private fields
    }

    A resumable pull traversal. Budgets are cumulative across next calls.

    Cursor::fail

    fn Cursor::fail(self : Cursor) -> Unit

    Mark the traversal as failed, for example after a consumer failure.

    Cursor::next

    fn Cursor::next(self : Cursor, control? : Control) -> Observation?

    Apply control to the previous enter, then return the next observation. SkipChildren still yields the matching leave; Stop yields nothing more.

    Cursor::outcome

    fn Cursor::outcome(self : Cursor) -> Outcome

    Cursor::stop

    fn Cursor::stop(self : Cursor) -> Unit

    Cursor::tree

    fn Cursor::tree(self : Cursor) -> Tree

    The tree that this cursor walks.

    DataTreeElement

    Data tree elements. A member owns the node it names; highlights are references.

    DataTreeElement::equal

    automatically derived

    DataTreeElement::id

    fn DataTreeElement::id(self : DataTreeElement) -> String?

    DataTreeElement::kind_name

    fn DataTreeElement::kind_name(self : DataTreeElement) -> String

    DataTreeElement::not_equal

    fn DataTreeElement::not_equal(x : DataTreeElement, y : DataTreeElement) -> Bool
    automatically derived

    DataTreeElement::to_repr

    automatically derived

    EbnfElement

    pub(all) enum EbnfElement {
    Diagram(String)
    Rule(
    Rule
    )
    Note(String, String)
    Node(
    Node
    )
    } derive(Eq,
    Debug
    )

    EBNF elements. A rule reference names another rule by reference.

    EbnfElement::equal

    fn EbnfElement::equal(EbnfElement, EbnfElement) -> Bool
    automatically derived

    EbnfElement::id

    fn EbnfElement::id(self : EbnfElement) -> String?

    EbnfElement::kind_name

    fn EbnfElement::kind_name(self : EbnfElement) -> String

    EbnfElement::not_equal

    fn EbnfElement::not_equal(x : EbnfElement, y : EbnfElement) -> Bool
    automatically derived

    EbnfElement::to_repr

    automatically derived

    Element

    pub(all) enum Element {
    Sequence(SequenceElement)
    Bpmn(BpmnElement)
    Swimlane(SwimlaneElement)
    State(StateElement)
    Flowchart(FlowchartElement)
    Architecture(ArchitectureElement)
    Regex(RegexElement)
    Ebnf(EbnfElement)
    DataTree(DataTreeElement)
    } derive(Eq,
    Debug
    )

    A typed structural value. Each alternative holds one diagram family's element type, so family semantics survive the common traversal contract.

    Element::equal

    fn Element::equal(Element, Element) -> Bool
    automatically derived

    Element::family

    fn Element::family(self : Element) -> String

    The family of the element, for example flowchart. It equals @render.Diagram::kind_name of the diagram that owns the element.

    Element::id

    fn Element::id(self : Element) -> String?

    The model identifier of the element, when its family has one. Identifiers are data, not identity: they can repeat or be absent. Use a Handle to identify an element.

    Element::kind_name

    fn Element::kind_name(self : Element) -> String

    The name of the element's alternative within its family, for example node.

    Element::not_equal

    fn Element::not_equal(x : Element, y : Element) -> Bool
    automatically derived

    Element::to_repr

    automatically derived

    FlowchartElement

    Flowchart elements. Connections and region members are references, not children.

    FlowchartElement::equal

    automatically derived

    FlowchartElement::id

    fn FlowchartElement::id(self : FlowchartElement) -> String?

    FlowchartElement::kind_name

    fn FlowchartElement::kind_name(self : FlowchartElement) -> String

    FlowchartElement::not_equal

    fn FlowchartElement::not_equal(x : FlowchartElement, y : FlowchartElement) -> Bool
    automatically derived

    FlowchartElement::to_repr

    automatically derived

    Handle

    pub struct Handle {
    ordinal : Int
    // private fields
    }

    One element of one tree.
    impl Eq for Handle

    Handle::equal

    fn Handle::equal(self : Handle, other : Handle) -> Bool

    Handles are equal when they name the same element of the same tree.

    Handle::not_equal

    fn Handle::not_equal(x : Handle, y : Handle) -> Bool

    Handle::ordinal

    fn Handle::ordinal(self : Handle) -> Int

    Handle::same

    fn Handle::same(self : Handle, other : Handle) -> Bool

    True when both handles name the same element of the same tree.

    Handle::to_repr

    IdentityError

    pub(all) enum IdentityError {
    RevisionMismatch
    OutOfRange
    } derive(Eq,
    Debug
    )

    Why an index or a handle could not be built or resolved.

    IdentityError::equal

    automatically derived

    IdentityError::not_equal

    fn IdentityError::not_equal(x : IdentityError, y : IdentityError) -> Bool
    automatically derived

    IdentityError::to_repr

    automatically derived

    IndexLimits

    pub struct IndexLimits {
    elements : Int
    depth : Int
    work : Int
    }

    Index limits. elements bounds indexed elements, depth the containment depth (the root is depth 1) and work the effort of resolving containers.

    IndexLimits::new

    fn IndexLimits::new(elements? : Int, depth? : Int, work? : Int) -> IndexLimits

    Observation

    pub struct Observation {
    phase : Phase
    ordinal : Int
    parent : Int?
    path : ReadOnlyArray[Int]
    element : Element
    span :
    Span
    ?
    } derive(Eq,
    Debug
    )

    Ordinals and paths belong to one Tree. The host binding supplies its owner token.

    Observation::equal

    fn Observation::equal(Observation, Observation) -> Bool
    automatically derived

    Observation::not_equal

    fn Observation::not_equal(x : Observation, y : Observation) -> Bool
    automatically derived

    Observation::to_repr

    automatically derived

    Outcome

    pub(all) enum Outcome {
    Running
    Completed
    Stopped
    LimitExceeded
    Failed
    } derive(Eq,
    Debug
    )

    Outcome::equal

    fn Outcome::equal(Outcome, Outcome) -> Bool
    automatically derived

    Outcome::not_equal

    fn Outcome::not_equal(x : Outcome, y : Outcome) -> Bool
    automatically derived

    Outcome::to_repr

    automatically derived

    Phase

    pub(all) enum Phase {
    Enter
    Leave
    } derive(Eq,
    Debug
    )

    Phase::equal

    fn Phase::equal(Phase, Phase) -> Bool
    automatically derived

    Phase::not_equal

    fn Phase::not_equal(x : Phase, y : Phase) -> Bool
    automatically derived

    Phase::to_repr

    automatically derived

    RegexElement

    pub(all) enum RegexElement {
    Diagram(String)
    Node(
    Node
    )
    } derive(Eq,
    Debug
    )

    Regex elements. Backreferences name groups by reference.

    RegexElement::equal

    automatically derived

    RegexElement::id

    fn RegexElement::id(self : RegexElement) -> String?

    RegexElement::kind_name

    fn RegexElement::kind_name(self : RegexElement) -> String

    RegexElement::not_equal

    fn RegexElement::not_equal(x : RegexElement, y : RegexElement) -> Bool
    automatically derived

    RegexElement::to_repr

    automatically derived

    SequenceElement

    Sequence elements. A frame owns its sections and a section owns its events. Message endpoints, notes and activations name participants by reference.

    SequenceElement::equal

    automatically derived

    SequenceElement::id

    fn SequenceElement::id(self : SequenceElement) -> String?

    SequenceElement::kind_name

    fn SequenceElement::kind_name(self : SequenceElement) -> String

    SequenceElement::not_equal

    fn SequenceElement::not_equal(x : SequenceElement, y : SequenceElement) -> Bool
    automatically derived

    SequenceElement::to_repr

    automatically derived

    StateElement

    State diagram elements. Transitions, note targets and region members are references.

    StateElement::equal

    automatically derived

    StateElement::id

    fn StateElement::id(self : StateElement) -> String?

    StateElement::kind_name

    fn StateElement::kind_name(self : StateElement) -> String

    StateElement::not_equal

    fn StateElement::not_equal(x : StateElement, y : StateElement) -> Bool
    automatically derived

    StateElement::to_repr

    automatically derived

    SwimlaneElement

    Swimlane elements. Connections are references, not children.

    SwimlaneElement::equal

    automatically derived

    SwimlaneElement::id

    fn SwimlaneElement::id(self : SwimlaneElement) -> String?

    SwimlaneElement::kind_name

    fn SwimlaneElement::kind_name(self : SwimlaneElement) -> String

    SwimlaneElement::not_equal

    fn SwimlaneElement::not_equal(x : SwimlaneElement, y : SwimlaneElement) -> Bool
    automatically derived

    SwimlaneElement::to_repr

    automatically derived

    Tree

    pub struct Tree {
    // private fields
    }

    A bounded containment index over one immutable model revision. The root is ordinal 0; ordinals follow model order, so repeated walks agree.

    Tree::architecture

    fn Tree::architecture(view :
    Architecture
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index an architecture view. Root children are groups, services, junctions, connections and alignments in field order. A group, service or junction belongs to its parent group.

    Tree::bpmn

    fn Tree::bpmn(view :
    Bpmn
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index a BPMN view. Root children are nodes, then flows, in model order. A node belongs to its subprocess, else its innermost lane, else its pool. A boundary event stays with that owner; attached_to and group membership are references. A repeated node identifier fails only when an owner names it (ambiguous-node).

    Tree::children

    fn Tree::children(self : Tree, ordinal : Int) -> ReadOnlyArray[Int]

    Tree::cursor

    fn Tree::cursor(self : Tree, observations_limit? : Int, visits_limit? : Int, depth_limit? : Int) -> Cursor

    observations_limit bounds enter and leave observations, visits_limit the entered elements and depth_limit the containment depth of an enter.

    Tree::data_tree

    fn Tree::data_tree(view :
    DataTree
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index a data tree. The root node comes first; an object or array node owns its members in order and a member owns the node that its value names, in pre-order. Unreachable nodes, then highlights, follow as root children. The first reference to a node owns it; repeated or cyclic references are not followed.

    Tree::depth

    fn Tree::depth(self : Tree) -> Int

    The deepest containment path, counting the root as depth 1.

    Tree::ebnf

    fn Tree::ebnf(view :
    Grammar
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index a grammar. Root children are items in model order; a rule owns its body, and a node owns Node::children in pre-order. Unreachable nodes follow as root children. The first reference to a node owns it; repeated or cyclic references are not followed.

    Tree::element

    fn Tree::element(self : Tree, ordinal : Int) -> Element?

    Tree::find

    fn Tree::find(self : Tree, id : String) -> ReadOnlyArray[Int]

    The ordinals of the elements whose Element::id equals id, in model order. Identifiers can repeat, so the result can have several ordinals.

    Tree::flowchart

    fn Tree::flowchart(view :
    Flowchart
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index a flowchart. Root children follow field order: lanes, groups, nodes, notes, connections and regions. A group belongs to its parent group, else its lane; a node or note belongs to its innermost group, else its lane; a region belongs to its parent region and owns its branches. Connections and region members stay references. A repeated container identifier fails only when a child names it (ambiguous-lane, ambiguous-group, ambiguous-region).

    Tree::fold

    fn[S] Tree::fold(self : Tree, initial : S, step : (S, Observation) -> (S, Control) raise?, observations_limit? : Int) -> (S, Outcome) raise?

    Fold observations into consumer state without a visual tree. The step returns the next state and the control for the following observation.

    Tree::handle

    fn Tree::handle(self : Tree, ordinal : Int) -> Handle?

    Tree::length

    fn Tree::length(self : Tree) -> Int

    Tree::lookup

    fn Tree::lookup(self : Tree, handle : Handle) -> Result[Element, IdentityError]

    Tree::of

    fn Tree::of(diagram :
    Diagram
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index any shared Diagram. Each family documents its containment map.

    Tree::owns

    fn Tree::owns(self : Tree, handle : Handle) -> Bool

    True when handle was issued by this tree.

    Tree::parent

    fn Tree::parent(self : Tree, ordinal : Int) -> Int?

    Tree::regex

    fn Tree::regex(view :
    Regex
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index a regex. The root node and its descendants follow Node::children in pre-order; unreachable nodes follow as root children in model order. The first reference to a node owns it; repeated or cyclic references are not followed. The first node with a repeated identifier is used.

    Tree::resolve

    fn Tree::resolve(self : Tree, handle : Handle) -> Element?

    Tree::revision_label

    fn Tree::revision_label(self : Tree) -> Int

    The caller's revision label, for example a document version. The label is informative; handle checks use the tree's own identity.

    Tree::sequence

    fn Tree::sequence(view :
    Sequence
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index a sequence. Root children are boxes (at the first participant that names them), participants outside a box, then events in model order. A box owns its participants, a frame its sections and a section its events.

    Tree::slot

    fn Tree::slot(self : Tree, ordinal : Int) -> Int

    The position of the element in the model array that holds it, for example the index of a flowchart node in Flowchart::nodes, or of a sequence event in the event list of its parent section. The root has slot -1.

    Tree::span

    fn Tree::span(self : Tree, ordinal : Int) ->
    Span
    ?

    Tree::state

    fn Tree::state(view :
    StateDiagram
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index a state diagram. Root children are regions without an owner, then transitions. A region belongs to its owning composite state; a state and a note belong to their region, in model order. A repeated identifier fails only when a child names it (ambiguous-region, ambiguous-state).

    Tree::swimlane

    fn Tree::swimlane(view :
    Swimlane
    , limits? : IndexLimits, revision? : Int) -> Result[Tree, String]

    Index a swimlane. Root children are lanes, groups, nodes and connections in field order. A group belongs to its parent group, else its lane; a node to its innermost group, else its lane. Connections stay references.

    Tree::walk

    fn Tree::walk(self : Tree, consume : (Observation) -> Control raise?, observations_limit? : Int, visits_limit? : Int, depth_limit? : Int) -> Outcome raise?

    Push traversal over the same resumable engine as cursor. A consumer failure stops delivery immediately and propagates to the caller.