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 protected static long[] cArrayUnwrap(Action[] arrayWrapper) {
39 long[] cArray = new long[arrayWrapper.length];
40 for (int i=0; i<arrayWrapper.length; i++)
41 cArray[i] = Action.getCPtr(arrayWrapper[i]);
45 protected static Action[] cArrayWrap(long[] cArray, boolean cMemoryOwn) {
46 Action[] arrayWrapper = new Action[cArray.length];
47 for (int i=0; i<cArray.length; i++)
48 arrayWrapper[i] = new Action(cArray[i], cMemoryOwn);
52 public Action(Model model, double cost, boolean failed) {
53 this(SurfJNI.new_Action(Model.getCPtr(model), model, cost, failed), true);
56 public Model getModel() {
57 long cPtr = SurfJNI.Action_getModel(swigCPtr, this);
58 return (cPtr == 0) ? null : new Model(cPtr, false);
61 public LmmVariable getVariable() {
62 long cPtr = SurfJNI.Action_getVariable(swigCPtr, this);
63 return (cPtr == 0) ? null : new LmmVariable(cPtr, false);
66 public ActionState getState() {
67 return ActionState.swigToEnum(SurfJNI.Action_getState(swigCPtr, this));
70 public boolean isSuspended() {
71 return SurfJNI.Action_isSuspended(swigCPtr, this);
74 public double getBound() {
75 return SurfJNI.Action_getBound(swigCPtr, this);
78 public void setBound(double bound) {
79 SurfJNI.Action_setBound(swigCPtr, this, bound);
82 public void updateRemains(double delta) {
83 SurfJNI.Action_updateRemains(swigCPtr, this, delta);
86 public double getRemains() {
87 return SurfJNI.Action_getRemains(swigCPtr, this);
90 public void setPriority(double priority) {
91 SurfJNI.Action_setPriority(swigCPtr, this, priority);
94 public void setState(ActionState state) {
95 SurfJNI.Action_setState(swigCPtr, this, state.swigValue());