Package

org.nlogo

core

Permalink

package core

Visibility
  1. Public
  2. All

Type Members

  1. sealed trait AgentKind extends Product with Serializable

    Permalink
  2. trait AgentVariableSet extends AnyRef

    Permalink
  3. trait Application extends AstNode

    Permalink

    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.

  4. trait AstNode extends AnyRef

    Permalink

    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.

  5. trait AstTransformer extends AnyRef

    Permalink

    Transforms an AST to allow changes without mutation

  6. trait AstVisitor extends AnyRef

    Permalink

    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.

  7. case class Breed(name: String, singular: String, owns: Seq[String] = Seq(), isLinkBreed: Boolean = false, isDirected: Boolean = false) extends Product with Serializable

    Permalink
  8. case class Button(display: Option[String], left: Int, top: Int, right: Int, bottom: Int, source: String, forever: Boolean, buttonKind: AgentKind = AgentKind.Observer, actionKey: String = "NIL", disableUntilTicksStart: Boolean = false) extends Widget with Product with Serializable

    Permalink
  9. sealed trait Chooseable extends AnyRef

    Permalink
  10. case class ChooseableBoolean(value: Boolean) extends Chooseable with Product with Serializable

    Permalink
  11. case class ChooseableDouble(value: Double) extends Chooseable with Product with Serializable

    Permalink
  12. case class ChooseableList(value: LogoList) extends Chooseable with Product with Serializable

    Permalink
  13. case class ChooseableString(value: String) extends Chooseable with Product with Serializable

    Permalink
  14. case class Chooser(display: String, left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, varName: String, choices: List[Chooseable] = Nil, currentChoice: Int = 0) extends Widget with DeclaresGlobal with DeclaresGlobalCommand with DeclaresConstraint with Product with Serializable

    Permalink
  15. trait Color extends AnyRef

    Permalink
  16. trait Command extends Instruction

    Permalink
  17. class CommandBlock extends Expression

    Permalink

    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.

  18. trait CompilationEnvironment extends AnyRef

    Permalink
  19. case class CompilationOperand(sources: Map[String, String], extensionManager: ExtensionManager, compilationEnvironment: CompilationEnvironment, containingProgram: Program = Program.empty, oldProcedures: ProceduresMap = NoProcedures, subprogram: Boolean = true, displayName: Option[String] = None) extends Product with Serializable

    Permalink
  20. class CompilerException extends RuntimeException

    Permalink

    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.

  21. trait CompilerUtilitiesInterface extends LiteralParser

    Permalink
  22. sealed trait ConstraintSpecification extends AnyRef

    Permalink
  23. sealed trait DeclaresConstraint extends AnyRef

    Permalink
  24. sealed trait DeclaresGlobal extends AnyRef

    Permalink
  25. sealed trait DeclaresGlobalCommand extends AnyRef

    Permalink
  26. trait Dialect extends LowPriorityDialect

    Permalink
  27. sealed trait Direction extends AnyRef

    Permalink
  28. class DummyCompilationEnvironment extends CompilationEnvironment

    Permalink
  29. class DummyExtensionManager extends ExtensionManager

    Permalink
  30. trait Dump extends AnyRef

    Permalink
  31. class ErrorSource extends AnyRef

    Permalink
  32. trait Expression extends AstNode

    Permalink

    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).

  33. trait ExtensionManager extends AnyRef

    Permalink
  34. trait ExtensionObject extends AnyRef

    Permalink

    Interface which all NetLogo objects defined in Extensions must support

  35. abstract class File extends AnyRef

    Permalink
  36. sealed trait FileMode extends AnyRef

    Permalink
  37. trait FrontEndInterface extends AnyRef

    Permalink
  38. trait FrontEndProcedure extends AnyRef

    Permalink
  39. trait I18NJava extends AnyRef

    Permalink
  40. case class InputBox[T](left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, varName: String, value: T, multiline: Boolean = false, boxtype: InputBoxType) extends Widget with DeclaresGlobal with DeclaresGlobalCommand with DeclaresConstraint with Product with Serializable

    Permalink
  41. sealed abstract class InputBoxType extends AnyRef

    Permalink
  42. trait Instruction extends TokenHolder

    Permalink
  43. case class Let(name: String = null) extends Product with Serializable

    Permalink
  44. trait LiteralImportHandler extends AnyRef

    Permalink
  45. trait LiteralParser extends AnyRef

    Permalink
  46. class LogoList extends IndexedSeq[AnyRef] with Serializable

    Permalink
  47. trait LowPriorityDialect extends AnyRef

    Permalink
  48. case class Model(code: String = "", widgets: List[Widget] = List(View()), info: String = "", version: String = "NetLogo 6.0", turtleShapes: List[VectorShape] = Model.defaultShapes, behaviorSpace: List[String] = Nil, linkShapes: List[LinkShape] = Model.defaultLinkShapes, previewCommands: List[String] = Nil, otherSections: Map[String, List[String]] = Map()) extends Product with Serializable

    Permalink
  49. case class Monitor(display: Option[String], left: Int, top: Int, right: Int, bottom: Int, source: String, precision: Int, fontSize: Int) extends Widget with Product with Serializable

    Permalink
  50. case class Output(left: Int, top: Int, right: Int, bottom: Int, fontSize: Int) extends Widget with Product with Serializable

    Permalink
  51. case class Pen(display: String, interval: Double = 1, mode: Int = 0, color: Int = 0, inLegend: Boolean = false, setupCode: String = "", updateCode: String = "") extends Widget with Product with Serializable

    Permalink
  52. case class Plot(display: String, left: Int = 0, top: Int = 0, right: Int = 5, bottom: Int = 5, xAxis: String = "", yAxis: String = "", 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

    Permalink
  53. trait PlotPenInterface extends AnyRef

    Permalink
  54. 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

    Permalink
  55. trait Primitive extends AnyRef

    Permalink

    Top-level interface for primitives (commands or reporters).

    Top-level interface for primitives (commands or reporters). Not to be implemented directly; the Command or Reporter interface should be used instead.

    See also

    Reporter

    Command

  56. trait PrimitiveCommand extends Primitive

    Permalink
  57. trait PrimitiveReporter extends Primitive

    Permalink
  58. class ProcedureDefinition extends AstNode

    Permalink

    represents a single procedure definition.

    represents a single procedure definition. really just a container for the procedure body, which is a Statements object.

  59. case class ProcedureSyntax(declarationKeyword: Token, identifier: Token, endKeyword: Token) extends Product with Serializable

    Permalink
  60. case class Program extends Product with Serializable

    Permalink
  61. trait Pure extends AnyRef

    Permalink
  62. case class Reference(kind: AgentKind, vn: Int, original: TokenHolder) extends Product with Serializable

    Permalink
  63. trait Referenceable extends AnyRef

    Permalink
  64. trait Reporter extends Instruction

    Permalink
  65. class ReporterApp extends Expression with Application

    Permalink

    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.

  66. class ReporterBlock extends Expression

    Permalink

    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.

  67. sealed trait Shape extends AnyRef

    Permalink
  68. class ShapeList extends AnyRef

    Permalink
  69. case class Slider(display: String, left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, varName: String, min: String = "1", max: String = "10", 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

    Permalink
  70. class Statement extends Application

    Permalink

    represents a NetLogo statement.

    represents a NetLogo statement. Statements only have one form: command application.

  71. class Statements extends AstNode

    Permalink

    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 or report)

  72. case class StructureResults(program: Program, procedures: ProceduresMap = NoProcedures, procedureTokens: Map[String, Iterable[Token]] = Map(), includes: Seq[Token] = Seq(), extensions: Seq[Token] = Seq()) extends Product with Serializable

    Permalink
  73. case class Switch(display: String, left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, varName: String, on: Boolean = false) extends Widget with DeclaresGlobal with DeclaresGlobalCommand with DeclaresConstraint with Product with Serializable

    Permalink
  74. case class Syntax extends Product with Serializable

    Permalink

    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(...) or Syntax.reporterSyntax(...).

    For example, in a Reporter that takes two number arguments and returns a boolean, implement Primitive.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()

  75. case class TextBox(display: String, left: Int = 0, top: Int = 0, right: Int = 5, bottom: Int = 5, fontSize: Int, color: Double, transparent: Boolean) extends Widget with Product with Serializable

    Permalink
  76. case class Token(text: String, tpe: TokenType, value: AnyRef)(start: Int, end: Int, filename: String) extends Product with Serializable

    Permalink
  77. trait TokenColorizer extends AnyRef

    Permalink
  78. trait TokenHolder extends AnyRef

    Permalink
  79. class TokenMapper extends TokenMapperInterface

    Permalink
  80. trait TokenMapperInterface extends AnyRef

    Permalink
  81. sealed trait TokenType extends AnyRef

    Permalink
  82. trait TokenizerInterface extends AnyRef

    Permalink
  83. sealed abstract class UpdateMode extends AnyRef

    Permalink
  84. case class View(left: Int = 0, top: Int = 0, right: Int = 5, bottom: Int = 5, dimensions: WorldDimensions = View.defaultDimensions, fontSize: Int = 9, updateMode: UpdateMode = UpdateMode.TickBased, showTickCounter: Boolean = true, tickCounterLabel: String = "ticks", frameRate: Double = 25) extends Widget with Product with Serializable

    Permalink
  85. trait Widget extends AnyRef

    Permalink
  86. 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

    Permalink

Value Members

  1. object AgentKind extends Serializable

    Permalink
  2. object AgentKindJ

    Permalink

    Java can't (I don't think) access Scala inner objects without reflection, so we provide these convenience vals for use from Java.

  3. object AgentVariables extends AgentVariableSet

    Permalink
  4. object BreedIdentifierHandler

    Permalink
  5. object Chooseable

    Permalink
  6. object Col extends InputBoxType with Product with Serializable

    Permalink
  7. object Color extends Color

    Permalink
  8. object ColorConstants

    Permalink
  9. object CompilerException extends Serializable

    Permalink
  10. object ConstraintSpecification

    Permalink
  11. object DefaultTokenMapper extends TokenMapper

    Permalink
  12. object Dialect extends LowPriorityDialect

    Permalink
  13. object Dump extends Dump

    Permalink
  14. object Fail

    Permalink
  15. object Femto

    Permalink
  16. object FileMode

    Permalink
  17. object FileModeJ

    Permalink

    Java can't (I don't think) access Scala inner objects without reflection, so we provide these convenience vals for use from Java.

  18. object FrontEndInterface

    Permalink
  19. object Horizontal extends Direction with Product with Serializable

    Permalink
  20. object I18N

    Permalink
  21. object Instantiator

    Permalink
  22. object Keywords

    Permalink
  23. object LiteralImportHandler

    Permalink
  24. object LogoList extends Serializable

    Permalink
  25. object Model extends Serializable

    Permalink
  26. object NetLogoCore extends Dialect with Product with Serializable

    Permalink
  27. object Nobody

    Permalink
  28. object Num extends InputBoxType with Product with Serializable

    Permalink
  29. object NumberParser

    Permalink
  30. object PlotPenInterface

    Permalink
  31. object Program extends Serializable

    Permalink
  32. object Resource

    Permalink
  33. object Shape

    Permalink
  34. object ShapeList

    Permalink
  35. object ShapeParser

    Permalink
  36. object SourceWrapping

    Permalink
  37. object Str extends InputBoxType with Product with Serializable

    Permalink
  38. object StrCommand extends InputBoxType with Product with Serializable

    Permalink
  39. object StrReporter extends InputBoxType with Product with Serializable

    Permalink
  40. object StringEscaper

    Permalink
  41. object StructureDeclarations

    Permalink
  42. object StructureResults extends Serializable

    Permalink
  43. object Syntax extends Serializable

    Permalink
  44. object SyntaxJ

    Permalink

    Legacy convenience methods for constructing Syntax objects, for use by extensions written in Java.

  45. object Token extends Serializable

    Permalink
  46. object TokenType

    Permalink
  47. object TokenTypeJ

    Permalink
  48. object TypeNames

    Permalink
  49. object UpdateMode

    Permalink
  50. object UpdateModeJ

    Permalink

    Java can't (I don't think) access Scala inner objects without reflection, so we provide these convenience vals for use from Java.

  51. object Vertical extends Direction with Product with Serializable

    Permalink
  52. object View extends Serializable

    Permalink
  53. package model

    Permalink

Ungrouped