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 / Surf.java
index 8cfbc04..e58ee89 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.
@@ -25,6 +25,10 @@ public class Surf {
     return SurfJNI.getCpuActionDirector(jarg1);
   }
 
+  
+  /**
+    * @return The current simulated time
+    */
   public static double getClock() {
     return SurfJNI.getClock();
   }
@@ -34,9 +38,9 @@ public class Surf {
   }
 
   public static CpuModel getCpuModel() {
-  long cPtr = SurfJNI.getCpuModel();
-  return (CpuModel)Surf.getCpuModelDirector(cPtr);
-}
+    long cPtr = SurfJNI.getCpuModel();
+    return (cPtr == 0) ? null : new CpuModel(cPtr, false);
+  }
 
   public static void setCpuModel(CpuModel cpuModel) {
     SurfJNI.setCpuModel(CpuModel.getCPtr(cpuModel), cpuModel);
@@ -46,8 +50,8 @@ public class Surf {
     SurfJNI.setCpu(name, Cpu.getCPtr(cpu), cpu);
   }
 
-  public static NetworkLink[] getRoute(String srcName, String dstName) {
-     return NetworkLink.cArrayWrap(SurfJNI.getRoute(srcName, dstName), false);
+  public static Link[] getRoute(String srcName, String dstName) {
+     return Link.cArrayWrap(SurfJNI.getRoute(srcName, dstName), false);
 }
 
 }