2 %module(directors="1") Surf
4 %pragma(java) jniclassimports=%{
5 import org.simgrid.NativeLib;
8 %pragma(java) jniclasscode=%{
10 NativeLib.nativeInit("surf-java");
15 #include "src/surf/cpu_interface.hpp"
16 #include "src/surf/network_interface.hpp"
17 #include "src/bindings/java/surf_swig.hpp"
18 #include "src/xbt/dict_private.h"
19 typedef struct lmm_constraint *lmm_constraint_t;
22 %feature("director") Plugin;
24 %include "src/bindings/java/surf_swig.hpp"
29 const char *getName();
35 const char *getName();
36 virtual bool isUsed()=0;
37 lmm_constraint *getConstraint();
38 s_xbt_dict *getProperties();
41 class Cpu : public Resource {
45 double getCurrentPowerPeak();
48 class NetworkLink : public Resource {
59 class CpuAction : public Action {
62 Cpu *getCpu() {return getActionCpu($self);}
66 %nodefaultctor NetworkAction;
67 class NetworkAction : public Action {
70 double getLatency() {return $self->m_latency;}
75 %rename lmm_constraint LmmConstraint;
76 struct lmm_constraint {
78 double getUsage() {return lmm_constraint_get_usage($self);}
82 %rename s_xbt_dict XbtDict;
85 char *getValue(char *key) {return (char*)xbt_dict_get_or_null($self, key);}