Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
not all resources need a property set, only Host, Link and Storage
[simgrid.git] / src / bindings / java / org / simgrid / surf / CpuModel.java
index b5572a8..4063ee1 100644 (file)
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.11
+ * Version 2.0.12
  *
  * Do not make changes to this file unless you know what you are doing--modify
  * the SWIG interface file instead.
@@ -8,11 +8,6 @@
 
 package org.simgrid.surf;
 
-/**
-  * The generic model for the Cpu component
-  * @see Cpu
-  * @see CpuAction
-  */
 public class CpuModel extends Model {
   private long swigCPtr;
 
@@ -55,35 +50,14 @@ public class CpuModel extends Model {
     SurfJNI.CpuModel_change_ownership(this, swigCPtr, true);
   }
 
-  
-  /**
-    * CpuModel constructon
-    * @param name The name of the cpumodel
-    */
-  public CpuModel(String name) {
-    this(SurfJNI.new_CpuModel(name), true);
+  public CpuModel() {
+    this(SurfJNI.new_CpuModel(), true);
     SurfJNI.CpuModel_director_connect(this, swigCPtr, swigCMemOwn, true);
   }
 
-  
-  /**
-    * Create a new Cpu
-    *
-    * @param name
-    * @param power_peak
-    * @param pstate
-    * @param power_scale
-    * @param power_trace
-    * @param core
-    * @param state_initial
-    * @param state_trace
-    * @param cpu_properties
-    * @return The new Cpu
-    * @see Cpu
-    */
-  public Cpu createCpu(String name, double[] power_peak, int pstate, double power_scale, TmgrTrace power_trace, int core, ResourceState state_initial, TmgrTrace state_trace, XbtDict cpu_properties) {
-  long cPtr = SurfJNI.CpuModel_createCpu(swigCPtr, this, name, power_peak, pstate, power_scale, TmgrTrace.getCPtr(power_trace), power_trace, core, state_initial.swigValue(), TmgrTrace.getCPtr(state_trace), state_trace, XbtDict.getCPtr(cpu_properties), cpu_properties);
-  return (Cpu)Surf.getCpuDirector(cPtr);
-}
+  public Cpu createCpu(String name, double[] power_peak, int pstate, double power_scale, TmgrTrace power_trace, int core, ResourceState state_initial, TmgrTrace state_trace) {
+    long cPtr = SurfJNI.CpuModel_createCpu(swigCPtr, this, name, power_peak, pstate, power_scale, TmgrTrace.getCPtr(power_trace), power_trace, core, state_initial.swigValue(), TmgrTrace.getCPtr(state_trace), state_trace);
+    return (cPtr == 0) ? null : new Cpu(cPtr, false);
+  }
 
 }