views

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package views renders SysML v2 views, for the sysml-view macro (requirement MC-21): the Service writes a view with sysml.Model.RenderView — DOT for a diagram, columns and rows for a table — and Graphviz's dot lays the DOT out as SVG. A table needs no program.

reg.SetViews(&views.InProcess{Model: m}) // reg from macros.Register

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InProcess

type InProcess struct {
	// Model is the open model whose views these are; the Service holds the
	// model and writes the views while the client is open.
	Model *sysml.Model
	// Dot is Graphviz's dot command, which lays a diagram out; "" runs "dot"
	// from PATH. Only a diagram needs it: a table is written from the rows
	// the rendering gives.
	Dot string
	// contains filtered or unexported fields
}

InProcess renders views with the Service's RenderView, once per view: it is a macros.Views. Renderings are kept, failures included, so a view shown on several pages is rendered once. Safe for concurrent use.

func (*InProcess) Render

func (v *InProcess) Render(ctx context.Context, qualifiedName string) (*macros.Rendering, error)

Render renders the view with that qualified name: a diagram as SVG (the rendering's DOT form, then dot -Tsvg), else a table, from the rows the rendering gives. Its errors say what went wrong, as the service or dot reports it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL