01_user_documentation:07_rgg_xl:02_xl:04_production:08_function
This is an old revision of the document!
Function
It is possible to declare a function that can represent a production element. The function receive implicitly the current producer object and run its declared production rule. The first argument of the function must be of the same type of the implicitly given producer. The method must return void.
Example
import de.grogra.rgg.model.RGGProducer; module A { void doStuff(RGGProducer prod, int aVar, float anotherVar){ prod ==> F(aVar) F(anotherVar) ; // any production statement } } void alsoProd(RGGProducer prod){ prod ==> F Box; } public void run() [ a:A ==> a.doStuff(1,2); Node ==> alsoProd F F; ]
01_user_documentation/07_rgg_xl/02_xl/04_production/08_function.1761124823.txt.gz · Last modified: 2025/10/22 11:20 by gaetan
