PartSet

semagrams.acsets.PartSet
case class PartSet(nextId: Int, ids: Seq[Id], acsets: Map[Id, ACSet])

Storage class for the parts corresponding to an Ob in a schema.

This is immutable; methods that logically mutate simply return new objects.

Attributes

acsets

The subacset corresponding to each id

ids

The ids of all the parts added so far. This is a Seq because we care about the ordering; when the ACSet is displayed this ordering is used when two sprites overlap.

nextId

The id to assign to the next part added

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def addPart(acset: ACSet): (PartSet, Id)

Adds a single part with subacset acs, returns its id.

Adds a single part with subacset acs, returns its id.

Attributes

def addParts(partacsets: Seq[ACSet]): (PartSet, Seq[Id])

Add multiple new parts, with subacsets given in partacsets.

Add multiple new parts, with subacsets given in partacsets.

Returns a sequence of the ids of the added parts.

Attributes

Move the id i to the front of the list of ids.

Move the id i to the front of the list of ids.

This is used, for instance, when dragging a sprite so that the sprite goes over the other parts.

Attributes

def moveToIndex(i: Id, j: Int): PartSet

Move the id i to the index j in the list of ids.

Move the id i to the index j in the list of ids.

This is used, for instance, when setting the position of a port.

Attributes

def remPart(i: Id): PartSet

Remove the part with id i

Remove the part with id i

Attributes

def setAcset(i: Id, acs: ACSet): PartSet

Set the subacset corresponding to i to acs

Set the subacset corresponding to i to acs

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product