netlogo - Finding "types" (reporter/command, and different contexts) of Procedures -
i trying extract, , sort, list of procedures in model. want procedures can run in observer context, , commands, not reporters. workspaces have .getprocedures():map<string, procedure>
method , accessing procedure objects that.
this leads me 2 related questions: 1. there way me find out if procedure
object reporter or command? netlogo desktop version seems able make distinction, think answer might yes. , 2. there way me find out context of procedure is, i.e. whether patch/turtle/link procedure or observer procedure?
http://ccl.northwestern.edu/netlogo/docs/scaladoc/org/nlogo/nvm/procedure.html shows procedure has syntax method returning api.syntax
object. methods need there, namely ret
(which syntax.voidtype
or syntax.wildcardtype
according whether command or reporter procedure) , agentclassstring
(which might e.g. "otpl").
oh see first constructor parameter procedure type tyype
(the y because type
keyword in scala), first part of question, equally check , see whether command
or reporter
. there isn't reason information redundantly stored.
Comments
Post a Comment