org.nlogo.api
Interface PrimitiveManager

All Known Implementing Classes:
ExtensionPrimitiveManager

public interface PrimitiveManager

PrimitiveManager ships extension primitives and associated names to NetLogo.


Method Summary
 void addPrimitive(String name, Primitive prim)
          Adds a new primitive.
 boolean autoImportPrimitives()
           
 void autoImportPrimitives(boolean val)
          Should the primitives be automatically imported into the top-level NetLogo namespace.
 

Method Detail

addPrimitive

void addPrimitive(String name,
                  Primitive prim)
Adds a new primitive. The primitive remains effective as long as this model remains loaded.

Parameters:
name - the name of the primitive that will be use in NetLogo code
prim - an instance of Primitive to associate with name

autoImportPrimitives

void autoImportPrimitives(boolean val)
Should the primitives be automatically imported into the top-level NetLogo namespace. If false, they may only be referred to in NetLogo code as "extensionname:primitive". If true, they may also optionally be referred to simply as "primitive". The default is false.


autoImportPrimitives

boolean autoImportPrimitives()