--- /dev/null
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.11
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+package org.simgrid.surf;
+
+public class CpuModel extends Model {
+ private long swigCPtr;
+
+ protected CpuModel(long cPtr, boolean cMemoryOwn) {
+ super(SurfJNI.CpuModel_SWIGUpcast(cPtr), cMemoryOwn);
+ swigCPtr = cPtr;
+ }
+
+ protected static long getCPtr(CpuModel obj) {
+ return (obj == null) ? 0 : obj.swigCPtr;
+ }
+
+ protected void finalize() {
+ delete();
+ }
+
+ public synchronized void delete() {
+ if (swigCPtr != 0) {
+ if (swigCMemOwn) {
+ swigCMemOwn = false;
+ SurfJNI.delete_CpuModel(swigCPtr);
+ }
+ swigCPtr = 0;
+ }
+ super.delete();
+ }
+
+ protected void swigDirectorDisconnect() {
+ swigCMemOwn = false;
+ delete();
+ }
+
+ public void swigReleaseOwnership() {
+ swigCMemOwn = false;
+ SurfJNI.CpuModel_change_ownership(this, swigCPtr, false);
+ }
+
+ public void swigTakeOwnership() {
+ swigCMemOwn = true;
+ SurfJNI.CpuModel_change_ownership(this, swigCPtr, true);
+ }
+
+ public CpuModel(String name) {
+ this(SurfJNI.new_CpuModel(name), true);
+ SurfJNI.CpuModel_director_connect(this, swigCPtr, swigCMemOwn, true);
+ }
+
+ public Cpu createResource(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_createResource(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 void addTraces() {
+ SurfJNI.CpuModel_addTraces(swigCPtr, this);
+ }
+
+}