/*******************************************************************************
* Copyright (c) 2009-2013 CWI
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.rascalmpl.eclipse.library.vis;
//This code was generated by Rascal API gen
import io.usethesource.vallang.IConstructor;
import io.usethesource.vallang.IInteger;
import io.usethesource.vallang.type.Type;
import io.usethesource.vallang.type.TypeFactory;
import io.usethesource.vallang.type.TypeStore;
public class Timer {
public static final TypeStore typestore = new TypeStore();
private static final TypeFactory tf = TypeFactory.getInstance();
public static final Type TimerAction = tf.abstractDataType(typestore, "TimerAction");
public static final Type TimerAction_restart = tf.constructor(typestore,TimerAction,"restart",tf.integerType(),"delay");
public static final Type TimerAction_noChange = tf.constructor(typestore,TimerAction,"noChange");
public static final Type TimerAction_stop = tf.constructor(typestore,TimerAction,"stop");
public static final Type TimerInfo = tf.abstractDataType(typestore, "TimerInfo");
public static final Type TimerInfo_running = tf.constructor(typestore,TimerInfo,"running",tf.integerType(),"timeElapsed");
public static final Type TimerInfo_stopped = tf.constructor(typestore,TimerInfo,"stopped",tf.integerType(),"timeSinceLast");
public static int TimerAction_restart_delay(IConstructor c){
return ((IInteger)c.get(0)).intValue();
}
public static int TimerInfo_running_timeElapsed(IConstructor c){
return ((IInteger)c.get(0)).intValue();
}
public static int TimerInfo_stopped_timeSinceLast(IConstructor c){
return ((IInteger)c.get(0)).intValue();
}
private static final class InstanceHolder {
public final static Timer factory = new Timer();
}
public static Timer getInstance() {
return InstanceHolder.factory;
}
public static TypeStore getStore() {
return typestore;
}
}