O1Library Docs
Fall 2023
Docs API

# GeneratesTrace

o1.gui.viewimpl.tracing$.GeneratesTrace
trait GeneratesTrace[Model, TraceData]

## Attributes

Graph
Supertypes
  class Object
  trait Matchable
  class Any
Known subtypes
  trait TraceGeneratingView[Model, TraceData]
  class Traced[TraceData]
  class Traced[TraceData]
  trait TraceGeneratingView[Model, TraceData]
  class Traced[TraceData]
  class Traced[TraceData]
  Show all

## Members list

### Value members

#### Concrete methods

final override def isPaused: Boolean

Indicates whether the view is paused. This implementation delegates to the underlying `View` that is being traced.

Indicates whether the view is paused. This implementation delegates to the underlying `View` that is being traced.

## Attributes

Definition Classes
  Controls

final override def onStop(): Unit

Causes an additional effect when the view is stopped (with `stop()`). This implementation delegates to the underlying `View` that is being traced. In addition, if the traced view had been started with `startAndGet` and reaches its tick limit before being done, this method causes the returned future to complete with a failure.

Causes an additional effect when the view is stopped (with `stop()`). This implementation delegates to the underlying `View` that is being traced. In addition, if the traced view had been started with `startAndGet` and reaches its tick limit before being done, this method causes the returned future to complete with a failure.

## Attributes

Definition Classes
  Controls

final def simulateAndGet(tickLimit: Int): Seq[(TraceData, TraceEvent)]

Simulates this trace-generating view with simulate and returns the resulting trace. This is equivalent to calling first simulate, then trace. See also startAndGet.

Simulates this trace-generating view with simulate and returns the resulting trace. This is equivalent to calling first simulate, then trace. See also startAndGet.

## Parameters

tickLimit

  the maximum number of ticks to simulate; `Int.MaxValue` (which is the default) means there is no such limit

## Attributes

final def startAndGet(tickLimit: Long): Future[Seq[(TraceData, TraceEvent)]]

Starts this trace-generating view with start and returns a Future that evaluates to the resulting trace. The `Future` succeeds when the view is done; if the view isn’t done after a given number of clock ticks, the `Future` fails with TraceAborted, producing a partial trace. See also simulateAndGet.

Starts this trace-generating view with start and returns a Future that evaluates to the resulting trace. The `Future` succeeds when the view is done; if the view isn’t done after a given number of clock ticks, the `Future` fails with TraceAborted, producing a partial trace. See also simulateAndGet.

## Parameters

tickLimit

  the maximum number of ticks to process before the future completes with a failure; defaults to `Long.MaxValue`

## Attributes

final override def toString: String

Returns a brief textual description of the view.

Returns a brief textual description of the view.

## Attributes

Definition Classes
  Any

final def trace: Seq[(TraceData, TraceEvent)]

Returns a trace of the events processed by this view. The trace comes in a collection of pairs, each of which is composed of a `TraceData` value that describes at the time of the event and a TraceEvent value that describes the event itself.

Returns a trace of the events processed by this view. The trace comes in a collection of pairs, each of which is composed of a `TraceData` value that describes at the time of the event and a TraceEvent value that describes the event itself.

## Attributes

#### Inherited methods

def simulate(tickLimit: Int): Unit

## Attributes

Inherited from:
  Controls (hidden)

def start(): Unit

## Attributes

Inherited from:
  Controls (hidden)