package core
- Alphabetic
- Public
- All
Type Members
- sealed trait AgentKind extends Product with Serializable
- trait AgentVariableSet extends AnyRef
- case class AllShapesReplaced(oldShapeList: ShapeList, newShapeList: ShapeList) extends ShapeEvent with Product with Serializable
-
trait
Application extends AstNode
represents an application, in the abstract (either a reporter application of a command application).
represents an application, in the abstract (either a reporter application of a command application). This is used when parsing arguments, when we don't care what kind of application the args are for.
- trait AstFolder[A] extends AnyRef
-
trait
AstNode extends SourceLocatable
An interface representing a node in the NetLogo abstract syntax tree (AKA parse tree, in NetLogo's case).
An interface representing a node in the NetLogo abstract syntax tree (AKA parse tree, in NetLogo's case).
Each AstNode, even if synthesized, should correspond to some particular source fragment, as indicated by the position and length. It's the compiler's job to make sure these values are always reasonable.
-
trait
AstTransformer extends AnyRef
Transforms an AST to allow changes without mutation
-
trait
AstVisitor extends AnyRef
The default AST tree-walker.
The default AST tree-walker. This simply visits each node of the tree, and visits any children of each node in turn. Subclasses can implement pre-order or post-order traversal, or a wide range of other strategies.
- sealed trait BoxedValue extends AnyRef
- case class Breed(name: String, singular: String, originalName: String, originalSingular: String, owns: Seq[String] = Seq(), isLinkBreed: Boolean = false, isDirected: Boolean = false) extends Product with Serializable
- case class Button(source: Option[String], left: Int, top: Int, right: Int, bottom: Int, display: Option[String] = None, forever: Boolean = false, buttonKind: AgentKind = AgentKind.Observer, actionKey: Option[Char] = None, disableUntilTicksStart: Boolean = false) extends Widget with Product with Serializable
- sealed trait Chooseable extends AnyRef
- case class ChooseableBoolean(value: Boolean) extends Chooseable with Product with Serializable
- case class ChooseableDouble(value: Double) extends Chooseable with Product with Serializable
- case class ChooseableList(value: LogoList) extends Chooseable with Product with Serializable
- case class ChooseableString(value: String) extends Chooseable with Product with Serializable
- case class Chooser(variable: Option[String], left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, display: Option[String] = None, choices: List[Chooseable] = Nil, currentChoice: Int = 0) extends Widget with DeclaresGlobal with DeclaresGlobalCommand with DeclaresConstraint with Product with Serializable
- case class ClosedLambdaVariable(name: String) extends ClosedVariable with Product with Serializable
- case class ClosedLet(let: Let) extends ClosedVariable with Product with Serializable
- sealed trait ClosedVariable extends AnyRef
- trait Color extends AnyRef
- trait Command extends Instruction
-
class
CommandBlock extends Expression
represents a block containing zero or more statements.
represents a block containing zero or more statements. Called a command block rather than a statement block for consistency with usual NetLogo jargon. Note that this is an Expression, and as such can be an argument to commands and reporters, etc.
- trait CompilationEnvironment extends AnyRef
- case class CompilationOperand(sources: Map[String, String], extensionManager: ExtensionManager, libraryManager: LibraryManager, compilationEnvironment: CompilationEnvironment, containingProgram: Program = Program.empty, oldProcedures: ProceduresMap = NoProcedures, subprogram: Boolean = true, displayName: Option[String] = None, shouldAutoInstallLibs: Boolean = false) extends Product with Serializable
-
class
CompilerException extends RuntimeException
Exception thrown by various methods that accept NetLogo code as input and cause that code to be compiled; indicates the code was invalid.
Exception thrown by various methods that accept NetLogo code as input and cause that code to be compiled; indicates the code was invalid. May be inspected to discover the location and nature of the error.
- trait CompilerUtilitiesInterface extends LiteralParser
- sealed trait ConstraintSpecification extends AnyRef
- trait DeclaresConstraint extends NamedWidget
- trait DeclaresGlobal extends NamedWidget
- trait DeclaresGlobalCommand extends NamedWidget
- trait Dialect extends LowPriorityDialect
- sealed trait Direction extends AnyRef
- class DummyCompilationEnvironment extends CompilationEnvironment
- class DummyExtensionManager extends ExtensionManager
- class DummyLibraryManager extends LibraryManager
- trait Dump extends AnyRef
- class ErrorSource extends AnyRef
-
trait
Expression extends AstNode
represents a NetLogo expression.
represents a NetLogo expression. An expression is either a block or a reporter application (variable references and constants (including lists), are turned into reporter applications).
- trait ExtensionManager extends AnyRef
-
trait
ExtensionObject extends AnyRef
Interface which all NetLogo objects defined in Extensions must support
- abstract class File extends AnyRef
- sealed trait FileMode extends AnyRef
- trait FrontEndInterface extends AnyRef
- trait FrontEndProcedure extends AnyRef
-
trait
I18NJava extends AnyRef
The Scala compiler won't generate a Java varargs forwarder for a Scala varargs method unless the method comes from a Java class or interface.
The Scala compiler won't generate a Java varargs forwarder for a Scala varargs method unless the method comes from a Java class or interface. So this is in Java to be implemented from Scala by I18N.BundleKind.
- case class InputBox(variable: Option[String], left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, boxedValue: BoxedValue = ...) extends Widget with DeclaresGlobal with DeclaresGlobalCommand with DeclaresConstraint with Product with Serializable
- trait Instruction extends TokenHolder
- case class Let(name: String = null) extends Product with Serializable
- case class LibraryInfo(name: String, codeName: String, shortDescription: String, longDescription: String, version: String, homepage: URL, downloadURL: URL, bundled: Boolean, installedVersionOpt: Option[String], minNetLogoVersion: Option[String]) extends Product with Serializable
- trait LibraryManager extends AnyRef
- sealed trait LibraryStatus extends AnyRef
- trait LiteralImportHandler extends AnyRef
- trait LiteralParser extends AnyRef
- class LogoList extends IndexedSeq[AnyRef] with Serializable
- trait LowPriorityDialect extends AnyRef
- case class Model(code: String = "", widgets: Seq[Widget] = List(View()), info: String = "", version: String = "NetLogo 6.3", turtleShapes: Seq[VectorShape] = Model.defaultShapes, linkShapes: Seq[LinkShape] = Model.defaultLinkShapes, optionalSections: Seq[OptionalSection[_]] = Seq()) extends Product with Serializable
- case class ModelInfo(title: String, tags: Seq[String]) extends Product with Serializable
- case class Monitor(source: Option[String], left: Int, top: Int, right: Int, bottom: Int, display: Option[String], precision: Int, fontSize: Int = 11) extends Widget with Product with Serializable
- trait NamedWidget extends AnyRef
- case class NumericInput(value: Double, label: NumericKind) extends BoxedValue with Product with Serializable
- class OptionalSection[A <: AnyRef] extends AnyRef
- case class Output(left: Int, top: Int, right: Int, bottom: Int, fontSize: Int) extends Widget with Product with Serializable
- case class Pen(display: String, interval: Double = 1, mode: Int = 0, color: Int = 0, inLegend: Boolean = false, setupCode: String = "", updateCode: String = "") extends Product with Serializable
- case class Plot(display: Option[String], left: Int = 0, top: Int = 0, right: Int = 5, bottom: Int = 5, xAxis: Option[String] = None, yAxis: Option[String] = None, xmin: Double = 0, xmax: Double = 0, ymin: Double = 0, ymax: Double = 0, autoPlotOn: Boolean = true, legendOn: Boolean = false, setupCode: String = "", updateCode: String = "", pens: List[Pen] = Nil) extends Widget with Product with Serializable
- case class PlotPenState(x: Double = 0.0, color: Int = java.awt.Color.BLACK.getRGB, interval: Double = 1.0, mode: Int = PlotPenInterface.LineMode, isDown: Boolean = true, hidden: Boolean = false) extends Product with Serializable
-
trait
Primitive extends AnyRef
Top-level interface for primitives (commands or reporters).
Top-level interface for primitives (commands or reporters). Not to be implemented directly; the
Command
orReporter
interface should be used instead.- See also
Command
Reporter
- trait PrimitiveCommand extends Primitive
- trait PrimitiveReporter extends Primitive
-
class
ProcedureDefinition extends AstNode
represents a single procedure definition.
represents a single procedure definition. really just a container for the procedure body, which is a Statements object.
- case class ProcedureSyntax(declarationKeyword: Token, identifier: Token, endKeyword: Token) extends Product with Serializable
- case class Program(interfaceGlobals: Seq[String] = Seq(), userGlobals: Seq[String] = Seq(), turtleVars: ListMap[String, Int] = ListMap(), patchVars: ListMap[String, Int] = ListMap(), linkVars: ListMap[String, Int] = ListMap(), breeds: ListMap[String, Breed] = ListMap(), linkBreeds: ListMap[String, Breed] = ListMap(), dialect: Dialect = NetLogoCore) extends Product with Serializable
- trait Pure extends AnyRef
- case class Reference(kind: AgentKind, vn: Int, original: TokenHolder) extends Product with Serializable
- trait Referenceable extends AnyRef
- trait Reporter extends Instruction
-
class
ReporterApp extends Application with Expression
represents a reporter application.
represents a reporter application. This is the typical kind of NetLogo expression, things like "round 5" and "3 + 4". However, this class also represents things like constants, which are converted into no-arg reporter applications as they're parsed.
-
class
ReporterBlock extends Expression
represents a block containing exactly one expression.
represents a block containing exactly one expression. Called a reporter block rather than an expression block for consistency with usual NetLogo jargon. Note that this is an Expression, and as such can be an argument to commands and reporters, etc. However, it is a different expression from the expression it contains... Its "blockness" is significant.
- sealed trait Shape extends AnyRef
- case class ShapeAdded(newShape: Shape, oldValue: Option[Shape], newShapeList: ShapeList) extends ShapeEvent with Product with Serializable
- sealed trait ShapeEvent extends AnyRef
- case class ShapeList(kind: AgentKind, shapeMap: Map[String, Shape]) extends Product with Serializable
- class ShapeListTracker extends Publisher[ShapeEvent]
- case class ShapeRemoved(removedShape: Shape, newShapeList: ShapeList) extends ShapeEvent with Product with Serializable
- case class ShapesAdded(addedShapes: Map[String, Shape], newShapeList: ShapeList) extends ShapeEvent with Product with Serializable
- case class Slider(variable: Option[String], left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, display: Option[String] = None, min: String = "0", max: String = "100", default: Double = 1, step: String = "1", units: Option[String] = None, direction: Direction = Horizontal) extends Widget with DeclaresGlobal with DeclaresGlobalCommand with DeclaresConstraint with Product with Serializable
- trait SourceLocatable extends AnyRef
- case class SourceLocation(start: Int, end: Int, filename: String) extends Product with Serializable
- trait SourceRelocatable[T] extends SourceLocatable
- trait SourceRewriter extends AnyRef
-
class
Statement extends Application
represents a NetLogo statement.
represents a NetLogo statement. Statements only have one form: command application.
-
class
Statements extends AstNode
represents a chunk of zero or more NetLogo statements.
represents a chunk of zero or more NetLogo statements. Note that this is not necessarily a "block" of statements, as block means something specific (enclosed in [], in particular). This class is used to represent other groups of statements as well, for instance procedure bodies. nonLocalExit identifies that the statements contain one or more commands (possibly nested) which may cause a non-local exit (like
stop
orreport
) - case class StringInput(value: String, label: StringKind, multiline: Boolean) extends BoxedValue with Product with Serializable
- case class StructureResults(program: Program, procedures: ProceduresMap = NoProcedures, procedureTokens: Map[String, Iterable[Token]] = Map(), includes: Seq[Token] = Seq(), includedSources: Seq[String] = Seq(), extensions: Seq[Token] = Seq()) extends Product with Serializable
- case class Switch(variable: Option[String], left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, display: Option[String] = None, on: Boolean = false) extends Widget with DeclaresGlobal with DeclaresGlobalCommand with DeclaresConstraint with Product with Serializable
-
case class
Syntax extends Product with Serializable
Specifies the arguments accepted by a primitive.
Specifies the arguments accepted by a primitive. Used by the compiler for type-checking.
You cannot instantiate this class directly. Instead, use the static construction methods
Syntax.commandSyntax(...)
orSyntax.reporterSyntax(...)
.For example, in a
Reporter
that takes two number arguments and returns a boolean, implementPrimitive.getSyntax()
as follows:public Syntax getSyntax() { return Syntax.reporterSyntax( new int[] { Syntax.NumberType(), Syntax.NumberType() }, Syntax.BooleanType()); }
An input can be made variadic, meaning that it can be repeated any number of times when enclosed in parentheses, if you add the
RepeatableType
flag. When using variadic inputs you should also define the default number of inputs, that is, the number of inputs expect if the user does not use parentheses. For example:public Syntax getSyntax() { return Syntax.reporterSyntax( new int[] { Syntax.WildcardType() | Syntax.RepeatableType() }, Syntax.ListType(), 2); }
- See also
Primitive#getSyntax()
- case class TextBox(display: Option[String], left: Int = 0, top: Int = 0, right: Int = 5, bottom: Int = 5, fontSize: Int, color: Double, transparent: Boolean = false) extends Widget with Product with Serializable
- case class Token(text: String, tpe: TokenType, value: AnyRef)(sourceLocation: SourceLocation) extends SourceLocatable with Product with Serializable
- trait TokenColorizer extends AnyRef
- trait TokenHolder extends AnyRef
- class TokenMapper extends TokenMapperInterface
- trait TokenMapperInterface extends AnyRef
- sealed trait TokenType extends AnyRef
- trait TokenizerInterface extends AnyRef
- sealed abstract class UpdateMode extends Serializable
- case class View(left: Int = 0, top: Int = 0, right: Int = 5, bottom: Int = 5, dimensions: WorldDimensions = View.defaultDimensions, fontSize: Int = 13, updateMode: UpdateMode = UpdateMode.TickBased, showTickCounter: Boolean = true, tickCounterLabel: Option[String] = Some("ticks"), frameRate: Double = 30) extends Widget with Product with Serializable
- trait Widget extends AnyRef
- case class WorldDimensions(minPxcor: Int, maxPxcor: Int, minPycor: Int, maxPycor: Int, patchSize: Double = 12.0, wrappingAllowedInX: Boolean = true, wrappingAllowedInY: Boolean = true) extends Product with Serializable
Value Members
- object AgentKind extends Serializable
-
object
AgentKindJ
Java can't (I don't think) access Scala inner objects without reflection, so we provide these convenience vals for use from Java.
- object AgentVariables extends AgentVariableSet
- object BoxedValue
- object BreedIdentifierHandler
- object Chooseable
- object Color extends Color
- object ColorConstants
- object CompilerException extends Serializable
- object ConstraintSpecification
- object DefaultTokenMapper extends TokenMapper
- object Dialect extends LowPriorityDialect
- object Dump extends Dump
- object Fail
- object Femto
- object FileMode
-
object
FileModeJ
Java can't (I don't think) access Scala inner objects without reflection, so we provide these convenience vals for use from Java.
- object FrontEndInterface
- object Horizontal extends Direction with Product with Serializable
- object I18N
- object InputBox extends Serializable
- object Instantiator
- object Keywords
- object LibraryInfo extends Serializable
- object LibraryStatus
- object LiteralImportHandler
- object LogoList extends Serializable
- object Model extends Serializable
- object ModelInfo extends Serializable
- object NetLogoCore extends Dialect with Product with Serializable
- object Nobody
- object NumberParser
- object NumericInput extends Serializable
- object PlotPenInterface
- object Program extends Serializable
- object ReporterApp
- object ReporterBlock
- object Resource
- object Shape
- object ShapeList extends Serializable
- object ShapeParser
- object SourceWrapping
- object Statement
- object StringEscaper
- object StringInput extends Serializable
- object StructureDeclarations
- object StructureResults extends Serializable
- object Syntax extends Serializable
-
object
SyntaxJ
Legacy convenience methods for constructing Syntax objects, for use by extensions written in Java.
- object Token extends Serializable
- object TokenType
- object TokenTypeJ
- object TypeNames
- object UpdateMode extends Serializable
-
object
UpdateModeJ
Java can't (I don't think) access Scala inner objects without reflection, so we provide these convenience vals for use from Java.
- object VersionUtils
- object Vertical extends Direction with Product with Serializable
- object View extends Serializable