1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
9 package org.simgrid.surf;
12 private long swigCPtr;
13 protected boolean swigCMemOwn;
15 protected Action(long cPtr, boolean cMemoryOwn) {
16 swigCMemOwn = cMemoryOwn;
20 protected static long getCPtr(Action obj) {
21 return (obj == null) ? 0 : obj.swigCPtr;
24 protected void finalize() {
28 public synchronized void delete() {
32 SurfJNI.delete_Action(swigCPtr);
38 public Action(Model model, double cost, boolean failed) {
39 this(SurfJNI.new_Action(Model.getCPtr(model), model, cost, failed), true);
42 public Model getModel() {
43 long cPtr = SurfJNI.Action_getModel(swigCPtr, this);
44 return (cPtr == 0) ? null : new Model(cPtr, false);
47 public LmmVariable getVariable() {
48 long cPtr = SurfJNI.Action_getVariable(swigCPtr, this);
49 return (cPtr == 0) ? null : new LmmVariable(cPtr, false);
52 public ActionState getState() {
53 return ActionState.swigToEnum(SurfJNI.Action_getState(swigCPtr, this));
56 public boolean isSuspended() {
57 return SurfJNI.Action_isSuspended(swigCPtr, this);
60 public double getBound() {
61 return SurfJNI.Action_getBound(swigCPtr, this);
64 public void setBound(double bound) {
65 SurfJNI.Action_setBound(swigCPtr, this, bound);
68 public void updateRemains(double delta) {
69 SurfJNI.Action_updateRemains(swigCPtr, this, delta);
72 public double getRemains() {
73 return SurfJNI.Action_getRemains(swigCPtr, this);
76 public void setPriority(double priority) {
77 SurfJNI.Action_setPriority(swigCPtr, this, priority);
80 public void setState(ActionState state) {
81 SurfJNI.Action_setState(swigCPtr, this, state.swigValue());