
jaitools.jiffle.parser.DirectRuntime.stg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jt-jiffle Show documentation
Show all versions of jt-jiffle Show documentation
Jiffle is a raster algebra language that can be used to
create new images from logical and mathematical expressions involving
source images and user defined variables. It is intended to let users
concentrate on algorithms rather than tedious boiler-plate code.
The newest version!
/*
* Copyright 2011 Michael Bedward
*
* This file is part of jai-tools.
*
* jai-tools is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* jai-tools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with jai-tools. If not, see .
*
*/
group DirectRuntime : Runtime;
/*
* This file contains templates for direct runtime class source code generation.
* It depends on the shared templates in Runtime.stg.
*
* The templates are formatted for the ANTLR StringTemplate libary and are
* called from the source generator class built from the RuntimeSourceCreator.g
* grammar file.
*
* @author Michael Bedward
* @since 1.1
* @version $Id: DirectRuntime.stg 1451 2011-02-24 05:25:37Z michael.bedward $
*/
////////////////////////////////////////////////////////////
// Runtime template.
// This is the root template for source generation.
runtime(pkgname, imports, name, base, opts, fields, eval) ::= <<
package ;
;}; separator="\n">
public class extends {
public void evaluate(int _x, int _y) {
_stk.clear();
}
}
>>
////////////////////////////////////////////////////////////
// Write to destination image
setdestvalue(var, expr) ::= <<
writeToImage("", _x, _y, 0, )
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy