Skip to content

Commit

Permalink
Automated update to SWIG generated interface files (#1597)
Browse files Browse the repository at this point in the history
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and HELICS-bot committed Sep 24, 2020
1 parent ec209a7 commit c46ecbf
Show file tree
Hide file tree
Showing 306 changed files with 1,787 additions and 968 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
/**
* structure defining a basic complex type
*/
public class helics_complex {
public class HelicsComplex {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;

protected helics_complex(long cPtr, boolean cMemoryOwn) {
protected HelicsComplex(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}

protected static long getCPtr(helics_complex obj) {
protected static long getCPtr(HelicsComplex obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

Expand All @@ -33,30 +33,30 @@ public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
helicsJNI.delete_helics_complex(swigCPtr);
helicsJNI.delete_HelicsComplex(swigCPtr);
}
swigCPtr = 0;
}
}

public void setReal(double value) {
helicsJNI.helics_complex_real_set(swigCPtr, this, value);
helicsJNI.HelicsComplex_real_set(swigCPtr, this, value);
}

public double getReal() {
return helicsJNI.helics_complex_real_get(swigCPtr, this);
return helicsJNI.HelicsComplex_real_get(swigCPtr, this);
}

public void setImag(double value) {
helicsJNI.helics_complex_imag_set(swigCPtr, this, value);
helicsJNI.HelicsComplex_imag_set(swigCPtr, this, value);
}

public double getImag() {
return helicsJNI.helics_complex_imag_get(swigCPtr, this);
return helicsJNI.HelicsComplex_imag_get(swigCPtr, this);
}

public helics_complex() {
this(helicsJNI.new_helics_complex(), true);
public HelicsComplex() {
this(helicsJNI.new_HelicsComplex(), true);
}

}
81 changes: 76 additions & 5 deletions interfaces/java/interface/helics.java
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,8 @@ public static helics_federate_state helicsFederateGetState(SWIGTYPE_p_void fed)
* <br>
* @return A core object, nullptr if invalid.
*/
public static SWIGTYPE_p_void helicsFederateGetCoreObject(SWIGTYPE_p_void fed) {
long cPtr = helicsJNI.helicsFederateGetCoreObject(SWIGTYPE_p_void.getCPtr(fed));
public static SWIGTYPE_p_void helicsFederateGetCore(SWIGTYPE_p_void fed) {
long cPtr = helicsJNI.helicsFederateGetCore(SWIGTYPE_p_void.getCPtr(fed));
return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
}

Expand Down Expand Up @@ -1333,6 +1333,55 @@ public static void helicsFederateLogLevelMessage(SWIGTYPE_p_void fed, int loglev
helicsJNI.helicsFederateLogLevelMessage(SWIGTYPE_p_void.getCPtr(fed), loglevel, logmessage);
}

/**
* Send a command to another helics object through a federate.<br>
* <br>
* @param fed The federate to send the command through.<br>
* @param target The name of the object to send the command to.<br>
* @param command The command to send.
*/
public static void helicsFederateSendCommand(SWIGTYPE_p_void fed, String target, String command) {
helicsJNI.helicsFederateSendCommand(SWIGTYPE_p_void.getCPtr(fed), target, command);
}

/**
* Get a command sent to the federate.<br>
* <br>
* @param fed The federate to get the command for.<br>
* <br>
* <br>
* @return A string with the command for the federate, if the string is empty no command is available.
*/
public static String helicsFederateGetCommand(SWIGTYPE_p_void fed) {
return helicsJNI.helicsFederateGetCommand(SWIGTYPE_p_void.getCPtr(fed));
}

/**
* Get the source of the most recently retrieved command sent to the federate.<br>
* <br>
* @param fed The federate to get the command for.<br>
* <br>
* <br>
* @return A string with the command for the federate, if the string is empty no command is available.
*/
public static String helicsFederateGetCommandSource(SWIGTYPE_p_void fed) {
return helicsJNI.helicsFederateGetCommandSource(SWIGTYPE_p_void.getCPtr(fed));
}

/**
* Get a command sent to the federate. Blocks until a command is received.<br>
* <br>
* @param fed The federate to get the command for.<br>
* <br>
* <br>
* <br>
* <br>
* @return A string with the command for the federate, if the string is empty no command is available.
*/
public static String helicsFederateWaitCommand(SWIGTYPE_p_void fed) {
return helicsJNI.helicsFederateWaitCommand(SWIGTYPE_p_void.getCPtr(fed));
}

/**
* Set a global value in a core.<br>
* <br>
Expand All @@ -1359,6 +1408,28 @@ public static void helicsBrokerSetGlobal(SWIGTYPE_p_void broker, String valueNam
helicsJNI.helicsBrokerSetGlobal(SWIGTYPE_p_void.getCPtr(broker), valueName, value);
}

/**
* Send a command to another helics object though a core.<br>
* <br>
* @param core The core to send the command through.<br>
* @param target The name of the object to send the command to.<br>
* @param command The command to send.
*/
public static void helicsCoreSendCommand(SWIGTYPE_p_void core, String target, String command) {
helicsJNI.helicsCoreSendCommand(SWIGTYPE_p_void.getCPtr(core), target, command);
}

/**
* Send a command to another helics object through a broker.<br>
* <br>
* <br>
* @param target The name of the object to send the command to.<br>
* @param command The command to send.
*/
public static void helicsBrokerSendCommand(SWIGTYPE_p_void broker, String target, String command) {
helicsJNI.helicsBrokerSendCommand(SWIGTYPE_p_void.getCPtr(broker), target, command);
}

/**
* Set the log file on a core.<br>
* <br>
Expand Down Expand Up @@ -2065,10 +2136,10 @@ public static char helicsInputGetChar(SWIGTYPE_p_void ipt) {
* @param ipt The input to get the data for.<br>
* <br>
* <br>
* @return A helics_complex structure with the value.
* @return A HelicsComplex structure with the value.
*/
public static helics_complex helicsInputGetComplexObject(SWIGTYPE_p_void ipt) {
return new helics_complex(helicsJNI.helicsInputGetComplexObject(SWIGTYPE_p_void.getCPtr(ipt)), true);
public static HelicsComplex helicsInputGetComplexObject(SWIGTYPE_p_void ipt) {
return new HelicsComplex(helicsJNI.helicsInputGetComplexObject(SWIGTYPE_p_void.getCPtr(ipt)), true);
}

/**
Expand Down
20 changes: 13 additions & 7 deletions interfaces/java/interface/helicsJNI.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ public class helicsJNI {
public final static native int helics_true_get();
public final static native int helics_false_get();
public final static native int helics_state_startup_get();
public final static native void helics_complex_real_set(long jarg1, helics_complex jarg1_, double jarg2);
public final static native double helics_complex_real_get(long jarg1, helics_complex jarg1_);
public final static native void helics_complex_imag_set(long jarg1, helics_complex jarg1_, double jarg2);
public final static native double helics_complex_imag_get(long jarg1, helics_complex jarg1_);
public final static native long new_helics_complex();
public final static native void delete_helics_complex(long jarg1);
public final static native void HelicsComplex_real_set(long jarg1, HelicsComplex jarg1_, double jarg2);
public final static native double HelicsComplex_real_get(long jarg1, HelicsComplex jarg1_);
public final static native void HelicsComplex_imag_set(long jarg1, HelicsComplex jarg1_, double jarg2);
public final static native double HelicsComplex_imag_get(long jarg1, HelicsComplex jarg1_);
public final static native long new_HelicsComplex();
public final static native void delete_HelicsComplex(long jarg1);
public final static native String helicsGetVersion();
public final static native String helicsGetBuildFlags();
public final static native String helicsGetCompilerVersion();
Expand Down Expand Up @@ -220,7 +220,7 @@ public class helicsJNI {
public final static native void helicsFederateEnterExecutingModeIterativeAsync(long jarg1, int jarg2);
public final static native int helicsFederateEnterExecutingModeIterativeComplete(long jarg1);
public final static native int helicsFederateGetState(long jarg1);
public final static native long helicsFederateGetCoreObject(long jarg1);
public final static native long helicsFederateGetCore(long jarg1);
public final static native double helicsFederateRequestTime(long jarg1, double jarg2);
public final static native double helicsFederateRequestTimeAdvance(long jarg1, double jarg2);
public final static native double helicsFederateRequestNextStep(long jarg1);
Expand All @@ -246,8 +246,14 @@ public class helicsJNI {
public final static native void helicsFederateLogInfoMessage(long jarg1, String jarg2);
public final static native void helicsFederateLogDebugMessage(long jarg1, String jarg2);
public final static native void helicsFederateLogLevelMessage(long jarg1, int jarg2, String jarg3);
public final static native void helicsFederateSendCommand(long jarg1, String jarg2, String jarg3);
public final static native String helicsFederateGetCommand(long jarg1);
public final static native String helicsFederateGetCommandSource(long jarg1);
public final static native String helicsFederateWaitCommand(long jarg1);
public final static native void helicsCoreSetGlobal(long jarg1, String jarg2, String jarg3);
public final static native void helicsBrokerSetGlobal(long jarg1, String jarg2, String jarg3);
public final static native void helicsCoreSendCommand(long jarg1, String jarg2, String jarg3);
public final static native void helicsBrokerSendCommand(long jarg1, String jarg2, String jarg3);
public final static native void helicsCoreSetLogFile(long jarg1, String jarg2);
public final static native void helicsBrokerSetLogFile(long jarg1, String jarg2);
public final static native void helicsBrokerSetTimeBarrier(long jarg1, double jarg2);
Expand Down

0 comments on commit c46ecbf

Please sign in to comment.